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