Commit 1d48ea95 by xue_wengang

Update queryRole.vue

parent 96e74a8e
......@@ -142,6 +142,7 @@ export default {
checkAll: false,
selec: [],
parentArr: [],
allMenu: [],
};
},
created() {
......@@ -185,6 +186,7 @@ export default {
this.getTreeCode(item.children);
} else {
item.label = item.title;
this.allMenu.push(item.id);
}
});
return children;
......@@ -226,7 +228,10 @@ export default {
this.selec = new Set(
this.selectedId[0].menuListId.filter((x) => !arr.has(x))
);
//this.selec = this.selectedId[0].menuListId;
debugger;
if (this.selec.size == this.allMenu.length) {
this.checkAll = true;
}
} else {
this.$message.error("请选择角色");
}
......@@ -237,10 +242,6 @@ export default {
});
},
selectionChange(val) {
// this.selectedId = [];
// row.forEach((item) => {
// this.selectedId.push(item.id);
// });
debugger;
this.selectedId = val;
this.checkAll = false;
......@@ -251,28 +252,10 @@ export default {
this.$message.warning("只能单选");
return;
}
// this.$nextTick(() => {
// this.$refs.tree.setCheckedKeys([]);
// });
},
handleClose() {
this.dialogVisible = false;
},
handleCheckChange(data, checked, check) {
// debugger
// if (checked === true) {
// if (data.hasChildren) {
// this.handleChildren(data.children);
// } else {
// this.selectedTree.push(data.id);
// }
// } else {
// let index = this.selectedTree.findIndex((item) => item == data.id);
// let indexs = this.selec.findIndex((item) => item == data.id);
// this.selectedTree.splice(index, 1);
// this.selec.splice(indexs, 1);
// }
},
handleChildren(data) {
data.forEach((item) => {
if (item.hasChildren) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment