{"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\\saftyTraining\\components\\CmgtSaftyTrainingProjectFormDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\saftyTraining\\components\\CmgtSaftyTrainingProjectFormDialog.vue","mtime":1691463999696},{"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//\nimport CmgtSaftyTrainingProjectApi from '@/views/Manage/saftyTraining/api/CmgtSaftyTrainingProjectApi';\nimport dictContracts from '@/components/dict/DictSelectUtils.js';\nimport CommonApi from '@/views/Manage/CommonApi.js';\nimport { mapState } from 'vuex';\nimport fileUpload from '@/components/fileUpload/index';\nexport default {\n name: 'CmgtSaftyTrainingProjectFormDialog',\n props: {},\n components: {\n fileUpload: fileUpload\n },\n data: function data() {\n return {\n readonlyYear: false,\n cmgtSaftyData: [],\n title: '新增',\n CommonApi: CommonApi,\n showFormDia: false,\n loading: false,\n activeCollapseNames: ['1'],\n activeTabChildName: '0',\n trainingTypeSelectOptions: [],\n params: {\n year: null,\n pxpl: null,\n name: null,\n goal: null,\n content: null,\n planId: '',\n subjectType: null,\n fileList: []\n },\n rules: {\n subjectType: [{\n required: true,\n message: '活动类别不能为空',\n trigger: 'blur'\n }],\n year: [{\n required: true,\n message: '开展年度不能为空',\n trigger: 'blur'\n }],\n planId: [{\n required: true,\n message: '年度计划任务不能为空',\n trigger: 'blur'\n }],\n // pxpl: [\n // {\n // required: true,\n // message: '培训频次描述”不能为空',\n // trigger: 'blur'\n // }\n // ],\n // content: [\n // {\n // required: true,\n // message: '主要培训内容不能为空',\n // trigger: 'blur'\n // }\n // ],\n // goal: [\n // {\n // required: true,\n // message: '培训目标不能为空',\n // trigger: 'blur'\n // }\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.trainingTypeSelectOptions = dictContracts.getDictItemsFromCache('hdlb');\n console.log(this.trainingTypeSelectOptions);\n this.cmgtSaftyPlan();\n },\n methods: {\n attachmentHandleFileDelete: function attachmentHandleFileDelete(f) {\n this.params.fileList = this.params.fileList.filter(function (item) {\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 //年度计划任务\n planIdInput: function planIdInput(val) {\n var _this = this;\n\n CmgtSaftyTrainingProjectApi.cmgtSaftyPlanId(val, function (res) {\n // console.log(res)\n _this.params.year = res.planYear;\n _this.readonlyYear = true;\n });\n },\n cmgtSaftyPlan: function cmgtSaftyPlan() {\n var _this2 = this;\n\n CmgtSaftyTrainingProjectApi.loadcmgtSaftyPlan({\n groupRelation: 'AND',\n groupTree: {},\n pageBean: {\n page: 1,\n pageSize: -1,\n showTotal: true\n },\n sorter: [{\n direction: 'DESC',\n property: 'plan_year_'\n }]\n }, function (res) {\n console.log(res);\n _this2.cmgtSaftyData = res.rows;\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 year: null,\n pxpl: null,\n name: null,\n goal: null,\n content: null,\n planId: '',\n subjectType: null,\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 _this3 = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n var method;\n\n if (!_this3.params.id) {\n // 新增\n method = CmgtSaftyTrainingProjectApi.addCmgtSaftyTrainingProject;\n } else {\n // 修改\n method = CmgtSaftyTrainingProjectApi.editCmgtSaftyTrainingProject;\n }\n\n _this3.loading = true;\n method(_this3.params, function (res) {\n _this3.loading = false;\n\n if (res.state) {\n _this3.$notify({\n type: 'success',\n message: _this3.title + '成功',\n duration: 2000\n }); //this.$emit('loadData')\n\n\n _this3.$parent.loadData();\n\n _this3.handleClose();\n } else {\n _this3.$message.warning(res.message);\n }\n });\n }\n });\n },\n Update: function Update(row) {\n var _this4 = this;\n\n console.log(row);\n CmgtSaftyTrainingProjectApi.cmgtSaftyTrainProjectId(row.id, function (res) {\n _this4.params = res;\n _this4.params.fileList = _this4.params.fileList ? _this4.params.fileList : [];\n\n _this4.params.fileList.forEach(function (it) {\n it.name = it.fileName + '.' + it.extensionName;\n it.url = _this4.previewUrl + it.id;\n });\n });\n this.title = '修改';\n this.showFormDia = true;\n }\n }\n};",null]}