Răsfoiți Sursa

优化质检报告工艺参数显示逻辑并修复数值比较问题,调整表格列固定位置

yusheng 4 luni în urmă
părinte
comite
6c51623912

+ 19 - 2
src/views/inspectionWork/components/inspectionProjectReport.vue

@@ -229,6 +229,20 @@
       <template v-slot:imgUrl="{ row, $index }">
         <fileMain v-model="row.imgUrl" type="view"></fileMain>
       </template>
+      <template v-slot:defaultValue="{ row }">
+        <div style="display: flex; justify-content: center">
+          <span>{{ row.symbol }}</span>
+          <span v-if="row.textType == 3">
+            {{ row.minValue }}-{{ row.maxValue }}
+          </span>
+
+          <span v-else>
+            <span>{{ row.defaultValue }}</span>
+          </span>
+
+          {{ row.unitName }}
+        </div>
+      </template>
 
       <template v-slot:isRequired="{ column }">
         <span class="is-required">{{ column.label }}</span>
@@ -595,6 +609,7 @@
           },
           {
             minWidth: 150,
+            slot: 'defaultValue',
             prop: 'defaultValue',
             align: 'center',
             label: '工艺参数',
@@ -688,7 +703,9 @@
             slot: 'qualityResults',
             align: 'center',
             label: '质检结果',
-            showOverflowTooltip: true
+            showOverflowTooltip: true,
+            fixed: 'right'
+
           },
           {
             minWidth: 150,
@@ -848,7 +865,7 @@
       },
       handleOneKeyQualified() {
         this.tableData.forEach((item, index) => {
-          this.$set(this.tableData[index],'qualityResults',1)
+          this.$set(this.tableData[index], 'qualityResults', 1);
         });
       },
       formSampleQuantityChange() {

+ 1 - 1
src/views/inspectionWork/components/unit.js

@@ -73,7 +73,7 @@ function mathematicalJudgment(row) {
     return 2;
   }
   if (symbol == '±') {
-    if (Math.abs(Ivalue) != Math.abs(Dvalue)) {
+    if (Math.abs(Ivalue) <= Math.abs(Dvalue)) {
       return 1;
     } else {
       return 2;