diff --git a/Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db b/Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db
index 462a5b06..a032b95c 100644
Binary files a/Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db and b/Yi.Framework/Yi.Framework.ApiMicroservice/YIDB.db differ
diff --git a/Yi.Vue/src/components/ccTreeview.vue b/Yi.Vue/src/components/ccTreeview.vue
index 586ba166..0b463960 100644
--- a/Yi.Vue/src/components/ccTreeview.vue
+++ b/Yi.Vue/src/components/ccTreeview.vue
@@ -177,7 +177,7 @@ export default {
});
},
editItem(item) {
- this.editedIndex = this.desserts.indexOf(item);
+ this.editedIndex = item.id;
this.editedItem = Object.assign({}, item);
this.dialog = true;
},
diff --git a/Yi.Vue/src/layouts/default/Drawer.vue b/Yi.Vue/src/layouts/default/Drawer.vue
index 6e330453..997566e5 100644
--- a/Yi.Vue/src/layouts/default/Drawer.vue
+++ b/Yi.Vue/src/layouts/default/Drawer.vue
@@ -68,67 +68,65 @@ export default {
items: [
{
- title: "首页",
+ menu_name: "首页",
icon: "mdi-view-dashboard",
- to: "/",
+ router: "/",
},
{
- title: "用户角色管理",
+ menu_name: "用户角色管理",
icon: "mdi-account",
- to: "",
+ router: "",
children: [
{
- title: "用户管理",
+ menu_name: "用户管理",
icon: "mdi-account",
- to: "/admuser/",
- children: [
-
- ],
+ router: "/admuser/",
+ children: null,
},
{
- title: "角色管理",
+ menu_name: "角色管理",
icon: "mdi-account-tie",
- to: "/admrole/",
- children: [],
+ router: "/admrole/",
+ children: null,
},
],
},
{
- title: "菜单接口管理",
+ menu_name: "菜单接口管理",
icon: "mdi-clipboard-outline",
- to: "",
+ router: "",
children: [
{
- title: "菜单管理",
+ menu_name: "菜单管理",
icon: "mdi-account",
- to: "/admMenu/",
- children: [],
+ router: "/admMenu/",
+ children: null,
},
{
- title: "接口管理",
+ menu_name: "接口管理",
icon: "mdi-account",
- to: "/admMould/",
- children: [],
+ router: "/admMould/",
+ children: null,
},
{
- title: "角色菜单分配管理",
+ menu_name: "角色菜单分配管理",
icon: "mdi-account",
- to: "/admRoleMenu/",
- children: [],
+ router: "/admRoleMenu/",
+ children: null,
},
],
},
{
- title: "测试路由",
+ menu_name: "测试路由",
icon: "mdi-clipboard-outline",
- to: "",
+ router: "",
children: [
{
- title: "用户信息",
+ menu_name: "用户信息",
icon: "mdi-account",
- to: "/userinfo/",
- children: [],
- }
+ router: "/userinfo/",
+ children: null,
+ },
],
},
],
diff --git a/Yi.Vue/src/layouts/default/ListGroup.vue b/Yi.Vue/src/layouts/default/ListGroup.vue
index b0ef2852..3fbcb133 100644
--- a/Yi.Vue/src/layouts/default/ListGroup.vue
+++ b/Yi.Vue/src/layouts/default/ListGroup.vue
@@ -1,7 +1,7 @@
-
-
+
+
@@ -60,11 +60,11 @@
computed: {
- // group () {
- // return this.genGroup(this.item.items)
- // },
+ group () {
+ return this.genGroup(this.item.children)
+ },
title () {
- const matches = this.item.title.match(/\b(\w)/g)
+ const matches = this.item.menu_name.match(/\b(\w)/g)
return matches.join('')
},
@@ -73,12 +73,12 @@
methods: {
genGroup (items) {
return items.reduce((acc, cur) => {
- if (!cur.to) return acc
+ if (!cur.router) return acc
acc.push(
- cur.items
- ? this.genGroup(cur.items)
- : cur.to.slice(1, -1),
+ cur.children
+ ? this.genGroup(cur.children)
+ : cur.router.slice(1, -1),
)
return acc
diff --git a/Yi.Vue/src/layouts/default/ListItem.vue b/Yi.Vue/src/layouts/default/ListItem.vue
index a125c4be..16056715 100644
--- a/Yi.Vue/src/layouts/default/ListItem.vue
+++ b/Yi.Vue/src/layouts/default/ListItem.vue
@@ -3,7 +3,7 @@
:href="item.href"
:rel="item.href ? 'nofollow' : undefined"
:target="item.href ? '_blank' : undefined"
- :to="item.to"
+ :to="item.router"
active-class="primary white--text"
link
class="py-1"
@@ -28,8 +28,8 @@
-
-
+
+
@@ -47,7 +47,7 @@
computed: {
title () {
- const matches = this.item.title.match(/\b(\w)/g)
+ const matches = this.item.menu_name.match(/\b(\w)/g)
return matches.join('')
},
diff --git a/Yi.Vue/src/util/getMould.js b/Yi.Vue/src/util/getMould.js
index 4a07ff48..360c8ae4 100644
--- a/Yi.Vue/src/util/getMould.js
+++ b/Yi.Vue/src/util/getMould.js
@@ -5,13 +5,11 @@ 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);
}