From c362763a2521e2bf3e968c270767e22c950ae064 Mon Sep 17 00:00:00 2001 From: shijing Date: Wed, 3 Jun 2026 14:04:32 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E6=95=B0=E5=AD=97=E8=AF=86=E5=88=AB?= =?UTF-8?q?=E6=8C=89=E9=92=AE=E9=A2=9C=E8=89=B2=E6=94=B9=E4=B8=BA=E7=BB=BF?= =?UTF-8?q?=E8=89=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/wpm_bx/mlogbw_check_table.vue | 102 ++++++++++++------------ 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/src/views/wpm_bx/mlogbw_check_table.vue b/src/views/wpm_bx/mlogbw_check_table.vue index 5e982a8c..7b4b586e 100644 --- a/src/views/wpm_bx/mlogbw_check_table.vue +++ b/src/views/wpm_bx/mlogbw_check_table.vue @@ -22,7 +22,7 @@ 检验 批量操作 - 数字识别 + 数字识别
{{ test_file_name }} @@ -1133,58 +1133,58 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => { return; } that.$API.em.equipment.get_svs_char.req({ - ip: that.ocr_ip, + host: that.ocr_ip, port: that.ocr_port, - unit: that.ocr_unit + flow_unit: that.ocr_unit }).then((res) => { - alert(res); - // if(res.number){ - // that.mlogbwlist.forEach((item,index) => { - // if(item.number==res.number){ - // let obj = Object.assign({},item); - // obj.isEdit = true; - // that.mlogbwlist.splice(index,1); - // that.wprInputText = ""; - // that.mlogbwlist.unshift(obj); - // that.$nextTick(() => { - // that.selectedindexes.push(obj.id); - // that.selectWprList.push(item); - // }) - // //第二步:获取投影仪设备的监测数据 - // //先判断是否有需要检测设备的检测项,若有,赋值,若无,跳过 - // if(that.qct_testitems.length>0 && !!that.setForm.cd_req_addr){ - // 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) => { - // this.$notify.error({ - // title: '获取数据失败', - // message: err.data - // }) - // return err; - // }); - // } - // } - // }) - // } + console.log(res); + if(res.char){ + that.mlogbwlist.forEach((item,index) => { + if(item.number==res.char){ + let obj = Object.assign({},item); + obj.isEdit = true; + that.mlogbwlist.splice(index,1); + that.wprInputText = ""; + that.mlogbwlist.unshift(obj); + that.$nextTick(() => { + that.selectedindexes.push(obj.id); + that.selectWprList.push(item); + }) + //第二步:获取投影仪设备的监测数据 + //先判断是否有需要检测设备的检测项,若有,赋值,若无,跳过 + if(that.qct_testitems.length>0 && !!that.setForm.cd_req_addr){ + 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) => { + this.$notify.error({ + title: '获取数据失败', + message: err.data + }) + return err; + }); + } + } + }) + } }).catch((err) => { that.$notify.error({ title: '数字识别获取失败',