{"remainingRequest":"D:\\jenkins\\workspace\\reform-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\reform-fvue\\src\\views\\ReformSituation\\components\\addFormDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\ReformSituation\\components\\addFormDialog.vue","mtime":1745572395279},{"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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\nconst portal = window.context.portal\r\nimport {TableMixin} from '@/mixins/tableMixin'\r\nimport projectCase from '@/views/ReformSituation/components/projectCase.vue'\r\nimport pilotCase from '@/views/ReformSituation/components/pilotCase.vue'\r\nimport addNation from '@/views/ReformSituation/components/addNation.vue'\r\nimport countyApi from '@/api/ReformSituation/countyApi'\r\nimport RejectInfoBlockDialog from '@/components/dialog/RejectInfoBlockDialog.vue'\r\nimport req from '@/request'\r\nexport default {\r\n name: 'AddFormDialog',\r\n components: {RejectInfoBlockDialog, projectCase, pilotCase, addNation},\r\n mixins: [TableMixin],\r\n props: {},\r\n data() {\r\n return {\r\n routeName:'',\r\n item: {},\r\n visible: false,\r\n reqLoading: false,\r\n activeNames: '',\r\n title: '',\r\n base: {\r\n municipalProjectTotalNum: 0,\r\n municipalProjectPlanNum: 0,\r\n municipalProjectFinishNum: 0,\r\n newProjectTotalNum: 0,\r\n newProjectPlanNum: 0,\r\n newProjectFinishNum: 0,\r\n selfProjectTotalNum: 0,\r\n selfProjectPlanNum: 0,\r\n selfProjectFinishNum: 0,\r\n nationPointProcessNum: 0,\r\n nationPointNewNum: 0,\r\n nationPointFinishNum: 0,\r\n municipalPointProcessNum: 0,\r\n municipalPointNewNum: 0,\r\n municipalPointFinishNum: 0,\r\n nationwideAffirmNum: 0\r\n },\r\n baseBack: {\r\n municipalProjectTotalNum: 0,\r\n municipalProjectPlanNum: 0,\r\n municipalProjectFinishNum: 0,\r\n newProjectTotalNum: 0,\r\n newProjectPlanNum: 0,\r\n newProjectFinishNum: 0,\r\n selfProjectTotalNum: 0,\r\n selfProjectPlanNum: 0,\r\n selfProjectFinishNum: 0,\r\n nationPointProcessNum: 0,\r\n nationPointNewNum: 0,\r\n nationPointFinishNum: 0,\r\n municipalPointProcessNum: 0,\r\n municipalPointNewNum: 0,\r\n municipalPointFinishNum: 0,\r\n nationwideAffirmNum: 0\r\n },\r\n municipalProjectList: [],\r\n newProjectList: [],\r\n selfProjectList: [],\r\n nationPointList: [],\r\n municipalPointList: [],\r\n nationList: [],\r\n historyMunicipalProjectList: [],\r\n historyNationPointList: [],\r\n historyNewProjectList: [],\r\n historySelfProjectList: [],\r\n historyMunicipalPointList: [],\r\n historyNationList: [],\r\n rules: {},\r\n echoData:{},\r\n reformOffice:false,\r\n municipalDepartment:false,\r\n details:{},\r\n showLoading:true,\r\n isSave1:false,\r\n isSave2:false,\r\n isSave3:false,\r\n isSave4:false,\r\n isSave5:false,\r\n isSave6:false,\r\n isBtnLoading:false,\r\n isHistory:false,\r\n isApi:false,\r\n }\r\n },\r\n created() {\r\n let {name} = this.$route\r\n this.routeName = name\r\n },\r\n methods: {\r\n isEdit() {\r\n return true\r\n },\r\n isDetails(){\r\n return this.title !== '详情'\r\n },\r\n upDate(item, title) {\r\n this.title = title\r\n this.item = item\r\n this.visible = true\r\n\r\n // 判断是否有status 有掉详情接口,没则掉历史接口\r\n if(item.status>=0){\r\n this.getDetails()\r\n }else{\r\n this.getHistoryDataChange()\r\n }\r\n\r\n if(title === '责任单位审核'){\r\n this.reformOffice = true\r\n }\r\n if(title === '改革办审核'){\r\n this.municipalDepartment = true\r\n }\r\n },\r\n // 详情回显\r\n getDetails(){\r\n this.reqLoading = true\r\n countyApi.countiesAreDisplayed(this.item.id).then(res => {\r\n this.isApi = true\r\n this.details = res\r\n this.base = res.base\r\n // 根据isHistory字段判断\r\n this.historyMunicipalProjectList = res.municipalProjectList.filter(item => item.isHistory === '1')\r\n this.municipalProjectList = res.municipalProjectList.filter(item => item.isHistory === '0')\r\n\r\n this.historyNationPointList = res.nationPointList.filter(item => item.isHistory === '1')\r\n this.nationPointList = res.nationPointList.filter(item => item.isHistory === '0')\r\n\r\n this.historyNewProjectList = res.newProjectList.filter(item => item.isHistory === '1')\r\n this.newProjectList = res.newProjectList.filter(item => item.isHistory === '0')\r\n\r\n this.historySelfProjectList = res.selfProjectList.filter(item => item.isHistory === '1')\r\n this.selfProjectList = res.selfProjectList.filter(item => item.isHistory === '0')\r\n\r\n this.historyMunicipalPointList = res.municipalPointList.filter(item => item.isHistory === '1')\r\n this.municipalPointList = res.municipalPointList.filter(item => item.isHistory === '0')\r\n\r\n this.nationList = res.nationList\r\n\r\n this.showLoading = false\r\n this.reqLoading = false\r\n })\r\n },\r\n // 查看历史通过数据\r\n getHistoryDataChange(){\r\n let param = {\r\n id:this.item.id,\r\n unitId:this.item.unitId,\r\n createTime:this.item.createTime\r\n }\r\n this.reqLoading = true\r\n countyApi.countyHistory(param).then(res => {\r\n if(JSON.stringify(res) !== '{}'){\r\n this.details = res\r\n this.base = res.base\r\n this.isHistory = true\r\n //判断第一次新增的时候\r\n this.municipalProjectList = res.municipalProjectList?res.municipalProjectList:[]\r\n this.newProjectList = res.newProjectList?res.newProjectList:[]\r\n this.selfProjectList = res.selfProjectList?res.selfProjectList:[]\r\n this.nationPointList = res.nationPointList?res.nationPointList:[]\r\n this.municipalPointList = res.municipalPointList?res.municipalPointList:[]\r\n this.nationList = res.nationList?res.nationList:[]\r\n\r\n this.historyMunicipalProjectList = res.municipalProjectList?res.municipalProjectList:[]\r\n this.historyNationPointList = res.nationPointList?res.nationPointList:[]\r\n this.historyNewProjectList = res.newProjectList?res.newProjectList:[]\r\n this.historySelfProjectList = res.selfProjectList?res.selfProjectList:[]\r\n this.historyMunicipalPointList = res.municipalPointList?res.municipalPointList:[]\r\n this.showLoading = false\r\n this.reqLoading = false\r\n }\r\n })\r\n },\r\n // 保存\r\n handlSaveOrUpdate(type) {\r\n if(!this.isSave1 && !this.isHistory){\r\n this.municipalProjectList = [...this.municipalProjectList,...this.historyMunicipalProjectList]\r\n }\r\n if(!this.isSave2 && !this.isHistory){\r\n this.newProjectList = [...this.newProjectList,...this.historyNewProjectList]\r\n }\r\n if(!this.isSave3 && !this.isHistory){\r\n this.selfProjectList = [...this.selfProjectList,...this.historySelfProjectList]\r\n }\r\n if(!this.isSave4 && !this.isHistory){\r\n this.nationPointList = [...this.nationPointList,...this.historyNationPointList]\r\n }\r\n if(!this.isSave5 && !this.isHistory){\r\n this.municipalPointList = [...this.municipalPointList,...this.historyMunicipalPointList]\r\n }\r\n let params = {\r\n base: this.base,\r\n municipalProjectList: this.municipalProjectList,\r\n newProjectList: this.newProjectList,\r\n selfProjectList: this.selfProjectList,\r\n nationPointList: this.nationPointList,\r\n municipalPointList: this.municipalPointList,\r\n nationList: this.nationList,\r\n ...this.item,\r\n status:type,\r\n }\r\n this.isBtnLoading = true\r\n if(this.item.status>=0){\r\n countyApi.renewalOfDistrictsAndCounties(params).then(res => {\r\n if (res.state) {\r\n this.handleClose()\r\n this.$emit('confirm')\r\n this.$message.success('更新成功')\r\n }\r\n })\r\n }else{\r\n countyApi.renewalOfDistrictsAndFirst(params).then(res => {\r\n if (res.state) {\r\n this.handleClose()\r\n this.$emit('confirm')\r\n this.$message.success('更新成功')\r\n }\r\n })\r\n }\r\n },\r\n // 取消\r\n handleClose() {\r\n this.visible = false\r\n this.isSave1 = false\r\n this.isSave2 = false\r\n this.isSave3 = false\r\n this.isSave4 = false\r\n this.isSave5 = false\r\n this.isSave6 = false\r\n this.isBtnLoading = false\r\n this.showLoading = true\r\n this.isHistory = false\r\n this.reformOffice = false\r\n this.municipalDepartment = false\r\n this.base = JSON.parse(JSON.stringify(this.baseBack))\r\n },\r\n // 63填报,40项,因地制宜\r\n filingChange(title) {\r\n let data = []\r\n let historyData = []\r\n if(title ==='对接市委六届六次全会部署63项'){\r\n if(!this.isSave1){\r\n if(this.isHistory){\r\n data = []\r\n historyData = this.historyMunicipalProjectList\r\n }else{\r\n data = this.municipalProjectList\r\n historyData = this.historyMunicipalProjectList\r\n }\r\n this.isSave1 = false\r\n }else{\r\n // 根据isHistory字段判断 (弹窗保存时 这个时候 融合到一起了)\r\n data = this.municipalProjectList.filter(item => item.isHistory === '0')\r\n historyData = this.municipalProjectList.filter(item => item.isHistory === '1')\r\n }\r\n }else if(title === '对接新推进40项'){\r\n if(!this.isSave2){\r\n if(this.isHistory){\r\n data = []\r\n historyData = this.historyNewProjectList\r\n }else{\r\n data = this.newProjectList\r\n historyData = this.historyNewProjectList\r\n }\r\n this.isSave2 = false\r\n }else{\r\n data = this.newProjectList.filter(item => item.isHistory === '0')\r\n historyData = this.newProjectList.filter(item => item.isHistory === '1')\r\n }\r\n }else{\r\n if(!this.isSave3){\r\n if(this.isHistory){\r\n data = []\r\n historyData = this.historySelfProjectList\r\n }else{\r\n data = this.selfProjectList\r\n historyData = this.historySelfProjectList\r\n }\r\n this.isSave3 = false\r\n }else{\r\n data = this.selfProjectList.filter(item => item.isHistory === '0')\r\n historyData = this.selfProjectList.filter(item => item.isHistory === '1')\r\n }\r\n }\r\n this.$refs.projectCase.upDate(title,data,this.title,historyData,this.details)\r\n },\r\n //国家级改革、市级改革\r\n pilotReform(title) {\r\n let data = []\r\n let historyData = []\r\n if(title ==='国家级'){\r\n if(!this.isSave4){\r\n if(this.isHistory){\r\n data = []\r\n historyData = this.historyNationPointList\r\n }else{\r\n data = this.nationPointList\r\n historyData = this.historyNationPointList\r\n }\r\n this.isSave4 = false\r\n }else{\r\n // 根据isHistory字段判断 (弹窗保存时 这个时候 融合到一起了)\r\n data = this.nationPointList.filter(item => item.isHistory === '0')\r\n historyData = this.nationPointList.filter(item => item.isHistory === '1')\r\n }\r\n }else{\r\n if(!this.isSave5){\r\n if(this.isHistory){\r\n data = []\r\n historyData = this.historyMunicipalPointList\r\n }else{\r\n data = this.municipalPointList\r\n historyData = this.historyMunicipalPointList\r\n }\r\n this.isSave5 = false\r\n }else{\r\n // 根据isHistory字段判断 (弹窗保存时 这个时候 融合到一起了)\r\n data = this.municipalPointList.filter(item => item.isHistory === '0')\r\n historyData = this.municipalPointList.filter(item => item.isHistory === '1')\r\n }\r\n }\r\n this.$refs.pilotCase.upDate(title,data,this.title,historyData,this.details)\r\n },\r\n //改革经验\r\n nationChange() {\r\n this.isSave6 = false\r\n this.$refs.addNation.upDate(this.nationList,this.title,this.details)\r\n },\r\n // 将3个数组转为一个\r\n mergeProjects(arrays){\r\n if(arrays.length<=0){\r\n return []\r\n } else{\r\n const merged = {};\r\n arrays.forEach(array => {\r\n array.forEach(item => {\r\n const { key } = item;\r\n if (!merged[key]) {\r\n merged[key] = { key }; // 初始化\r\n }\r\n Object.assign(merged[key], item); // 合并内容\r\n });\r\n });\r\n return Object.values(merged); // 转换为数组\r\n }\r\n },\r\n onComfirm(data, title) {\r\n const datas = this.mergeProjects([data.projectList, data.researchList, data.introducedList])\r\n const dataHistory = this.mergeProjects([data.historyProjectList, data.historyResearchList, data.histotyIntroducedList])\r\n if (title === '对接市委六届六次全会部署63项') {\r\n this.isSave1 = true\r\n this.municipalProjectList = [...dataHistory,...datas]\r\n this.base.municipalProjectTotalNum = data.projectList.length + data.historyProjectList.length;\r\n this.base.municipalProjectFinishNum = data.researchList.length + data.historyResearchList.length;\r\n this.base.municipalProjectPlanNum = data.introducedList.length + data.histotyIntroducedList.length;\r\n } else if (title === '对接新推进40项') {\r\n this.isSave2 = true\r\n this.newProjectList = [...dataHistory,...datas]\r\n this.base.newProjectTotalNum = data.projectList.length + data.historyProjectList.length;\r\n this.base.newProjectFinishNum = data.researchList.length + data.historyResearchList.length;\r\n this.base.newProjectPlanNum = data.introducedList.length + data.histotyIntroducedList.length;\r\n } else {\r\n this.isSave3 = true\r\n this.selfProjectList = [...dataHistory,...datas]\r\n this.base.selfProjectTotalNum = data.projectList.length + data.historyProjectList.length;\r\n this.base.selfProjectFinishNum = data.researchList.length + data.historyResearchList.length;\r\n this.base.selfProjectPlanNum = data.introducedList.length + data.histotyIntroducedList.length;\r\n }\r\n },\r\n onPilotComfirm(data, title) {\r\n const datas = this.mergeProjects([data.projectList, data.researchList, data.introducedList])\r\n const dataHistory = this.mergeProjects([data.historyProjectList, data.historyResearchList, data.histotyIntroducedList])\r\n if (title === '国家级') {\r\n this.isSave4 = true\r\n this.nationPointList = [...dataHistory,...datas]\r\n this.base.nationPointProcessNum = (data.projectList.length - data.researchList.length) + (data.historyProjectList.length - data.historyResearchList.length);\r\n this.base.nationPointFinishNum = data.researchList.length + data.historyResearchList.length;\r\n this.base.nationPointNewNum = data.introducedList.length + data.histotyIntroducedList.length;\r\n } else {\r\n this.isSave5 = true\r\n this.municipalPointList = [...dataHistory,...datas]\r\n this.base.municipalPointProcessNum = (data.projectList.length - data.researchList.length) + (data.historyProjectList.length - data.historyResearchList.length);\r\n this.base.municipalPointFinishNum = data.researchList.length + data.historyResearchList.length;\r\n this.base.municipalPointNewNum = data.introducedList.length + data.histotyIntroducedList.length;\r\n }\r\n },\r\n nationComfirm(data,type) {\r\n this.isSave6 = true\r\n this.nationList = [...data.historyNationList,...data.nationList]\r\n this.base.nationwideAffirmNum = data.nationList.length + data.historyNationList.length;\r\n },\r\n handleVerify(status){\r\n this.$confirm(`*: 如有修改,请先点击“保存”按钮,保存成功之后再进行操作!
请确认审核是否通过?`, this.$t('common.tips'), {\r\n confirmButtonText: this.$t('common.confirm'),\r\n cancelButtonText: this.$t('common.cancel'),\r\n dangerouslyUseHTMLString: true,\r\n type: 'warning'\r\n }).then(() => {\r\n let formData = new FormData()\r\n formData.append('id',this.item.id);\r\n formData.append('status',status);\r\n formData.append('approvalResults',0);\r\n this.isBtnLoading = true\r\n this.reqLoading = true\r\n countyApi.updateByStatus(formData).then(res => {\r\n if (res.state) {\r\n this.handleClose()\r\n this.reqLoading = false\r\n this.$emit('confirm')\r\n this.$message.success('审核成功')\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 dangerouslyUseHTMLString: true,\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 === 'qxReviewOfReform' ? 2 : 4\r\n if (!rejectInfo) {\r\n this.saveLoading = false\r\n return\r\n }\r\n let formData = new FormData()\r\n formData.append('id',this.item.id);\r\n formData.append('status',status);\r\n formData.append('approvalResults',1);\r\n formData.append('approvalComments',rejectInfo);\r\n this.isBtnLoading = true\r\n this.reqLoading = true\r\n countyApi.updateByStatus(formData).then(res => {\r\n if (res.state) {\r\n this.handleClose()\r\n this.reqLoading = false\r\n this.$emit('confirm')\r\n this.$message.success('驳回成功')\r\n }\r\n })\r\n },\r\n // 驳回原因查看\r\n opdismissedView(data) {\r\n this.$alert(data, '驳回详情', {\r\n customClass: 'message_box_alert',\r\n showConfirmButton: false\r\n })\r\n },\r\n auditSave(){\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 if(!this.isSave1){\r\n this.municipalProjectList = [...this.municipalProjectList,...this.historyMunicipalProjectList]\r\n }\r\n if(!this.isSave2){\r\n this.newProjectList = [...this.newProjectList,...this.historyNewProjectList]\r\n }\r\n if(!this.isSave3){\r\n this.selfProjectList = [...this.selfProjectList,...this.historySelfProjectList]\r\n }\r\n if(!this.isSave4){\r\n this.nationPointList = [...this.nationPointList,...this.historyNationPointList]\r\n }\r\n if(!this.isSave5){\r\n this.municipalPointList = [...this.municipalPointList,...this.historyMunicipalPointList]\r\n }\r\n if(!this.isSave6){\r\n this.nationList = [...this.nationList,...this.historyNationList]\r\n }\r\n let params = {\r\n base: this.base,\r\n municipalProjectList: this.municipalProjectList,\r\n newProjectList: this.newProjectList,\r\n selfProjectList: this.selfProjectList,\r\n nationPointList: this.nationPointList,\r\n municipalPointList: this.municipalPointList,\r\n nationList: this.nationList,\r\n ...this.item,\r\n }\r\n this.isBtnLoading = true\r\n countyApi.updateForm(params).then(res => {\r\n if (res.state) {\r\n this.handleClose()\r\n this.$emit('confirm')\r\n this.$message.success('保存成功')\r\n }\r\n })\r\n })\r\n }\r\n }\r\n}\r\n",null]}