{"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\\CmgtSaftyPlanFormDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\saftyPlan\\components\\CmgtSaftyPlanFormDialog.vue","mtime":1687342878020},{"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//\nimport CmgtSaftyPlanApi from '@/views/Manage/saftyPlan/api/CmgtSaftyPlanApi';\nimport dictContracts from '@/components/dict/DictSelectUtils.js';\nimport CommonApi from '@/views/Manage/CommonApi.js';\nimport { mapState } from 'vuex';\nimport moment from 'moment';\nimport CmgtSaftyPlanTaskChildTable from \"./CmgtSaftyPlanTaskChildTable.vue\";\nimport CmgtSaftyTargetApi from '@/views/Manage/saftyPlan/api/CmgtSaftyTargetApi';\nimport dictUtils from '@/components/dict/DictSelectUtils.js';\nimport fileUpload from '@/components/fileUpload/index';\nexport default {\n name: 'CmgtSaftyPlanFormDialog',\n components: {\n CmgtSaftyPlanTaskChildTable: CmgtSaftyPlanTaskChildTable,\n fileUpload: fileUpload\n },\n props: {},\n data: function data() {\n return {\n title: '新增',\n CommonApi: CommonApi,\n showFormDia: false,\n loading: false,\n activeCollapseNames: ['1'],\n activeTabChildName: '0',\n TargetList: [],\n // targetIdSelectOptions: [],\n newParams: {\n pageBean: {\n pageSize: -1,\n page: 1\n },\n querys: [{\n group: 'main',\n operation: 'LIKE',\n parentGroup: '',\n property: 'target_is_check_',\n relation: 'AND',\n value: '是'\n }]\n },\n aqywlbList: [],\n params: {\n planYear: null,\n planName: null,\n saftyClass: null,\n planDescription: null,\n planStartDate: null,\n planEndDate: null,\n planComplet: null,\n dutyOrg: null,\n dutyUser: null,\n according: null,\n fileList: [] // cmgtSaftyPlanTaskList: []\n\n },\n rules: {\n planName: [{\n required: true,\n message: '计划名称不能为空',\n trigger: 'blur'\n }],\n targetId: [{\n required: true,\n message: '工作目标不能为空',\n trigger: 'blur'\n }],\n name: [{\n required: true,\n message: '主题不能为空',\n trigger: 'blur'\n }]\n }\n };\n },\n computed: mapState({\n header: function header(state) {\n return {\n Authorization: \"Bearer \".concat(state.login.currentUser.token)\n };\n }\n }),\n created: function created() {\n this.aqywlbList = dictUtils.getDictItemsFromCache('aqywlb');\n this.getTarget(); // CommonApi.loadSelectOptions({\n // \tname: 'cmgtSaftySelectOptions.getCmgtSaftyTargets'\n // }, res => {\n // \tthis.targetIdSelectOptions = res\n // })\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 attachmentBeforeUpload: function attachmentBeforeUpload(file) {\n var isLt1M = file.size / 1024 / 1024 < 100;\n\n if (!isLt1M) {\n this.$message.error('上传文件不能超过 100MB!');\n }\n\n return isLt1M;\n },\n add: function add() {\n this.title = '新增';\n this.resetForm();\n this.showFormDia = true;\n },\n //获取工作目标\n getTarget: function getTarget() {\n var _this = this;\n\n CmgtSaftyTargetApi.loadCmgtSaftyTarget(this.newParams, function (res) {\n if (res) {\n _this.TargetList = res.rows;\n }\n });\n },\n handleTarget: function handleTarget(item) {\n var arr = this.TargetList.filter(function (e) {\n return e.id == item;\n });\n this.params.planYear = arr[0].targetYear; // this.params.planName = arr[0].name\n\n this.params.saftyClass = arr[0].saftyClass;\n this.params.planDescription = arr[0].memo;\n this.params.planComplet = arr[0].content;\n this.params.according = arr[0].according;\n },\n resetForm: function resetForm() {\n this.params = {\n planYear: moment().format('YYYY'),\n planName: null,\n saftyClass: null,\n planDescription: null,\n planStartDate: null,\n planEndDate: null,\n planComplet: null,\n dutyOrg: null,\n dutyUser: null,\n according: null,\n fileList: [] // attachmentFileList: [],\n // cmgtSaftyPlanTaskList: []\n\n };\n },\n handleClose: function handleClose() {\n this.resetForm();\n this.showFormDia = false;\n },\n handleSave: function handleSave() {\n var _this2 = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n var method;\n\n if (!_this2.params.id) {\n // 新增\n method = CmgtSaftyPlanApi.addCmgtSaftyPlan;\n } else {\n // 修改\n method = CmgtSaftyPlanApi.editCmgtSaftyPlan;\n }\n\n _this2.loading = true;\n method(_this2.params, function (res) {\n _this2.loading = false;\n\n if (res.state) {\n _this2.$notify({\n type: 'success',\n message: _this2.title + '成功',\n duration: 2000\n }); // this.$emit('loadData')\n\n\n _this2.$parent.loadData();\n\n _this2.handleClose();\n } else {\n _this2.$message.warning(res.message);\n }\n });\n }\n });\n },\n Update: function Update(row) {\n var _this3 = this;\n\n this.title = '修改';\n this.showFormDia = true;\n CmgtSaftyPlanApi.getItemById(row.id, function (res) {\n _this3.params = res;\n _this3.params.fileList = _this3.params.fileList ? _this3.params.fileList : [];\n\n _this3.params.fileList.forEach(function (it) {\n it.name = it.fileName + '.' + it.extensionName;\n it.url = _this3.previewUrl + it.id;\n });\n });\n }\n }\n};",null]}