fix:输出详情列表采集数据报错调整

This commit is contained in:
shijing 2025-09-17 09:49:46 +08:00
parent b128751889
commit d7cc7a9065
1 changed files with 11 additions and 5 deletions

View File

@ -411,6 +411,7 @@ export default {
test_user:"", test_user:"",
equipment:"", equipment:"",
equipment_name:"", equipment_name:"",
cd_req_addr:null,//
testitemids : [], testitemids : [],
defectids : [], defectids : [],
}, },
@ -669,9 +670,9 @@ export default {
}, },
formTableEdit(row) { formTableEdit(row) {
let that = this; let that = this;
if(that.route_code=='niuzhuan'&&that.optionsEq.length==0){ // if(that.route_code=='niuzhuan'&&that.optionsEq.length==0){
that.getEquipment4(); // that.getEquipment4();
} // }
that.mlogbwlist.forEach((item, index) => { that.mlogbwlist.forEach((item, index) => {
if (item.id == row.id) { if (item.id == row.id) {
that.mlogbwlist[index].isEdit = true; that.mlogbwlist[index].isEdit = true;
@ -679,7 +680,7 @@ export default {
if(that.mlogbwlist[index].work_start_time==''||that.mlogbwlist[index].work_start_time==null){ if(that.mlogbwlist[index].work_start_time==''||that.mlogbwlist[index].work_start_time==null){
that.mlogbwlist[index].work_start_time = that.$TOOL.dateFormat(date, 'yyyy-MM-dd hh:mm:ss'); that.mlogbwlist[index].work_start_time = that.$TOOL.dateFormat(date, 'yyyy-MM-dd hh:mm:ss');
} }
if(that.setForm.cd_req_addr!==null){ if(that.setForm.cd_req_addr!==null&&that.setForm.cd_req_addr!==""&&that.setForm.cd_req_addr!==undefined){
that.getEqData(index); that.getEqData(index);
} }
} }
@ -886,7 +887,7 @@ export default {
that.mlogbwlist.splice(index,1); that.mlogbwlist.splice(index,1);
that.wprInputText = ""; that.wprInputText = "";
that.mlogbwlist.unshift(obj); that.mlogbwlist.unshift(obj);
if(that.setForm.cd_req_addr!==null){ if(that.setForm.cd_req_addr!==null&&that.setForm.cd_req_addr!==""&&that.setForm.cd_req_addr!==undefined){
//cd_req_addr, //cd_req_addr,
that.getEqData(0); that.getEqData(0);
} }
@ -902,6 +903,11 @@ export default {
} }
}) })
}).catch((err) => { }).catch((err) => {
console.log(err);
this.$notify.error({
title: '获取数据失败',
message: err.data
})
return err; return err;
}); });
}, },