From a6c81fa9c6e24b084df10059674a610e6fe90c08 Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 16 May 2025 11:34:03 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=8E=BB=E7=BA=A4=E8=BE=93=E5=87=BA?= =?UTF-8?q?=E6=A3=80=E9=AA=8C=E6=B7=BB=E5=8A=A0=E9=87=8D=E6=96=B0=E8=8E=B7?= =?UTF-8?q?=E5=8F=96=E8=AE=BE=E5=A4=87=E6=95=B0=E6=8D=AE=E7=9A=84=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/mlogbw_check.vue | 48 +++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/src/views/wpm_bx/mlogbw_check.vue b/src/views/wpm_bx/mlogbw_check.vue index 755d4921..0e02c83b 100644 --- a/src/views/wpm_bx/mlogbw_check.vue +++ b/src/views/wpm_bx/mlogbw_check.vue @@ -204,6 +204,14 @@ @click="formTableCancel(scope.row)" >取消 + 重取数据 { - //例:res:[{"ZValue": "-0.18", "machineId": "testMachine","XValue": "-127.5831","YValue": "-12.5523"}] - //遍历检测项,查看是否有cd_expr - that.qct_testitems.forEach(item0 => { - if(item0.testitem_cd_expr!=null){ - that.mlogbwlist[0][item0.testitem_name]= eval(item0.testitem_cd_expr); - } - }) - - }).catch((err) => { - return err; - }); + that.getEqData(0); } } }) }, + getEqData(index){ + let that = this; + that.$API.em.cd.req({method:that.setForm.cd_req_addr}).then((res) => { + that.qct_testitems.forEach(item0 => { + if(item0.testitem_cd_expr!=null){ + that.mlogbwlist[index][item0.testitem_name]= eval(item0.testitem_cd_expr); + } + }) + }).catch((err) => { + return err; + }); + // let retryCount = 0; + // let MAX_RETRIES = 3; + // that.$API.em.cd.req({method:that.setForm.cd_req_addr}).then((res) => { + // that.qct_testitems.forEach(item0 => { + // if(item0.testitem_cd_expr!=null){ + // that.mlogbwlist[0][item0.testitem_name]= eval(item0.testitem_cd_expr); + // } + // }) + // }).catch((err) => { + // if (retryCount < MAX_RETRIES) { + // retryCount++; + // that.getEqData(); // 递归调用 + // } + // return err; + // }); + }, wprChange(wprNumber){ let that = this; that.mlogbwlist.forEach(item => {