From 792d270446c75e82f3ba6d546aa33a3b2f64c6c1 Mon Sep 17 00:00:00 2001 From: shijingjing <1789544664@qq.com> Date: Fri, 1 Jul 2022 13:43:25 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AppPartyIntegralAudit/components/Detail.vue | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/project/sanjianxi/apps/AppPartyIntegralAudit/components/Detail.vue b/project/sanjianxi/apps/AppPartyIntegralAudit/components/Detail.vue index 360ab9c8..38916758 100644 --- a/project/sanjianxi/apps/AppPartyIntegralAudit/components/Detail.vue +++ b/project/sanjianxi/apps/AppPartyIntegralAudit/components/Detail.vue @@ -151,13 +151,15 @@ export default { if (res?.data) { this.info = res.data, this.integralInfo = res.data.integralRule - this.scoreItem = JSON.parse(res.data.integralRule.ladderRule).map(e=>{ - return { - dictName: e.viewCount, - dictValue: e.integral.toString() - } - }) if(res.data.integralRule.ruleType == 1) { + this.scoreItem = JSON.parse(res.data.integralRule.ladderRule)?.map(e=>{ + return { + dictName: e.viewCount, + dictValue: e.integral.toString() + } + }) + } + if(res.data.integralRule.ruleType == 0) { this.form.auditIntegral = this.integralInfo.integral } } @@ -192,7 +194,7 @@ export default { onConfirm() { if(this.integralInfo.ruleType == 2 && this.form.pass == 1) { - this.form.integralItem = this.scoreItem.filter(e=> e.dictValue == this.form.auditIntegral)[0].dictName + this.form.integralItem = this.scoreItem.filter(e=> e.dictValue == this.form.auditIntegral)[0]?.dictName } if(this.integralInfo.ruleType == 0 && this.form.pass == 1) { this.form.auditIntegral = this.integralInfo.integral