fix:点击提交按钮后不再进行缺陷项判断
This commit is contained in:
parent
d43c63e085
commit
4ffb9df5c2
|
|
@ -632,19 +632,19 @@ export default {
|
||||||
obj.note = row.note;
|
obj.note = row.note;
|
||||||
//qct不为空,有检验表
|
//qct不为空,有检验表
|
||||||
if((that.qct!==''&&that.qct!==null)||(that.qctId!==''&&that.qctId!==null)){
|
if((that.qct!==''&&that.qct!==null)||(that.qctId!==''&&that.qctId!==null)){
|
||||||
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[editIndex][item.defect_name] = judge;
|
// that.mlogbwlist[editIndex][item.defect_name] = judge;
|
||||||
}catch (error) {
|
// }catch (error) {
|
||||||
console.error('error',error);
|
// console.error('error',error);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
obj.ftest = {};
|
obj.ftest = {};
|
||||||
obj.ftest.ftestitems = [];
|
obj.ftest.ftestitems = [];
|
||||||
obj.ftest.ftestdefects = [];
|
obj.ftest.ftestdefects = [];
|
||||||
|
|
@ -937,10 +937,26 @@ export default {
|
||||||
},
|
},
|
||||||
getEqData(index){
|
getEqData(index){
|
||||||
let that = this;
|
let that = this;
|
||||||
|
let row = that.mlogbwlist[index];
|
||||||
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 => {
|
||||||
|
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) => {
|
}).catch((err) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue