Files
wysite/output/sourcemaps/hc-pos.sqygj.cn/static/js/chunk-2507ce71.ce5a48d7.js

642 lines
54 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-2507ce71", "chunk-2d0aa9e6"], { "0240": function(e, t, o) {
"use strict";
var n = function() {
var e2 = this, t2 = e2.$createElement, o2 = e2._self._c || t2;
return o2("div", { staticClass: "app-container bgHeight" }, [e2.list ? o2("div", [o2("div", { ref: "box", staticClass: "searchStys transition_dom" }, [o2("el-form", { ref: "query", attrs: { model: e2.query } }, [o2("div", { ref: "form_box", staticClass: "searchBar" }, [o2("div", { staticClass: "searchInput" }, [o2("el-row", { attrs: { gutter: 20 } }, [o2("el-col", { attrs: { span: 6 } }, [o2("el-form-item", { attrs: { prop: "fallout" } }, [o2("el-select", { attrs: { multiple: "", "collapse-tags": "", clearable: "", filterable: "", placeholder: "事故类型/事故后果" }, model: { value: e2.query.fallout, callback: function(t3) {
e2.$set(e2.query, "fallout", t3);
}, expression: "query.fallout" } }, e2._l(e2.taskType2, (function(e3) {
return o2("el-option", { key: e3.value, attrs: { label: e3.label, value: e3.value } });
})), 1)], 1)], 1), e2._v(" "), o2("el-col", { attrs: { span: 6 } }, [o2("el-form-item", { attrs: { prop: "damageType" } }, [o2("el-select", { attrs: { clearable: "", placeholder: "人员伤害类型" }, model: { value: e2.query.damageType, callback: function(t3) {
e2.$set(e2.query, "damageType", t3);
}, expression: "query.damageType" } }, e2._l(e2.degreeList, (function(e3) {
return o2("el-option", { key: e3.value, attrs: { label: e3.label, value: e3.value } });
})), 1)], 1)], 1), e2._v(" "), o2("el-col", { attrs: { span: 6 } }, [o2("el-form-item", { attrs: { prop: "status" } }, [o2("el-select", { attrs: { clearable: "", placeholder: "状态" }, model: { value: e2.query.status, callback: function(t3) {
e2.$set(e2.query, "status", t3);
}, expression: "query.status" } }, [o2("el-option", { attrs: { label: "启用", value: 1 } }), e2._v(" "), o2("el-option", { attrs: { label: "禁用", value: 0 } })], 1)], 1)], 1), e2._v(" "), o2("el-col", { attrs: { span: 6 } }, [o2("el-form-item", { attrs: { prop: "description" } }, [o2("el-select", { attrs: { clearable: "", placeholder: "物业事故等级" }, model: { value: e2.query.level, callback: function(t3) {
e2.$set(e2.query, "level", t3);
}, expression: "query.level" } }, e2._l(e2.hazardLevel, (function(e3) {
return o2("el-option", { key: e3.value, attrs: { label: e3.label, value: e3.value } });
})), 1)], 1)], 1), e2._v(" "), o2("el-col", { attrs: { span: 12 } }, [o2("el-form-item", [o2("el-date-picker", { attrs: { type: "daterange", format: "yyyy-MM-dd", "value-format": "yyyy-MM-dd", "range-separator": "至", "start-placeholder": "开始日期", "end-placeholder": "结束日期" }, model: { value: e2.createTime, callback: function(t3) {
e2.createTime = t3;
}, expression: "createTime" } })], 1)], 1), e2._v(" "), o2("el-col", { attrs: { span: 6 } }, [o2("el-form-item", { attrs: { prop: "description" } }, [o2("el-input", { attrs: { placeholder: "简述", clearable: "" }, model: { value: e2.query.description, callback: function(t3) {
e2.$set(e2.query, "description", t3);
}, expression: "query.description" } })], 1)], 1)], 1)], 1), e2._v(" "), o2("div", { staticClass: "searchBtn" }, [o2("el-form-item", [o2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], on: { click: function(t3) {
return e2.resetFormQuery("query");
} } }, [e2._v("重置")]), e2._v(" "), o2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { type: "primary" }, on: { click: e2.onSearch } }, [e2._v("查询")]), e2._v(" "), e2.is_show || "80px" == e2.height ? e2._e() : o2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { type: "text" }, on: { click: e2.upAndDown } }, [e2._v("展开"), o2("i", { staticClass: "el-icon-arrow-down" })]), e2._v(" "), e2.is_show && "80px" != e2.height ? o2("el-button", { directives: [{ name: "points", rawName: "v-points", value: 500, expression: "500" }], attrs: { type: "text" }, on: { click: e2.upAndDown } }, [e2._v("收起"), o2("i", { staticClass: "el-icon-arrow-up" })]) : e2._e()], 1)], 1)])])], 1), e2._v(" "), o2("el-card", { staticClass: "box-card", attrs: { shadow: "never" } }, [o2("div", { staticClass: "planLst", attrs: { slot: "header" }, slot: "header" }, [o2("span", { staticClass: "planTitle" }, [e2._v(e2._s(e2.commonInfo[1]))]), e2._v(" "), "case" == e2.type ? o2("el-button", { attrs: { type: "primary", plain: "", loading: e2.syncLoad }, on: { click: e2.cloudUpload } }, [e2._v("云下载")]) : e2._e(), e2._v(" "), o2("el-button", { attrs: { type: "primary" }, on: { click: e2.addClick } }, [e2._v("添加")])], 1), e2._v(" "), o2("el-table", { directives: [{ name: "loading", rawName: "v-loading", value: e2.listLoading, expression: "listLoading" }], ref: "receivableTable", attrs: { border: "", data: e2.listData, "header-cell-style": e2.headClass } }, [o2("el-table-column", { attrs: { align: "center", label: e2.commonInfo[2], "min-width": "150", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(t3.row.occurrenceTime || "-") + "\n ")];
} }], null, false, 3117576306) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: "事故类型/事故后果", "min-width": "150", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(e2.filterFallout(t3.row.fallout)) + "\n ")];
} }], null, false, 1917378044) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: "简述", "min-width": "180", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(t3.row.description) + "\n ")];
} }], null, false, 2896220923) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: "人员伤害", "min-width": "80", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(e2._f("getItemType")(t3.row.damageType, e2.degreeList)) + "\n ")];
} }], null, false, 2645313014) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: "事故等级", "min-width": "80", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(e2._f("getItemType")(t3.row.level, e2.hazardLevel)) + "\n ")];
} }], null, false, 1122097911) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: "财务损失(元)", "min-width": "90", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [o2("div", { staticStyle: { "text-align": "right" } }, [e2._v("\n " + e2._s(e2._f("formatMoney")(t3.row.propertyLoss)) + "\n ")])];
} }], null, false, 1114912353) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: "环境影响", "min-width": "150", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(e2._f("getItemType")(t3.row.environmentalImpact, e2.SeIAList)) + "\n ")];
} }], null, false, 630377077) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: e2.commonInfo[3], "min-width": "70", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return ["" == t3.row.fileUrl ? o2("span", [e2._v("-")]) : o2("div", [o2("el-popover", { attrs: { placement: "right", width: "400", trigger: "click" } }, [e2._l(e2.fileData(t3.row.fileUrl), (function(t4, n2) {
return o2("div", { key: n2 }, [o2("div", { staticClass: "download-style" }, [o2("span", [e2._v(e2._s(t4.name))]), e2._v(" "), o2("i", { staticClass: "el-icon-download", on: { click: function(o3) {
return e2.downloadItem(t4);
} } })])]);
})), e2._v(" "), o2("el-button", { attrs: { slot: "reference", type: "text" }, slot: "reference" }, [e2._v("下载")])], 2)], 1)];
} }], null, false, 3670453676) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: "状态", "min-width": "70", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [1 == t3.row.status ? o2("el-tag", { attrs: { type: "success" } }, [e2._v("已启用")]) : e2._e(), e2._v(" "), 0 == t3.row.status ? o2("el-tag", { attrs: { type: "info" } }, [e2._v("已禁用")]) : e2._e()];
} }], null, false, 1269940178) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: "提交人", "min-width": "90", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(t3.row.creatorName) + "\n ")];
} }], null, false, 3448814470) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: "提交时间", "min-width": "150", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(t3.row.createTime) + "\n ")];
} }], null, false, 3546623148) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: "操作", "min-width": "110", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [o2("el-button", { attrs: { type: "text" }, on: { click: function(o3) {
return e2.accidentEidt(t3.row);
} } }, [e2._v("编辑")]), e2._v(" "), 0 == t3.row.status ? o2("el-button", { staticStyle: { color: "#67c23a" }, attrs: { type: "text" }, on: { click: function(o3) {
return e2.accidentStr(t3.row);
} } }, [e2._v("启用")]) : e2._e(), e2._v(" "), 1 == t3.row.status ? o2("el-button", { staticStyle: { color: "#e6a23c" }, attrs: { type: "text" }, on: { click: function(o3) {
return e2.accidentEnd(t3.row);
} } }, [e2._v("禁用")]) : e2._e(), e2._v(" "), 0 == t3.row.status ? o2("el-button", { staticStyle: { color: "#f56c6c" }, attrs: { type: "text" }, on: { click: function(o3) {
return e2.accidentDelete(t3.row);
} } }, [e2._v("删除")]) : e2._e()];
} }], null, false, 380741602) })], 1), e2._v(" "), o2("div", { staticClass: "paginations" }, [o2("el-pagination", { attrs: { background: "", "current-page": e2.query.pageNumber, "page-sizes": [10, 30, 50], "page-size": e2.query.pageSize, layout: "total, sizes, prev, pager, next, jumper", total: e2.total }, on: { "update:currentPage": function(t3) {
return e2.$set(e2.query, "pageNumber", t3);
}, "update:current-page": function(t3) {
return e2.$set(e2.query, "pageNumber", t3);
}, "size-change": e2.handleSizeChange, "current-change": e2.handleCurrentChange } })], 1)], 1)], 1) : e2._e(), e2._v(" "), o2("editAccident", { ref: "editAccident", attrs: { show: e2.add }, on: { callback: e2.getListData, close: e2.addClose } })], 1);
}, a = [], r = o("dcf1"), i = o("dce5"), l = function() {
var e2 = this, t2 = e2.$createElement, o2 = e2._self._c || t2;
return e2.show ? o2("div", { staticClass: "edit-accident-main" }, [o2("el-card", { staticClass: "box-card" }, [o2("el-page-header", { attrs: { content: e2.commonInfo[4] }, on: { back: e2.goBack } })], 1), e2._v(" "), o2("el-card", { staticClass: "box-card" }, [o2("h3", [e2._v("基本信息")]), e2._v(" "), o2("el-form", { ref: "addForm", staticClass: "demo-ruleForm", attrs: { model: e2.addForm, "label-width": "180px" } }, [o2("el-row", { attrs: { gutter: 20 } }, [o2("el-col", { attrs: { span: 12 } }, [o2("el-form-item", { attrs: { label: e2.commonInfo[1], prop: "occurrenceTime", rules: { required: true, message: "请选择时间", trigger: "change" } } }, [o2("el-date-picker", { attrs: { format: "yyyy-MM-dd HH:mm:ss", "value-format": "yyyy-MM-dd HH:mm:ss", "default-time": "09:00:00", type: "datetime", placeholder: "选择日期时间" }, model: { value: e2.addForm.occurrenceTime, callback: function(t3) {
e2.$set(e2.addForm, "occurrenceTime", t3);
}, expression: "addForm.occurrenceTime" } })], 1)], 1), e2._v(" "), o2("el-col", { attrs: { span: 12 } }, [o2("el-form-item", { attrs: { label: "事故类型/事故后果", prop: "fallout", rules: { required: true, message: "请选择事故类型/事故后果", trigger: "change" } } }, [o2("el-select", { attrs: { "collapse-tags": "", multiple: "", clearable: "", filterable: "", placeholder: "事故类型/事故后果" }, model: { value: e2.addForm.fallout, callback: function(t3) {
e2.$set(e2.addForm, "fallout", t3);
}, expression: "addForm.fallout" } }, e2._l(e2.taskType2, (function(e3) {
return o2("el-option", { key: e3.value, attrs: { label: e3.label, value: e3.value } });
})), 1)], 1)], 1), e2._v(" "), o2("el-col", { attrs: { span: 12 } }, [o2("el-form-item", { attrs: { label: e2.commonInfo[2], prop: "description", rules: { required: true, message: "请填写简述", trigger: "blur" } } }, [o2("el-input", { attrs: { maxlength: "12", "show-word-limit": "" }, model: { value: e2.addForm.description, callback: function(t3) {
e2.$set(e2.addForm, "description", t3);
}, expression: "addForm.description" } })], 1)], 1), e2._v(" "), o2("el-col", { attrs: { span: 12 } }, [o2("el-form-item", { attrs: { label: "人员伤害", prop: "damageType" } }, [o2("el-select", { attrs: { clearable: "", placeholder: "人员伤害类型" }, model: { value: e2.addForm.damageType, callback: function(t3) {
e2.$set(e2.addForm, "damageType", t3);
}, expression: "addForm.damageType" } }, e2._l(e2.degreeList, (function(e3) {
return o2("el-option", { key: e3.value, attrs: { label: e3.label, value: e3.value } });
})), 1)], 1)], 1), e2._v(" "), o2("el-col", { attrs: { span: 12 } }, [o2("el-form-item", { attrs: { label: "财务损失(元)", prop: "propertyLoss" } }, [o2("el-input-number", { attrs: { "controls-position": "right", min: 0, precision: 2 }, on: { change: e2.propertyLossChange }, model: { value: e2.addForm.propertyLoss, callback: function(t3) {
e2.$set(e2.addForm, "propertyLoss", t3);
}, expression: "addForm.propertyLoss" } }), e2._v(" "), o2("el-tooltip", { staticClass: "item", attrs: { effect: "dark", placement: "top" } }, [o2("div", { attrs: { slot: "content" }, slot: "content" }, [o2("el-image", { attrs: { src: "http://sqy-oss-test.oss-cn-guangzhou.aliyuncs.com/candidateFile_list/20250716/candidate_fileList1752647995208_3cb4b5d6.png" } })], 1), e2._v(" "), o2("i", { staticClass: "el-icon-question" })])], 1)], 1), e2._v(" "), o2("el-col", { attrs: { span: 12 } }, [o2("el-form-item", { attrs: { label: "环境影响", prop: "environmentalImpact" } }, [o2("el-select", { attrs: { disabled: true }, model: { value: e2.addForm.environmentalImpact, callback: function(t3) {
e2.$set(e2.addForm, "environmentalImpact", t3);
}, expression: "addForm.environmentalImpact" } }, e2._l(e2.SeIAList, (function(e3, t3) {
return o2("el-option", { key: t3, attrs: { label: e3.label, value: e3.value } });
})), 1)], 1)], 1), e2._v(" "), o2("el-col", { attrs: { span: 12 } }, [o2("el-form-item", { attrs: { label: "状态", prop: "status" } }, [o2("el-switch", { attrs: { "active-value": 1, "inactive-value": 0 }, model: { value: e2.addForm.status, callback: function(t3) {
e2.$set(e2.addForm, "status", t3);
}, expression: "addForm.status" } })], 1)], 1), e2._v(" "), o2("el-col", { attrs: { span: 12 } }, [o2("el-form-item", { attrs: { label: "物业事故等级", prop: "level", rules: { required: true, message: "请选择物业事故等级", trigger: "change" } } }, [o2("el-select", { attrs: { disabled: true, placeholder: "物业事故等级" }, model: { value: e2.addForm.level, callback: function(t3) {
e2.$set(e2.addForm, "level", t3);
}, expression: "addForm.level" } }, e2._l(e2.hazardLevel, (function(e3) {
return o2("el-option", { key: e3.value, attrs: { label: e3.label, value: e3.value } });
})), 1)], 1)], 1), e2._v(" "), o2("el-col", { attrs: { span: 12 } }, [o2("el-form-item", { attrs: { label: e2.commonInfo[3] } }, [o2("el-upload", { ref: "uploadFile", staticClass: "upload-demo", attrs: { action: "", accept: ".pdf,.doc,.docx,.xls,.xlsx,.txt,.png,.jpg,.jpeg,.bmp", "on-exceed": e2.exceedUpload, "before-upload": e2.beforeUpload, "http-request": e2.uploadRequest, "on-success": e2.uploadSuccess, "on-remove": e2.uploadRemove, multiple: "", limit: 10, "file-list": e2.fileList } }, [o2("el-button", { attrs: { size: "small", type: "primary" } }, [e2._v("点击上传")]), e2._v(" "), o2("div", { staticClass: "el-upload__tip", attrs: { slot: "tip" }, slot: "tip" }, [e2._v("\n 只能上传图片和文档图片不超过2M文档不超过10M\n ")])], 1)], 1)], 1)], 1), e2._v(" "), "添加历史事故" == this.commonInfo[4] ? o2("div", { staticClass: "btn-box" }, [o2("el-button", { attrs: { type: "primary" }, on: { click: e2.addHistoryData } }, [e2._v("保存")])], 1) : o2("div", { staticClass: "btn-box" }, [e2.commonInfo[4].includes("添加") ? o2("el-button", { attrs: { type: "primary" }, on: { click: e2.submitData } }, [e2._v("确定")]) : e2._e(), e2._v(" "), e2.commonInfo[4].includes("编辑") ? o2("el-button", { attrs: { type: "primary" }, on: { click: e2.saveData } }, [e2._v("保存")]) : e2._e(), e2._v(" "), o2("el-button", { on: { click: e2.goBack } }, [e2._v("返回")])], 1)], 1)], 1), e2._v(" "), "accident" == e2.type ? o2("el-card", [o2("div", { staticClass: "people-box" }, [o2("h3", [e2._v("关联工伤人员")]), e2._v(" "), o2("el-button", { attrs: { type: "primary" }, on: { click: e2.addPeople } }, [e2._v("添加")])], 1), e2._v(" "), o2("el-table", { ref: "receivableTable", attrs: { border: "", data: e2.listData, "header-cell-style": e2.headClass } }, [o2("el-table-column", { attrs: { label: "#", align: "center", fixed: "", width: "70" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v(e2._s(t3.$index + (e2.query.pageNumber - 1) * e2.query.pageSize + 1))];
} }], null, false, 3355511203) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: "身份", "min-width": "100", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(e2._f("getItemType")(t3.row.type, e2.occupationalInjury)) + "\n ")];
} }], null, false, 2548941922) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: "姓名", "min-width": "80", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(t3.row.memberName) + "\n ")];
} }], null, false, 3707849802) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: "证件类型", "min-width": "180", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(e2._f("getItemType")(t3.row.certificateType, e2.certificateType)) + "\n ")];
} }], null, false, 50670739) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: "证件号", "min-width": "80", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(t3.row.certificateNo) + "\n ")];
} }], null, false, 3262576137) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: "申报保险", "min-width": "90", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(e2._f("getItemType")(t3.row.insurance, e2.insuranceType)) + "\n ")];
} }], null, false, 755767083) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: "保险赔偿金额", "min-width": "80", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(e2._f("formatMoney")(t3.row.indemnityAmount)) + "\n ")];
} }], null, false, 1941891834) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: "赔偿人员金额", "min-width": "80", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(e2._f("formatMoney")(t3.row.compensationAmount)) + "\n ")];
} }], null, false, 4269801967) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: "操作人", "min-width": "80", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(t3.row.operationBy || "-") + "\n ")];
} }], null, false, 3261982) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: "操作时间", "min-width": "100", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [e2._v("\n " + e2._s(t3.row.operationTime || "-") + "\n ")];
} }], null, false, 1469595056) }), e2._v(" "), o2("el-table-column", { attrs: { align: "center", label: "操作", width: "110", "show-overflow-tooltip": "" }, scopedSlots: e2._u([{ key: "default", fn: function(t3) {
return [o2("el-button", { attrs: { type: "text" }, on: { click: function(o3) {
return e2.accidentEidt(t3.row);
} } }, [e2._v("编辑")]), e2._v(" "), o2("el-button", { staticStyle: { color: "#f56c6c" }, attrs: { type: "text" }, on: { click: function(o3) {
return e2.accidentDelete(t3.row);
} } }, [e2._v("删除")])];
} }], null, false, 2756344702) })], 1), e2._v(" "), o2("el-dialog", { staticClass: "people-dialog", attrs: { title: e2.title, visible: e2.addPeopleShow, "show-close": true, "close-on-press-escape": false, "close-on-click-modal": false, width: "30%" }, on: { close: e2.cancel } }, [o2("el-form", { ref: "peopleForm", attrs: { "label-width": "140px", model: e2.peopleForm, rules: e2.peopleFormRules } }, [o2("el-form-item", { attrs: { label: "身份", prop: "type" } }, [o2("el-select", { attrs: { placeholder: "请选择身份" }, on: { change: e2.typeChange }, model: { value: e2.peopleForm.type, callback: function(t3) {
e2.$set(e2.peopleForm, "type", t3);
}, expression: "peopleForm.type" } }, e2._l(e2.occupationalInjury, (function(e3, t3) {
return o2("el-option", { key: t3, attrs: { label: e3.label, value: e3.value } });
})), 1)], 1), e2._v(" "), 1 == e2.peopleForm.type ? o2("el-form-item", { attrs: { label: "姓名", prop: "memberId" } }, [o2("el-select", { attrs: { filterable: "" }, on: { change: e2.changeMember }, model: { value: e2.peopleForm.memberId, callback: function(t3) {
e2.$set(e2.peopleForm, "memberId", t3);
}, expression: "peopleForm.memberId" } }, e2._l(e2.engineerList, (function(e3, t3) {
return o2("el-option", { key: t3, attrs: { label: e3.name, value: e3.id } });
})), 1)], 1) : e2._e(), e2._v(" "), 2 == e2.peopleForm.type ? o2("el-form-item", { attrs: { label: "姓名", prop: "memberName" } }, [o2("el-input", { attrs: { placeholder: "请输入姓名" }, model: { value: e2.peopleForm.memberName, callback: function(t3) {
e2.$set(e2.peopleForm, "memberName", t3);
}, expression: "peopleForm.memberName" } })], 1) : e2._e(), e2._v(" "), o2("el-form-item", { attrs: { label: "证件类型", prop: "certificateType" } }, [o2("el-select", { attrs: { disabled: 1 == e2.peopleForm.type, placeholder: "请选择证件类型" }, model: { value: e2.peopleForm.certificateType, callback: function(t3) {
e2.$set(e2.peopleForm, "certificateType", t3);
}, expression: "peopleForm.certificateType" } }, e2._l(e2.certificateType, (function(e3, t3) {
return o2("el-option", { key: t3, attrs: { label: e3.label, value: e3.value } });
})), 1)], 1), e2._v(" "), o2("el-form-item", { attrs: { label: "证件号", prop: "certificateNo" } }, [o2("el-input", { attrs: { disabled: 1 == e2.peopleForm.type, placeholder: "请输入证件号" }, model: { value: e2.peopleForm.certificateNo, callback: function(t3) {
e2.$set(e2.peopleForm, "certificateNo", t3);
}, expression: "peopleForm.certificateNo" } })], 1), e2._v(" "), 2 == e2.peopleForm.type ? o2("el-form-item", { attrs: { label: "申报保险", prop: "insurance" } }, [o2("el-select", { attrs: { clearable: "", placeholder: "请选择保险" }, model: { value: e2.peopleForm.insurance, callback: function(t3) {
e2.$set(e2.peopleForm, "insurance", t3);
}, expression: "peopleForm.insurance" } }, e2._l(e2.insuranceType, (function(e3, t3) {
return o2("el-option", { key: t3, attrs: { label: e3.label, value: e3.value } });
})), 1)], 1) : e2._e(), e2._v(" "), 1 == e2.peopleForm.type ? o2("el-form-item", { attrs: { label: "申报保险", prop: "insurance" } }, [o2("el-select", { attrs: { clearable: "", placeholder: "请选择保险" }, model: { value: e2.peopleForm.insurance, callback: function(t3) {
e2.$set(e2.peopleForm, "insurance", t3);
}, expression: "peopleForm.insurance" } }, e2._l(e2.insuranceType2, (function(e3, t3) {
return o2("el-option", { key: t3, attrs: { label: e3.label, value: e3.value } });
})), 1)], 1) : e2._e(), e2._v(" "), 1 == e2.peopleForm.type || 2 == e2.peopleForm.type ? o2("el-form-item", { attrs: { label: "保险赔偿金额(元)", prop: "indemnityAmount" } }, [o2("el-input-number", { attrs: { "controls-position": "right", min: 0, precision: 2 }, model: { value: e2.peopleForm.indemnityAmount, callback: function(t3) {
e2.$set(e2.peopleForm, "indemnityAmount", t3);
}, expression: "peopleForm.indemnityAmount" } })], 1) : e2._e(), e2._v(" "), 1 == e2.peopleForm.type || 2 == e2.peopleForm.type ? o2("el-form-item", { attrs: { label: "赔偿人员金额(元)", prop: "compensationAmount" } }, [o2("el-input-number", { attrs: { "controls-position": "right", min: 0, precision: 2 }, model: { value: e2.peopleForm.compensationAmount, callback: function(t3) {
e2.$set(e2.peopleForm, "compensationAmount", t3);
}, expression: "peopleForm.compensationAmount" } })], 1) : e2._e(), e2._v(" "), o2("el-form-item", [o2("el-button", { on: { click: e2.cancel } }, [e2._v("取消")]), e2._v(" "), "添加" == e2.title ? o2("el-button", { attrs: { type: "primary" }, on: { click: e2.submitForm } }, [e2._v("确定")]) : e2._e(), e2._v(" "), "编辑" == e2.title ? o2("el-button", { attrs: { type: "primary" }, on: { click: e2.update } }, [e2._v("保存")]) : e2._e()], 1)], 1)], 1), e2._v(" "), o2("div", { staticClass: "paginations" }, [o2("el-pagination", { attrs: { background: "", "current-page": e2.query.pageNumber, "page-sizes": [10, 30, 50], "page-size": e2.query.pageSize, layout: "total, sizes, prev, pager, next, jumper", total: e2.total }, on: { "update:currentPage": function(t3) {
return e2.$set(e2.query, "pageNumber", t3);
}, "update:current-page": function(t3) {
return e2.$set(e2.query, "pageNumber", t3);
}, "size-change": e2.handleSizeChange, "current-change": e2.handleCurrentChange } })], 1), e2._v(" "), e2.historyShow ? o2("div", { staticClass: "btn-box" }, [e2.commonInfo[4].includes("添加") ? o2("el-button", { attrs: { type: "primary" }, on: { click: e2.submitData } }, [e2._v("确定")]) : e2._e(), e2._v(" "), e2.commonInfo[4].includes("编辑") ? o2("el-button", { attrs: { type: "primary" }, on: { click: e2.saveData } }, [e2._v("保存")]) : e2._e(), e2._v(" "), o2("el-button", { on: { click: e2.goBack } }, [e2._v("返回")])], 1) : e2._e()], 1) : e2._e()], 1) : e2._e();
}, s = [], c = o("e10e"), u = (o("127f"), o("b562"));
function d(e2) {
return d = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e3) {
return typeof e3;
} : function(e3) {
return e3 && "function" == typeof Symbol && e3.constructor === Symbol && e3 !== Symbol.prototype ? "symbol" : typeof e3;
}, d(e2);
}
function p() {
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
var e2, t2, o2 = "function" == typeof Symbol ? Symbol : {}, n2 = o2.iterator || "@@iterator", a2 = o2.toStringTag || "@@toStringTag";
function r2(o3, n3, a3, r3) {
var s3 = n3 && n3.prototype instanceof l2 ? n3 : l2, c3 = Object.create(s3.prototype);
return m(c3, "_invoke", (function(o4, n4, a4) {
var r4, l3, s4, c4 = 0, u3 = a4 || [], d3 = false, p2 = { p: 0, n: 0, v: e2, a: m2, f: m2.bind(e2, 4), d: function(t3, o5) {
return r4 = t3, l3 = 0, s4 = e2, p2.n = o5, i2;
} };
function m2(o5, n5) {
for (l3 = o5, s4 = n5, t2 = 0; !d3 && c4 && !a5 && t2 < u3.length; t2++) {
var a5, r5 = u3[t2], m3 = p2.p, f3 = r5[2];
o5 > 3 ? (a5 = f3 === n5) && (s4 = r5[(l3 = r5[4]) ? 5 : (l3 = 3, 3)], r5[4] = r5[5] = e2) : r5[0] <= m3 && ((a5 = o5 < 2 && m3 < r5[1]) ? (l3 = 0, p2.v = n5, p2.n = r5[1]) : m3 < f3 && (a5 = o5 < 3 || r5[0] > n5 || n5 > f3) && (r5[4] = o5, r5[5] = n5, p2.n = f3, l3 = 0));
}
if (a5 || o5 > 1) return i2;
throw d3 = true, n5;
}
return function(a5, u4, f3) {
if (c4 > 1) throw TypeError("Generator is already running");
for (d3 && 1 === u4 && m2(u4, f3), l3 = u4, s4 = f3; (t2 = l3 < 2 ? e2 : s4) || !d3; ) {
r4 || (l3 ? l3 < 3 ? (l3 > 1 && (p2.n = -1), m2(l3, s4)) : p2.n = s4 : p2.v = s4);
try {
if (c4 = 2, r4) {
if (l3 || (a5 = "next"), t2 = r4[a5]) {
if (!(t2 = t2.call(r4, s4))) throw TypeError("iterator result is not an object");
if (!t2.done) return t2;
s4 = t2.value, l3 < 2 && (l3 = 0);
} else 1 === l3 && (t2 = r4.return) && t2.call(r4), l3 < 2 && (s4 = TypeError("The iterator does not provide a '" + a5 + "' method"), l3 = 1);
r4 = e2;
} else if ((t2 = (d3 = p2.n < 0) ? s4 : o4.call(n4, p2)) !== i2) break;
} catch (t3) {
r4 = e2, l3 = 1, s4 = t3;
} finally {
c4 = 1;
}
}
return { value: t2, done: d3 };
};
})(o3, a3, r3), true), c3;
}
var i2 = {};
function l2() {
}
function s2() {
}
function c2() {
}
t2 = Object.getPrototypeOf;
var u2 = [][n2] ? t2(t2([][n2]())) : (m(t2 = {}, n2, (function() {
return this;
})), t2), d2 = c2.prototype = l2.prototype = Object.create(u2);
function f2(e3) {
return Object.setPrototypeOf ? Object.setPrototypeOf(e3, c2) : (e3.__proto__ = c2, m(e3, a2, "GeneratorFunction")), e3.prototype = Object.create(d2), e3;
}
return s2.prototype = c2, m(d2, "constructor", c2), m(c2, "constructor", s2), s2.displayName = "GeneratorFunction", m(c2, a2, "GeneratorFunction"), m(d2), m(d2, a2, "Generator"), m(d2, n2, (function() {
return this;
})), m(d2, "toString", (function() {
return "[object Generator]";
})), (p = function() {
return { w: r2, m: f2 };
})();
}
function m(e2, t2, o2, n2) {
var a2 = Object.defineProperty;
try {
a2({}, "", {});
} catch (e3) {
a2 = 0;
}
m = function(e3, t3, o3, n3) {
function r2(t4, o4) {
m(e3, t4, (function(e4) {
return this._invoke(t4, o4, e4);
}));
}
t3 ? a2 ? a2(e3, t3, { value: o3, enumerable: !n3, configurable: !n3, writable: !n3 }) : e3[t3] = o3 : (r2("next", 0), r2("throw", 1), r2("return", 2));
}, m(e2, t2, o2, n2);
}
function f(e2, t2, o2, n2, a2, r2, i2) {
try {
var l2 = e2[r2](i2), s2 = l2.value;
} catch (e3) {
return void o2(e3);
}
l2.done ? t2(s2) : Promise.resolve(s2).then(n2, a2);
}
function h(e2) {
return function() {
var t2 = this, o2 = arguments;
return new Promise((function(n2, a2) {
var r2 = e2.apply(t2, o2);
function i2(e3) {
f(r2, n2, a2, i2, l2, "next", e3);
}
function l2(e3) {
f(r2, n2, a2, i2, l2, "throw", e3);
}
i2(void 0);
}));
};
}
function v(e2, t2, o2) {
return (t2 = y(t2)) in e2 ? Object.defineProperty(e2, t2, { value: o2, enumerable: true, configurable: true, writable: true }) : e2[t2] = o2, e2;
}
function y(e2) {
var t2 = b(e2, "string");
return "symbol" == d(t2) ? t2 : t2 + "";
}
function b(e2, t2) {
if ("object" != d(e2) || !e2) return e2;
var o2 = e2[Symbol.toPrimitive];
if (void 0 !== o2) {
var n2 = o2.call(e2, t2 || "default");
if ("object" != d(n2)) return n2;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return ("string" === t2 ? String : Number)(e2);
}
var g = { props: ["show"], data: function() {
return { certificateType: i["A"], insuranceType: i["ib"], occupationalInjury: i["wb"], hazardLevel: i["cb"], SeIAList: i["c"], type: "", commonInfo: {}, taskType2: i["sc"], degreeList: i["L"], addForm: { occurrenceTime: "", fallout: [], description: "", damageType: "", propertyLoss: "", environmentalImpact: 1, status: 1, level: 1 }, fileList: [], uploadFileList: [], listData: [], query: { pageNumber: 1, pageSize: 10, projectUuid: this.$store.state.community_uuid }, total: 0, addPeopleShow: false, peopleForm: v(v(v({ accidentId: "", certificateNo: "", certificateType: "", allowEmptyValue: "", insurance: "", memberId: "", memberName: "", type: "" }, "accidentId", ""), "indemnityAmount", ""), "compensationAmount", ""), peopleFormRules: { type: [{ required: true, message: "请选择身份", trigger: "change" }], memberId: [{ required: true, message: "请选择员工", trigger: "change" }], memberName: [{ required: true, message: "请输入姓名", trigger: "blur" }], certificateType: [{ required: true, message: "请选择证件类型", trigger: "change" }], certificateNo: [{ required: true, message: "请输入证件号", trigger: "blur" }] }, engineerList: [], insuranceType2: [], filterList: [{ name: "医疗保险", value: "medical", index: 1 }, { name: "失业保险", value: "unemployment", index: 2 }, { name: "生育保险", value: "maternity", index: 3 }, { name: "工伤保险", value: "workInjury", index: 4 }, { name: "养老保险", value: "endowment", index: 5 }, { name: "特定人员工伤保险", value: "specificWorkInjury", index: 6 }, { name: "雇主责任险", value: "employerLiability", index: 7 }], title: "添加", historyShow: false };
}, mounted: function() {
}, methods: { propertyLossChange: function(e2) {
e2 >= 0 && e2 < 2e3 ? (this.addForm.level = 3, this.addForm.environmentalImpact = 1) : e2 >= 2e3 && e2 < 1e4 ? (this.addForm.level = 5, this.addForm.environmentalImpact = 2) : e2 >= 1e4 && e2 < 4e4 ? (this.addForm.level = 6, this.addForm.environmentalImpact = 3) : e2 >= 4e4 && e2 < 1e6 ? (this.addForm.level = 8, this.addForm.environmentalImpact = 4) : e2 >= 1e6 && (this.addForm.level = 9, this.addForm.environmentalImpact = 5);
}, update: function() {
var e2 = this;
this.$refs.peopleForm.validate((function(t2) {
t2 && (e2.peopleForm.operationById = e2.$store.state.user.userInfo.memberId, e2.peopleForm.operationBy = e2.$store.state.user.userInfo.memberName, Object(r["d"])(e2.peopleForm).then((function(t3) {
0 == t3.code && (e2.$message.success("更新成功"), e2.$refs.peopleForm.resetFields(), e2.getListData(e2.addForm.id), e2.addPeopleShow = false);
})));
}));
}, submitForm: function() {
var e2 = this;
this.$refs.peopleForm.validate((function(t2) {
t2 && (e2.peopleForm.operationById = e2.$store.state.user.userInfo.memberId, e2.peopleForm.operationBy = e2.$store.state.user.userInfo.memberName, Object(r["a"])(e2.peopleForm).then((function(t3) {
0 == t3.code && (e2.$message.success("添加成功"), e2.$refs.peopleForm.resetFields(), e2.getListData(e2.addForm.id), e2.addPeopleShow = false);
})));
}));
}, getEngineer: function() {
var e2 = this, t2 = { id: this.$store.state.id };
Object(c["m"])(t2).then((function(t3) {
e2.engineerList = t3.data;
}));
}, typeChange: function(e2) {
}, changeMember: function(e2) {
var t2 = this;
this.insuranceType2 = [];
var o2 = this.engineerList.find((function(t3) {
return t3.id == e2;
}));
if (this.peopleForm.memberName = o2.name, this.peopleForm.certificateType = o2.certificateType, this.peopleForm.certificateNo = o2.idNumber, o2.memberSocialSecurityRespDTO) {
var n2 = function(e3) {
if (4 == o2.memberSocialSecurityRespDTO[e3] || 2 == o2.memberSocialSecurityRespDTO[e3]) {
var n3 = t2.filterList.find((function(t3) {
return t3.value == e3;
}));
"housingFund" !== e3 && t2.insuranceType2.push({ label: n3.name, value: n3.index });
}
};
for (var a2 in o2.memberSocialSecurityRespDTO) n2(a2);
} else console.log("我是空保险");
}, filterUserList: function(e2) {
var t2 = this;
this.insuranceType2 = [];
var o2 = this.engineerList.find((function(t3) {
return t3.id == e2;
}));
if (console.log(o2, "data"), o2.memberSocialSecurityRespDTO) {
var n2 = function(e3) {
if (console.log(o2.memberSocialSecurityRespDTO, "key"), 4 == o2.memberSocialSecurityRespDTO[e3] || 2 == o2.memberSocialSecurityRespDTO[e3]) {
var n3 = t2.filterList.find((function(t3) {
return t3.value == e3;
}));
"housingFund" !== e3 && t2.insuranceType2.push({ label: n3.name, value: n3.index });
}
};
for (var a2 in o2.memberSocialSecurityRespDTO) n2(a2);
}
}, addPeople: function() {
var e2 = this;
this.title = "添加", this.addForm.id ? (this.peopleForm.accidentId = this.addForm.id, this.peopleForm.certificateNo = "", this.addPeopleShow = true, this.$nextTick((function() {
e2.$refs.peopleForm.resetFields();
})), this.getEngineer()) : this.$message.error("请先添加事故");
}, cancel: function() {
this.$refs.peopleForm.resetFields(), this.addPeopleShow = false;
}, accidentEidt: function(e2) {
var t2 = this;
Object(r["c"])({ id: e2.id }).then((function(e3) {
0 == e3.code && (Object.assign(t2.peopleForm, e3.data), 1 == t2.peopleForm.type && t2.filterUserList(t2.peopleForm.memberId));
})), this.title = "编辑", this.addPeopleShow = true;
}, accidentDelete: function(e2) {
var t2 = this;
Object(r["b"])({ id: e2.id }).then((function(e3) {
0 == e3.code && (t2.$message.success("删除成功"), t2.getListData(t2.addForm.id));
}));
}, editFun: function(e2, t2) {
this.type = e2, "case" == e2 ? this.commonInfo = { 1: "案例时间", 2: "案例简述", 3: "案例文档" } : "accident" == e2 && (this.commonInfo = { 1: "发生时间", 2: "事故简述", 3: "事故报告" }), void 0 != t2 ? (this.addForm = JSON.parse(JSON.stringify(t2)), this.addForm.fallout.includes(",") ? this.addForm.fallout = this.addForm.fallout.split(",").map((function(e3) {
return Number(e3);
})) : this.addForm.fallout = [Number(t2.fallout)], "" != t2.fileUrl && (this.fileList = JSON.parse(t2.fileUrl), this.uploadFileList = JSON.parse(t2.fileUrl)), this.propertyLossChange(this.addForm.propertyLoss), "case" == e2 ? this.commonInfo[4] = "编辑案例信息" : "accident" == e2 && (this.commonInfo[4] = "编辑历史事故", this.peopleForm.accidentId = this.addForm.id, this.getListData(this.addForm.id), this.getEngineer(), this.historyShow = false)) : "case" == e2 ? this.commonInfo[4] = "添加案例信息" : "accident" == e2 && (this.addForm = { occurrenceTime: "", fallout: [], description: "", damageType: "", propertyLoss: "", environmentalImpact: 1, status: 1, level: 1 }, this.fileList = [], this.uploadFileList = [], this.commonInfo[4] = "添加历史事故", this.listData = [], this.getEngineer(), this.historyShow = true);
}, addHistoryData: function() {
var e2 = this;
this.$refs["addForm"].validate((function(t2) {
t2 && Object(r["f"])(e2.setAddData()).then((function(t3) {
0 == t3.code && (e2.$message({ message: "添加成功", type: "success" }), e2.addForm.id = t3.data.id);
}));
}));
}, submitData: function() {
var e2 = this;
if (console.log("添加被触发"), this.addForm.id) return this.$refs["addForm"].resetFields(), this.fileList = [], this.uploadFileList = [], this.$emit("callback"), void this.$emit("close");
this.$refs["addForm"].validate((function(t2) {
t2 && Object(r["f"])(e2.setAddData()).then((function(t3) {
0 == t3.code && (e2.$message({ message: "添加成功", type: "success" }), e2.$refs["addForm"].resetFields(), e2.fileList = [], e2.uploadFileList = [], e2.$emit("callback"), e2.addForm.id = t3.data.id, e2.$emit("close"));
}));
}));
}, saveData: function() {
var e2 = this, t2 = this.setAddData();
t2.id = this.addForm.id, this.$refs["addForm"].validate((function(o2) {
o2 && Object(r["j"])(t2).then((function(t3) {
0 == t3.code && (e2.$message({ message: "修改成功", type: "success" }), e2.$refs["addForm"].resetFields(), e2.fileList = [], e2.uploadFileList = [], e2.$emit("callback"), e2.$emit("close"));
}));
}));
}, setAddData: function() {
var e2 = { occurrenceTime: this.addForm.occurrenceTime, description: this.addForm.description, damageType: "" == this.addForm.damageType ? 0 : this.addForm.damageType, propertyLoss: void 0 == this.addForm.propertyLoss ? 0 : this.addForm.propertyLoss, environmentalImpact: this.addForm.environmentalImpact, status: this.addForm.status, fileUrl: 0 == this.uploadFileList.length ? "" : JSON.stringify(this.uploadFileList), projectUuid: this.$store.state.community_uuid, operationById: this.$store.state.user.userInfo.memberId, operationBy: this.$store.state.user.userInfo.memberName, level: this.addForm.level };
return this.addForm.fallout.length > 1 ? e2.fallout = this.addForm.fallout.join(",") : e2.fallout = String(this.addForm.fallout[0]), "case" == this.type ? (e2.source = 2, e2.type = 2) : "accident" == this.type && (e2.source = 2, e2.type = 3), e2;
}, exceedUpload: function() {
this.$message("最多仅允许上传10个文件");
}, beforeUpload: function(e2) {
var t2 = e2.size / 1024 / 1024 < 10, o2 = e2.size / 1024 / 1024 < 2, n2 = ["jpeg", "jpg", "gif", "bmp", "png"], a2 = ["xls", "xlsx", "doc", "docx", "ppt", "pptx", "pdf", "txt"], r2 = e2.name.substring(e2.name.lastIndexOf(".") + 1);
if (!n2.includes(r2) && !a2.includes(r2)) return this.$message("上传文件只能是图片或文档jpg、jpeg、png、doc、pdf、xls、txt等格式!"), false;
if (n2.includes(r2) || a2.includes(r2)) {
if (n2.includes(r2) && !o2) return this.$message("图片文件最大不超过2M"), false;
if (a2.includes(r2) && !t2) return this.$message("文档文件最大不超过10M"), false;
}
return true;
}, uploadRequest: (function() {
var e2 = h(p().m((function e3(t3) {
var o2, n2, a2, r2, i2, l2, s2, c2, d2, m2, f2, h2, v2;
return p().w((function(e4) {
while (1) switch (e4.p = e4.n) {
case 0:
if (o2 = t3.file, e4.p = 1, n2 = o2.size / 1024 / 1024 < 10, a2 = o2.size / 1024 / 1024 < 2, r2 = ["jpeg", "jpg", "gif", "bmp", "png"], i2 = ["xls", "xlsx", "doc", "docx", "ppt", "pptx", "pdf", "txt"], l2 = o2.name.substring(o2.name.lastIndexOf(".") + 1), r2.includes(l2) || i2.includes(l2)) {
e4.n = 2;
break;
}
return this.$message("上传文件只能是图片或文档jpg、jpeg、png、doc、pdf、xls、txt等格式!"), t3.onError("文件类型不支持"), e4.a(2, false);
case 2:
if (!r2.includes(l2) && !i2.includes(l2)) {
e4.n = 4;
break;
}
if (!r2.includes(l2) || a2) {
e4.n = 3;
break;
}
return this.$message("图片文件最大不超过2M"), t3.onError("图片文件过大"), e4.a(2, false);
case 3:
if (!i2.includes(l2) || n2) {
e4.n = 4;
break;
}
return this.$message("文档文件最大不超过10M"), t3.onError("文档文件过大"), e4.a(2, false);
case 4:
return s2 = new FormData(), s2.append("file", o2), e4.n = 5, Object(u["b"])(s2);
case 5:
c2 = e4.v, c2 && 0 === c2.data.code && c2.data.data.fullUrl ? (d2 = { name: o2.name, url: c2.data.data.fullUrl }, t3.onSuccess(d2), this.$message({ message: "文件上传成功", type: "success" })) : (m2 = o2.uid, f2 = this.$refs.uploadFile.uploadFiles.findIndex((function(e5) {
return e5.uid == m2;
})), this.$refs.uploadFile.uploadFiles.splice(f2, 1), this.$message.error("文件上传失败"), t3.onError("上传失败")), e4.n = 7;
break;
case 6:
e4.p = 6, e4.v, h2 = o2.uid, v2 = this.$refs.uploadFile.uploadFiles.findIndex((function(e5) {
return e5.uid == h2;
})), this.$refs.uploadFile.uploadFiles.splice(v2, 1), this.$message.error("文件上传失败"), t3.onError("上传失败");
case 7:
return e4.a(2);
}
}), e3, this, [[1, 6]]);
})));
function t2(t3) {
return e2.apply(this, arguments);
}
return t2;
})(), uploadSuccess: function(e2) {
e2 && this.uploadFileList.push(e2);
}, uploadRemove: function(e2, t2) {
var o2 = this.uploadFileList.findIndex((function(t3) {
return t3.name === e2.name;
}));
this.uploadFileList.splice(o2, 1);
}, goBack: function() {
this.$refs["addForm"].resetFields(), this.fileList = [], this.uploadFileList = [], this.$emit("close");
}, headClass: function() {
return "text-align:center;background:#FAFAFA;";
}, getListData: function(e2) {
var t2 = this;
this.query.accidentId = e2, Object(r["e"])(this.query).then((function(e3) {
0 == e3.code && (t2.listData = e3.data.records, t2.total = e3.data.rowsCount);
}));
}, handleSizeChange: function(e2) {
this.query.pageSize = e2, this.getListData(this.addForm.id);
}, handleCurrentChange: function(e2) {
this.query.pageNumber = e2, this.getListData(this.addForm.id);
} } }, _ = g, F = (o("356e"), o("829d")), w = Object(F["a"])(_, l, s, false, null, "70d768cf", null), k = w.exports, x = { components: { editAccident: k }, props: { type: { type: String, default: "case" } }, data: function() {
return { hazardLevel: i["cb"], SeIAList: i["c"], commonInfo: {}, list: true, add: false, is_show: false, height: "", listData: [], listLoading: false, syncLoad: false, total: 0, taskType2: i["sc"], degreeList: i["L"], createTime: "", query: { fallout: [], damageType: "", status: "", description: "", level: "", pageNumber: 1, pageSize: 10 } };
}, created: function() {
this.setCommon(), this.headClass(), this.getRealHeight(), this.query.projectUuid = this.$store.state.community_uuid;
}, methods: { filterFallout: function(e2) {
var t2 = this;
if (e2) {
if (e2.includes(",")) {
var o2 = e2.split(",").map((function(e3) {
return Number(e3);
}));
return o2.map((function(e3) {
return t2.taskType2.find((function(t3) {
return t3.value == e3;
})).label;
})).join("/");
}
return this.taskType2.find((function(t3) {
return t3.value == e2;
})).label;
}
return "-";
}, setCommon: function() {
"case" == this.type ? this.commonInfo = { 1: "案例信息列表", 2: "案例时间", 3: "案例文档" } : "accident" == this.type && (this.commonInfo = { 1: "历史事故列表", 2: "发生时间", 3: "事故报告" });
}, getListData: function() {
var e2 = this;
this.listLoading = true, this.query.startTime = this.createTime ? "".concat(this.createTime[0], " 00:00:00") : "", this.query.endTime = this.createTime ? "".concat(this.createTime[1], " 23:59:59") : "", "case" == this.type ? this.query.type = 2 : "accident" == this.type && (this.query.type = 3);
var t2 = JSON.parse(JSON.stringify(this.query));
t2.fallout.length > 0 ? t2.fallout = t2.fallout.join(",") : t2.fallout = "", Object(r["h"])(t2).then((function(t3) {
t3.data && t3.data.records && (e2.listData = t3.data.records, e2.total = t3.data.rowsCount, e2.listLoading = false);
})).catch((function(t3) {
e2.listLoading = false;
}));
}, addClick: function() {
this.$nextTick((function() {
this.$refs.editAccident.editFun(this.type), this.list = false, this.add = true;
}));
}, addClose: function() {
this.list = true, this.add = false;
}, accidentStr: function(e2) {
var t2 = this;
this.$confirm("此操作将启用该数据信息, 是否继续?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then((function() {
t2.strAndEnd(e2, 1);
})).catch((function() {
}));
}, accidentEnd: function(e2) {
var t2 = this;
this.$confirm("此操作将禁用该数据信息, 是否继续?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then((function() {
t2.strAndEnd(e2, 0);
})).catch((function() {
}));
}, strAndEnd: function(e2, t2) {
var o2 = this, n2 = { id: e2.id, status: t2 };
Object(r["k"])(n2).then((function(e3) {
1 == t2 ? o2.$message({ type: "success", message: "启用成功!" }) : 0 == t2 && o2.$message({ type: "success", message: "禁用成功!" }), o2.getListData();
}));
}, accidentDelete: function(e2) {
var t2 = this;
this.$confirm("确定删除该数据吗?", "提示", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning" }).then((function() {
Object(r["g"])({ id: e2.id }).then((function(e3) {
0 == e3.code && (t2.$message({ message: "删除成功", type: "success" }), t2.getListData());
}));
}));
}, accidentEidt: function(e2) {
this.$nextTick((function() {
this.$refs.editAccident.editFun(this.type, e2), this.list = false, this.add = true;
}));
}, cloudUpload: function() {
var e2 = this;
this.syncLoad = true;
var t2 = { projectUuid: this.$store.state.community_uuid, creatorId: this.$store.state.user.userInfo.memberId, creatorName: this.$store.state.user.userInfo.memberName };
Object(r["i"])(t2).then((function(t3) {
0 == t3.code ? (e2.syncLoad = false, e2.$message({ message: "同步成功!", type: "success" }), e2.getListData()) : e2.syncLoad = false;
})).catch((function() {
e2.syncLoad = false;
}));
}, downloadItem: function(e2) {
var t2 = e2.url, o2 = new XMLHttpRequest();
o2.open("GET", t2, true), o2.responseType = "blob", o2.onload = function() {
var t3 = URL.createObjectURL(o2.response), n2 = document.createElement("a");
n2.href = t3, n2.download = e2.name, n2.target = "_blank", n2.click();
}, o2.send();
}, fileData: function(e2) {
if (e2 && "" != e2) return JSON.parse(e2);
}, onSearch: function() {
this.query.pageNumber = 1, this.getListData();
}, resetFormQuery: function(e2) {
this.$refs[e2].resetFields(), this.createTime = "", this.query.pageNumber = 1, this.getListData();
}, handleSizeChange: function(e2) {
this.query.pageSize = e2, this.getListData();
}, handleCurrentChange: function(e2) {
this.query.pageNumber = e2, this.getListData();
}, upAndDown: function() {
this.is_show ? this.$refs.box.style.height = "80px" : this.$refs.box.style.height = this.height, this.is_show = !this.is_show;
}, getRealHeight: function() {
this.$nextTick((function() {
this.height = this.$refs.form_box.offsetHeight + "px";
}));
}, headClass: function() {
return "text-align:center;background:#FAFAFA;";
} }, mounted: function() {
this.getListData();
} }, S = x, T = (o("78f3"), Object(F["a"])(S, n, a, false, null, "da695a58", null));
t["a"] = T.exports;
}, "066c": function(e, t, o) {
}, "127f": function(e, t, o) {
"use strict";
o.d(t, "a", (function() {
return n;
}));
var n = function() {
function e2() {
return (65536 * (1 + Math.random()) | 0).toString(16).substring(1);
}
return "".concat(+/* @__PURE__ */ new Date(), "_").concat(e2()).concat(e2());
};
}, "356e": function(e, t, o) {
"use strict";
o("acb9");
}, "78f3": function(e, t, o) {
"use strict";
o("066c");
}, acb9: function(e, t, o) {
}, dcf1: function(e, t, o) {
"use strict";
o.d(t, "h", (function() {
return a;
})), o.d(t, "f", (function() {
return r;
})), o.d(t, "g", (function() {
return i;
})), o.d(t, "j", (function() {
return l;
})), o.d(t, "k", (function() {
return s;
})), o.d(t, "i", (function() {
return c;
})), o.d(t, "e", (function() {
return u;
})), o.d(t, "a", (function() {
return d;
})), o.d(t, "b", (function() {
return p;
})), o.d(t, "c", (function() {
return m;
})), o.d(t, "d", (function() {
return f;
}));
var n = o("b775");
function a(e2) {
return Object(n["a"])({ url: "/appproject/AccidentPastRecords/pageList", method: "post", data: e2 });
}
function r(e2) {
return Object(n["a"])({ url: "/appproject/AccidentPastRecords/create", method: "post", data: e2 });
}
function i(e2) {
return Object(n["a"])({ url: "/appproject/AccidentPastRecords/delete", method: "post", data: e2 });
}
function l(e2) {
return Object(n["a"])({ url: "/appproject/AccidentPastRecords/update", method: "post", data: e2 });
}
function s(e2) {
return Object(n["a"])({ url: "/appproject/AccidentPastRecords/updateStatus", method: "post", data: e2 });
}
function c(e2) {
return Object(n["a"])({ url: "/appproject/AccidentPastRecords/sync", method: "post", data: e2 });
}
function u(e2) {
return Object(n["a"])({ url: "/appproject/AccidentPastMember/pageList", method: "post", data: e2 });
}
function d(e2) {
return Object(n["a"])({ url: "/appproject/AccidentPastMember/create", method: "post", data: e2 });
}
function p(e2) {
return Object(n["a"])({ url: "/appproject/AccidentPastMember/delete", method: "post", data: e2 });
}
function m(e2) {
return Object(n["a"])({ url: "/appproject/AccidentPastMember/findById", method: "post", data: e2 });
}
function f(e2) {
return Object(n["a"])({ url: "/appproject/AccidentPastMember/update", method: "post", data: e2 });
}
} }]);