{"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\\addPilot.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\ReformSituation\\components\\addPilot.vue","mtime":1745564629841},{"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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 {TableMixin} from '@/mixins/tableMixin'\r\nimport FileList from '@/components/uploadFile/FileList.vue'\r\nimport UploadFile from '@/components/uploadFile/index.vue'\r\nexport default {\r\n name: 'AddFormDialog',\r\n components: {UploadFile, FileList},\r\n mixins: [TableMixin],\r\n props: {},\r\n data() {\r\n const validateReportFileList = (rule, value, callback) => {\r\n const parts = rule.field.split('.')\r\n const listName = parts[0]\r\n const index = parts[1]\r\n const reportFileList = parts[2]\r\n if (this.parameter[listName][index].reportFileIsClassified === '0') {\r\n if (this.parameter[listName][index][reportFileList].length > 0) {\r\n callback()\r\n } else {\r\n callback(new Error('请上传附件'))\r\n }\r\n } else {\r\n callback()\r\n }\r\n }\r\n const validateProofFileList = (rule, value, callback) => {\r\n const parts = rule.field.split('.')\r\n const listName = parts[0]\r\n const index = parts[1]\r\n const proofFileList = parts[2]\r\n if (this.parameter[listName][index].proofFileIsClassified === '0') {\r\n if (this.parameter[listName][index][proofFileList].length > 0) {\r\n callback()\r\n } else {\r\n callback(new Error('请上传附件'))\r\n }\r\n } else {\r\n callback()\r\n }\r\n }\r\n return {\r\n visibleProject: false,\r\n reqLoading: false,\r\n title: '',\r\n activeCollapse1: ['1', '2', '3'],\r\n parameter: {\r\n projectList: [],\r\n researchList: [],\r\n introducedList: []\r\n },\r\n parameterBack: {},\r\n rules: {\r\n projectName: [\r\n {required: true, message: '试点名称不能为空', trigger: 'blur'}\r\n ],\r\n isFinish: [\r\n {required: true, message: '是否完成调研不能为空', trigger: 'change'}\r\n ],\r\n isPlan: [\r\n {required: true, message: '是否出台方案不能为空', trigger: 'change'}\r\n ],\r\n reportFileList: [\r\n {validator: validateReportFileList, trigger: 'blur'}\r\n ],\r\n proofFileList: [\r\n {validator: validateProofFileList, trigger: 'blur'}\r\n ]\r\n },\r\n // 上传附件时的标识\r\n upIndex: 0,\r\n upType: '',\r\n identify: '',\r\n category: '',\r\n isDetails: false,\r\n isAudit: false,\r\n details:{}\r\n }\r\n },\r\n created() {},\r\n methods: {\r\n cellMouseEnter(row,cloumn,cell,event) {\r\n if(row.isNowDatar === '1' || row.isNowDatas === '1'){\r\n return this.createTips(event, row, '本条数据为历史填报内容,现已进入本次填报的修改行列中,请完善填报内容')\r\n }\r\n },\r\n cellMouseLeave(row){\r\n this.removeTips(row)\r\n },\r\n // 创建toolTip\r\n createTips(el, row, value) {\r\n const { key } = row\r\n const tooltipDom = document.createElement('div')\r\n tooltipDom.style.cssText = `\r\n display: inline-block;\r\n max-width: 300px;\r\n max-height: 300px;\r\n position: absolute;\r\n top: ${el.clientY + 5}px;\r\n left: ${el.clientX}px;\r\n padding:5px 10px;\r\n overflow: auto;\r\n font-size: 12px;\r\n font-family: PingFangSC-Regular, PingFang SC;\r\n font-weight: 400;\r\n color: #595959;\r\n background: #fff;\r\n border-radius: 5px;\r\n z-index: 19999;\r\n box-shadow: 0 4px 12px 1px #ccc;\r\n `\r\n tooltipDom.innerHTML = value\r\n tooltipDom.setAttribute('id', `tooltip-${key}`)\r\n // 将浮层插入到body中\r\n document.body.appendChild(tooltipDom)\r\n },\r\n // 删除tooltip\r\n removeTips(row) {\r\n const { key } = row\r\n this.$nextTick(()=>{\r\n const tooltipDomLeave = document.querySelectorAll(`#tooltip-${key}`)\r\n if (tooltipDomLeave.length) {\r\n tooltipDomLeave.forEach(dom => {\r\n document.body.removeChild(dom)\r\n })\r\n }\r\n })\r\n },\r\n tableRowClassNamer({row, index}) {\r\n if(this.details.status === 5){\r\n return ''\r\n }else if(row.isNowDatar === '1') {\r\n return 'highlight-row';\r\n }else{\r\n return '';\r\n }\r\n },\r\n tableRowClassNames({row, index}) {\r\n if(this.details.status === 5){\r\n return ''\r\n }else if(row.isNowDatas === '1') {\r\n return 'highlight-row';\r\n }else{\r\n return '';\r\n }\r\n },\r\n blurNameChange(index){\r\n let array2 = []\r\n array2 = this.parameter.researchList.filter(item=>item.key===this.parameter.projectList[index].key)\r\n if(array2.length>0){\r\n this.parameter.researchList = this.parameter.researchList.map(item=>{\r\n let name = ''\r\n if(item.key === array2[0].key){\r\n name = this.parameter.projectList[index].projectName\r\n }else{\r\n name = item.projectName\r\n }\r\n return {\r\n ...item,\r\n projectName:name\r\n }\r\n })\r\n }\r\n\r\n let array1 = []\r\n array1 = this.parameter.introducedList.filter(item=>item.key===this.parameter.projectList[index].key)\r\n if(array1.length>0){\r\n this.parameter.introducedList = this.parameter.introducedList.map(item=>{\r\n let name = ''\r\n if(item.key === array1[0].key){\r\n name = this.parameter.projectList[index].projectName\r\n }else{\r\n name = item.projectName\r\n }\r\n return {\r\n ...item,\r\n projectName:name\r\n }\r\n })\r\n }\r\n },\r\n upDate(title, dataList, isDetails, historyDataList,isEditHistory,details) {\r\n this.details = details\r\n this.isAudit = isEditHistory === '改革办审核';\r\n this.isDetails = isDetails\r\n this.parameter = {...dataList,...historyDataList}\r\n this.parameterBack = JSON.parse(JSON.stringify(this.parameter))\r\n this.title = title\r\n this.visibleProject = true\r\n\r\n //调研和出台方案 设置index\r\n if(this.parameter.historyResearchList.length > 0){\r\n this.parameter.historyResearchList = this.getHistoryIndexChange(this.parameter.historyProjectList,this.parameter.historyResearchList)\r\n }\r\n if(this.parameter.histotyIntroducedList.length > 0){\r\n this.parameter.histotyIntroducedList = this.getHistoryIndexChange(this.parameter.historyProjectList,this.parameter.histotyIntroducedList)\r\n }\r\n\r\n // 序号回显\r\n this.getIndexChange()\r\n },\r\n // 序号回显\r\n getIndexChange(){\r\n if(this.parameter.historyProjectList.length > 0) {\r\n this.parameter.projectList = this.parameter.projectList.map((item,indexs)=>{\r\n return {\r\n ...item,\r\n index:this.parameter.historyProjectList.length+indexs+1\r\n }\r\n })\r\n // 调研列表\r\n this.parameter.projectList.forEach(itemA => {\r\n const itemB = this.parameter.researchList.find(item => item.key === itemA.key);\r\n if (itemB) {\r\n itemB.index = itemA.index;\r\n }\r\n });\r\n this.parameter.projectList.forEach(itemA => {\r\n const itemB = this.parameter.introducedList.find(item => item.key === itemA.key);\r\n if (itemB) {\r\n itemB.index = itemA.index;\r\n }\r\n });\r\n }else{\r\n this.parameter.projectList = this.parameter.projectList.map((item,indexs)=>{\r\n return {\r\n ...item,\r\n index:indexs+1\r\n }\r\n })\r\n // 调研列表\r\n this.parameter.projectList.forEach(itemA => {\r\n const itemB = this.parameter.researchList.find(item => item.key === itemA.key);\r\n if (itemB) {\r\n itemB.index = itemA.index;\r\n }\r\n });\r\n this.parameter.projectList.forEach(itemA => {\r\n const itemB = this.parameter.introducedList.find(item => item.key === itemA.key);\r\n if (itemB) {\r\n itemB.index = itemA.index;\r\n }\r\n });\r\n }\r\n },\r\n getHistoryIndexChange(oldData, newData) {\r\n let serviceData = []\r\n serviceData = newData.map(item => {\r\n // 查找 a 中与 b 当前项的 id 匹配的下标\r\n const index = oldData.findIndex(aItem => aItem.key === item.key)\r\n // 返回新的对象,包含 b 的原有属性和找到的 index\r\n return {...item, index: index}\r\n })\r\n return serviceData\r\n },\r\n handleClose() {\r\n this.parameter = JSON.parse(JSON.stringify(this.parameterBack))\r\n this.parameter.projectList = this.parameter.projectList.filter(\r\n item => item.projectName !== ''\r\n )\r\n this.$emit('confirm', this.parameter)\r\n this.visibleProject = false\r\n },\r\n confirmChange() {\r\n this.$refs['formInfo'].validate(valid => {\r\n if (valid) {\r\n this.$emit('confirm', this.parameter)\r\n this.visibleProject = false\r\n } else {\r\n this.$message.warning('请填写必填选项!')\r\n }\r\n })\r\n },\r\n tableAdd(type) {\r\n if (type === 'projectList') {\r\n this.parameter[type].push({\r\n index: this.parameter.historyProjectList.length + this.parameter.projectList.length + 1,\r\n key: this.parameter[type].length + new Date(),\r\n isHistory:'0',\r\n projectName: '',\r\n finishExit:true,\r\n planExit:true,\r\n })\r\n }\r\n },\r\n tableDel(type, row) {\r\n this.parameter[type] = this.parameter[type].filter(\r\n item => item.key !== row.key\r\n )\r\n this.getIndexChange()\r\n if (this.parameter.researchList.length > 0) {\r\n this.parameter.researchList = this.parameter.researchList.filter(\r\n item => item.key !== row.key\r\n )\r\n }\r\n if (this.parameter.introducedList.length > 0) {\r\n this.parameter.introducedList = this.parameter.introducedList.filter(\r\n item => item.key !== row.key\r\n )\r\n }\r\n },\r\n // 调研单选框\r\n researchChange(item, index) {\r\n if (\r\n item.projectName === undefined ||\r\n item.projectName === null ||\r\n item.projectName === ''\r\n ) {\r\n this.$message.warning('请先填写项目名称!')\r\n return false\r\n }\r\n let param = {\r\n index: index,\r\n projectName: item.projectName,\r\n key: item.key,\r\n isHistory: '0',\r\n reportFileList: [],\r\n reportFileIsClassified: '0',\r\n finishExit:true,\r\n }\r\n if (item.isFinish === '1') {\r\n this.parameter.researchList.splice(index, 0, param)\r\n this.parameter.researchList.sort((a, b) => a.index - b.index);\r\n } else {\r\n this.parameter.researchList = this.parameter.researchList.filter(\r\n obj => obj.key !== item.key\r\n )\r\n }\r\n },\r\n // 调研单选框 (历史)\r\n researchHistoryChange(item,index) {\r\n if (\r\n item.projectName === undefined ||\r\n item.projectName === null ||\r\n item.projectName === ''\r\n ) {\r\n this.$message.warning('请先填写项目名称!')\r\n return false\r\n }\r\n let param = {\r\n index:index,\r\n projectName: item.projectName,\r\n key:item.key,\r\n isHistory: '1',\r\n reportFileList: [],\r\n reportFileIsClassified:'0',\r\n finishExit:true,\r\n isNowDatar:'1'\r\n }\r\n if (item.isFinish === '1') {\r\n this.parameter.historyResearchList.splice(index, 0, param);\r\n this.parameter.historyResearchList.sort((a, b) => a.index - b.index);\r\n } else {\r\n this.parameter.historyResearchList = this.parameter.historyResearchList.filter(\r\n obj => obj.key !== item.key\r\n )\r\n }\r\n },\r\n //出台\r\n introducedChange(item, index) {\r\n if (\r\n item.projectName === undefined ||\r\n item.projectName === null ||\r\n item.projectName === ''\r\n ) {\r\n this.$message.warning('请先填写项目名称!')\r\n return false\r\n }\r\n let param = {\r\n index: index,\r\n projectName: item.projectName,\r\n key: item.key,\r\n isHistory: '0',\r\n proofFileList: [],\r\n proofFileIsClassified: '0',\r\n planExit:true,\r\n }\r\n if (item.isPlan === '1') {\r\n this.parameter.introducedList.splice(index, 0, param)\r\n this.parameter.introducedList.sort((a, b) => a.index - b.index);\r\n } else {\r\n this.parameter.introducedList = this.parameter.introducedList.filter(\r\n obj => obj.key !== item.key\r\n )\r\n }\r\n },\r\n //出台(历史)\r\n introducedHistoryChange(item,index) {\r\n if (\r\n item.projectName === undefined ||\r\n item.projectName === null ||\r\n item.projectName === ''\r\n ) {\r\n this.$message.warning('请先填写项目名称!')\r\n return false\r\n }\r\n let param = {\r\n index:index,\r\n projectName: item.projectName,\r\n key:item.key,\r\n proofFileList: [],\r\n isHistory: '1',\r\n proofFileIsClassified:'0',\r\n planExit:true,\r\n isNowDatas:'1'\r\n }\r\n if (item.isPlan === '1') {\r\n this.parameter.histotyIntroducedList.splice(index, 0, param);\r\n this.parameter.histotyIntroducedList.sort((a, b) => a.index - b.index);\r\n } else {\r\n this.parameter.histotyIntroducedList = this.parameter.histotyIntroducedList.filter(\r\n obj => obj.key !== item.key\r\n )\r\n }\r\n },\r\n // 附件相关\r\n setAipher() {\r\n if (this.identify === '1') {\r\n if(this.category === 'history'){\r\n this.$set(this.parameter.historyResearchList[this.upIndex],'reportFileIsClassified',\r\n '1'\r\n )\r\n }else{\r\n this.$set(this.parameter.researchList[this.upIndex],'reportFileIsClassified',\r\n '1'\r\n )\r\n }\r\n } else {\r\n if(this.category === 'history'){\r\n this.$set(this.parameter.histotyIntroducedList[this.upIndex],'proofFileIsClassified',\r\n '1'\r\n )\r\n }else{\r\n this.$set(this.parameter.introducedList[this.upIndex],'proofFileIsClassified',\r\n '1'\r\n )\r\n }\r\n }\r\n },\r\n deleteTag(index, type ,category) {\r\n if (type === 'reportFileList') {\r\n if(category === 'history'){\r\n this.$set(this.parameter.historyResearchList[index], 'reportFileIsClassified', '0')\r\n }else{\r\n this.$set(this.parameter.researchList[index], 'reportFileIsClassified', '0')\r\n }\r\n } else {\r\n if(category === 'history'){\r\n this.$set(this.parameter.histotyIntroducedList[index], 'proofFileIsClassified', '0')\r\n }else{\r\n this.$set(this.parameter.introducedList[index], 'proofFileIsClassified', '0')\r\n }\r\n }\r\n },\r\n openUploade(type, index, code, identify, category) {\r\n this.category = category\r\n this.upIndex = index\r\n this.upType = type\r\n this.identify = identify\r\n let codes = ''\r\n if (identify === '1') {\r\n if (this.title === '国家级') {\r\n codes = 'nPointReport'\r\n } else {\r\n codes = 'mPointReport'\r\n }\r\n } else {\r\n if (this.title === '国家级') {\r\n codes = 'nPointProof'\r\n } else {\r\n codes = 'mPointProof'\r\n }\r\n }\r\n this.$refs.uploadFile.open(codes)\r\n },\r\n setFileList(res) {\r\n let file = {\r\n ...res,\r\n id: res.response.fileId\r\n }\r\n let {upIndex, upType} = this\r\n if (this.identify === '1') {\r\n if(this.category === 'history'){\r\n this.parameter.historyResearchList[upIndex].reportFileList.push(file)\r\n }else{\r\n this.parameter.researchList[upIndex].reportFileList.push(file)\r\n }\r\n } else {\r\n if(this.category === 'history'){\r\n this.parameter.histotyIntroducedList[upIndex].proofFileList.push(file)\r\n }else{\r\n this.parameter.introducedList[upIndex].proofFileList.push(file)\r\n }\r\n }\r\n console.log(this.parameter.histotyIntroducedList,this.upIndex)\r\n },\r\n // 删除附件\r\n changeFileList(arr, index, type,category,identify) {\r\n if (identify === '1') {\r\n if(category === 'history'){\r\n this.parameter.historyResearchList[index].reportFileList = arr\r\n }else{\r\n this.parameter.researchList[index].reportFileList = arr\r\n }\r\n } else {\r\n if(category === 'history'){\r\n this.parameter.histotyIntroducedList[index].proofFileList = arr\r\n }else{\r\n this.parameter.introducedList[index].proofFileList = arr\r\n }\r\n }\r\n }\r\n }\r\n}\r\n",null]}