From 4ffb9df5c26bd83040bbb4be65d7b026fc846b58 Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 22 Oct 2025 15:32:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=82=B9=E5=87=BB=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E5=90=8E=E4=B8=8D=E5=86=8D=E8=BF=9B=E8=A1=8C?= =?UTF-8?q?=E7=BC=BA=E9=99=B7=E9=A1=B9=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/mlogbw_check_table.vue | 42 +++++++++++++++++-------- 1 file changed, 29 insertions(+), 13 deletions(-) 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) => {