From f7cd216f7c6f6aeb3241c9d118d1c13354641dc7 Mon Sep 17 00:00:00 2001 From: shijing Date: Thu, 27 Feb 2025 14:26:20 +0800 Subject: [PATCH] =?UTF-8?q?fix=EF=BC=9A=E6=A3=80=E6=B5=8B=E9=A1=B9?= =?UTF-8?q?=E6=89=A7=E8=A1=8C=E9=87=87=E9=9B=86=E6=95=B0=E6=8D=AE=E6=96=B9?= =?UTF-8?q?=E6=B3=95=E5=B9=B6=E5=A1=AB=E5=85=A5=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/mlogbw_check.vue | 35 ++++++++++++------------------- 1 file changed, 13 insertions(+), 22 deletions(-) diff --git a/src/views/wpm_bx/mlogbw_check.vue b/src/views/wpm_bx/mlogbw_check.vue index a61bba4c..a8d5233c 100644 --- a/src/views/wpm_bx/mlogbw_check.vue +++ b/src/views/wpm_bx/mlogbw_check.vue @@ -65,7 +65,6 @@ { - //例:res:{x:2.5,y:3.5,z:5.0} - let x = res.x; - let y = res.y; - let z = res.z; + that.$API.em.cd.req({method:that.setForm.cd_req_addr}).then((res) => { + //例:res:[{"ZValue": "-0.18", "machineId": "testMachine","XValue": "-127.5831","YValue": "-12.5523"}] + let x = res.XValue; + let y = res.YValue; + let z = res.ZValue; //遍历检测项,查看是否有cd_expr that.qct_testitems.forEach(item0 => { - let str = "x>y?x:y" - obj[item0.testitem_name] = eval(str); - // if(item0.cd_expr!=null){ - // //例:cd_expr:"x>y?x:y" - // obj[item0.testitem_name] = eval(item0.cd_expr); - // } + if(item0.testitem_cd_expr!=null){ + that.mlogbwlist[0][item0.testitem_name]= eval(item0.testitem_cd_expr); + } }) - that.mlogbwlist.unshift(obj); - // }).catch((err) => { - // return err; - // }); - }else{ - that.mlogbwlist.unshift(obj); + + }).catch((err) => { + return err; + }); } } })