diff --git a/src/views/wpm_bx/mlogbw_check_table.vue b/src/views/wpm_bx/mlogbw_check_table.vue index f812e307..e6584f95 100644 --- a/src/views/wpm_bx/mlogbw_check_table.vue +++ b/src/views/wpm_bx/mlogbw_check_table.vue @@ -632,19 +632,19 @@ export default { obj.note = row.note; //qct不为空,有检验表 if((that.qct!==''&&that.qct!==null)||(that.qctId!==''&&that.qctId!==null)){ - that.qct_defects.forEach(item => { - if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){ - let str = item.rule_expression.replace(/`/g, ''); - str = str.replace(/\${(.*?)}/g, 'row.\$1') - let judge = false; - try { - judge = eval(str); - that.mlogbwlist[editIndex][item.defect_name] = judge; - }catch (error) { - console.error('error',error); - } - } - }); + // that.qct_defects.forEach(item => { + // if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){ + // let str = item.rule_expression.replace(/`/g, ''); + // str = str.replace(/\${(.*?)}/g, 'row.\$1') + // let judge = false; + // try { + // judge = eval(str); + // that.mlogbwlist[editIndex][item.defect_name] = judge; + // }catch (error) { + // console.error('error',error); + // } + // } + // }); obj.ftest = {}; obj.ftest.ftestitems = []; obj.ftest.ftestdefects = []; @@ -937,10 +937,26 @@ export default { }, getEqData(index){ let that = this; + let row = that.mlogbwlist[index]; 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); + that.qct_defects.forEach(item => { + if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){ + let str = item.rule_expression.replace(/`/g, ''); + str = str.replace(/\${(.*?)}/g, 'row.\$1'); + let judge = false; + try { + judge = eval(str); + that.mlogbwlist[index][item.defect_name] = judge; + }catch (error) { + console.error(error); + } + }else{ + that.mlogbwlist[index][item.defect_name] = false; + } + }); } }) }).catch((err) => {