From ac1e2d27b8a20424f2ceb289bd601a0e7af278b0 Mon Sep 17 00:00:00 2001 From: surenjun Date: Fri, 6 Sep 2024 13:36:33 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9AcdsbInfo=E8=A1=A8=E8=AF=BB?= =?UTF-8?q?=E5=8F=96=E4=BC=98=E5=8C=96=EF=BC=8C=E5=8F=AA=E5=AD=98=E5=82=A8?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E8=80=83=E8=AF=95=E9=A1=B9=E7=9B=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- entry/src/main/ets/pages/Judge.ets | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/entry/src/main/ets/pages/Judge.ets b/entry/src/main/ets/pages/Judge.ets index a50b8f0f..1d907bd9 100644 --- a/entry/src/main/ets/pages/Judge.ets +++ b/entry/src/main/ets/pages/Judge.ets @@ -336,20 +336,26 @@ struct Index { // 获取场地设备信息 async initCDSBInfo() { const cdsbParams = await getSyncData('MA_CDSBINFO') + //只记录考试项目的模型 + const projectsObj = this.projectsObj //@ts-ignore cdsbParams.forEach((cdsb) => { const key = decodeURI(cdsb.itemsno); const newKey = key.split('~').join('_') - this.cdsbInfoObj[newKey] = { - kdid: cdsb.kdid, - sbbh: cdsb.sbbh, - sbbm: cdsb.sbbm, - itemsno: key, - modelKey: newKey, - //@ts-ignore - xmdm: key.split('~')[0] * 1, - xmxh: key.split('~')[1], + //@ts-ignore + const xmdm = key.split('~')[0] * 1 + if(projectsObj[xmdm]){ + this.cdsbInfoObj[newKey] = { + kdid: cdsb.kdid, + sbbh: cdsb.sbbh, + sbbm: cdsb.sbbm, + itemsno: key, + modelKey: newKey, + xmdm, + xmxh: key.split('~')[1], + } } + }) }