{"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\\projectCase.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\ReformSituation\\components\\projectCase.vue","mtime":1745582908271},{"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\r\nimport { TableMixin } from '@/mixins/tableMixin'\r\nimport AddProject from './addProject.vue'\r\nexport default {\r\n name: 'AddFormDialog',\r\n mixins: [TableMixin],\r\n components: {AddProject},\r\n props:{\r\n },\r\n data() {\r\n return {\r\n visible: false,\r\n reqLoading: false,\r\n activeNames: '',\r\n title:'',\r\n projectNum:0,\r\n researchNum:0,\r\n introducedNum:0,\r\n dataList:{\r\n projectList:[],\r\n researchList:[],\r\n introducedList:[],\r\n historyProjectList:[],\r\n historyResearchList:[],\r\n histotyIntroducedList:[]\r\n },\r\n historyDataList:{\r\n historyProjectList:[],\r\n historyResearchList:[],\r\n histotyIntroducedList:[]\r\n },\r\n isDetails:false,\r\n isEditHistory:'',\r\n details:{}\r\n }\r\n },\r\n created() {\r\n },\r\n methods: {\r\n upDate(title,data,isDetails,historyData,details){\r\n console.log(data,'----------',historyData)\r\n this.details = details;\r\n this.isDetails = isDetails !== '详情';\r\n this.isEditHistory = isDetails\r\n this.projectNum = 0\r\n this.researchNum = 0\r\n this.introducedNum = 0\r\n this.dataList = {\r\n projectList:[],\r\n researchList:[],\r\n introducedList:[],\r\n historyProjectList:[],\r\n historyResearchList:[],\r\n histotyIntroducedList:[]\r\n }\r\n this.historyDataList = {\r\n historyProjectList:[],\r\n historyResearchList:[],\r\n histotyIntroducedList:[]\r\n }\r\n this.title = title\r\n this.visible = true\r\n //回显 将一个数组转为三个数组 (本次更新)\r\n if(data.length>0){\r\n this.dataList.projectList = data.map(item => ({\r\n projectName: item.projectName,\r\n isFinish: item.isFinish,\r\n isPlan: item.isPlan,\r\n isHistory: item.isHistory,\r\n key:item.id?item.id:item.key,\r\n finishExit:item.finishExit,\r\n planExit:item.planExit,\r\n hisIsFinish:item.hisIsFinish,\r\n hisIsPlan:item.hisIsPlan,\r\n }));\r\n data.forEach(item => {\r\n if (item.isFinish === \"1\") {\r\n this.dataList.researchList.push({\r\n key:item.id?item.id:item.key,\r\n projectName: item.projectName,\r\n isHistory: item.isHistory,\r\n reportFileList: item.reportFileList?item.reportFileList:[],\r\n reportFileIsClassified:item.reportFileIsClassified,\r\n });\r\n }\r\n if (item.isPlan === \"1\") {\r\n this.dataList.introducedList.push({\r\n key:item.id?item.id:item.key,\r\n projectName: item.projectName,\r\n planNumber: item.planNumber,\r\n planName: item.planName,\r\n isHistory: item.isHistory,\r\n proofFileList: item.proofFileList?item.proofFileList:[],\r\n planFileIsClassified:item.planFileIsClassified,\r\n });\r\n }\r\n });\r\n }\r\n\r\n //回显 将一个数组转为三个数组 (历史数据)\r\n if(historyData.length>0){\r\n this.historyDataList.historyProjectList = historyData.map(item => ({\r\n projectName: item.projectName,\r\n isFinish: item.isFinish,\r\n isPlan: item.isPlan,\r\n isHistory: item.isHistory,\r\n key:item.id?item.id:item.key,\r\n finishExit:item.finishExit,\r\n planExit:item.planExit,\r\n hisIsFinish:item.hisIsFinish,\r\n hisIsPlan:item.hisIsPlan,\r\n }));\r\n historyData.forEach(item => {\r\n if (item.isFinish === \"1\") {\r\n this.historyDataList.historyResearchList.push({\r\n key:item.id?item.id:item.key,\r\n projectName: item.projectName,\r\n isHistory: item.isHistory,\r\n reportFileList: item.reportFileList?item.reportFileList:[],\r\n reportFileIsClassified:item.reportFileIsClassified,\r\n isNowDatar:item.isNowDatar?item.isNowDatar:'',\r\n finishExit:item.finishExit,\r\n });\r\n }\r\n if (item.isPlan === \"1\") {\r\n this.historyDataList.histotyIntroducedList.push({\r\n key:item.id?item.id:item.key,\r\n projectName: item.projectName,\r\n planNumber: item.planNumber,\r\n planName: item.planName,\r\n isHistory: item.isHistory,\r\n proofFileList: item.proofFileList?item.proofFileList:[],\r\n planFileIsClassified:item.planFileIsClassified,\r\n isNowDatas:item.isNowDatas?item.isNowDatas:'',\r\n planExit:item.planExit,\r\n });\r\n }\r\n });\r\n }\r\n this.projectNum = this.dataList.projectList.length + this.historyDataList.historyProjectList.length\r\n this.researchNum = this.dataList.researchList.length + this.historyDataList.historyResearchList.length\r\n this.introducedNum = this.dataList.introducedList.length + this.historyDataList.histotyIntroducedList.length\r\n },\r\n handleClose(){\r\n console.log('111111111111')\r\n this.visible = false\r\n this.dataList = {\r\n projectList:[],\r\n researchList:[],\r\n introducedList:[],\r\n historyProjectList:[],\r\n historyResearchList:[],\r\n histotyIntroducedList:[]\r\n }\r\n this.historyDataList = {\r\n historyProjectList:[],\r\n historyResearchList:[],\r\n histotyIntroducedList:[]\r\n }\r\n },\r\n projectChange(){\r\n this.$refs.addProject.upDate(this.title,this.dataList,this.isDetails,this.historyDataList,this.isEditHistory,this.details)\r\n },\r\n onConfirm(data){\r\n this.projectNum = data.projectList.length + data.historyProjectList.length\r\n this.researchNum = data.researchList.length + data.historyResearchList.length\r\n this.introducedNum = data.introducedList.length + data.histotyIntroducedList.length\r\n this.historyDataList.historyProjectList = data.historyProjectList\r\n this.historyDataList.historyResearchList = data.historyResearchList\r\n this.historyDataList.histotyIntroducedList = data.histotyIntroducedList\r\n this.dataList = data\r\n },\r\n ensureChange(){\r\n this.visible = false\r\n this.dataList.historyProjectList = this.historyDataList.historyProjectList\r\n this.dataList.historyResearchList = this.historyDataList.historyResearchList\r\n this.dataList.histotyIntroducedList = this.historyDataList.histotyIntroducedList\r\n this.$emit('confirm',this.dataList,this.title)\r\n }\r\n },\r\n}\r\n",null]}