fix:玻纤输出检验添加重新获取设备数据的按钮

This commit is contained in:
shijing 2025-05-16 11:34:03 +08:00
parent 37e6684a54
commit a6c81fa9c6
1 changed files with 36 additions and 12 deletions

View File

@ -204,6 +204,14 @@
@click="formTableCancel(scope.row)"
>取消</el-link
>
<el-link
v-if="scope.row.isEdit"
type="success"
size="small"
style="margin-left: 5px;"
@click="getEqData(scope.$index)"
>重取数据</el-link
>
<el-link
v-if="!scope.row.isEdit&&(mode=='outs'||route_code=='niuzhuan')"
type="primary"
@ -930,22 +938,38 @@ export default {
that.mlogbwlist.unshift(obj);
if(that.setForm.cd_req_addr!==null){
//cd_req_addr,
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"}]
//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 => {