{"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\\CmgtSaftyTrainingRecordFormDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Manage\\saftyTraining\\components\\CmgtSaftyTrainingRecordFormDialog.vue","mtime":1688109363933},{"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//\nimport CmgtSaftyTrainingPlanApi from '@/views/Manage/saftyTraining/api/CmgtSaftyTrainingPlanApi';\nimport CmgtSaftyTrainingRecordApi from '@/views/Manage/saftyTraining/api/CmgtSaftyTrainingRecordApi';\nimport dictContracts from '@/components/dict/DictSelectUtils.js';\nimport CommonApi from '@/views/Manage/CommonApi.js';\nimport { mapState } from 'vuex';\nimport fileUpload from '@/components/fileUpload/index';\nimport CmgtSaftyTrainingRecordDetailChildTable from \"./CmgtSaftyTrainingRecordDetailChildTable.vue\";\nexport default {\n name: 'CmgtSaftyTrainingRecordFormDialog',\n props: {},\n components: {\n CmgtSaftyTrainingRecordDetailChildTable: CmgtSaftyTrainingRecordDetailChildTable,\n fileUpload: fileUpload\n },\n data: function data() {\n return {\n TrainingPlanData: [],\n title: '新增',\n CommonApi: CommonApi,\n showFormDia: false,\n loading: false,\n activeCollapseNames: ['1'],\n activeTabChildName: '0',\n trainingProjectIdSelectOptions: [],\n teacherSelectOptions: [],\n trainingPlanIdSelectOptions: [],\n traineeSelectOptions: [],\n traineeSelectLoading: false,\n params: {\n content: '',\n location: '',\n pplanId: '',\n summary: '',\n teacher: '',\n trainEndDate: '',\n trainStartDate: '',\n trainee: '',\n fileList: []\n },\n rules: {\n location: [{\n required: true,\n message: '培训地点不能为空',\n trigger: 'blur'\n }],\n pplanId: [{\n required: true,\n message: '教育培训项目不能为空',\n trigger: 'blur'\n }],\n // summary: [\n // {required: true, message: '培训总结不能为空', trigger: 'blur'}\n // ],\n // teacher: [\n // {required: true, message: '培训讲师不能为空', trigger: 'blur'}\n // ],\n trainEndDate: [{\n required: true,\n message: '结束时间不能为空',\n trigger: 'blur'\n }],\n trainStartDate: [{\n required: true,\n message: '开始时间不能为空',\n trigger: 'blur'\n }] // trainee: [\n // {required: true, message: '培训对象不能为空', trigger: 'blur'}\n // ],\n // content: [\n // {required: true, message: '培训课程内容不能为空', trigger: 'blur'}\n // ]\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 // CommonApi.loadSelectOptions(\n // {name: 'cmgtSaftySelectOptions.getCmgtSaftyTrainingProjects'},\n // res => {\n // this.trainingProjectIdSelectOptions = res\n // }\n // )\n // CommonApi.loadSelectOptions(\n // {name: 'cmgtSaftySelectOptions.getUsers'},\n // res => {\n // // console.log(res)\n // this.teacherSelectOptions = res\n // }\n // )\n // CommonApi.loadSelectOptions(\n // {name: 'cmgtSaftySelectOptions.getCmgtSaftyTrainingPlans'},\n // res => {\n // this.trainingPlanIdSelectOptions = res\n // }\n // )\n this.TrainingPlan();\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 handleSelectChange: function handleSelectChange(val) {\n var _this = this;\n\n console.log(val);\n this.TrainingPlanData.map(function (item) {\n console.log(item);\n\n if (val == item.id) {\n _this.params.content = item.content;\n _this.params.location = item.location;\n _this.params.trainEndDate = item.trainingEndDate;\n _this.params.trainStartDate = item.trainingStartDate;\n _this.params.trainee = item.participant;\n }\n });\n },\n TrainingPlan: function TrainingPlan() {\n var _this2 = this;\n\n CmgtSaftyTrainingPlanApi.loadCmgtSaftyTrainingPlan({\n groupTree: {},\n pageBean: {\n page: 1,\n pageSize: 10,\n showTotal: true\n }\n }, function (res) {\n console.log(res, 'res');\n _this2.TrainingPlanData = res.rows;\n });\n },\n traineeSelectRemoteMethod: function traineeSelectRemoteMethod(query) {\n var _this3 = this;\n\n this.traineeSelectLoading = true;\n CommonApi.loadSelectOptions({\n name: 'cmgtSaftySelectOptions.getUsers',\n query: query\n }, function (res) {\n _this3.traineeSelectLoading = false;\n _this3.traineeSelectOptions = res;\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 content: '',\n location: '',\n pplanId: '',\n summary: '',\n teacher: '',\n trainEndDate: '',\n trainStartDate: '',\n trainee: '',\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 _this4 = this;\n\n this.$refs.formInfo.validate(function (valid) {\n if (valid) {\n var method;\n\n if (!_this4.params.id) {\n // 新增\n method = CmgtSaftyTrainingRecordApi.addCmgtSaftyTrainingRecord;\n } else {\n // 修改\n method = CmgtSaftyTrainingRecordApi.editCmgtSaftyTrainingRecord;\n }\n\n _this4.loading = true;\n method(_this4.params, function (res) {\n _this4.loading = false;\n\n if (res.state) {\n _this4.$notify({\n type: 'success',\n message: _this4.title + '成功',\n duration: 2000\n }); //this.$emit('loadData')\n\n\n _this4.$parent.loadData();\n\n _this4.handleClose();\n } else {\n _this4.$message.warning(res.message);\n }\n });\n }\n });\n },\n Update: function Update(row) {\n var _this5 = this;\n\n CmgtSaftyTrainingRecordApi.cmgtWorkWarnSendDetailId(row.id, function (res) {\n _this5.params = res;\n _this5.params.fileList = _this5.params.fileList ? _this5.params.fileList : [];\n\n _this5.params.fileList.forEach(function (it) {\n it.name = it.fileName + '.' + it.extensionName;\n it.url = _this5.previewUrl + it.id;\n });\n });\n this.title = '修改';\n this.showFormDia = true; // this.params = row\n }\n }\n};",null]}