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
26b6ab05
Commit
26b6ab05
authored
Apr 17, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改数据首页
parent
982d08cb
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
103 additions
and
26 deletions
+103
-26
App.vue
src/App.vue
+21
-1
CampusRank.vue
src/containers/Dashboard/CampusRank/CampusRank.vue
+2
-1
CampusRankChart.vue
src/containers/Dashboard/CampusRank/CampusRankChart.vue
+7
-11
chart.vue
src/containers/Dashboard/CustomerRecharge/chart.vue
+4
-2
CustomerRegister.vue
...ontainers/Dashboard/CustomerRegister/CustomerRegister.vue
+14
-1
RegisterByMonth.vue
...Dashboard/CustomerRegister/components/RegisterByMonth.vue
+10
-0
Dashboard.js
src/containers/Dashboard/Dashboard.js
+19
-1
IconMenu.vue
src/containers/layout/IconMenu/IconMenu.vue
+6
-0
MenuItem.vue
src/containers/layout/IconMenu/components/MenuItem.vue
+20
-9
No files found.
src/App.vue
View file @
26b6ab05
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
:routers=
"allRoutes"
:routers=
"allRoutes"
:dashboardVisiable=
"dashboardVisiable"
:dashboardVisiable=
"dashboardVisiable"
:toggleFastLink=
"toggleFastLink"
:toggleFastLink=
"toggleFastLink"
:selectRouteMenu=
"selectRouteMenu"
/>
/>
</div>
</div>
<template
v-if=
"dashboardVisiable"
>
<template
v-if=
"dashboardVisiable"
>
...
@@ -25,6 +26,10 @@
...
@@ -25,6 +26,10 @@
:routers=
"route"
:routers=
"route"
/>
/>
<sidebar-nav
<sidebar-nav
v-else-if=
"showSelected"
:routers=
"selectedRoute"
/>
<sidebar-nav
v-else
v-else
:routers=
"route"
:routers=
"route"
/>
/>
...
@@ -63,9 +68,11 @@ export default {
...
@@ -63,9 +68,11 @@ export default {
},
},
data
()
{
data
()
{
return
{
return
{
selectedRoute
:
[],
routerDone
:
false
,
routerDone
:
false
,
isInnerPage
:
true
,
isInnerPage
:
true
,
showFastLink
:
false
,
showFastLink
:
false
,
showSelected
:
false
,
};
};
},
},
computed
:
{
computed
:
{
...
@@ -104,7 +111,20 @@ export default {
...
@@ -104,7 +111,20 @@ export default {
}
}
},
},
toggleFastLink
(
entity
)
{
toggleFastLink
(
entity
)
{
this
.
showFastLink
=
entity
;
if
(
entity
)
{
this
.
$router
.
push
({
path
:
'/'
,
});
this
.
showFastLink
=
entity
;
}
else
{
this
.
showFastLink
=
entity
;
this
.
showSelected
=
false
;
}
},
selectRouteMenu
(
routes
)
{
this
.
selectedRoute
=
routes
;
this
.
showSelected
=
true
;
this
.
showFastLink
=
false
;
},
},
},
},
};
};
...
...
src/containers/Dashboard/CampusRank/CampusRank.vue
View file @
26b6ab05
...
@@ -45,8 +45,9 @@ export default {
...
@@ -45,8 +45,9 @@ export default {
...
mapGetters
(
'Dashboard'
,
[
'campusRankList'
,
'filters'
]),
...
mapGetters
(
'Dashboard'
,
[
'campusRankList'
,
'filters'
]),
},
},
methods
:
{
methods
:
{
...
mapActions
(
'Dashboard'
,
[
'fetchConsumeList'
]),
...
mapActions
(
'Dashboard'
,
[
'fetchConsumeList'
,
'updateCampusName'
]),
changeCampusHandle
(
data
)
{
changeCampusHandle
(
data
)
{
this
.
updateCampusName
(
data
.
areaName
);
this
.
fetchConsumeList
({
this
.
fetchConsumeList
({
areaId
:
data
.
areaId
,
areaId
:
data
.
areaId
,
updatePercentList
:
true
,
updatePercentList
:
true
,
...
...
src/containers/Dashboard/CampusRank/CampusRankChart.vue
View file @
26b6ab05
...
@@ -31,7 +31,6 @@ export default {
...
@@ -31,7 +31,6 @@ export default {
this
.
initChart
();
this
.
initChart
();
},
},
methods
:
{
methods
:
{
...
mapActions
(
'Dashboard'
,
[
'updateCampusName'
]),
initChart
()
{
initChart
()
{
this
.
chart
=
new
G2
.
Chart
({
this
.
chart
=
new
G2
.
Chart
({
container
:
'CampusRank'
,
container
:
'CampusRank'
,
...
@@ -129,14 +128,10 @@ export default {
...
@@ -129,14 +128,10 @@ export default {
if
(
this
.
data
.
length
)
{
if
(
this
.
data
.
length
)
{
this
.
totle
=
this
.
data
.
reduce
((
count
,
item
)
=>
count
+
item
.
count
,
0
);
this
.
totle
=
this
.
data
.
reduce
((
count
,
item
)
=>
count
+
item
.
count
,
0
);
let
data
=
this
.
SelectedDataIndex
;
let
data
=
this
.
SelectedDataIndex
;
if
(
data
)
{
this
.
changeSelected
(
data
);
this
.
chartGeom
.
setSelected
(
this
.
data
[
0
]);
this
.
chartGeom
.
setSelected
(
data
);
this
.
changeSelected
(
this
.
data
[
0
]);
}
else
{
this
.
SelectedDataIndex
=
this
.
data
[
0
];
this
.
chartGeom
.
setSelected
(
this
.
data
[
0
]);
this
.
changeSelected
(
this
.
data
[
0
]);
this
.
SelectedDataIndex
=
this
.
data
[
0
];
}
}
}
},
},
clickHandle
(
ev
)
{
clickHandle
(
ev
)
{
...
@@ -144,11 +139,12 @@ export default {
...
@@ -144,11 +139,12 @@ export default {
if
(
this
.
SelectedDataIndex
.
areaId
!==
data
.
areaId
)
{
if
(
this
.
SelectedDataIndex
.
areaId
!==
data
.
areaId
)
{
this
.
SelectedDataIndex
=
data
;
this
.
SelectedDataIndex
=
data
;
this
.
changeSelected
(
data
);
this
.
changeSelected
(
data
);
this
.
changeCampusHandle
(
data
);
if
(
data
.
areaId
)
{
this
.
changeCampusHandle
(
data
);
}
}
}
},
},
changeSelected
(
data
)
{
changeSelected
(
data
)
{
this
.
updateCampusName
(
data
.
areaName
);
this
.
percentDom
=
document
.
querySelector
(
'.CampusRank-percent'
);
this
.
percentDom
=
document
.
querySelector
(
'.CampusRank-percent'
);
this
.
areaNameDom
=
document
.
querySelector
(
'.CampusRank-areaName'
);
this
.
areaNameDom
=
document
.
querySelector
(
'.CampusRank-areaName'
);
if
(
this
.
percentDom
)
{
if
(
this
.
percentDom
)
{
...
...
src/containers/Dashboard/CustomerRecharge/chart.vue
View file @
26b6ab05
...
@@ -121,7 +121,6 @@ export default {
...
@@ -121,7 +121,6 @@ export default {
},
},
initSlider
()
{
initSlider
()
{
const
wrapDom
=
document
.
getElementById
(
'CustomerRechangeChart'
);
const
wrapDom
=
document
.
getElementById
(
'CustomerRechangeChart'
);
console
.
log
(
wrapDom
.
clientHeight
);
let
height
=
wrapDom
.
clientHeight
;
let
height
=
wrapDom
.
clientHeight
;
// const arrLength = this.data.length;
// const arrLength = this.data.length;
...
@@ -154,6 +153,9 @@ export default {
...
@@ -154,6 +153,9 @@ export default {
this
.
slider
.
render
();
// 渲染
this
.
slider
.
render
();
// 渲染
},
},
updateSlider
()
{
updateSlider
()
{
const
wrapDom
=
document
.
getElementById
(
'CustomerRechangeChart'
);
let
height
=
wrapDom
.
clientHeight
;
let
dom
=
this
.
sliderDom
;
let
dom
=
this
.
sliderDom
;
dom
.
innerHTML
=
''
;
dom
.
innerHTML
=
''
;
const
arrLength
=
this
.
data
.
length
;
const
arrLength
=
this
.
data
.
length
;
...
@@ -162,7 +164,7 @@ export default {
...
@@ -162,7 +164,7 @@ export default {
this
.
slider
=
new
Slider
({
this
.
slider
=
new
Slider
({
container
:
this
.
sliderDom
,
container
:
this
.
sliderDom
,
width
:
26
,
width
:
26
,
height
:
300
,
height
:
height
,
xAxis
:
'value'
,
xAxis
:
'value'
,
yAxis
:
'areaName'
,
yAxis
:
'areaName'
,
startRadio
:
this
.
ds
.
state
.
startRadio
,
startRadio
:
this
.
ds
.
state
.
startRadio
,
...
...
src/containers/Dashboard/CustomerRegister/CustomerRegister.vue
View file @
26b6ab05
...
@@ -22,7 +22,10 @@
...
@@ -22,7 +22,10 @@
<div
class=
"Dashboard-CampusData"
>
<div
class=
"Dashboard-CampusData"
>
<div
class=
"Dashboard-CampusItem"
>
<div
class=
"Dashboard-CampusItem"
>
<div
class=
"Dashboard-title"
>
{{
reportYear
}}
年每月注册数据
</div>
<div
class=
"Dashboard-title"
>
{{
reportYear
}}
年每月注册数据
</div>
<RegisterByMonth
:data=
"registePerMonth"
></RegisterByMonth>
<RegisterByMonth
:data=
"registePerMonth"
:changeReportMonthHandle=
"changeReportMonthHandle"
/>
</div>
</div>
<div
class=
"Dashboard-CampusItem"
>
<div
class=
"Dashboard-CampusItem"
>
<div
class=
"Dashboard-title"
>
<div
class=
"Dashboard-title"
>
...
@@ -88,6 +91,16 @@ export default {
...
@@ -88,6 +91,16 @@ export default {
});
});
}
}
},
},
changeReportMonthHandle
(
month
)
{
console
.
log
(
month
);
let
year
=
this
.
campusFilters
.
year
;
let
areaId
=
this
.
campusFilters
.
areaId
;
this
.
fetchReportList
({
year
:
year
?
year
:
null
,
areaId
:
areaId
?
areaId
:
null
,
month
:
month
,
});
},
},
},
};
};
</
script
>
</
script
>
src/containers/Dashboard/CustomerRegister/components/RegisterByMonth.vue
View file @
26b6ab05
...
@@ -7,6 +7,11 @@ import chartMixin from '../../chartMixin';
...
@@ -7,6 +7,11 @@ import chartMixin from '../../chartMixin';
export
default
{
export
default
{
name
:
'RegisterByMonth'
,
name
:
'RegisterByMonth'
,
props
:
{
changeReportMonthHandle
:
{
type
:
Function
,
},
},
mixins
:
[
chartMixin
],
mixins
:
[
chartMixin
],
data
()
{
data
()
{
return
{
return
{
...
@@ -47,6 +52,11 @@ export default {
...
@@ -47,6 +52,11 @@ export default {
.
position
(
'month*count'
)
.
position
(
'month*count'
)
.
color
(
'#4e82fb'
);
.
color
(
'#4e82fb'
);
this
.
chart
.
render
();
this
.
chart
.
render
();
this
.
chart
.
on
(
'interval:click'
,
this
.
clickHandle
);
},
clickHandle
(
ev
)
{
let
data
=
ev
.
data
.
_origin
;
this
.
changeReportMonthHandle
(
data
.
month
);
},
},
},
},
};
};
...
...
src/containers/Dashboard/Dashboard.js
View file @
26b6ab05
...
@@ -85,6 +85,9 @@ const actions = {
...
@@ -85,6 +85,9 @@ const actions = {
entity
.
date
=
formatDate
(
nowTime
,
'yyyy-MM-dd'
);
entity
.
date
=
formatDate
(
nowTime
,
'yyyy-MM-dd'
);
break
;
break
;
}
}
if
(
data
&&
data
.
areaId
)
{
entity
.
areaId
=
data
.
areaId
;
}
return
fetchConsumeList
({
return
fetchConsumeList
({
data
:
{
data
:
{
...
entity
,
...
entity
,
...
@@ -131,7 +134,22 @@ const mutations = {
...
@@ -131,7 +134,22 @@ const mutations = {
state
.
consume
.
consumeAfterVos
=
data
.
consumeAfterVos
state
.
consume
.
consumeAfterVos
=
data
.
consumeAfterVos
?
data
.
consumeAfterVos
?
data
.
consumeAfterVos
:
[];
:
[];
state
.
consume
.
list
=
data
.
list
?
data
.
list
:
[];
let
campusList
=
data
.
list
?
data
.
list
:
[];
if
(
campusList
.
length
>
2
)
{
let
arrStart
=
campusList
.
slice
(
0
,
2
);
let
arrEnd
=
campusList
.
slice
(
2
).
reduce
(
(
item
,
curentVal
)
=>
({
...
item
,
count
:
item
.
count
+
curentVal
.
count
,
}),
{
areaName
:
'其他校区'
,
count
:
0
,
}
);
campusList
=
[...
arrStart
,
arrEnd
];
}
state
.
consume
.
list
=
campusList
;
state
.
consume
.
percentList
=
data
.
percentList
?
data
.
percentList
:
[];
state
.
consume
.
percentList
=
data
.
percentList
?
data
.
percentList
:
[];
},
},
[
GET_PERCENT_DATA
]:
(
state
,
data
)
=>
{
[
GET_PERCENT_DATA
]:
(
state
,
data
)
=>
{
...
...
src/containers/layout/IconMenu/IconMenu.vue
View file @
26b6ab05
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
v-if=
"customerManage && customerManage.length"
v-if=
"customerManage && customerManage.length"
menuName=
"会员管理"
menuName=
"会员管理"
:menuList=
"customerManage[0].children"
:menuList=
"customerManage[0].children"
:selectRouteMenu=
"selectRouteMenu"
>
>
<img
<img
slot=
"icon"
slot=
"icon"
...
@@ -32,6 +33,7 @@
...
@@ -32,6 +33,7 @@
v-if=
"baseManage && baseManage.length"
v-if=
"baseManage && baseManage.length"
menuName=
"基础数据"
menuName=
"基础数据"
:menuList=
"baseManage[0].children"
:menuList=
"baseManage[0].children"
:selectRouteMenu=
"selectRouteMenu"
>
>
<img
<img
slot=
"icon"
slot=
"icon"
...
@@ -48,6 +50,7 @@
...
@@ -48,6 +50,7 @@
v-if=
"systemManage && systemManage.length"
v-if=
"systemManage && systemManage.length"
menuName=
"系统管理"
menuName=
"系统管理"
:menuList=
"systemManage[0].children"
:menuList=
"systemManage[0].children"
:selectRouteMenu=
"selectRouteMenu"
>
>
<img
<img
slot=
"icon"
slot=
"icon"
...
@@ -110,6 +113,9 @@ export default {
...
@@ -110,6 +113,9 @@ export default {
toggleFastLink
:
{
toggleFastLink
:
{
type
:
Function
,
type
:
Function
,
},
},
selectRouteMenu
:
{
type
:
Function
,
},
},
},
data
()
{
data
()
{
return
{
return
{
...
...
src/containers/layout/IconMenu/components/MenuItem.vue
View file @
26b6ab05
...
@@ -5,13 +5,16 @@
...
@@ -5,13 +5,16 @@
@mouseenter="toggleSubmenus"
@mouseenter="toggleSubmenus"
@mouseleave="toggleSubmenus"
@mouseleave="toggleSubmenus"
>
>
<div
class=
"IconMenus"
>
<div
<div
class=
"IconMenus-icon"
>
class=
"IconMenu"
@
click=
"selectHandle"
>
<div
class=
"IconMenu-icon"
>
<slot
name=
"icon"
>
<slot
name=
"icon"
>
<img
src=
"@/assets/images/layout/icon_huiyuanguanli@2x.png"
/>
<img
src=
"@/assets/images/layout/icon_huiyuanguanli@2x.png"
/>
</slot>
</slot>
</div>
</div>
<div
class=
"IconMenu
s
-name"
>
{{
menuName
}}
</div>
<div
class=
"IconMenu-name"
>
{{
menuName
}}
</div>
</div>
</div>
<div
<div
:class=
"`SubmenuBox $
{showSubMenus?'show':''}`"
:class=
"`SubmenuBox $
{showSubMenus?'show':''}`"
...
@@ -67,6 +70,9 @@ export default {
...
@@ -67,6 +70,9 @@ export default {
type
:
Array
,
type
:
Array
,
default
:
()
=>
[],
default
:
()
=>
[],
},
},
selectRouteMenu
:
{
type
:
Function
,
},
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -89,6 +95,11 @@ export default {
...
@@ -89,6 +95,11 @@ export default {
toggleSubmenus
()
{
toggleSubmenus
()
{
this
.
showSubMenus
=
!
this
.
showSubMenus
;
this
.
showSubMenus
=
!
this
.
showSubMenus
;
},
},
selectHandle
()
{
if
(
typeof
this
.
selectRouteMenu
===
'function'
)
{
this
.
selectRouteMenu
(
this
.
menuList
);
}
},
},
},
};
};
</
script
>
</
script
>
...
@@ -104,7 +115,7 @@ export default {
...
@@ -104,7 +115,7 @@ export default {
&
:hover
{
&
:hover
{
background-color
:
#68aaff
;
background-color
:
#68aaff
;
}
}
.IconMenu
s
{
.IconMenu
{
display
:
flex
;
display
:
flex
;
width
:
100%
;
width
:
100%
;
height
:
100%
;
height
:
100%
;
...
@@ -112,12 +123,12 @@ export default {
...
@@ -112,12 +123,12 @@ export default {
justify-content
:
center
;
justify-content
:
center
;
align-items
:
center
;
align-items
:
center
;
cursor
:
pointer
;
cursor
:
pointer
;
.IconMenu
s
-icon
{
.IconMenu-icon
{
width
:
17px
;
width
:
17px
;
height
:
17px
;
height
:
17px
;
margin-bottom
:
5px
;
margin-bottom
:
5px
;
}
}
.IconMenu
s
-name
{
.IconMenu-name
{
font-size
:
14px
;
font-size
:
14px
;
}
}
}
}
...
@@ -176,13 +187,13 @@ export default {
...
@@ -176,13 +187,13 @@ export default {
.MenuItem
{
.MenuItem
{
width
:
112px
;
width
:
112px
;
height
:
80px
;
height
:
80px
;
.IconMenu
s
{
.IconMenu
{
.IconMenu
s
-icon
{
.IconMenu-icon
{
width
:
34px
;
width
:
34px
;
height
:
34px
;
height
:
34px
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
}
}
.IconMenu
s
-name
{
.IconMenu-name
{
font-size
:
18px
;
font-size
:
18px
;
}
}
}
}
...
...
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