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
6f2fa2b3
Commit
6f2fa2b3
authored
May 07, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'test'
点击反馈跳转到反馈页面携带区域参数 See merge request
!84
parents
8142fdf2
57f027b0
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
46 additions
and
12 deletions
+46
-12
.env
.env
+1
-0
App.vue
src/App.vue
+13
-1
CustomerFeedback.vue
...ontainers/Dashboard/CustomerFeedback/CustomerFeedback.vue
+11
-1
Collect.vue
src/containers/layout/Collect/Collect.vue
+2
-2
IconMenu.vue
src/containers/layout/IconMenu/IconMenu.vue
+2
-2
index.js
src/store/modules/app/index.js
+9
-0
route.js
src/utils/route.js
+8
-6
No files found.
.env
View file @
6f2fa2b3
...
...
@@ -2,6 +2,7 @@ VUE_APP_BASE_URL=/
VUE_APP_CUSTOMER_MENU_CODE=0001
VUE_APP_BASE_MENU_CODE=0002
VUE_APP_SYSTEM_MENU_CODE=0003
VUE_APP_FEEDBACK_MENU_CODE=0018
VUE_APP_STATISTICS_MENU_CODE=0044
VUE_APP_DEVICE_MENU_CODE=0048
VUE_APP_DASHBOARD_CODE=0079
...
...
src/App.vue
View file @
6f2fa2b3
...
...
@@ -62,9 +62,10 @@
import
UserBox
from
'./containers/layout/components/UserBox'
;
import
IconMenus
from
'./containers/layout/IconMenu/IconMenu'
;
import
CollectMenu
from
'./containers/layout/Collect/Collect'
;
import
{
mapGetters
}
from
'vuex'
;
import
{
mapGetters
,
mapActions
}
from
'vuex'
;
import
{
getStorageData
,
setStorageData
}
from
'@/utils/auth'
;
import
{
STSTEM_STATE_KEY
}
from
'@/config'
;
import
{
getMenuDataByCode
}
from
'@/utils/route'
;
export
default
{
name
:
'App'
,
...
...
@@ -105,6 +106,9 @@ export default {
this
.
title
=
document
.
title
;
},
watch
:
{
route
(
newVal
)
{
this
.
getFeedbackPage
();
},
$route
(
newVal
)
{
this
.
routerDone
=
false
;
if
(
newVal
.
meta
&&
newVal
.
meta
.
store
)
{
...
...
@@ -115,6 +119,7 @@ export default {
},
},
methods
:
{
...
mapActions
([
'updateFeedbackPage'
]),
showComponents
(
store
)
{
this
.
isInnerPage
=
this
.
whiteList
.
indexOf
(
this
.
$route
.
path
)
!==
-
1
?
false
:
true
;
...
...
@@ -169,6 +174,13 @@ export default {
};
}
},
getFeedbackPage
()
{
let
feedbackCode
=
process
.
env
.
VUE_APP_FEEDBACK_MENU_CODE
;
let
menu
=
getMenuDataByCode
(
this
.
route
,
feedbackCode
);
if
(
menu
)
{
this
.
updateFeedbackPage
(
menu
.
name
);
}
},
},
};
</
script
>
...
...
src/containers/Dashboard/CustomerFeedback/CustomerFeedback.vue
View file @
6f2fa2b3
...
...
@@ -23,6 +23,7 @@
<span
class=
"CustomerFeedback-ItemNum"
>
{{
item
.
count
}}
条
</span>
<span
class=
"CustomerFeedback-ItemName"
@
click=
"() => clickHandle(item)"
:title=
"item.areaName"
>
{{
item
.
areaName
}}
</span>
</div>
...
...
@@ -37,6 +38,7 @@ export default {
name
:
'CustomerFeedback'
,
computed
:
{
...
mapGetters
(
'Dashboard/customerFeedback'
,
[
'feedbackList'
,
'count'
]),
...
mapGetters
([
'feedbackPage'
]),
},
data
()
{
return
{
...
...
@@ -58,6 +60,14 @@ export default {
initData
()
{
this
.
getFeedbackList
();
},
clickHandle
(
data
)
{
const
{
areaId
}
=
data
;
if
(
this
.
feedbackPage
)
{
this
.
$router
.
push
({
name
:
this
.
feedbackPage
,
params
:
{
areaId
}
});
}
else
{
this
.
$message
.
error
(
'无会员反馈页面权限'
);
}
},
},
};
</
script
>
...
...
@@ -109,8 +119,8 @@ export default {
overflow
:
hidden
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
cursor
:
pointer
;
}
}
}
@media
screen
and
(
max-width
:
$bigScreenWidth
)
{
...
...
src/containers/layout/Collect/Collect.vue
View file @
6f2fa2b3
...
...
@@ -6,7 +6,7 @@
<
script
>
import
CollectMixin
from
'@/mixins/collect/collect.js'
;
import
{
get
CollectMenu
}
from
'@/utils/route'
;
import
{
get
MenuDataById
}
from
'@/utils/route'
;
export
default
{
name
:
'Collect'
,
...
...
@@ -27,7 +27,7 @@ export default {
)
{
let
list
=
this
.
collectList
.
map
(
item
=>
{
let
name
=
item
.
menuId
.
toString
();
return
get
CollectMenu
(
this
.
routers
,
name
);
return
get
MenuDataById
(
this
.
routers
,
name
);
});
list
=
list
.
filter
(
item
=>
!!
item
);
return
list
;
...
...
src/containers/layout/IconMenu/IconMenu.vue
View file @
6f2fa2b3
...
...
@@ -139,7 +139,7 @@
<
script
>
import
MenuItem
from
'./components/MenuItem'
;
import
{
mapGetters
}
from
'vuex'
;
import
{
formatRouteLink
,
get
FilterMenu
,
getCollectMenu
}
from
'@/utils/route'
;
import
{
formatRouteLink
,
get
MenuDataById
}
from
'@/utils/route'
;
export
default
{
name
:
'IconMenus'
,
...
...
@@ -229,7 +229,7 @@ export default {
let
routers
=
formatRouteLink
(
this
.
routers
);
let
list
=
val
.
map
(
item
=>
{
let
name
=
item
.
menuId
.
toString
();
return
get
CollectMenu
(
routers
,
name
);
return
get
MenuDataById
(
routers
,
name
);
});
list
=
list
.
filter
(
item
=>
!!
item
);
this
.
collectRouteList
=
list
&&
list
.
length
?
list
:
[];
...
...
src/store/modules/app/index.js
View file @
6f2fa2b3
...
...
@@ -3,18 +3,21 @@ import collect from './collect';
import
{
FETCH_START
,
FETCH_DONE
}
from
'./mutation-types'
;
const
GET_WHITE_LIST
=
'GET_WHITE_LIST'
;
const
UPDATE_BACK_PAGE
=
'UPDATE_BACK_PAGE'
;
const
UPDATE_FEEDBACK_PAGE
=
'UPDATE_FEEDBACK_PAGE'
;
let
fetchCount
=
0
;
const
state
=
()
=>
({
loading
:
false
,
whiteList
:
[],
dashboardBackPage
:
undefined
,
feedbackPage
:
undefined
,
});
const
getters
=
{
loading
:
state
=>
state
.
loading
,
whiteList
:
state
=>
state
.
whiteList
,
dashboardBackPage
:
state
=>
state
.
dashboardBackPage
,
feedbackPage
:
state
=>
state
.
feedbackPage
,
};
const
actions
=
{
...
...
@@ -30,6 +33,9 @@ const actions = {
updateBackPage
({
commit
},
name
)
{
commit
(
UPDATE_BACK_PAGE
,
name
);
},
updateFeedbackPage
({
commit
},
name
)
{
commit
(
UPDATE_FEEDBACK_PAGE
,
name
);
},
};
const
mutations
=
{
[
FETCH_START
](
state
,
notLoading
)
{
...
...
@@ -52,6 +58,9 @@ const mutations = {
[
UPDATE_BACK_PAGE
](
state
,
name
)
{
state
.
dashboardBackPage
=
name
;
},
[
UPDATE_FEEDBACK_PAGE
](
state
,
name
)
{
state
.
feedbackPage
=
name
;
},
};
export
default
{
modules
:
{
...
...
src/utils/route.js
View file @
6f2fa2b3
...
...
@@ -11,6 +11,7 @@ export const formatRouteLink = (addRoute, path = '/') => {
return
{
path
:
path
+
route
.
menuLink
,
name
:
route
.
id
.
toString
(),
menuCode
:
route
.
menuCode
,
meta
:
{
title
:
route
.
menuName
,
icon
:
route
.
menuPicSmall
},
};
}
...
...
@@ -40,6 +41,7 @@ export const getAuthRoute = (asyncRouterMap, addRoute, path = '/') => {
path
:
path
+
route
.
menuLink
,
component
:
localcomponent
.
component
,
name
:
route
.
id
,
menuCode
:
route
.
menuCode
,
meta
:
{
...
localcomponent
.
meta
,
title
:
route
.
menuName
,
...
...
@@ -68,12 +70,12 @@ export const getAuthRoute = (asyncRouterMap, addRoute, path = '/') => {
});
};
export
const
get
CollectMenu
=
(
routeList
,
name
)
=>
{
export
const
get
MenuDataById
=
(
routeList
,
name
)
=>
{
let
menuData
=
null
;
for
(
let
index
=
0
;
index
<
routeList
.
length
;
index
++
)
{
const
element
=
routeList
[
index
];
if
(
element
.
children
&&
element
.
children
.
length
)
{
menuData
=
get
CollectMenu
(
element
.
children
,
name
);
menuData
=
get
MenuDataById
(
element
.
children
,
name
);
if
(
menuData
)
break
;
}
else
if
(
element
.
name
===
name
)
{
menuData
=
element
;
...
...
@@ -83,14 +85,14 @@ export const getCollectMenu = (routeList, name) => {
return
menuData
;
};
export
const
get
FilterMenu
=
(
allRouterMap
,
id
)
=>
{
export
const
get
MenuDataByCode
=
(
allRouterMap
,
code
)
=>
{
let
menuData
=
null
;
for
(
let
index
=
0
;
index
<
allRouterMap
.
length
;
index
++
)
{
const
element
=
allRouterMap
[
index
];
if
(
element
.
child
s
&&
element
.
childs
.
length
)
{
menuData
=
get
FilterMenu
(
element
.
childs
,
id
);
if
(
element
.
child
ren
&&
element
.
children
.
length
)
{
menuData
=
get
MenuDataByCode
(
element
.
children
,
code
);
if
(
menuData
)
break
;
}
else
if
(
element
.
id
===
id
)
{
}
else
if
(
element
.
menuCode
===
code
)
{
menuData
=
element
;
break
;
}
...
...
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