From 18ebb99a2aaafdc496d908992c6d105a0f41e87d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=95=E9=87=91=E6=B3=BD?= <1098696801@qq.com> Date: Mon, 10 Jan 2022 23:55:17 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/后台/菜单管理/搜索菜单数据.ms | 30 +++++++++++ .../src/layout/components/Sidebar/index.vue | 52 +++++++++++++++++-- 2 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 data/magic-api/api/后台/菜单管理/搜索菜单数据.ms diff --git a/data/magic-api/api/后台/菜单管理/搜索菜单数据.ms b/data/magic-api/api/后台/菜单管理/搜索菜单数据.ms new file mode 100644 index 0000000..68c088a --- /dev/null +++ b/data/magic-api/api/后台/菜单管理/搜索菜单数据.ms @@ -0,0 +1,30 @@ +{ + "properties" : { }, + "id" : "0adb88c728814db88b901701faa56161", + "script" : null, + "groupId" : "67b2ce258e24491194b74992958c74aa", + "name" : "搜索菜单数据", + "createTime" : null, + "updateTime" : 1641828392961, + "lock" : "0", + "method" : "GET", + "path" : "/search", + "parameters" : [ ], + "option" : "[]", + "requestBody" : "", + "headers" : [ ], + "paths" : [ ], + "responseBody" : null, + "description" : null, + "requestBodyDefinition" : null, + "responseBodyDefinition" : null, + "optionMap" : { } +} +================================ +var toTree = (list,pid) => select t.*,toTree(list,t.id) children from list t where t.pid = pid +var list = toTree(db.select('select id,name as label,pid,url from sys_menu where is_del = 0 and is_show = 1 order by sort'),'0') + +return { + list: list, + total: list.getLength() +} \ No newline at end of file diff --git a/magic-boot-ui/src/layout/components/Sidebar/index.vue b/magic-boot-ui/src/layout/components/Sidebar/index.vue index bc35b88..450a275 100644 --- a/magic-boot-ui/src/layout/components/Sidebar/index.vue +++ b/magic-boot-ui/src/layout/components/Sidebar/index.vue @@ -7,6 +7,18 @@ + + + + +