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; + }); } } })