From 497e5fd410e181f9a25c5e7b06ce23f1dbfefb5a Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 29 Jul 2024 10:00:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat:=20base=20menu=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ops/menu.vue | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/views/ops/menu.vue b/src/views/ops/menu.vue index 56dc9a8a..cff60154 100644 --- a/src/views/ops/menu.vue +++ b/src/views/ops/menu.vue @@ -4,9 +4,22 @@
+
+ + +
- @@ -77,15 +90,13 @@ export default { name: "dept", data() { return { + query: {}, dialog: { save: false, permission: false, }, apiObj: this.$API.system.permission.list, selection: [], - search: { - keyword: null, - }, params: { page: 0, }, From 60f8b0fb6d2bfa53ecc0d3504425cae25dd89393 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Mon, 29 Jul 2024 10:25:19 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat:=20base=20menu=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E6=97=B6=E5=8F=98=E6=9B=B4options?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/ops/menu.vue | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/src/views/ops/menu.vue b/src/views/ops/menu.vue index cff60154..53a9298d 100644 --- a/src/views/ops/menu.vue +++ b/src/views/ops/menu.vue @@ -20,7 +20,7 @@ + @selection-change="selectionChange" hidePagination @dataChange="updateOptions"> @@ -53,9 +53,9 @@ - 目录 - 菜单 - 按钮 + 模块 + 页面 + 接口 @@ -123,9 +123,9 @@ export default { type: [{ required: true, message: "请选择类型" }], }, types: { - 10: "目录", - 20: "菜单", - 30: "按钮", + 10: "模块", + 20: "页面", + 30: "接口", }, groupsProps: { // value: "id", @@ -140,19 +140,15 @@ export default { }, mounted() { - this.getGroup(); this.getPermCodes(); }, methods: { + updateOptions(data) { + this.group = genTree(data) + }, getPermCodes() { this.permCodes = this.$API.system.permission.codes.req(); }, - //加载树数据 - async getGroup() { - var res = await this.$API.system.permission.list.req({ page: 0 }); - this.group = genTree(res); - }, - //添加 addMenu() { this.type = "add";