ysy 1 год назад
Родитель
Сommit
7f1b826f02

+ 18 - 3
src/views/inspectionClassify/components/user-list.vue

@@ -47,10 +47,18 @@
         {{ getDictValue('质检标准类型', row.itemVO.type) }}
       </template>
 
-
       <template v-slot:toolList="{ row }">
-             <div style="display: inline-block;" v-for="(item,idx) in row.itemVO.toolList" :key="idx">{{ item.name }}  <span v-if="row.itemVO.toolList && idx != row.itemVO.toolList.length - 1">, </span></div>
-        </template>
+        <div
+          style="display: inline-block"
+          v-for="(item, idx) in row.itemVO.toolList"
+          :key="idx"
+          >{{ item.name }}
+          <span
+            v-if="row.itemVO.toolList && idx != row.itemVO.toolList.length - 1"
+            >,
+          </span></div
+        >
+      </template>
 
       <template v-slot:action="{ row }">
         <el-popconfirm
@@ -97,6 +105,12 @@
         current: null,
 
         columns: [
+          {
+            prop: 'itemVO.categoryLevelName',
+            label: '质检类型',
+            align: 'center',
+            minWidth: 110
+          },
           {
             prop: 'itemVO.inspectionCode',
             label: '参数编码',
@@ -184,6 +198,7 @@
           },
           {
             label: '操作',
+
             slot: 'action',
             showOverflowTooltip: true
           }

+ 3 - 4
src/views/inspectionPoint/components/newEdit.vue

@@ -134,7 +134,6 @@
     </template>
 
     <EquipmentDialog
-     
       v-if="showEquipment"
       :qualityIds="qualityIds"
       @chooseModal="chooseModal"
@@ -326,9 +325,9 @@
 
       openAdd() {
         this.qualityIds = [];
-        this.qualityIds =  this.inspectionItems.map(
-              (item) => item.qualityLevelId
-            )
+        this.qualityIds = this.inspectionItems.map(
+          (item) => item.qualityLevelId
+        );
         this.showEquipment = true;
       },
 

+ 17 - 7
src/views/inspectionPoint/components/newEquipmentDialog.vue

@@ -126,8 +126,7 @@
     },
     props: {
       qualityIds: {
-        type: Array,
-        default: () => []
+        type: Array
       }
     },
 
@@ -136,7 +135,9 @@
         immediate: true,
         deep: true,
         handler(ids) {
-          this.handleDone(ids);
+          if (ids && ids.length > 0) {
+            this.handleDone([...ids]);
+          }
         }
       }
     },
@@ -156,6 +157,13 @@
             reserveSelection: true
           },
 
+          {
+            prop: 'itemVO.categoryLevelName',
+            label: '质检类型',
+            align: 'center',
+            minWidth: 110
+          },
+
           {
             prop: 'itemVO.inspectionCode',
             label: '参数编码',
@@ -258,10 +266,12 @@
       },
 
       handleDone(ids) {
-        if(Array.isArray(ids)){
-          console.log("ids", ids)
-          this.$refs.table.setSelectedRowKeys(['1869306144490258435']);
-        }
+        setTimeout(() => {
+          if (Array.isArray(ids)) {
+            this.$refs.table &&
+              this.$refs.table.setSelectedRowKeys([...ids]);
+          }
+        }, 500);
       },
 
       handleNodeClick(info) {