diff --git a/project/xiushan/apps/processManagement/approvalManage/components/approvalDetail.vue b/project/xiushan/apps/processManagement/approvalManage/components/approvalDetail.vue index 3416a170..936411de 100644 --- a/project/xiushan/apps/processManagement/approvalManage/components/approvalDetail.vue +++ b/project/xiushan/apps/processManagement/approvalManage/components/approvalDetail.vue @@ -4,8 +4,8 @@ - - - -
- + - + - - + + - + + + + (最多9张) - + v.form.pass ? '审批同意' : '审批拒绝' }, methods: { handleDownload() { @@ -417,10 +413,6 @@ export default { this.fileList = [] this.isAgree = false }, - openImg(url) { - this.isOpen = true; - this.imgUrl = url; - }, // 下载 downFile(url) { window.open(url); @@ -558,36 +550,22 @@ export default { let dictionaryArr = [] this.loading = true this.instance.post(`/app/approv-alapply-info/approval-popup?id=${this.detail.id}&type=${index}`).then(res => { - this.loading = false - if (res && res.data) { + if (res?.data) { if (index == 1) { - res.data.fieldInfos.map(e => { - if (e.fieldType == 3 && e.dictionaryCode && dictionaryArr.indexOf(e.dictionaryCode) == -1) { + this.form = res.data + this.form.fieldInfos = res.data.fieldInfos.filter(e => e.fieldType == 3) + this.form.nextCandidateList = this.form.nextCandidateList?.map(e => ({dictValue: e.candidate, dictName: e.name})) + this.form.fieldInfos.map(e => { + if (e.dictionaryCode && !dictionaryArr.includes(e.dictionaryCode)) { dictionaryArr.push(e.dictionaryCode) } }) - if (dictionaryArr.length) { - this.dict.load(dictionaryArr).then(() => { - this.form.fieldInfos = res.data.fieldInfos.filter(e => e.fieldType == 3) - }) - } else { - this.form.fieldInfos = res.data.fieldInfos.filter(e => e.fieldType == 3) - } + dictionaryArr.length > 0 && this.dict.load(dictionaryArr) } - + this.form.pass = index == 1 this.isAgree = true; - if (index == 0) { - this.form.pass = false; - this.titleType = '审批拒绝'; - } else { - this.form.pass = true; - this.titleType = '审批同意'; - } } - }).catch(err => { - this.loading = false - console.log(err); - }) + }).finally(() => this.loading = false) }, saveAgree() { this.form.id = this.detail.id;