{"remainingRequest":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\reform-fvue\\src\\views\\SixthConferenceImplementation\\components\\projectsDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\SixthConferenceImplementation\\components\\projectsDialog.vue","mtime":1735627367857},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\r\nimport org from '@/api/org.js'\r\nimport utils from '@/utils.js'\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\nimport projectsAPI from '@/api/SixthConferenceImplementation/index.js'\r\nimport RejectInfoBlockDialog from '@/components/dialog/RejectInfoBlockDialog.vue'\r\nimport UploadFile from '@/components/uploadFile/index.vue'\r\nimport FileList from '@/components/uploadFile/FileList.vue'\r\nimport moment from 'moment'\r\nimport { TableMixin } from '@/mixins/tableMixin'\r\nimport { file, files } from 'jszip'\r\nexport default {\r\n name: 'projectsDialog',\r\n components: {\r\n UploadFile,\r\n FileList,\r\n RejectInfoBlockDialog,\r\n },\r\n mixins: [TableMixin],\r\n data() {\r\n return {\r\n approvalComments: '',\r\n approvalCommentsList: [],\r\n displayType: '', // createEntry, pushEntry, pushComfire, createComfire展示类型\r\n reqLoading: false,\r\n activeCollapse1: ['1', '3'],\r\n visible: false,\r\n title: '新增',\r\n saveloading: false,\r\n rules: {\r\n projectName: [\r\n {\r\n required: true,\r\n message: '请输入项目名称',\r\n trigger: 'change',\r\n },\r\n ],\r\n projectType: [\r\n {\r\n required: true,\r\n message: '请选择项目类型',\r\n trigger: 'change',\r\n },\r\n ],\r\n groupName: [\r\n {\r\n required: true,\r\n message: '请选择专项小组',\r\n trigger: 'change',\r\n },\r\n ],\r\n unitId: [\r\n {\r\n required: true,\r\n message: '请选择责任单位',\r\n trigger: 'change',\r\n },\r\n ],\r\n },\r\n queryParam: {\r\n pageBean: {\r\n page: 1,\r\n pageSize: -1,\r\n },\r\n },\r\n treeData: [],\r\n typeList: [],\r\n parameter: {\r\n projectName: '',\r\n projectType: '1',\r\n groupName: '',\r\n unitId: '',\r\n unitName: '',\r\n unitCode: '',\r\n unitGrade: '',\r\n },\r\n fileList: [],\r\n markLoading: false,\r\n treeItem: null,\r\n propelInfo: {},\r\n propelRules: {\r\n propulsiveStatus: [\r\n {\r\n required: true,\r\n message: '请选择当前状态',\r\n trigger: 'change',\r\n },\r\n ],\r\n },\r\n historyPropelInfo: null,\r\n types:true\r\n }\r\n },\r\n created() {\r\n\r\n this.setTreeData()\r\n },\r\n mounted() {\r\n setTimeout(() => {\r\n if (this.$store.state.user.currentOrgDetail == null) {\r\n this.$store\r\n .dispatch('user/loadCurrentUserDetail')\r\n .then((currentOrgDetail) => {\r\n this.currentOrg = currentOrgDetail\r\n })\r\n } else {\r\n this.currentOrg = this.$store.state.user.currentOrgDetail\r\n }\r\n }, 100)\r\n },\r\n methods: {\r\n changeGroup(val, valobj) {\r\n this.parameter.groupName = valobj.name\r\n this.parameter.groupCode = valobj.value\r\n },\r\n setTreeData() {\r\n let data = JSON.parse(sessionStorage.getItem('responsibilityTree'))\r\n if (data) {\r\n this.treeData = data[0].children[0].children[0].children\r\n } else {\r\n org.getByParentAndDemToTree({\r\n orgKind: 'ogn',\r\n }).then((res) => {\r\n let treeData = res\r\n ? utils.tile2nest(res)\r\n : utils.tile2nest([])\r\n sessionStorage.setItem(\r\n 'responsibilityTree',\r\n JSON.stringify(treeData)\r\n )\r\n this.treeData = treeData[0].children[0].children[0].children\r\n })\r\n }\r\n },\r\n // 获取字典值翻译\r\n getDictName(code, value) {\r\n return utils.getDictName(code, value)\r\n },\r\n edit(val, title,types=true) {\r\n this.types = types\r\n this.title = title\r\n this.reqLoading = true\r\n this.visible = true\r\n this.parameter = val\r\n this.propelInfo.projectId = val.id\r\n if (val.detailsId) {\r\n projectsAPI.getPropelDataById(val.detailsId).then(res => {\r\n if ((res.status === 2 || res.status === 4 || res.status === 5) && title != '详情') {\r\n this.propelInfo = {\r\n files: [],\r\n projectId: val.id\r\n }\r\n this.historyPropelInfo = res\r\n this.reqLoading = false\r\n } else {\r\n this.historyById(val.id)\r\n this.propelInfo = res\r\n }\r\n })\r\n } else {\r\n setTimeout(() => {\r\n this.reqLoading = false\r\n }, 1000)\r\n }\r\n },\r\n // 历史查询\r\n historyById(id) {\r\n projectsAPI.historyById(id).then(res => {\r\n if (res.id) {\r\n this.historyPropelInfo = res\r\n }\r\n this.reqLoading = false\r\n })\r\n },\r\n add(val) {\r\n this.title = '新增'\r\n this.visible = true\r\n },\r\n changeUnit(value) {\r\n this.$nextTick(() => {\r\n let nodesObj = this.$refs['cascader'].getCheckedNodes()\r\n if (nodesObj.length) {\r\n // this.parameter.unitId = nodesObj[0].data.id\r\n this.$set(this.parameter, 'unitId', nodesObj[0].data.id)\r\n this.parameter.unitName = nodesObj[0].label\r\n this.parameter.unitCode = nodesObj[0].data.code\r\n this.parameter.unitGrade = nodesObj[0].level\r\n } else {\r\n this.parameter.unitId = ''\r\n this.parameter.unitName = ''\r\n this.parameter.unitCode = ''\r\n this.parameter.unitGrade = ''\r\n }\r\n })\r\n },\r\n // 关闭新增人员窗口\r\n handleClose() {\r\n this.approvalComments = ''\r\n this.approvalCommentsList = []\r\n this.activeCollapse1 = ['1', '3']\r\n this.visible = false\r\n this.title = ''\r\n this.saveloading = false\r\n this.displayType = ''\r\n this.parameter = {\r\n projectName: '',\r\n projectType: '1',\r\n groupName: '',\r\n unitId: '',\r\n unitName: '',\r\n unitCode: '',\r\n unitGrade: '',\r\n }\r\n this.propelInfo = {\r\n files: []\r\n }\r\n },\r\n //打卡目标录入\r\n targetEntry(ind, val) {\r\n let title = '录入'\r\n if (this.title == '详情' || this.displayType == 'pushComfire') {\r\n title = '详情'\r\n }\r\n this.$refs.targetEntryDialog.add(ind, val, title)\r\n },\r\n // 通过\r\n handleVerify() {\r\n this.$confirm('确认审核通过吗?', this.$t('common.tips'), {\r\n confirmButtonText: this.$t('common.confirm'),\r\n cancelButtonText: this.$t('common.cancel'),\r\n type: 'warning',\r\n }).then(() => {\r\n let status =\r\n this.$route.name == 'responsibleUnitReview' ? 3 : 5\r\n this.propelInfo.approvalResults = 0\r\n this.propelInfo.approvalComments = ''\r\n this.submitData(status, '审核通过')\r\n })\r\n },\r\n\r\n // 驳回确认\r\n handleReject() {\r\n this.$confirm('确认驳回吗?', this.$t('common.tips'), {\r\n confirmButtonText: this.$t('common.confirm'),\r\n cancelButtonText: this.$t('common.cancel'),\r\n type: 'error',\r\n }).then(() => {\r\n this.$refs.RejectInfoBlockDialog.open()\r\n })\r\n },\r\n // 驳回提交数据\r\n sendRejectInfo(rejectInfo) {\r\n let status = this.$route.name == 'responsibleUnitReview' ? 2 : 4\r\n if (!rejectInfo) {\r\n this.saveLoading = false\r\n return\r\n }\r\n this.propelInfo.approvalResults = 1\r\n this.propelInfo.approvalComments = rejectInfo\r\n this.submitData(status, '审核驳回')\r\n },\r\n // 根据id获取节点\r\n getUnitItem(data, id) {\r\n data.forEach((item) => {\r\n if (item.id == id) {\r\n this.treeItem = item\r\n } else {\r\n if (item.children) {\r\n this.getUnitItem(item.children, id)\r\n }\r\n }\r\n })\r\n },\r\n // 保存\r\n handleSave() {\r\n this.$refs.formInfo.validate((valid) => {\r\n if (valid) {\r\n this.markLoading = true\r\n this.getUnitItem(this.treeData, this.parameter.unitId)\r\n this.parameter.unitGrade = this.treeItem.grade\r\n this.parameter.sendStatus = 0\r\n if (this.title === '新增') {\r\n projectsAPI.addData(this.parameter).then((res) => {\r\n if (res.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: '新增成功',\r\n duration: 2000,\r\n })\r\n this.$emit('getData')\r\n this.handleClose()\r\n }\r\n this.markLoading = false\r\n })\r\n } else {\r\n projectsAPI.editData(this.parameter).then((res) => {\r\n if (res.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: '修改成功',\r\n duration: 2000,\r\n })\r\n this.$emit('getData')\r\n this.handleClose()\r\n }\r\n this.markLoading = false\r\n })\r\n }\r\n } else {\r\n this.$message.warning('信息录入有误,请检查后保存')\r\n }\r\n })\r\n },\r\n // 推进保存\r\n handlePropelSave(status) {\r\n this.$refs.propelInfo.validate((valid) => {\r\n if (valid) {\r\n let msg = status ? '保存并上报' : '保存为草稿'\r\n this.$confirm(`确认${msg}吗?`, this.$t('common.tips'), {\r\n confirmButtonText: this.$t('common.confirm'),\r\n cancelButtonText: this.$t('common.cancel'),\r\n type: 'success',\r\n }).then(() => {\r\n this.submitData(status, msg)\r\n })\r\n }\r\n })\r\n },\r\n // 提交数据\r\n submitData(status, msg) {\r\n this.markLoading = true\r\n let data = JSON.parse(JSON.stringify(this.propelInfo))\r\n data.status = status\r\n let api = data.id ? 'propelUpdate' : 'propelAdd'\r\n projectsAPI[api](data).then(res => {\r\n if (res.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: `${msg}成功`,\r\n duration: 2000,\r\n })\r\n this.$emit('getData')\r\n this.handleClose()\r\n }\r\n this.markLoading = false\r\n })\r\n },\r\n\r\n // 详情按钮修改编辑之后的 保存\r\n submitDataSecond(){\r\n this.markLoading = true\r\n let data = JSON.parse(JSON.stringify(this.propelInfo))\r\n projectsAPI.propelUpdate(data).then(res => {\r\n if (res.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: '保存成功',\r\n duration: 2000,\r\n })\r\n this.$emit('getData')\r\n this.handleClose()\r\n }\r\n this.markLoading = false\r\n })\r\n },\r\n\r\n // ------------文件相关--------------\r\n openUploade() {\r\n this.$refs.uploadFile.open('Effect')\r\n },\r\n // 文件涉密\r\n setAipher() {\r\n this.$set(this.propelInfo, 'classified', '1')\r\n },\r\n // 上传附件\r\n setFileList(file) {\r\n file.id = file.response.fileId\r\n this.propelInfo.files\r\n ? this.propelInfo.files.push(file)\r\n : this.$set(this.propelInfo, 'files', [file])\r\n this.propelInfo.classified = ''\r\n },\r\n changeFileList(arr) {\r\n this.propelInfo.files = arr\r\n },\r\n },\r\n}\r\n",null]}