diff --git a/imt-ui/src/api/system/appMenu.js b/imt-ui/src/api/system/appMenu.js
new file mode 100644
index 0000000..e69de29
diff --git a/imt-ui/src/views/system/appMenu/index.vue b/imt-ui/src/views/system/appMenu/index.vue
new file mode 100644
index 0000000..e69de29
diff --git a/imt-ui/src/views/system/tenantPackage/index.vue b/imt-ui/src/views/system/tenantPackage/index.vue
index 27f6fba..5fba9ea 100644
--- a/imt-ui/src/views/system/tenantPackage/index.vue
+++ b/imt-ui/src/views/system/tenantPackage/index.vue
@@ -71,6 +71,12 @@
+
+ 展开/折叠
+ 全选/全不选
+
+
{
+ // 处理 APPmenuOptions 参数
+ this.APPmenuOptions = [];
+ // 只需要配置
+ this.APPmenuOptions.push(...this.handleTree(response.data, "id"));
+ });
},
/** 提交按钮 */
submitForm() {
@@ -234,7 +266,8 @@ export default {
if (this.form.id != null) {
updateTenantPackage({
...this.form,
- menuIds: [...this.$refs.menu.getCheckedKeys(), ...this.$refs.menu.getHalfCheckedKeys()]
+ menuIds: [...this.$refs.menu.getCheckedKeys(), ...this.$refs.menu.getHalfCheckedKeys()],
+ appMenuIds: [...this.$refs.APPmenu.getCheckedKeys(), ...this.$refs.APPmenu.getHalfCheckedKeys()]
}).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
@@ -245,7 +278,8 @@ export default {
// 添加的提交
createTenantPackage({
...this.form,
- menuIds: [...this.$refs.menu.getCheckedKeys(), ...this.$refs.menu.getHalfCheckedKeys()]
+ menuIds: [...this.$refs.menu.getCheckedKeys(), ...this.$refs.menu.getHalfCheckedKeys()],
+ appMenuIds: [...this.$refs.APPmenu.getCheckedKeys(), ...this.$refs.APPmenu.getHalfCheckedKeys()]
}).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
@@ -274,6 +308,17 @@ export default {
handleCheckedTreeNodeAll(value) {
this.$refs.menu.setCheckedNodes(value ? this.menuOptions: []);
},
+ // 树权限(展开/折叠)
+ handleCheckedAPPTreeExpand(value, type) {
+ let treeList = this.APPmenuOptions;
+ for (let i = 0; i < treeList.length; i++) {
+ this.$refs.APPmenu.store.nodesMap[treeList[i].id].expanded = value;
+ }
+ },
+ // 树权限(全选/全不选)
+ handleCheckedAPPTreeNodeAll(value) {
+ this.$refs.APPmenu.setCheckedNodes(value ? this.APPmenuOptions: []);
+ },
// 树权限(父子联动)
handleCheckedTreeConnect(value) {
this.form.menuCheckStrictly = value;