{"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\\Manage\\saftyPlan\\components\\CmgtSaftyTargetFormDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\saftyPlan\\components\\CmgtSaftyTargetFormDialog.vue","mtime":1689316540109},{"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\";\nimport \"core-js/modules/es6.function.name\";\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//\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//\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 moment from 'moment';\nimport CmgtSaftyTargetApi from '@/views/Manage/saftyPlan/api/CmgtSaftyTargetApi';\nimport dictContracts from '@/components/dict/DictSelectUtils.js';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport fileUpload from '@/components/fileUpload/index';\nexport default {\n name: 'CmgtSaftyTargetFormDialog',\n props: {},\n components: {\n fileUpload: fileUpload\n },\n data: function data() {\n return {\n title: '新增',\n showFormDia: false,\n loading: false,\n activeCollapseNames: ['1'],\n activeTabChildName: '0',\n tableData: [],\n previewUrl: window.context.portal + '/file/onlinePreviewController/v1/getFileById_',\n params: {\n targetYear: '',\n name: null,\n content: null,\n memo: null,\n attachment: null,\n according: '',\n targetIsCheck: '否',\n fileList: [],\n detail: [// {\n // kpiName: '',\n // kpiStandard: '',\n // checkType: '',\n // checkScore: 0,\n // checkWeight: 0,\n // sn: 0\n // }\n ]\n },\n rules: {\n targetYear: [{\n required: true,\n message: '计划年度不能为空',\n trigger: 'blur'\n }],\n name: [{\n required: true,\n message: '目标名称不能为空',\n trigger: 'blur'\n }],\n saftyClass: [{\n required: true,\n message: '安全业务分类不能为空',\n trigger: 'blur'\n }],\n targetIsCheck: [{\n required: true,\n message: '是否考核不能为空',\n trigger: 'blur'\n }]\n },\n zbkhfsList: [],\n aqywlbList: []\n };\n },\n created: function created() {\n this.zbkhfsList = dictUtils.getDictItemsFromCache('zbkhfs');\n this.aqywlbList = dictUtils.getDictItemsFromCache('aqywlb');\n },\n methods: {\n attachmentHandleFileDelete: function attachmentHandleFileDelete(f) {\n this.params.fileList = this.params.fileList.filter(function (item) {\n console.log(item, f);\n return item.id !== f.id;\n });\n },\n attachmentUploadSuccess: function attachmentUploadSuccess(res, file, fileList) {\n if (res.success) {\n this.params.fileList.push({\n name: res.fileName,\n id: res.fileId,\n url: this.previewUrl + res.fileId,\n extensionName: file.name.substring(file.name.lastIndexOf('.') + 1)\n });\n } else {\n this.$message.error('上传文件失败!');\n }\n },\n add: function add() {\n this.title = '新增';\n this.resetForm();\n this.showFormDia = true;\n },\n resetForm: function resetForm() {\n this.params = {\n targetYear: moment().format('YYYY'),\n name: null,\n tvalue: null,\n content: null,\n memo: null,\n // attachment: null,\n according: '',\n targetIsCheck: '否',\n detail: [// {\n // kpiName: '',\n // kpiStandard: '',\n // checkType: '',\n // checkScore: 0,\n // checkWeight: 1,\n // sn: 0\n // }\n ],\n fileList: []\n };\n },\n handleClose: function handleClose() {\n this.resetForm();\n this.$refs.formInfo.resetFields();\n this.showFormDia = false;\n },\n handleSave: function handleSave() {\n var _this = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n var method;\n\n if (!_this.params.id) {\n // 新增\n method = CmgtSaftyTargetApi.addCmgtSaftyTarget;\n } else {\n // 修改\n method = CmgtSaftyTargetApi.editCmgtSaftyTarget;\n }\n\n _this.loading = true;\n console.log(_this.params);\n\n if (_this.params.targetIsCheck == '是') {\n if (_this.params.detail.length != 0) {\n var num = 0;\n\n _this.params.detail.forEach(function (item) {\n num += item.checkWeight;\n });\n\n if (num != 1) {\n _this.loading = false;\n\n _this.$message.warning('权重值的和必须等于1');\n } else {\n method(_this.params, function (res) {\n _this.loading = false;\n\n if (res.state) {\n _this.$notify({\n type: 'success',\n message: _this.title + '成功',\n duration: 2000\n }); //this.$emit('loadData')\n\n\n _this.$parent.loadData();\n\n _this.handleClose();\n } else {\n _this.$message.warning(res.message);\n }\n });\n }\n } else {\n _this.loading = false;\n\n _this.$message.warning('请输入安全目标考核项');\n }\n } else {\n method(_this.params, function (res) {\n _this.loading = false;\n\n if (res.state) {\n _this.$notify({\n type: 'success',\n message: _this.title + '成功',\n duration: 2000\n }); //this.$emit('loadData')\n\n\n _this.$parent.loadData();\n\n _this.handleClose();\n } else {\n _this.$message.warning(res.message);\n }\n });\n }\n }\n });\n },\n Update: function Update(row) {\n var _this2 = this;\n\n this.title = '修改';\n this.showFormDia = true;\n CmgtSaftyTargetApi.getItemById(row.id, function (res) {\n _this2.params = res;\n _this2.params.fileList = _this2.params.fileList ? _this2.params.fileList : [];\n\n _this2.params.fileList.forEach(function (it) {\n it.name = it.fileName + '.' + it.extensionName;\n it.url = _this2.previewUrl + it.id;\n });\n }); // this.params = row\n },\n addTable: function addTable() {\n this.params.detail.push({}); // this.$refs.singleTable.setCurrentRow(this.tableData[this.tableData.length - 1])\n },\n delTable: function delTable(index, row) {\n this.params.detail.splice(index, 1);\n }\n }\n};",null]}