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
759971c4
Commit
759971c4
authored
May 07, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改切换数据首页逻辑
parent
19ae235d
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
6 deletions
+22
-6
Dashboard.vue
src/containers/Dashboard/Dashboard.vue
+6
-0
IconMenu.vue
src/containers/layout/IconMenu/IconMenu.vue
+6
-2
index.vue
src/containers/login/index.vue
+1
-4
index.js
src/store/modules/app/index.js
+9
-0
No files found.
src/containers/Dashboard/Dashboard.vue
View file @
759971c4
...
...
@@ -34,6 +34,11 @@ export default {
CampusRank
,
EquipmentList
,
},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
vm
.
updateBackPage
(
from
.
name
);
});
},
created
()
{
this
.
initData
();
},
...
...
@@ -43,6 +48,7 @@ export default {
'fetchConsumeList'
,
'fetchTitleList'
,
]),
...
mapActions
([
'updateBackPage'
]),
initData
()
{
this
.
fetchReportList
();
this
.
fetchConsumeList
();
...
...
src/containers/layout/IconMenu/IconMenu.vue
View file @
759971c4
...
...
@@ -166,7 +166,7 @@ export default {
},
computed
:
{
...
mapGetters
(
'Dashboard'
,
[
'titleData'
]),
...
mapGetters
([
'collectList'
]),
...
mapGetters
([
'collectList'
,
'dashboardBackPage'
]),
customerManage
()
{
let
item
=
this
.
routers
.
find
(
menu
=>
menu
.
menuCode
===
process
.
env
.
VUE_APP_CUSTOMER_MENU_CODE
...
...
@@ -236,7 +236,11 @@ export default {
},
clickHandle
()
{
if
(
this
.
dashboardVisiable
)
{
this
.
$router
.
go
(
-
1
);
if
(
this
.
dashboardBackPage
)
{
this
.
$router
.
push
({
name
:
this
.
dashboardBackPage
});
}
else
{
this
.
$router
.
push
({
path
:
'/'
});
}
}
else
{
this
.
$router
.
push
({
path
:
'/dashboard'
,
...
...
src/containers/login/index.vue
View file @
759971c4
...
...
@@ -154,10 +154,7 @@ export default {
)
&&
this
.
$router
.
options
.
base
===
'/'
)
{
this
.
$router
.
push
({
path
:
'/'
});
setTimeout
(()
=>
{
this
.
$router
.
push
({
name
:
'dashboard'
});
},
400
);
this
.
$router
.
push
({
name
:
'dashboard'
});
}
else
{
this
.
$router
.
push
({
path
:
'/'
});
}
...
...
src/store/modules/app/index.js
View file @
759971c4
...
...
@@ -2,16 +2,19 @@ import sidebar from './sidebar';
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'
;
let
fetchCount
=
0
;
const
state
=
()
=>
({
loading
:
false
,
whiteList
:
[],
dashboardBackPage
:
undefined
,
});
const
getters
=
{
loading
:
state
=>
state
.
loading
,
whiteList
:
state
=>
state
.
whiteList
,
dashboardBackPage
:
state
=>
state
.
dashboardBackPage
,
};
const
actions
=
{
...
...
@@ -24,6 +27,9 @@ const actions = {
getWhiteList
({
commit
},
list
)
{
commit
(
GET_WHITE_LIST
,
list
);
},
updateBackPage
({
commit
},
name
)
{
commit
(
UPDATE_BACK_PAGE
,
name
);
},
};
const
mutations
=
{
[
FETCH_START
](
state
,
notLoading
)
{
...
...
@@ -43,6 +49,9 @@ const mutations = {
[
GET_WHITE_LIST
](
state
,
list
)
{
state
.
whiteList
=
[...
state
.
whiteList
,
...
list
];
},
[
UPDATE_BACK_PAGE
](
state
,
name
)
{
state
.
dashboardBackPage
=
name
;
},
};
export
default
{
modules
:
{
...
...
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