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