{"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\\addNation.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\ReformSituation\\components\\addNation.vue","mtime":1745230952366},{"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\r\nimport {TableMixin} from '@/mixins/tableMixin'\r\nimport FileList from '@/components/uploadFile/FileList.vue'\r\nimport UploadFile from '@/components/uploadFile/index.vue'\r\nimport utils from '@/utils'\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 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 activeCollapse1:'1',\r\n visibleProject: false,\r\n reqLoading: false,\r\n parameter: {\r\n nationList:[],\r\n historyNationList:[]\r\n },\r\n specificSituationOptions:[],\r\n rules: {\r\n effectCardTopic: [{ required: true, message: '情况描述不能为空', trigger: 'blur' }],\r\n details: [{ required: true, message: '具体情形', trigger: 'change' }],\r\n proofFileList: [{validator: validateProofFileList, trigger: 'blur'}],\r\n },\r\n // 上传附件时的标识\r\n upIndex: 0,\r\n upType: '',\r\n backUp:{\r\n nationList:[],\r\n historyNationList:[]\r\n },\r\n category:'',\r\n isDetails:false,\r\n isAudit:false,\r\n }\r\n },\r\n created() {},\r\n methods: {\r\n getDemandData() {\r\n let arr = utils.getDictItemsFromCache('sj_ggcx_hkdfs')\r\n arr.forEach(item => {\r\n if (item.value === '1') {\r\n this.specificSituationOptions = item.lowerDic['sj_cxxs_jtqx']\r\n }\r\n })\r\n },\r\n upDate(data,isDetails) {\r\n this.isDetails = isDetails !== '详情'\r\n this.isAudit = isDetails === '改革办审核';\r\n this.getDemandData()\r\n this.visibleProject = true\r\n if(data.length>0){\r\n this.parameter.nationList = data.filter(item => item.isHistory === '0')\r\n this.parameter.historyNationList = data.filter(item => item.isHistory === '1')\r\n }\r\n this.backUp = JSON.parse(JSON.stringify(this.parameter))\r\n },\r\n handleClose() {\r\n this.parameter = JSON.parse(JSON.stringify(this.backUp));\r\n this.parameter.nationList = this.parameter.nationList.filter(item => item.details !== '')\r\n this.$emit('confirm',this.parameter,'1')\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,'2')\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 === 'nationList') {\r\n this.parameter[type].push({\r\n id: this.parameter[type].length + new Date(),\r\n effectCardTopic:'',\r\n isHistory:'0',\r\n details:'',\r\n proofFileList:[],\r\n proofFileIsClassified:'0'\r\n })\r\n }\r\n },\r\n tableDel(type, row) {\r\n this.parameter[type] = this.parameter[type].filter(\r\n item => item.id !== row.id\r\n )\r\n },\r\n // 附件相关\r\n openUploade(type, index, code,category) {\r\n this.category = category\r\n this.upIndex = index\r\n this.upType = type\r\n this.$refs.uploadFile.open(code)\r\n },\r\n setAipher() {\r\n if(this.category === 'history'){\r\n this.$set(this.parameter.historyNationList[this.upIndex],'proofFileIsClassified',\r\n '1'\r\n )\r\n }else{\r\n this.$set(this.parameter.nationList[this.upIndex],'proofFileIsClassified',\r\n '1'\r\n )\r\n }\r\n },\r\n deleteTag(index, type,category) {\r\n if(category === 'history'){\r\n this.$set(this.parameter.historyNationList[index], 'proofFileIsClassified', '0')\r\n }else{\r\n this.$set(this.parameter.nationList[index], 'proofFileIsClassified', '0')\r\n }\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.category === 'history'){\r\n this.parameter.historyNationList[upIndex].proofFileList.push(file)\r\n }else{\r\n this.parameter.nationList[upIndex].proofFileList.push(file)\r\n }\r\n\r\n },\r\n // 删除附件\r\n changeFileList(arr, index, type,category) {\r\n if(category === 'history'){\r\n this.parameter.historyNationList[this.upIndex].proofFileList = arr\r\n }else{\r\n this.parameter.nationList[this.upIndex].proofFileList = arr\r\n }\r\n\r\n },\r\n }\r\n}\r\n",null]}