ysy 1 rok temu
rodzic
commit
17fad87201

+ 23 - 21
src/views/material/BOMmanage/qualityTesting/inspectionClassify/components/user-list.vue

@@ -100,8 +100,8 @@
     },
     data() {
       return {
-        // 当前编辑数据
-        current: null,
+
+        selection: [],
 
         columns: [
           {
@@ -112,6 +112,13 @@
             reserveSelection: true
           },
 
+          {
+            prop: 'itemVO.categoryLevelName',
+            label: '质检类型',
+            align: 'center',
+            minWidth: 110
+          },
+
           {
             prop: 'itemVO.inspectionCode',
             label: '参数编码',
@@ -145,24 +152,7 @@
 
           },
 
-          // {
-          //   prop: 'itemVO.maxValue',
-          //   label: '参数上限',
-          //   align: 'center',
-          //   showOverflowTooltip: true
-          // },
-          // {
-          //   prop: 'itemVO.minValue',
-          //   label: '参数下限',
-          //   align: 'center',
-          //   showOverflowTooltip: true
-          // },
-          // {
-          //   prop: 'itemVO.defaultValue',
-          //   label: '默认值',
-          //   align: 'center',
-          //   showOverflowTooltip: true
-          // },
+
           {
             label: '工艺要求',
             prop: 'itemVO.inspectionStandard',
@@ -246,7 +236,19 @@
         this.categoryLevelId = info.id;
         this.rootCategoryLevelId = info.rootCategoryLevelId;
         this.reload();
-      }
+      },
+
+
+      handleSelectionChange() {
+        let _arr = []
+        _arr = this.selection.map((m) => {
+          return {
+            ...m
+          }
+        })
+        this.$emit('selectChange', _arr)
+ 
+      } 
     }
   };
 </script>

+ 21 - 2
src/views/material/BOMmanage/qualityTesting/inspectionClassify/index.vue

@@ -29,6 +29,7 @@
             <user-list
               v-if="current"
               :category-id="current.id"
+              @selectChange="selectChange"
               :root-id="rootId"
               ref="searchRef"
             />
@@ -36,6 +37,12 @@
         </ele-split-layout>
       </el-card>
     </div>
+
+    <div slot="footer">
+        <el-button type="primary" @click="handleSave"> 选择 </el-button>
+        <el-button @click="handleClose"> 取消 </el-button>
+      </div>
+
   </el-dialog>
 </template>
 
@@ -57,7 +64,9 @@
         selection: [],
         current: null,
         rootId: '12',
-        visible: false
+        visible: false,
+
+        selectList: []
       };
     },
 
@@ -86,8 +95,18 @@
       },
 
       handleClose() {
+        this.selectList  = []
         this.visible = false;
-      }
+      },
+
+      selectChange(list) {
+        this.selectList = list;
+      },
+
+
+      handleSave() {
+        console.log(this.selectList, 666);
+      },
     }
   };
 </script>