fix:检测项执行采集数据方法并填入数据

This commit is contained in:
shijing 2025-02-27 14:26:20 +08:00
parent 1c67395b24
commit f7cd216f7c
1 changed files with 13 additions and 22 deletions

View File

@ -65,7 +65,6 @@
<el-input-number
v-if="item.testitem_field_type=='input-number'"
v-model="scope.row[item.testitem_name]"
:min="0"
:disabled="!scope.row.isEdit||!item.canEdit"
class="width-100"
controls-position="right"
@ -858,32 +857,24 @@ export default {
obj.isEdit = true;
that.mlogbwlist.splice(index,1);
that.wprInputText = "";
console.log('that.setForm',that.setForm);
that.mlogbwlist.unshift(obj);
if(that.setForm.cd_req_addr!==null){
//cd_req_addr,
console.log('that.setForm.cd_req_addr',that.setForm.cd_req_addr);
let res = mockData[0];
console.log('mockres',res);
// that.$API.system.eq_info_get.req({}).then((res) => {
//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;
});
}
}
})