From e229b32a5c2f7cc846a5679ab26c613b500bbf93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=A9=99=E5=AD=90?= <454313500@qq.com> Date: Fri, 22 Oct 2021 21:19:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=89=8D=E7=AB=AF=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Yi.Framework.ApiMicroservice/YIDB.db | Bin 69632 -> 69632 bytes Yi.Vue/src/components/ccTable.vue | 10 +- Yi.Vue/src/components/ccTreeview.vue | 1 + Yi.Vue/src/layouts/default/Drawer.vue | 4 +- Yi.Vue/src/util/getMould.js | 35 ++-- Yi.Vue/src/views/AdmRole.vue | 180 ++++++++++-------- 6 files changed, 130 insertions(+), 100 deletions(-) diff --git a/Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db b/Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db index 42d8c6cf64c091bd1673dc026bf8cdf7eb8280c2..462a5b06de32f497a82fd148e3746c90f7e9f90a 100644 GIT binary patch delta 488 zcmZozz|ydQWdn-=A1i-51OFTTtNi=;7xA}m78EGuua{(HWf0cqNJ-7nFUrqJ)ptqF z@yRSM2?DaESXdb(wK+-)QW8s2!IGh1CP+?{8K_O2BR#bQqRl-OtVNWGl|fpbGchFv zq`oAzxI`aB2r;rUh{|(^L-xA=L?IGLHn8FTYXb5dA0zwwt)kTK&s z#lZiE|2zLD{y#at&GDI*w6npU^e5_oyyLb%E396Gn3PsQx~XyCr7=E88?GG2M32RBZDYMZc3(Z zaYlLx?Hvv0tJ4w0Z7vj@-pFat6P Tzm*38WwQ|wQwg`f2?0R{TunE8 diff --git a/Yi.Vue/src/components/ccTable.vue b/Yi.Vue/src/components/ccTable.vue index e3ae25d6..aa241eb4 100644 --- a/Yi.Vue/src/components/ccTable.vue +++ b/Yi.Vue/src/components/ccTable.vue @@ -24,7 +24,7 @@ > @@ -72,7 +72,7 @@ diff --git a/Yi.Vue/src/components/ccTreeview.vue b/Yi.Vue/src/components/ccTreeview.vue index 6e451953..586ba166 100644 --- a/Yi.Vue/src/components/ccTreeview.vue +++ b/Yi.Vue/src/components/ccTreeview.vue @@ -103,6 +103,7 @@ export default { icon: "mdi-start", router: "test", menu_name: "测试", + is_show:1 }, }), computed: { diff --git a/Yi.Vue/src/layouts/default/Drawer.vue b/Yi.Vue/src/layouts/default/Drawer.vue index cc2aae85..6e330453 100644 --- a/Yi.Vue/src/layouts/default/Drawer.vue +++ b/Yi.Vue/src/layouts/default/Drawer.vue @@ -81,7 +81,9 @@ export default { title: "用户管理", icon: "mdi-account", to: "/admuser/", - children: [], + children: [ + + ], }, { title: "角色管理", diff --git a/Yi.Vue/src/util/getMould.js b/Yi.Vue/src/util/getMould.js index 2f9e05a8..4a07ff48 100644 --- a/Yi.Vue/src/util/getMould.js +++ b/Yi.Vue/src/util/getMould.js @@ -1,17 +1,24 @@ -function getUrl(menuList, menuStr) { - for (var i = 0; i < menuList.length; i++) { - if (menuList[i].menu_name == menuStr) { - console.log(handUrl(menuList[i])) - return 1; - } else { - if (menuList[i].children != undefined) { - getUrl(menuList[i].children, menuStr); - } +var start = true; +function getUrl(menuList, menuStr) { + + if (start) { + for (var i = 0; i < menuList.length; i++) { + if (menuList[i].menu_name == menuStr) { + alert(777) + start = false; + console.log(handUrl(menuList[i])) + return handUrl(menuList[i]) + } else { + if (menuList[i].children != undefined && start) { + alert(666) + getUrl(menuList[i].children, menuStr); + } + + } } } -} - +}; function handUrl(menu) { var axiosUrls = { @@ -42,4 +49,8 @@ function handUrl(menu) { }); return axiosUrls; } -export default { getUrl } \ No newline at end of file + +export { + getUrl, + handUrl +} \ No newline at end of file diff --git a/Yi.Vue/src/views/AdmRole.vue b/Yi.Vue/src/views/AdmRole.vue index 61a79ed7..ad8d7578 100644 --- a/Yi.Vue/src/views/AdmRole.vue +++ b/Yi.Vue/src/views/AdmRole.vue @@ -12,93 +12,109 @@