{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\operationCheck\\components\\CheckItemDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\operationCheck\\components\\CheckItemDialog.vue","mtime":1686706098943},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nimport operationCheck from '@/api/device/operationCheck.js';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nexport default {\n name: 'CheckItemDialog',\n components: {},\n data: function data() {\n return {\n visible: false,\n title: '新增',\n activeCollapse1: '1',\n tableData: [],\n counts: 0,\n multipleSelections: [],\n params: {\n itemsList: [],\n assessTitle: '',\n //\n memo: '',\n // 备注\n assessType: '',\n // 考核方式(1:单位考核,2:合同考核)\n publishStatus: '0',\n // 发布状态\n id: null\n },\n itemsList: [],\n assessTypeList: [],\n //考核方式字段列表\n itemsData: [],\n fbztList: [],\n rules: {\n item: [{\n required: true,\n message: '请输入考核内容',\n trigger: 'blur'\n }],\n assessType: [{\n required: true,\n message: '请选择考核方式',\n trigger: 'blur'\n }]\n }\n };\n },\n created: function created() {\n this.assessTypeList = dictUtils.getDictItemsFromCache('jxkh-khfs');\n this.fbztList = dictUtils.getDictItemsFromCache('fbzt');\n },\n methods: {\n add: function add() {\n this.handleClose();\n this.visible = true;\n this.params.assessType = this.assessTypeList[0].value;\n this.title = '新增';\n },\n edit: function edit(row) {\n var _this = this;\n\n console.log(row);\n\n if (row.publishStatus == '0') {\n this.visible = true;\n } else {\n this.visible = false;\n this.$message.warning('该条考核已发布');\n }\n\n this.title = '修改';\n operationCheck.getItemById(row.id, function (res) {\n _this.params = res;\n _this.params.assessYear = res.assessYear + '';\n });\n },\n insort: function insort(val, index) {\n var _this2 = this;\n\n var arr = JSON.parse(JSON.stringify(this.params.itemsList));\n arr.splice(index, 1);\n arr.forEach(function (e) {\n if (val.itemSn == e.itemSn) {\n _this2.$message.warning('存在相同排序号');\n }\n });\n },\n addAcounts: function addAcounts() {\n var count = this.params.itemsList.length + 1;\n this.params.itemsList.push({\n itemId: '',\n endVal: null,\n startVal: null,\n val: null,\n itemSn: count\n });\n },\n deletAcounts: function deletAcounts() {\n var _this3 = this;\n\n this.params.itemsList.forEach(function (item, index) {\n _this3.multipleSelections.forEach(function (ii) {\n if (item.itemSn == ii.itemSn) {\n _this3.params.itemsList.splice(index, 1);\n }\n });\n });\n this.$refs.multipleSelections.clearSelection(); // if (this.multipleSelections && this.multipleSelections.length) {\n // \tthis.multipleSelections.forEach(item => {\n // \t\tthis.params.itemsList.forEach((data, i) => {\n // \t\t\tif (item == data) {\n // \t\t\t\toperationCheck.remove(data.id, res => {\n // \t\t\t\t\tif (res.state) {\n // \t\t\t\t\t\tthis.params.itemsList.splice(i, 1)\n // \t\t\t\t\t\tthis.$refs.multipleSelections.clearSelection()\n // \t\t\t\t\t}\n // \t\t\t\t})\n // \t\t\t}\n // \t\t})\n // \t})\n // }\n },\n handleChanges: function handleChanges(val) {\n this.multipleSelections = val;\n },\n handleClose: function handleClose() {\n this.params = {\n itemsList: [{\n itemId: '',\n endVal: null,\n startVal: null,\n val: null,\n itemSn: 1\n }],\n assessTitle: '',\n //\n memo: '',\n // 备注\n assessType: '',\n // 考核方式(1:单位考核,2:合同考核)\n publishStatus: '0',\n // 发布状态\n id: null\n };\n this.activeCollapse1 = '1';\n this.visible = false;\n },\n goInfo: function goInfo(e) {\n var _this4 = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n if (_this4.title === '新增') {\n var isNull = false;\n\n _this4.params.itemsList.forEach(function (item) {\n if (item.item && item.itemVal) {\n isNull = true;\n } else {\n isNull = false;\n }\n });\n\n if (isNull) {\n operationCheck.addItems(_this4.params, function (response) {\n console.log(_this4.params, '新增');\n\n if (response.state) {\n _this4.$notify({\n type: 'success',\n message: '保存成功',\n duration: 2000\n });\n\n _this4.handleClose();\n\n _this4.$parent.loadData(1);\n } else {}\n });\n } else {\n _this4.$message({\n showClose: true,\n message: '请完善考核项内容和权重值',\n type: 'warning'\n });\n }\n }\n\n if (_this4.title === '修改') {\n operationCheck.updateItems(_this4.params, function (response) {\n console.log(_this4.params, '修改');\n\n if (response.state) {\n _this4.$notify({\n type: 'success',\n message: '修改成功',\n duration: 2000\n });\n\n _this4.handleClose();\n\n _this4.$parent.loadData(1);\n } else {}\n });\n }\n } else {\n return false;\n }\n });\n },\n //指定一个key标识这一行的数据\n getRowKey: function getRowKey(row) {\n return row.id;\n }\n }\n};",null]}