yijing 1 год назад
Родитель
Сommit
61dd17ce07
1 измененных файлов с 4 добавлено и 4 удалено
  1. 4 4
      src/views/material/BOMmanage/components/standardOutput.vue

+ 4 - 4
src/views/material/BOMmanage/components/standardOutput.vue

@@ -47,10 +47,10 @@ export default {
           width: 45,
           align: 'center',
           selectable: (row, index) => {
-            if (this.selectList.length) {
+            if (Array.isArray(this.selectList)) {
               return !this.selectList.some((it) => row.id == it.id);
             } else {
-              return;
+              return true;
             }
 
           },
@@ -179,7 +179,7 @@ export default {
       this.$refs.table.reload({ pageNum: 1, where: where });
     },
     open(list) {
-      if (list.length) {
+      if (Array.isArray(list)) {
         this.selectList = list;
       } else {
         this.type = list;
@@ -223,7 +223,7 @@ export default {
       }
       console.log(this.selection, '我是选择数据');
 
-      if (this.selection.length > 0) {
+      if (Array.isArray(this.selection) && !this.type) {
         this.$emit('selection', this.selection);
       } else {
         this.$emit('selection', this.type, this.selection);