{"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\\addForm.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\reform-fvue\\src\\views\\ReformSituation\\components\\addForm.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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 utils from '@/utils.js'\r\nimport UploadFile from '@/components/uploadFile/index.vue'\r\nimport FileList from '@/components/uploadFile/FileList.vue'\r\nimport apis from '@/api/ReformSituation/index.js'\r\nimport RejectInfoBlockDialog from '@/components/dialog/RejectInfoBlockDialog.vue'\r\n\r\nexport default {\r\n name: 'addForm',\r\n components: {\r\n UploadFile,\r\n FileList,\r\n RejectInfoBlockDialog\r\n },\r\n mixins: [TableMixin],\r\n props:{\r\n judgmentDetail:{\r\n type:Boolean,\r\n default:true,\r\n }\r\n },\r\n data() {\r\n return {\r\n routeName: '',\r\n activeNames: '',\r\n markLoading: false,\r\n infoData: {},\r\n rules: {\r\n municipalProjectTotalNum: [\r\n {\r\n required: true,\r\n message: '请输入对接市委六届六次全会生成项目总数',\r\n trigger: 'change'\r\n }\r\n ],\r\n selfProjectTotalNum: [\r\n {\r\n required: true,\r\n message: '请输入自主谋划项目',\r\n trigger: 'change'\r\n }\r\n ],\r\n municipalProjectLssueNum: [\r\n {\r\n required: true,\r\n message: '请输入对接市委六届六次全会生成项目出台方案数',\r\n trigger: 'change'\r\n }\r\n ],\r\n municipalProjectFinishNum: [\r\n {\r\n required: true,\r\n message: '请输入对接市委六届六次全会生成项目完成验收数',\r\n trigger: 'change'\r\n }\r\n ],\r\n selfProjectLssueNum: [\r\n {\r\n required: true,\r\n message: '请输入自主谋划项目出台方案数',\r\n trigger: 'change'\r\n }\r\n ],\r\n selfProjectFinishNum: [\r\n {\r\n required: true,\r\n message: '请输入自主谋划项目完成验收数',\r\n trigger: 'change'\r\n }\r\n ],\r\n digtialAppiicationNum: [\r\n {\r\n required: true,\r\n message: '请输入生成数字化应用总数',\r\n trigger: 'change'\r\n }\r\n ]\r\n },\r\n // 上传附件时的标识\r\n upIndex: 0,\r\n upType: '',\r\n // tab切换\r\n isHistory: false,\r\n tableLoading: false,\r\n // 需要删除的附件id\r\n deleteIds: [],\r\n // 是否可编辑\r\n // 拷贝数据\r\n reqId: '',\r\n unitId: '',\r\n title: '',\r\n date: '',\r\n loadingText: '数据加载中',\r\n base: {\r\n files: [],\r\n files1: [],\r\n files2: [],\r\n files3: [],\r\n files4: [],\r\n files5: [],\r\n files6: []\r\n },\r\n progress: {},\r\n demandRunwayOptions: [],\r\n nationsDelIds: [],\r\n effectsDelIds: []\r\n }\r\n },\r\n\r\n created() {\r\n this.getDemandData()\r\n let {name} = this.$route\r\n this.routeName = name\r\n if (name === 'qxReformSituationPropel') {\r\n this.markLoading = true\r\n let data = {\r\n pageBean: {\r\n page: 1,\r\n pageSize: 20,\r\n total: 0\r\n },\r\n querys: []\r\n }\r\n apis.qxPropelGetData(data, false).then(res => {\r\n if (res) {\r\n if (res.rows[0].id) {\r\n this.getDetailById(res.rows[0].id)\r\n } else {\r\n this.markLoading = false\r\n let effects = [\r\n {\r\n effectCardTopic: '',\r\n specificDetails: '',\r\n files: []\r\n }\r\n ]\r\n let nations = [\r\n {\r\n effectCardTopic: '',\r\n files: []\r\n }\r\n ]\r\n let progress = {\r\n existProblem: [{value: ''}],\r\n workObjectives: [{value: ''}, {value: ''}, {value: ''}],\r\n specificMeasures: [{value: ''}],\r\n expectedResults: [{value: ''}]\r\n }\r\n\r\n this.$set(this, 'progress', progress)\r\n this.$set(this.infoData, 'effects', effects)\r\n this.$set(this.infoData, 'nations', nations)\r\n this.$set(this.base, 'yearResult', [{value: ''}])\r\n }\r\n }\r\n })\r\n } else if (name === 'qxReviewOfReform') {\r\n this.markLoading = true\r\n let data = {\r\n pageBean: {\r\n page: 1,\r\n pageSize: 20,\r\n total: 0\r\n },\r\n querys: [\r\n {\r\n group: 'main',\r\n operation: 'IN',\r\n parentGroup: '',\r\n property: 'f.status_',\r\n relation: 'AND',\r\n value: [1, 2, 3, 4, 5]\r\n }\r\n ]\r\n }\r\n apis.qxPropelGetData(data, false).then(res => {\r\n if (res) {\r\n if (res.rows[0] && res.rows[0].id) {\r\n this.getDetailById(res.rows[0].id)\r\n } else {\r\n this.markLoading = false\r\n }\r\n }\r\n })\r\n }\r\n },\r\n methods: {\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 // 撤回\r\n propelRevocation() {\r\n let msg = this.routeName === 'qxReformSituationPropel' ? '上报' : '审核'\r\n let status = this.routeName === 'qxReformSituationPropel' ? 0 : 1\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: 'warning'\r\n }).then(() => {\r\n this.markLoading = true\r\n let data = {\r\n id: this.infoData.id,\r\n status: status,\r\n }\r\n apis.qxPropelRevocation(data).then(res => {\r\n if (res.state) {\r\n this.$message.success('撤回成功')\r\n this.infoData.status = status\r\n this.markLoading = false\r\n }\r\n })\r\n })\r\n },\r\n isEdit() {\r\n return true\r\n let {status} = this.infoData\r\n if (this.routeName === 'qxReformSituationPropel') {\r\n return status === 0 || status === 2 || status === 4 || status === 5\r\n } else if (this.routeName === 'qxReformSituationPropel') {\r\n return status === 1 || status === 2 || status === 3\r\n } else {\r\n return status === 4 || status === 5 || status === 6\r\n }\r\n },\r\n // 完成验收\r\n completeNumChange(type) {\r\n if (!type) {\r\n let {municipalProjectFinishNum, municipalProjectLssueNum} = this.base\r\n if (\r\n Number(municipalProjectFinishNum) > Number(municipalProjectLssueNum)\r\n ) {\r\n this.base.municipalProjectFinishNum = ''\r\n this.$message.error('完成验收数应不超过出台方案数')\r\n }\r\n } else {\r\n let {selfProjectFinishNum, selfProjectLssueNum} = this.base\r\n if (Number(selfProjectFinishNum) > Number(selfProjectLssueNum)) {\r\n this.base.selfProjectFinishNum = ''\r\n this.$message.error('完成验收数应不超过出台方案数')\r\n }\r\n }\r\n },\r\n deleteTableData(key, index, item) {\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: 'success'\r\n }).then(() => {\r\n this.infoData[key].splice(index, 1)\r\n if (item.id) {\r\n this[`${key}DelIds`].push(item.id)\r\n }\r\n })\r\n },\r\n deleteTextData(type, key, index) {\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: 'success'\r\n }).then(() => {\r\n this[type][key].splice(index, 1)\r\n })\r\n },\r\n municipalProjectTotalChange(val, type) {\r\n if (val === 0) return\r\n this.planValueChange(type, 'total')\r\n },\r\n planValueChange(type, key) {\r\n if (type === 0) {\r\n const {municipalProjectTotalNum, municipalProjectLssueNum} = this.base\r\n if (\r\n Number(municipalProjectLssueNum) > Number(municipalProjectTotalNum)\r\n ) {\r\n this.$message.error('出台方案数应不超过生成项目总数')\r\n if (key === 'total') {\r\n this.base.municipalProjectTotalNum = ''\r\n } else {\r\n this.base.municipalProjectLssueNum = ''\r\n }\r\n this.municipalProjectPlanNum = ''\r\n return\r\n }\r\n let value =\r\n Number(this.base.municipalProjectTotalNum) -\r\n Number(this.base.municipalProjectLssueNum)\r\n this.$set(this.base, 'municipalProjectPlanNum', value)\r\n } else {\r\n const {selfProjectTotalNum, selfProjectLssueNum} = this.base\r\n if (Number(selfProjectLssueNum) > Number(selfProjectTotalNum)) {\r\n this.$message.error('出台方案数应不超过项目总数')\r\n if (key === 'total') {\r\n this.base.selfProjectTotalNum = ''\r\n } else {\r\n this.base.selfProjectLssueNum = ''\r\n }\r\n this.selfProjectPlanNum = ''\r\n return\r\n }\r\n let value =\r\n Number(this.base.selfProjectTotalNum) -\r\n Number(this.base.selfProjectLssueNum)\r\n this.$set(this.base, 'selfProjectPlanNum', value)\r\n }\r\n },\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.demandRunwayOptions = item.lowerDic['sj_cxxs_jtqx']\r\n }\r\n })\r\n },\r\n // 保存\r\n handlerSave(status) {\r\n this.$refs['form'].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 // 审核通过\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 type: 'warning'\r\n }).then(() => {\r\n this.infoData.approvalResults = 0\r\n this.infoData.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 == 'qxReviewOfReform' ? 2 : 4\r\n if (!rejectInfo) {\r\n this.saveLoading = false\r\n return\r\n }\r\n this.infoData.approvalResults = 1\r\n this.infoData.approvalComments = rejectInfo\r\n this.submitData(status, '审核驳回')\r\n },\r\n\r\n // 提交\r\n submitData(status, msg) {\r\n this.markLoading = true\r\n let base = JSON.parse(JSON.stringify(this.base))\r\n base.yearResult = JSON.stringify(this.base.yearResult)\r\n base.files = [\r\n ...base.files,\r\n ...base.files1,\r\n ...base.files2,\r\n ...base.files3,\r\n ...base.files4,\r\n ...base.files5,\r\n ...base.files6\r\n ]\r\n let progress = JSON.parse(JSON.stringify(this.progress))\r\n progress.existProblem = JSON.stringify(this.progress.existProblem)\r\n progress.expectedResults = JSON.stringify(this.progress.expectedResults)\r\n progress.specificMeasures = JSON.stringify(this.progress.specificMeasures)\r\n progress.workObjectives = JSON.stringify(this.progress.workObjectives)\r\n let data = JSON.parse(JSON.stringify(this.infoData))\r\n data.base = base\r\n data.progress = progress\r\n data.fillDate = '2024-12-01'\r\n data.fillMonth = '12'\r\n data.fillYear = '2024'\r\n data.status = status\r\n let api = data.id ? 'qxAdvanceUpdate' : 'qxAdvanceEntry'\r\n\r\n apis[api](data)\r\n .then(res => {\r\n if (res.state) {\r\n this.$message.success(`${msg}成功`)\r\n this.closeDialog()\r\n this.infoData.status = status\r\n if (this.effectsDelIds.length) {\r\n apis.effectsDeleteById(this.effectsDelIds).then(res => {\r\n console.log(res)\r\n })\r\n }\r\n if (this.nationsDelIds.length) {\r\n apis.nationsDeleteById(this.nationsDelIds).then(res => {\r\n console.log(res)\r\n })\r\n }\r\n if (msg === '保存为草稿') {\r\n let data = {\r\n pageBean: {\r\n page: 1,\r\n pageSize: 20,\r\n total: 0\r\n },\r\n querys: []\r\n }\r\n apis.qxPropelGetData(data, false).then(res => {\r\n if (res) {\r\n if (res.rows[0].id) {\r\n this.getDetailById(res.rows[0].id)\r\n }\r\n }\r\n this.markLoading = false\r\n })\r\n } else {\r\n this.markLoading = false\r\n }\r\n }\r\n })\r\n .finally(() => {})\r\n },\r\n\r\n // 根据id查询详情\r\n getDetailById(id) {\r\n apis.qxGetPropelDetail(id).then(res => {\r\n if (res) {\r\n let data = JSON.parse(JSON.stringify(res))\r\n if (\r\n data.status === 5 &&\r\n this.routeName === 'qxReformSituationPropel'\r\n ) {\r\n data.progress = {\r\n existProblem: [{value: ''}],\r\n workObjectives: [{value: ''}, {value: ''}, {value: ''}],\r\n specificMeasures: [{value: ''}],\r\n expectedResults: [{value: ''}]\r\n }\r\n } else {\r\n data.progress.existProblem = res.progress.existProblem\r\n ? JSON.parse(res.progress.existProblem)\r\n : [{value: ''}]\r\n data.progress.workObjectives = res.progress.existProblem\r\n ? JSON.parse(res.progress.workObjectives)\r\n : [{value: ''}]\r\n data.progress.specificMeasures = res.progress.existProblem\r\n ? JSON.parse(res.progress.specificMeasures)\r\n : [{value: ''}]\r\n data.progress.expectedResults = res.progress.existProblem\r\n ? JSON.parse(res.progress.expectedResults)\r\n : [{value: ''}]\r\n }\r\n data.base.yearResult = res.progress.existProblem\r\n ? JSON.parse(res.base.yearResult)\r\n : [{value: ''}]\r\n data.effects =\r\n !data.effects || !data.effects.length\r\n ? [\r\n {\r\n effectCardTopic: '',\r\n specificDetails: '',\r\n files: []\r\n }\r\n ]\r\n : data.effects\r\n data.nations =\r\n !data.nations || !data.nations.length\r\n ? [\r\n {\r\n effectCardTopic: '',\r\n files: []\r\n }\r\n ]\r\n : data.nations\r\n\r\n if (!data.base.files || !data.base.files.length) {\r\n data.base.files = []\r\n data.base.files1 = []\r\n data.base.files2 = []\r\n data.base.files3 = []\r\n data.base.files4 = []\r\n data.base.files5 = []\r\n data.base.files6 = []\r\n } else {\r\n let files = JSON.parse(JSON.stringify(data.base.files))\r\n data.base.files = files.filter(\r\n file => file.bizCode === 'municipalProjectPlan'\r\n )\r\n data.base.files1 = files.filter(\r\n file => file.bizCode === 'selfProjectPlan'\r\n )\r\n data.base.files2 = files.filter(\r\n file => file.bizCode === 'countyDigtialApp'\r\n )\r\n data.base.files3 = files.filter(\r\n file => file.bizCode === 'municipalProjectLssue'\r\n )\r\n data.base.files4 = files.filter(\r\n file => file.bizCode === 'selfProjectLssue'\r\n )\r\n data.base.files5 = files.filter(\r\n file => file.bizCode === 'municipalProjectFinish'\r\n )\r\n data.base.files6 = files.filter(\r\n file => file.bizCode === 'selfProjectFinish'\r\n )\r\n }\r\n this.$set(this, 'base', JSON.parse(JSON.stringify(data.base)))\r\n this.$set(this, 'progress', JSON.parse(JSON.stringify(data.progress)))\r\n this.$emit('offMark')\r\n if (\r\n data.status === 5 &&\r\n this.routeName === 'qxReformSituationPropel'\r\n ) {\r\n data.id = ''\r\n }\r\n this.infoData = data\r\n this.markLoading = false\r\n }\r\n })\r\n },\r\n // 附件相关\r\n openUploade(type, index, code) {\r\n this.upIndex = index\r\n this.upType = type\r\n this.$refs.uploadFile.open(code)\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 (upType === 'base') {\r\n let str = upIndex > 0 ? `files${upIndex}` : 'files'\r\n if (!this.base[str]) {\r\n this.$set(this.base, str, [file])\r\n } else {\r\n this.base[str].push(file)\r\n }\r\n } else {\r\n if (!this.infoData[upType][upIndex].files) {\r\n this.$set(this.infoData[upType][upIndex], 'files', [file])\r\n } else {\r\n this.infoData[upType][upIndex].files.push(file)\r\n }\r\n }\r\n },\r\n // 删除附件\r\n changeFileList(arr, index, type) {\r\n if (type !== 'base') {\r\n this.infoData[type][index].files = arr\r\n } else {\r\n let key = index ? `files${index}` : 'files'\r\n this[type][key] = arr\r\n }\r\n },\r\n //\r\n idExist(id) {\r\n this.deleteIds.push(id)\r\n },\r\n listAdd(type, key) {\r\n if (this[type][key]) {\r\n this[type][key].push({value: ''})\r\n } else {\r\n this.$set(this[type], key, [{value: ''}])\r\n }\r\n },\r\n // tab切换\r\n tabToggle(e) {\r\n if (e) {\r\n let data = {id: '', isAffirm: false, date: this.date}\r\n if (this.routeName === 'AdvanceApproval') {\r\n data.id = this.unitId\r\n data.isAffirm = true\r\n }\r\n this.oldData\r\n ? (this.infoData = JSON.parse(JSON.stringify(this.oldData)))\r\n : this.getHistory(data)\r\n } else {\r\n if (this.copyData) {\r\n this.infoData = JSON.parse(JSON.stringify(this.copyData))\r\n this.setRunwayOptions(this.infoData)\r\n } else {\r\n this.getDetail(this.reqId)\r\n }\r\n // this.copyData ? this.infoData = JSON.parse(JSON.stringify(this.copyData)) :\r\n // this.getDetail(this.reqId)\r\n }\r\n this.isHistory = e\r\n },\r\n\r\n addCoreIndex(type) {\r\n if (type === 'nations') {\r\n if (this.infoData.nations) {\r\n this.infoData.nations.push({\r\n effectCardTopic: '',\r\n files: []\r\n })\r\n } else {\r\n this.$set(this.infoData, 'nations', [\r\n {\r\n effectCardTopic: '',\r\n files: []\r\n }\r\n ])\r\n }\r\n }\r\n if (type === 'effects') {\r\n if (this.infoData.effects) {\r\n this.infoData.effects.push({\r\n effectCardTopic: '',\r\n specificDetails: '',\r\n files: []\r\n })\r\n } else {\r\n this.$set(this.infoData, 'effects', [\r\n {\r\n effectCardTopic: '',\r\n specificDetails: '',\r\n files: []\r\n }\r\n ])\r\n }\r\n }\r\n },\r\n\r\n closeDialog() {\r\n if (this.routeName === 'qxApprovalOfReform') {\r\n this.infoData = {}\r\n ;(this.base = {\r\n files: [],\r\n files1: [],\r\n files2: [],\r\n files3: [],\r\n files4: [],\r\n files5: [],\r\n files6: []\r\n }),\r\n (this.progress = {})\r\n }\r\n this.$emit('closeDialog')\r\n }\r\n }\r\n}\r\n",null]}