From 05db88644c9d484c0027ac912323dac95a6f3fac Mon Sep 17 00:00:00 2001 From: aixianling Date: Thu, 23 Jun 2022 16:54:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=80=E5=B1=B1=E9=9C=80=E6=B1=82=E5=8F=98?= =?UTF-8?q?=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/approvalDetail.vue | 74 +++++++------------ 1 file changed, 26 insertions(+), 48 deletions(-) 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;