(window["webpackJsonp"] = window["webpackJsonp"] || []).push([["chunk-bc815762"], { 1614: function(t, e) { t.exports = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAABHNCSVQICAgIfAhkiAAAAWVJREFUSEu91stRwzAQBmBke3SFDogPfp1ICaETqIDQAVQAHUAngQ7CyZZ9cOggXD22xWhGnlE0lrU/zCS3xLv61pvNxuwCfLVte9V13U6lcc5v4zg+IkcwJNjA1jpvj6JkcAabaoVQEriAwagXJGAQuggCGBl1gn/ASKgTrKpqyxh7QaZ4ipVSPuZ5/jqXu9jSpmk2ZtIwDGu7CHV4GIZ7My5Jkg9Xod6hsROFEE/mZ1mWnbz3dQQGfQf6rsNgWZarKIqu1cF9338XRXHwIeZ1CFRYEAStecA4jjGCMiGEWr6XSJX/iD2eG/w5f0vR9uihWemhOSDfn8qB7hAtDt40doLerw/WD/8ZKYSy2uR0oF5tJztSSrmdWW2f8Gqr6/pOSvmGVD/FMsbu0zR9h1qq26eW8A2IfnHON66HK8ofMIIuYqQpBe7Ui5FAFURASRgZ9KBkDAIdKITBoIWqR33nNLom+xf/fdkS6x7eewAAAABJRU5ErkJggg=="; }, "1aba": function(t, e, n) { "use strict"; n.r(e); var i = function() { var t2 = this, e2 = t2.$createElement, i2 = t2._self._c || e2; return i2("div", { staticClass: "app-container bgHeight" }, [i2("el-card", { staticClass: "box-card", attrs: { shadow: "never" } }, [i2("div", { attrs: { slot: "header" }, slot: "header" }, [i2("span", [t2._v("安全生产二级看板设置")])]), t2._v(" "), i2("div", { staticClass: "radio-Box" }, [i2("el-radio-group", { on: { change: t2.changeType }, model: { value: t2.type, callback: function(e3) { t2.type = e3; }, expression: "type" } }, t2._l(t2.typeList, (function(e3, n2) { return i2("el-radio-button", { key: n2, attrs: { label: e3.value } }, [t2._v(t2._s(e3.label))]); })), 1)], 1), t2._v(" "), i2("div", { staticClass: "table-Box" }, [i2("div", { staticStyle: { width: "50%" } }, [i2("el-table", { attrs: { border: "", data: t2.TrainingTypeListMap[t2.type - 1].list } }, [i2("el-table-column", { attrs: { label: "顺序", width: "80", align: "center", index: function(t3) { return t3 + 1; } }, scopedSlots: t2._u([{ key: "default", fn: function(e3) { return [t2._v("\n " + t2._s(e3.$index + 1) + "\n ")]; } }]) }), t2._v(" "), i2("el-table-column", { attrs: { prop: "name", label: 1 == t2.type ? "培训类型" : 2 == t2.type ? "应急演练执行场景" : "历史事故事故后果", align: "center" } }), t2._v(" "), i2("el-table-column", { attrs: { label: "拖拽排序", prop: "isClick", align: "center" } }, [[i2("span", [i2("img", { attrs: { src: n("1614"), alt: "" } })])]], 2), t2._v(" "), i2("el-table-column", { attrs: { label: "操作", width: "100", align: "center" }, scopedSlots: t2._u([{ key: "default", fn: function(e3) { return [i2("el-button", { attrs: { type: "danger", size: "mini" }, on: { click: function(n2) { return t2.deleteItem(e3.$index, e3.row); } } }, [t2._v("删除")])]; } }]) })], 1), t2._v(" "), i2("div", { staticClass: "btn-Box" }, [i2("el-button", { attrs: { type: "primary" }, on: { click: t2.add } }, [t2._v("新增")]), t2._v(" "), i2("el-button", { attrs: { type: "primary" }, on: { click: t2.save } }, [t2._v("保存")])], 1)], 1)])]), t2._v(" "), i2("el-dialog", { attrs: { "close-on-click-modal": false, "close-on-press-escape": false, title: t2.dialogTitle, visible: t2.addShow, width: "20%" }, on: { close: t2.addClose } }, [i2("div", { staticClass: "table-Box" }, [1 == t2.type ? i2("el-select", { model: { value: t2.TrainingType, callback: function(e3) { t2.TrainingType = e3; }, expression: "TrainingType" } }, t2._l(t2.TrainingTypeListFilterList, (function(t3, e3) { return i2("el-option", { key: e3, attrs: { label: t3.name, value: t3.id } }); })), 1) : 2 == t2.type ? i2("el-select", { model: { value: t2.TrainingType, callback: function(e3) { t2.TrainingType = e3; }, expression: "TrainingType" } }, t2._l(t2.sceneMenuFilterList, (function(t3, e3) { return i2("el-option", { key: e3, attrs: { label: t3.label, value: t3.value } }); })), 1) : i2("el-select", { model: { value: t2.TrainingType, callback: function(e3) { t2.TrainingType = e3; }, expression: "TrainingType" } }, t2._l(t2.taskType2FilterList, (function(t3, e3) { return i2("el-option", { key: e3, attrs: { label: t3.label, value: t3.value } }); })), 1)], 1), t2._v(" "), i2("div", { staticClass: "dialog-footer", attrs: { slot: "footer" }, slot: "footer" }, [i2("el-button", { attrs: { type: "primary" }, on: { click: t2.sub } }, [t2._v("确定")]), t2._v(" "), i2("el-button", { attrs: { type: "primary" }, on: { click: t2.addClose } }, [t2._v("取消")])], 1)])], 1); }, a = [], r = (n("aa18"), n("982e"), n("1bc7"), n("e5b4"), n("a450"), n("90e7")), o = n("2a7b"), s = n("dce5"), c = n("e7e2"), u = n.n(c), l = (n("f753"), { data: function() { return { addShow: false, taskType2: s["Eb"], taskType2FilterList: [], TrainingTypeListMap: [{ list: [] }, { list: [] }, { list: [] }], TrainingTypeList: [], TrainingTypeListFilterList: [], TrainingType: "", test: "", msg: "", type: 1, typeList: [{ label: "培训类型", value: 1 }, { label: "应急演练执行场景", value: 2 }, { label: "历史事故事故后果", value: 3 }], dialogTitle: "新增培训类型", sceneMenuList: [], sceneMenuFilterList: [] }; }, mounted: function() { this.getSceneMenu(), this.getTrainingTypePageList(), this.initSortable(), this.taskType2FilterList = JSON.parse(JSON.stringify(this.taskType2)); }, methods: { getSceneMenu: function() { var t2 = this; Object(r["d"])().then((function(e2) { 0 == e2.code && e2.data && (t2.sceneMenuList = e2.data.map((function(t3) { return { label: t3.sceneName, value: t3.id }; }))); })); }, changeType: function() { this.initSortable(), this.TrainingTypeListMap[this.type - 1].list = [], this.getSet(); }, initSortable: function() { var t2 = document.querySelector(".el-table__body-wrapper tbody"), e2 = this; u.a.create(t2, { onEnd: function(t3) { e2.TrainingTypeListMap[e2.type - 1].list.splice(t3.newIndex, 0, e2.TrainingTypeListMap[e2.type - 1].list.splice(t3.oldIndex, 1)[0]); var n2 = e2.TrainingTypeListMap[e2.type - 1].list.slice(0); e2.TrainingTypeListMap[e2.type - 1].list = [], e2.$nextTick((function() { e2.TrainingTypeListMap[e2.type - 1].list = n2, e2.postSort(e2.TrainingTypeListMap[e2.type - 1].list); })); } }); }, save: function() { var t2 = this, e2 = JSON.parse(window.localStorage.getItem("memberInfor")), n2 = JSON.parse(localStorage.getItem("companyInfo")).osId, i2 = { updaterName: e2.name, targetIdArray: JSON.stringify(this.TrainingTypeListMap[this.type - 1].list.map((function(t3) { return t3.id; }))), type: this.type, companyId: n2 }; Object(r["c"])(i2).then((function(e3) { 0 == e3.code && (t2.$message.success("更新成功"), t2.getSet()); })); }, deleteItem: function(t2, e2) { this.TrainingTypeListMap[this.type - 1].list.splice(t2, 1); var n2 = this.TrainingTypeListMap[this.type - 1].list.map((function(t3) { return t3.id; })); this.filterTrainingTypeList(1, n2), this.$message("操作成功,如要更新数据,请点击保存。"); }, sub: function() { var t2 = this; if (this.TrainingType) { this.TrainingTypeListMap[this.type - 1].list.push({ name: 1 == this.type ? this.TrainingTypeList.find((function(e3) { return e3.id == t2.TrainingType; })).name : 2 == this.type ? this.sceneMenuList.find((function(e3) { return e3.value == t2.TrainingType; })).label : this.taskType2.find((function(e3) { return e3.value == t2.TrainingType; })).label, id: this.TrainingType, type: this.type }); var e2 = this.TrainingTypeListMap[this.type - 1].list.map((function(t3) { return t3.id; })); console.log(e2, "list==="), 1 == this.type ? this.filterTrainingTypeList(1, e2) : 3 == this.type ? this.filterTaskType2(1, e2) : this.filterSceneMenu(1, e2), this.addClose(); } else this.$message.error("请选择"); }, addClose: function() { this.addShow = false, this.TrainingType = ""; }, getTrainingTypePageList: function() { var t2 = this; Object(o["f"])({ pageSize: -1, pageNumber: 1 }).then((function(e2) { 0 === e2.code && e2.data.records.length > 0 && (t2.TrainingTypeList = e2.data.records), setTimeout((function() { t2.getSet(); }), 500); })); }, postSort: function(t2) { var e2 = t2; e2.forEach((function(t3, e3) { t3.sort = e3 + 1; })); }, getSet: function() { var t2 = this, e2 = JSON.parse(localStorage.getItem("companyInfo")).osId; Object(r["e"])({ companyId: e2, type: this.type }).then((function(e3) { 0 == e3.code && e3.data && e3.data.targetIdArray && "[]" != e3.data.targetIdArray ? (e3.data.targetIdArray = JSON.parse(e3.data.targetIdArray), console.log("设置了内容"), Array.isArray(e3.data.targetIdArray) && e3.data.targetIdArray.length > 0 && (t2.TrainingTypeListMap[t2.type - 1].list = e3.data.targetIdArray.map((function(e4) { return { name: 1 == t2.type ? t2.TrainingTypeList.find((function(t3) { return t3.id == e4; })).name : 2 == t2.type ? t2.sceneMenuList.find((function(t3) { return t3.value == e4; })).label : t2.taskType2.find((function(t3) { return t3.value == e4; })).label, id: e4, type: t2.type }; })), console.log(t2.TrainingTypeListMap[t2.type - 1].list, "this.TrainingTypeListMap[this.type - 1].list+++"), console.log(e3.data.targetIdArray, "res.data.targetIdArray+++"), 1 == t2.type ? t2.filterTrainingTypeList(2, e3.data.targetIdArray) : 3 == t2.type ? t2.filterTaskType2(2, e3.data.targetIdArray) : t2.filterSceneMenu(2, e3.data.targetIdArray))) : (1 == t2.type && (t2.TrainingTypeListFilterList = t2.TrainingTypeList, t2.TrainingTypeListMap[t2.type - 1].list = []), 2 == t2.type && (t2.sceneMenuFilterList = t2.sceneMenuList, t2.TrainingTypeListMap[t2.type - 1].list = [])); })); }, filterSceneMenu: function(t2, e2) { var n2 = this; 1 == t2 && 1 == this.TrainingTypeListMap[this.type - 1].list.length ? this.sceneMenuFilterList = this.sceneMenuList.filter((function(t3) { return t3.value !== n2.TrainingType; })) : this.sceneMenuFilterList = this.sceneMenuList.filter((function(t3) { return !e2.includes(t3.value); })); }, filterTaskType2: function(t2, e2) { var n2 = this; 1 == t2 && 1 == this.TrainingTypeListMap[this.type - 1].list.length ? this.taskType2FilterList = this.taskType2.filter((function(t3) { return t3.value !== n2.TrainingType; })) : this.taskType2FilterList = this.taskType2.filter((function(t3) { return !e2.includes(t3.value); })); }, filterTrainingTypeList: function(t2, e2) { var n2 = this; 1 == t2 && 1 == this.TrainingTypeListMap[this.type - 1].list.length ? this.TrainingTypeListFilterList = this.TrainingTypeList.filter((function(t3) { return t3.id !== n2.TrainingType; })) : this.TrainingTypeListFilterList = this.TrainingTypeList.filter((function(t3) { return !e2.includes(t3.id); })); }, add: function() { var t2 = this; this.dialogTitle = "新增" + this.typeList.find((function(e2) { return e2.value == t2.type; })).label, this.addShow = true, this.TrainingType = ""; } } }), p = l, d = (n("f266"), n("829d")), y = Object(d["a"])(p, i, a, false, null, "0c652b55", null); e["default"] = y.exports; }, "2a7b": function(t, e, n) { "use strict"; n.d(e, "d", (function() { return a; })), n.d(e, "b", (function() { return r; })), n.d(e, "g", (function() { return o; })), n.d(e, "h", (function() { return s; })), n.d(e, "f", (function() { return c; })), n.d(e, "a", (function() { return u; })), n.d(e, "c", (function() { return l; })), n.d(e, "e", (function() { return p; })); var i = n("b775"); function a(t2) { return Object(i["a"])({ url: "/hakocompany/TrainingRecord/pageList", method: "post", data: t2 }); } function r(t2) { return Object(i["a"])({ url: "/hakocompany/TrainingRecord/create", method: "post", data: t2 }); } function o(t2) { return Object(i["a"])({ url: "/hakocompany/TrainingRecord/update", method: "post", data: t2 }); } function s(t2) { return Object(i["a"])({ url: "/hakocompany/TrainingRecord/updateStatus", method: "post", data: t2 }); } function c(t2) { return Object(i["a"])({ url: "/hakocompany/TrainingType/pageList", method: "post", data: t2 }); } function u(t2) { return Object(i["a"])({ url: "/hakocompany/AccidentPastRecords/companyTotal", method: "post", data: t2 }); } function l(t2) { return Object(i["a"])({ url: "/hakocompany/EmergencyPlanExecuteRecord/companyTotal", method: "post", data: t2 }); } function p(t2) { return Object(i["a"])({ url: "/hakocompany/TrainingType/companyTotal", method: "post", data: t2 }); } }, "5fe7": function(t, e, n) { }, "90e7": function(t, e, n) { "use strict"; n.d(e, "g", (function() { return a; })), n.d(e, "m", (function() { return r; })), n.d(e, "f", (function() { return o; })), n.d(e, "l", (function() { return s; })), n.d(e, "h", (function() { return c; })), n.d(e, "n", (function() { return u; })), n.d(e, "a", (function() { return l; })), n.d(e, "b", (function() { return p; })), n.d(e, "c", (function() { return d; })), n.d(e, "e", (function() { return y; })), n.d(e, "d", (function() { return f; })), n.d(e, "i", (function() { return g; })), n.d(e, "j", (function() { return h; })), n.d(e, "o", (function() { return T; })), n.d(e, "k", (function() { return m; })); var i = n("b775"); function a(t2) { return Object(i["a"])({ url: "/hakocompany/DeductionInfo/findById", method: "post", data: t2 }); } function r(t2) { return Object(i["a"])({ url: "/hakocompany/DeductionInfo/update", method: "post", data: t2 }); } function o(t2) { return Object(i["a"])({ url: "/hakocompany/CollectionInfoApi/findById", method: "post", data: t2 }); } function s(t2) { return Object(i["a"])({ url: "/hakocompany/CollectionInfoApi/update", method: "post", data: t2 }); } function c(t2) { return Object(i["a"])({ url: "/hakocompany/ChargePushConfigApi/findById", method: "post", data: t2 }); } function u(t2) { return Object(i["a"])({ url: "/hakocompany/ChargePushConfigApi/update", method: "post", data: t2 }); } function l(t2) { return Object(i["a"])({ url: "/company/ProjectSatisfactionConfig/pageList", method: "post", data: t2 }); } function p(t2) { return Object(i["a"])({ url: "/company/ProjectSatisfactionConfig/update", method: "post", data: t2 }); } function d(t2) { return Object(i["a"])({ url: "/hakocompany/CockpitConfig/create", method: "post", data: t2 }); } function y(t2) { return Object(i["a"])({ url: "/hakocompany/CockpitConfig/findByCompanyIdAndType", method: "post", data: t2 }); } function f(t2) { return Object(i["a"])({ url: "/hakocompany/CockpitConfig/sceneMenuList", method: "post", data: t2 }); } function g(t2) { return Object(i["a"])({ url: "/hakocompany/ProjectConfig/pageList", method: "post", data: t2 }); } function h(t2) { return Object(i["a"])({ url: "/hakocompany/ProjectConfig/updateExponentByProjectUuid", method: "post", data: t2 }); } function T(t2, e2) { return Object(i["a"])({ url: "/oss/upload", isFile: true, isReturnResponse: true, headers: { "Content-Type": "multipart/form-data;charset=UTF-8" }, method: "post", data: t2, onUploadProgress: e2 && e2.onUploadProgress }); } function m(t2) { return Object(i["a"])({ url: "/hakocompany/ProjectConfig/updateVisitPollRateByProjectUuid", method: "post", data: t2 }); } }, f266: function(t, e, n) { "use strict"; n("5fe7"); } }]);