Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcxy-manage-shell
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
姜雷
dcxy-manage-shell
Commits
b0d76115
Commit
b0d76115
authored
May 08, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'test'
修改顶部菜单子系统为动态配置 See merge request
!86
parents
7aa7bff0
8423817b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
118 deletions
+19
-118
IconMenu.vue
src/containers/layout/IconMenu/IconMenu.vue
+9
-116
route.js
src/utils/route.js
+10
-2
No files found.
src/containers/layout/IconMenu/IconMenu.vue
View file @
b0d76115
...
...
@@ -12,88 +12,17 @@
class=
"IconMenus-list"
v-else
>
<MenuItem
v-if=
"customerManage && customerManage.length"
menuName=
"会员管理"
:menuList=
"customerManage[0].children"
:selectRouteMenu=
"selectRouteMenu"
>
<img
slot=
"icon"
src=
"@/assets/images/layout/icon_huiyuanguanli@2x.png"
/>
</MenuItem>
<!--
<MenuItem
menuName=
"自助运营"
>
<img
slot=
"icon"
src=
"@/assets/images/layout/icon_zizhuyunying@2x.png"
/>
</MenuItem>
-->
<MenuItem
v-if=
"baseManage && baseManage.length"
menuName=
"基础数据"
:menuList=
"baseManage[0].children"
:selectRouteMenu=
"selectRouteMenu"
>
<img
slot=
"icon"
src=
"@/assets/images/layout/icon_jichu@2x.png"
/>
</MenuItem>
<MenuItem
v-if=
"systemManage && systemManage.length"
menuName=
"系统管理"
:menuList=
"systemManage[0].children"
:selectRouteMenu=
"selectRouteMenu"
>
<img
slot=
"icon"
src=
"@/assets/images/layout/icon_xitong@2x.png"
/>
</MenuItem>
<MenuItem
v-if=
"statisticsManage && statisticsManage.length"
menuName=
"统计系统"
:menuList=
"statisticsManage[0].children"
:selectRouteMenu=
"selectRouteMenu"
>
<img
slot=
"icon"
src=
"@/assets/images/layout/icon_baobiao.png"
/>
</MenuItem>
<MenuItem
v-if=
"deviceManage && deviceManage.length"
menuName=
"设备系统"
:menuList=
"deviceManage[0].children"
:selectRouteMenu=
"selectRouteMenu"
>
<img
slot=
"icon"
src=
"@/assets/images/layout/icon_shebei.png"
/>
</MenuItem>
<MenuItem
v-if=
"customerOperate && customerOperate.length"
menuName=
"运营管理"
:menuList=
"customerOperate[0].children"
:selectRouteMenu=
"selectRouteMenu"
>
<img
slot=
"icon"
src=
"@/assets/images/layout/icon_yunying.png"
/>
</MenuItem>
<MenuItem
v-if=
"smapreManage && smapreManage.length"
menuName=
"微信端"
:menuList=
"smapreManage[0].children"
v-for=
"(route) in formatRoute"
:key=
"route.name"
:menuName=
"route.meta.title"
:menuList=
"route.children"
:selectRouteMenu=
"selectRouteMenu"
>
<img
slot=
"icon"
src=
"@/assets/images/layout/wechat.png
"
:src=
"route.meta.icon
"
/>
</MenuItem>
<!--
<div
@
click=
"() => toggleFastLink(false)"
>
...
...
@@ -167,23 +96,11 @@ export default {
computed
:
{
...
mapGetters
(
'Dashboard'
,
[
'titleData'
]),
...
mapGetters
([
'collectList'
,
'dashboardBackPage'
]),
customerManage
()
{
let
item
=
this
.
routers
.
find
(
menu
=>
menu
.
menuCode
===
process
.
env
.
VUE_APP_CUSTOMER_MENU_CODE
);
return
item
?
formatRouteLink
([
item
])
:
null
;
},
baseManage
()
{
let
item
=
this
.
routers
.
find
(
menu
=>
menu
.
menuCode
===
process
.
env
.
VUE_APP_BASE_MENU_CODE
);
return
item
?
formatRouteLink
([
item
])
:
null
;
},
systemManage
()
{
let
item
=
this
.
routers
.
find
(
menu
=>
menu
.
menuCode
===
process
.
env
.
VUE_APP_SYSTEM_MENU_CODE
formatRoute
()
{
let
routeList
=
this
.
routers
.
filter
(
menu
=>
menu
.
menuCode
!==
process
.
env
.
VUE_APP_DASHBOARD_CODE
);
return
item
?
formatRouteLink
([
item
])
:
null
;
return
formatRouteLink
(
routeList
)
;
},
dashboardButtonVisiable
()
{
let
item
=
this
.
routers
.
find
(
...
...
@@ -191,30 +108,6 @@ export default {
);
return
item
?
true
:
false
;
},
statisticsManage
()
{
let
item
=
this
.
routers
.
find
(
menu
=>
menu
.
menuCode
===
process
.
env
.
VUE_APP_STATISTICS_MENU_CODE
);
return
item
?
formatRouteLink
([
item
])
:
null
;
},
deviceManage
()
{
let
item
=
this
.
routers
.
find
(
menu
=>
menu
.
menuCode
===
process
.
env
.
VUE_APP_DEVICE_MENU_CODE
);
return
item
?
formatRouteLink
([
item
])
:
null
;
},
customerOperate
()
{
let
item
=
this
.
routers
.
find
(
menu
=>
menu
.
menuCode
===
process
.
env
.
VUE_APP_CUSTOMER_OPERATE_CODE
);
return
item
?
formatRouteLink
([
item
])
:
null
;
},
smapreManage
()
{
let
item
=
this
.
routers
.
find
(
menu
=>
menu
.
menuCode
===
process
.
env
.
VUE_APP_SMAPRO_CODE
);
return
item
?
formatRouteLink
([
item
])
:
null
;
},
},
watch
:
{
collectList
(
val
)
{
...
...
src/utils/route.js
View file @
b0d76115
...
...
@@ -4,7 +4,11 @@ export const formatRouteLink = (addRoute, path = '/') => {
return
{
path
:
path
+
route
.
menuLink
,
name
:
route
.
id
.
toString
(),
meta
:
{
title
:
route
.
menuName
,
icon
:
route
.
menuPicSmall
},
meta
:
{
title
:
route
.
menuName
,
icon
:
route
.
menuPicSmall
,
bicon
:
route
.
menuPicBig
,
},
children
:
formatRouteLink
(
route
.
childs
,
path
+
route
.
menuLink
+
'/'
),
};
}
else
{
...
...
@@ -12,7 +16,11 @@ export const formatRouteLink = (addRoute, path = '/') => {
path
:
path
+
route
.
menuLink
,
name
:
route
.
id
.
toString
(),
menuCode
:
route
.
menuCode
,
meta
:
{
title
:
route
.
menuName
,
icon
:
route
.
menuPicSmall
},
meta
:
{
title
:
route
.
menuName
,
icon
:
route
.
menuPicSmall
,
bicon
:
route
.
menuPicBig
,
},
};
}
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment