chencc hai 1 ano
pai
achega
3567873e34
Modificáronse 1 ficheiros con 11 adicións e 2 borrados
  1. 11 2
      src/views/material/BOMmanage/components/standardOutput.vue

+ 11 - 2
src/views/material/BOMmanage/components/standardOutput.vue

@@ -137,6 +137,7 @@ export default {
           label: '选择'
         }
       ],
+      isshow:false,
       title: null,
       categoryLevelId: null,
       radio: null,
@@ -179,9 +180,12 @@ export default {
       this.$refs.table.reload({ pageNum: 1, where: where });
     },
     open(list) {
+      
       if (Array.isArray(list)) {
+        this.isshow = true;
         this.selectList = list;
       } else {
+        this.isshow = false;
         this.type = list;
       }
       this.getTreeData();
@@ -221,11 +225,16 @@ export default {
       if (this.selection.length <= 0) {
         return this.$message.warning('请至少选择一条数据');
       }
-      console.log(this.selection, '我是选择数据');
+      
+      console.log(this.selection, '我是选择数据',this.type,this.isshow);
+
+
+      if (Array.isArray(this.selection)&&this.isshow) {
 
-      if (Array.isArray(this.selection) && !this.type) {
         this.$emit('selection', this.selection);
+
       } else {
+
         this.$emit('selection', this.type, this.selection);
       }
       this.handleClose();