From df7f57d9637a91ae33cd0f9f6a5dc71b3012d8c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E8=90=BD=28YangLei=29?= Date: Thu, 1 Jul 2021 16:37:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=8A=BD=E5=B1=89=E6=8A=BD=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/menu_tree/index.vue | 1 - src/components/table/drawer.vue | 69 +++++++++++++++++++ src/components/table/index.vue | 4 +- src/components/table/table.vue | 99 +++++++++++++++++++++++++++ src/pages/system/view/role/form.vue | 11 ++- src/pages/user/components/message.vue | 29 +++++++- 6 files changed, 207 insertions(+), 6 deletions(-) create mode 100644 src/components/table/drawer.vue create mode 100644 src/components/table/table.vue diff --git a/src/components/menu_tree/index.vue b/src/components/menu_tree/index.vue index b3a255d..4bd300e 100644 --- a/src/components/menu_tree/index.vue +++ b/src/components/menu_tree/index.vue @@ -5,7 +5,6 @@ checkable :replaceFields="replaceFields" :tree-data="treeData" - style="max-height:400px" class="tw-overflow-y-auto" :expandedKeys.sync="expandedKeys" v-bind="$attrs" diff --git a/src/components/table/drawer.vue b/src/components/table/drawer.vue new file mode 100644 index 0000000..ec7afca --- /dev/null +++ b/src/components/table/drawer.vue @@ -0,0 +1,69 @@ + + + diff --git a/src/components/table/index.vue b/src/components/table/index.vue index 29b8d60..cd63510 100644 --- a/src/components/table/index.vue +++ b/src/components/table/index.vue @@ -58,7 +58,7 @@ :width="(addBtn && addBtn.width) || 600" destroyOnClose > -
+
@@ -179,6 +179,8 @@ export default { add() { this.addVisible = true; + this.type = 0; + this.noFooter = false; }, addDrawerClose() { this.addVisible = false; diff --git a/src/components/table/table.vue b/src/components/table/table.vue new file mode 100644 index 0000000..d3b6570 --- /dev/null +++ b/src/components/table/table.vue @@ -0,0 +1,99 @@ + + + diff --git a/src/pages/system/view/role/form.vue b/src/pages/system/view/role/form.vue index ca4208b..9df4648 100644 --- a/src/pages/system/view/role/form.vue +++ b/src/pages/system/view/role/form.vue @@ -38,10 +38,17 @@ export default { defaultCheckedKeys: [], }; }, - computed: {}, methods: { submit() { - const query = { ...this.form, functionAuthority: this.checkedKeys.map(i => i.toString()) }; + const query = { + ...this.form, + authorityList: this.$refs['menuTree'].get().map(i => ({ + ...i, + nodeId: i.menuId, + parentNodeId: i.parentMenuId, + nodeType: i.menuType, + })), + }; return this.isEdit ? updateRoleApi(query) : addRoleApi(query); }, setData(data, type) { diff --git a/src/pages/user/components/message.vue b/src/pages/user/components/message.vue index 487eee8..e3be9be 100644 --- a/src/pages/user/components/message.vue +++ b/src/pages/user/components/message.vue @@ -1,8 +1,33 @@