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 => {