Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcxy-system
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-system
Commits
8423817b
Commit
8423817b
authored
May 08, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改顶部菜单子系统为动态配置
parent
836ac266
Show 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 @
8423817b
...
@@ -12,88 +12,17 @@
...
@@ -12,88 +12,17 @@
class=
"IconMenus-list"
class=
"IconMenus-list"
v-else
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
<MenuItem
v-if=
"systemManage && systemManage.length"
v-for=
"(route) in formatRoute"
menuName=
"系统管理"
:key=
"route.name"
:menuList=
"systemManage[0].children"
:menuName=
"route.meta.title"
:selectRouteMenu=
"selectRouteMenu"
:menuList=
"route.children"
>
<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"
:selectRouteMenu=
"selectRouteMenu"
:selectRouteMenu=
"selectRouteMenu"
>
>
<img
<img
slot=
"icon"
slot=
"icon"
src=
"@/assets/images/layout/wechat.png
"
:src=
"route.meta.icon
"
/>
/>
</MenuItem>
</MenuItem>
<!--
<div
@
click=
"() => toggleFastLink(false)"
>
<!--
<div
@
click=
"() => toggleFastLink(false)"
>
...
@@ -167,23 +96,11 @@ export default {
...
@@ -167,23 +96,11 @@ export default {
computed
:
{
computed
:
{
...
mapGetters
(
'Dashboard'
,
[
'titleData'
]),
...
mapGetters
(
'Dashboard'
,
[
'titleData'
]),
...
mapGetters
([
'collectList'
,
'dashboardBackPage'
]),
...
mapGetters
([
'collectList'
,
'dashboardBackPage'
]),
customerManage
()
{
formatRoute
()
{
let
item
=
this
.
routers
.
find
(
let
routeList
=
this
.
routers
.
filter
(
menu
=>
menu
.
menuCode
===
process
.
env
.
VUE_APP_CUSTOMER_MENU_CODE
menu
=>
menu
.
menuCode
!==
process
.
env
.
VUE_APP_DASHBOARD_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
);
);
return
item
?
formatRouteLink
([
item
])
:
null
;
return
formatRouteLink
(
routeList
)
;
},
},
dashboardButtonVisiable
()
{
dashboardButtonVisiable
()
{
let
item
=
this
.
routers
.
find
(
let
item
=
this
.
routers
.
find
(
...
@@ -191,30 +108,6 @@ export default {
...
@@ -191,30 +108,6 @@ export default {
);
);
return
item
?
true
:
false
;
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
:
{
watch
:
{
collectList
(
val
)
{
collectList
(
val
)
{
...
...
src/utils/route.js
View file @
8423817b
...
@@ -4,7 +4,11 @@ export const formatRouteLink = (addRoute, path = '/') => {
...
@@ -4,7 +4,11 @@ export const formatRouteLink = (addRoute, path = '/') => {
return
{
return
{
path
:
path
+
route
.
menuLink
,
path
:
path
+
route
.
menuLink
,
name
:
route
.
id
.
toString
(),
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
+
'/'
),
children
:
formatRouteLink
(
route
.
childs
,
path
+
route
.
menuLink
+
'/'
),
};
};
}
else
{
}
else
{
...
@@ -12,7 +16,11 @@ export const formatRouteLink = (addRoute, path = '/') => {
...
@@ -12,7 +16,11 @@ export const formatRouteLink = (addRoute, path = '/') => {
path
:
path
+
route
.
menuLink
,
path
:
path
+
route
.
menuLink
,
name
:
route
.
id
.
toString
(),
name
:
route
.
id
.
toString
(),
menuCode
:
route
.
menuCode
,
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