|
@@ -74,12 +74,16 @@
|
|
|
label="工艺参数"
|
|
label="工艺参数"
|
|
|
prop="defaultValue"
|
|
prop="defaultValue"
|
|
|
align="center"
|
|
align="center"
|
|
|
|
|
+ show-overflow-tooltip
|
|
|
>
|
|
>
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<!-- <span :class="scope.row.qualityResults === 2 ? 'warn' : ''">
|
|
<!-- <span :class="scope.row.qualityResults === 2 ? 'warn' : ''">
|
|
|
{{ scope.row.defaultValue }}
|
|
{{ scope.row.defaultValue }}
|
|
|
</span> -->
|
|
</span> -->
|
|
|
- <div style="display: flex; justify-content: center" :class="scope.row.qualityResults === 2 ? 'warn' : ''">
|
|
|
|
|
|
|
+ <div
|
|
|
|
|
+ style="display: flex; justify-content: center"
|
|
|
|
|
+ :class="scope.row.qualityResults === 2 ? 'warn' : ''"
|
|
|
|
|
+ >
|
|
|
<span>{{ scope.row.symbol }}</span>
|
|
<span>{{ scope.row.symbol }}</span>
|
|
|
<span v-if="scope.row.textType == 3">
|
|
<span v-if="scope.row.textType == 3">
|
|
|
{{ scope.row.minValue }}-{{ scope.row.maxValue }}
|
|
{{ scope.row.minValue }}-{{ scope.row.maxValue }}
|
|
@@ -219,7 +223,8 @@
|
|
|
label: '名称',
|
|
label: '名称',
|
|
|
prop: 'categoryName',
|
|
prop: 'categoryName',
|
|
|
width: '150',
|
|
width: '150',
|
|
|
- align: 'center'
|
|
|
|
|
|
|
+ align: 'center',
|
|
|
|
|
+ showOverflowTooltip: true
|
|
|
},
|
|
},
|
|
|
{ label: '批次号', prop: 'batchNo', align: 'center' },
|
|
{ label: '批次号', prop: 'batchNo', align: 'center' },
|
|
|
// { label: '发货条码', prop: 'barcodes', align: 'center' },
|
|
// { label: '发货条码', prop: 'barcodes', align: 'center' },
|
|
@@ -293,11 +298,12 @@
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
// 默认合格
|
|
// 默认合格
|
|
|
- list.map((item)=>{
|
|
|
|
|
- item.qualitySampleTemplateList && item.qualitySampleTemplateList.map((el)=>{
|
|
|
|
|
- el.qualityResults = el.qualityResults ? el.qualityResults : 1
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ list.map((item) => {
|
|
|
|
|
+ item.qualitySampleTemplateList &&
|
|
|
|
|
+ item.qualitySampleTemplateList.map((el) => {
|
|
|
|
|
+ el.qualityResults = el.qualityResults ? el.qualityResults : 1;
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
this.tableData = JSON.parse(JSON.stringify(list));
|
|
this.tableData = JSON.parse(JSON.stringify(list));
|
|
|
console.log(this.tableData, '33333333333333333');
|
|
console.log(this.tableData, '33333333333333333');
|
|
|
|
|
|
|
@@ -323,30 +329,100 @@
|
|
|
},
|
|
},
|
|
|
inputResultContent(e, row) {
|
|
inputResultContent(e, row) {
|
|
|
console.log(row, 'row row row');
|
|
console.log(row, 'row row row');
|
|
|
- console.log(e, 'eeeeeeeee');
|
|
|
|
|
if (row.textType == '1') {
|
|
if (row.textType == '1') {
|
|
|
- if (row.qualityResultContent != row.defaultValue) {
|
|
|
|
|
- this.$set(row, 'qualityResults', 2);
|
|
|
|
|
- } else {
|
|
|
|
|
- this.$set(row, 'qualityResults', 1);
|
|
|
|
|
|
|
+ if (!row.symbol) {
|
|
|
|
|
+ if (row.qualityResultContent != row.defaultValue) {
|
|
|
|
|
+ this.$set(row, 'qualityResults', 2);
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$set(row, 'qualityResults', 1);
|
|
|
|
|
+ }
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
|
|
+ let key = this.mathematicalJudgment(row);
|
|
|
|
|
+ this.$set(row, 'qualityResults', key);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
if (row.textType == '3') {
|
|
if (row.textType == '3') {
|
|
|
- let num = Number(row.qualityResultContent)
|
|
|
|
|
- if(num == NaN){
|
|
|
|
|
- this.$set(row, 'qualityResults', 2);
|
|
|
|
|
|
|
+ let num = Number(row.qualityResultContent);
|
|
|
|
|
+ if (num == NaN) {
|
|
|
|
|
+ this.$set(row, 'qualityResults', 2);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
- console.log(num,'num')
|
|
|
|
|
- if(num >= Number(row.minValue) && num <= Number(row.maxValue)){
|
|
|
|
|
|
|
+ console.log(num, 'num');
|
|
|
|
|
+ if (num >= Number(row.minValue) && num <= Number(row.maxValue)) {
|
|
|
this.$set(row, 'qualityResults', 1);
|
|
this.$set(row, 'qualityResults', 1);
|
|
|
- }else{
|
|
|
|
|
- this.$set(row, 'qualityResults', 2);
|
|
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.$set(row, 'qualityResults', 2);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
|
|
+ // 数学判断
|
|
|
|
|
+ mathematicalJudgment(row) {
|
|
|
|
|
+ console.log('进来没有',row);
|
|
|
|
|
+ let symbol = row.symbol?.trim(); // 符号
|
|
|
|
|
+ let Ivalue = Number(row.qualityResultContent); // 输入的值
|
|
|
|
|
+ let Dvalue = Number(row.defaultValue); // 判断的值
|
|
|
|
|
+ if (Ivalue == NaN || Dvalue == NaN) {
|
|
|
|
|
+ return 2;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (symbol == '±') {
|
|
|
|
|
+ if (Math.abs(Ivalue) != Math.abs(Dvalue)) {
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return 2;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (symbol == '≤' || symbol == '≦') {
|
|
|
|
|
+ if (Ivalue <= Dvalue) {
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return 2;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (symbol == '≥' || symbol == '≧') {
|
|
|
|
|
+ if (Ivalue >= Dvalue) {
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return 2;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (symbol == '≈' || symbol == '=') {
|
|
|
|
|
+ console.log('进来等于号')
|
|
|
|
|
+ if (Ivalue == Dvalue) {
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return 2;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (symbol == '≠') {
|
|
|
|
|
+ if (Ivalue != Dvalue) {
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return 2;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (symbol == '>') {
|
|
|
|
|
+ if (Ivalue > Dvalue) {
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return 2;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (symbol == '<') {
|
|
|
|
|
+ if (Ivalue > Dvalue) {
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return 2;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- console.log(row, 'row 11111111111');
|
|
|
|
|
|
|
+ return 2;
|
|
|
},
|
|
},
|
|
|
handleClose() {
|
|
handleClose() {
|
|
|
this.visible = false;
|
|
this.visible = false;
|