fix:数字识别按钮颜色改为绿色

This commit is contained in:
shijing 2026-06-03 14:04:32 +08:00
parent a03f42f732
commit c362763a25
1 changed files with 51 additions and 51 deletions

View File

@ -22,7 +22,7 @@
<el-button type="primary" v-if="!isSubmit&&processType=='20'" @click="check_start">检验</el-button> <el-button type="primary" v-if="!isSubmit&&processType=='20'" @click="check_start">检验</el-button>
<el-button type="primary" v-if="multipleSet" @click="check_set" style="position: absolute;left: 210px;">批量操作</el-button> <el-button type="primary" v-if="multipleSet" @click="check_set" style="position: absolute;left: 210px;">批量操作</el-button>
<el-input v-if="multipleSet" v-model="wprInputText" @change="wprinputChange" style="width:200px;position: absolute;left: 308px;"></el-input> <el-input v-if="multipleSet" v-model="wprInputText" @change="wprinputChange" style="width:200px;position: absolute;left: 308px;"></el-input>
<el-button v-if="multipleSet" type="primary" @click="digital ">数字识别</el-button> <el-button v-if="!isSubmit" type="success" @click="digital ">数字识别</el-button>
<div style="width:fit-content;position: absolute;right: 0;display: inline-block;"> <div style="width:fit-content;position: absolute;right: 0;display: inline-block;">
<div style="display: flex;align-items: center;gap: 8px;"> <div style="display: flex;align-items: center;gap: 8px;">
<el-link v-if="test_file!==''" :href="test_file" target="_blank">{{ test_file_name }}</el-linK> <el-link v-if="test_file!==''" :href="test_file" target="_blank">{{ test_file_name }}</el-linK>
@ -1133,58 +1133,58 @@ that.$API.wpm.prints.req(printer_ip, obj).then((response) => {
return; return;
} }
that.$API.em.equipment.get_svs_char.req({ that.$API.em.equipment.get_svs_char.req({
ip: that.ocr_ip, host: that.ocr_ip,
port: that.ocr_port, port: that.ocr_port,
unit: that.ocr_unit flow_unit: that.ocr_unit
}).then((res) => { }).then((res) => {
alert(res); console.log(res);
// if(res.number){ if(res.char){
// that.mlogbwlist.forEach((item,index) => { that.mlogbwlist.forEach((item,index) => {
// if(item.number==res.number){ if(item.number==res.char){
// let obj = Object.assign({},item); let obj = Object.assign({},item);
// obj.isEdit = true; obj.isEdit = true;
// that.mlogbwlist.splice(index,1); that.mlogbwlist.splice(index,1);
// that.wprInputText = ""; that.wprInputText = "";
// that.mlogbwlist.unshift(obj); that.mlogbwlist.unshift(obj);
// that.$nextTick(() => { that.$nextTick(() => {
// that.selectedindexes.push(obj.id); that.selectedindexes.push(obj.id);
// that.selectWprList.push(item); that.selectWprList.push(item);
// }) })
// // //
// // //
// if(that.qct_testitems.length>0 && !!that.setForm.cd_req_addr){ 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.$API.em.cd.req({method:that.setForm.cd_req_addr}).then((res) => {
// that.qct_testitems.forEach(item0 => { that.qct_testitems.forEach(item0 => {
// if(item0.testitem_cd_expr!=null){ if(item0.testitem_cd_expr!=null){
// that.mlogbwlist[index][item0.testitem_name]= eval(item0.testitem_cd_expr); that.mlogbwlist[index][item0.testitem_name]= eval(item0.testitem_cd_expr);
// that.qct_defects.forEach(item => { that.qct_defects.forEach(item => {
// if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){ if(item.rule_expression!==''&&item.rule_expression!==undefined&&item.rule_expression!==null){
// let str = item.rule_expression.replace(/`/g, ''); let str = item.rule_expression.replace(/`/g, '');
// str = str.replace(/\${(.*?)}/g, 'row.\$1'); str = str.replace(/\${(.*?)}/g, 'row.\$1');
// let judge = false; let judge = false;
// try { try {
// judge = eval(str); judge = eval(str);
// that.mlogbwlist[index][item.defect_name] = judge; that.mlogbwlist[index][item.defect_name] = judge;
// }catch (error) { }catch (error) {
// console.error(error); console.error(error);
// } }
// }else{ }else{
// that.mlogbwlist[index][item.defect_name] = false; that.mlogbwlist[index][item.defect_name] = false;
// } }
// }); });
// } }
// }) })
// }).catch((err) => { }).catch((err) => {
// this.$notify.error({ this.$notify.error({
// title: '', title: '获取数据失败',
// message: err.data message: err.data
// }) })
// return err; return err;
// }); });
// } }
// } }
// }) })
// } }
}).catch((err) => { }).catch((err) => {
that.$notify.error({ that.$notify.error({
title: '数字识别获取失败', title: '数字识别获取失败',