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