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
3930f8f7
Commit
3930f8f7
authored
Jun 03, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
首页图表添加注册和活跃人数统计
parent
dca6ad7b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
47 additions
and
8 deletions
+47
-8
CustomerRegister.vue
...ontainers/Dashboard/CustomerRegister/CustomerRegister.vue
+30
-7
RegisterByDay.vue
...s/Dashboard/CustomerRegister/components/RegisterByDay.vue
+6
-0
RegisterByMonth.vue
...Dashboard/CustomerRegister/components/RegisterByMonth.vue
+6
-0
Dashboard.js
src/containers/Dashboard/Dashboard.js
+5
-1
No files found.
src/containers/Dashboard/CustomerRegister/CustomerRegister.vue
View file @
3930f8f7
...
@@ -31,7 +31,10 @@
...
@@ -31,7 +31,10 @@
class=
"Dashboard-CampusItem"
class=
"Dashboard-CampusItem"
v-loading=
"loading.regist"
v-loading=
"loading.regist"
>
>
<div
class=
"Dashboard-title"
>
{{
reportYear
}}
年每月注册数据
</div>
<div
class=
"Dashboard-title"
>
<span>
{{
reportYear
}}
年每月注册数据
</span>
<span
class=
"more-info"
>
{{
reportYear
}}
年注册人数为:
{{
registeYearTotal
}}
人;截止到目前为止注册会员总数:
{{
registeTotal
}}
人
</span>
</div>
<RegisterByMonth
<RegisterByMonth
:data=
"registePerMonth"
:data=
"registePerMonth"
:changeReportMonthHandle=
"changeReportMonthHandle"
:changeReportMonthHandle=
"changeReportMonthHandle"
...
@@ -54,7 +57,10 @@
...
@@ -54,7 +57,10 @@
class=
"Dashboard-CampusItem"
class=
"Dashboard-CampusItem"
v-loading=
"loading.regist"
v-loading=
"loading.regist"
>
>
<div
class=
"Dashboard-title"
>
{{
reportYear
}}
年每月活跃数据
</div>
<div
class=
"Dashboard-title"
>
<span>
{{
reportYear
}}
年每月活跃数据
</span>
<span
class=
"more-info"
>
截止
{{
today
}}
,系统总活跃人数为:
{{
activeTotal
}}
人
</span>
</div>
<ActiveUserByMonth
:data=
"activeUser"
/>
<ActiveUserByMonth
:data=
"activeUser"
/>
</div>
</div>
</div>
</div>
...
@@ -79,11 +85,9 @@ export default {
...
@@ -79,11 +85,9 @@ export default {
isAdmin
:
Boolean
,
isAdmin
:
Boolean
,
},
},
data
()
{
data
()
{
let
today
=
this
.
$formatDate
(
new
Date
(),
'yyyy-MM-dd'
);
return
{
return
{
campusFilters
:
{
today
:
today
,
year
:
''
,
areaId
:
undefined
,
},
};
};
},
},
computed
:
{
computed
:
{
...
@@ -96,7 +100,18 @@ export default {
...
@@ -96,7 +100,18 @@ export default {
'loading'
,
'loading'
,
'reportMounted'
,
'reportMounted'
,
'filters'
,
'filters'
,
'registeTotal'
,
]),
]),
registeYearTotal
()
{
return
this
.
registePerMonth
.
reduce
((
pre
,
curItem
)
=>
{
return
pre
+
curItem
.
count
;
},
0
);
},
activeTotal
()
{
return
this
.
activeUser
.
reduce
((
pre
,
curItem
)
=>
{
return
pre
+
curItem
.
count
;
},
0
);
},
},
},
mounted
()
{
mounted
()
{
if
(
!
this
.
reportMounted
)
{
if
(
!
this
.
reportMounted
)
{
...
@@ -148,7 +163,6 @@ export default {
...
@@ -148,7 +163,6 @@ export default {
.Dashboard
{
.Dashboard
{
.Dashboard-Row.Dashboard-Register
{
.Dashboard-Row.Dashboard-Register
{
height
:
auto
;
height
:
auto
;
}
.Dashboard-DataCard
{
.Dashboard-DataCard
{
background-color
:
#fff
;
background-color
:
#fff
;
border-radius
:
8px
;
border-radius
:
8px
;
...
@@ -160,6 +174,10 @@ export default {
...
@@ -160,6 +174,10 @@ export default {
.Dashboard-SearchBar
{
.Dashboard-SearchBar
{
display
:
flex
;
display
:
flex
;
padding
:
10px
0
20px
;
padding
:
10px
0
20px
;
.filter-item-label
{
min-width
:
auto
;
width
:
auto
;
}
.filter-item-input
{
.filter-item-input
{
width
:
200px
;
width
:
200px
;
.el-input
{
.el-input
{
...
@@ -172,6 +190,10 @@ export default {
...
@@ -172,6 +190,10 @@ export default {
padding
:
0
15px
;
padding
:
0
15px
;
.Dashboard-title
{
.Dashboard-title
{
position
:
relative
;
position
:
relative
;
.more-info
{
margin-left
:
20px
;
font-weight
:
normal
;
}
}
}
.
Dashboard-title
:
:
before
{
.
Dashboard-title
:
:
before
{
content
:
''
;
content
:
''
;
...
@@ -189,5 +211,6 @@ export default {
...
@@ -189,5 +211,6 @@ export default {
}
}
}
}
}
}
}
}
}
</
style
>
</
style
>
src/containers/Dashboard/CustomerRegister/components/RegisterByDay.vue
View file @
3930f8f7
...
@@ -32,6 +32,12 @@ export default {
...
@@ -32,6 +32,12 @@ export default {
},
},
count
:
{
count
:
{
alias
:
'人数'
,
alias
:
'人数'
,
formatter
:
val
=>
{
if
(
/
\.
/
.
test
(
val
))
{
return
''
;
}
return
val
;
},
},
},
})
})
.
tooltip
({
.
tooltip
({
...
...
src/containers/Dashboard/CustomerRegister/components/RegisterByMonth.vue
View file @
3930f8f7
...
@@ -30,6 +30,12 @@ export default {
...
@@ -30,6 +30,12 @@ export default {
.
source
(
this
.
data
,
{
.
source
(
this
.
data
,
{
count
:
{
count
:
{
alias
:
'人数'
,
alias
:
'人数'
,
formatter
:
val
=>
{
if
(
/
\.
/
.
test
(
val
))
{
return
''
;
}
return
val
;
},
},
},
})
})
.
axis
(
'month'
,
{
.
axis
(
'month'
,
{
...
...
src/containers/Dashboard/Dashboard.js
View file @
3930f8f7
...
@@ -61,6 +61,7 @@ const state = () => ({
...
@@ -61,6 +61,7 @@ const state = () => ({
registePerDay
:
[],
registePerDay
:
[],
registePerMonth
:
[],
registePerMonth
:
[],
activeUser
:
[],
activeUser
:
[],
customerCount
:
0
,
},
},
title
:
{
title
:
{
activeCount
:
0
,
activeCount
:
0
,
...
@@ -75,6 +76,7 @@ const getters = {
...
@@ -75,6 +76,7 @@ const getters = {
reportMonth
:
state
=>
state
.
report
.
month
,
reportMonth
:
state
=>
state
.
report
.
month
,
registePerDay
:
state
=>
state
.
report
.
registePerDay
,
registePerDay
:
state
=>
state
.
report
.
registePerDay
,
registePerMonth
:
state
=>
state
.
report
.
registePerMonth
,
registePerMonth
:
state
=>
state
.
report
.
registePerMonth
,
registeTotal
:
state
=>
state
.
report
.
customerCount
,
activeUser
:
state
=>
state
.
report
.
activeUser
,
activeUser
:
state
=>
state
.
report
.
activeUser
,
titleData
:
state
=>
state
.
title
,
titleData
:
state
=>
state
.
title
,
areaInfo
:
state
=>
state
.
consume
.
areaInfo
,
areaInfo
:
state
=>
state
.
consume
.
areaInfo
,
...
@@ -162,7 +164,7 @@ const actions = {
...
@@ -162,7 +164,7 @@ const actions = {
entity
.
year
=
filters
.
reportYear
;
entity
.
year
=
filters
.
reportYear
;
}
}
if
(
filters
.
reportAreaId
)
{
if
(
filters
.
reportAreaId
)
{
entity
.
year
=
filters
.
reportAreaId
;
entity
.
areaId
=
filters
.
reportAreaId
;
}
}
if
(
entity
&&
entity
.
updateRegisteByDay
)
{
if
(
entity
&&
entity
.
updateRegisteByDay
)
{
commit
(
LOADING_REGIST_BY_DAY
,
true
);
commit
(
LOADING_REGIST_BY_DAY
,
true
);
...
@@ -233,6 +235,8 @@ const mutations = {
...
@@ -233,6 +235,8 @@ const mutations = {
:
[];
:
[];
},
},
[
GET_REPORT_DATA
]:
(
state
,
data
)
=>
{
[
GET_REPORT_DATA
]:
(
state
,
data
)
=>
{
state
.
report
.
customerCount
=
data
.
customerCount
?
data
.
customerCount
:
0
;
state
.
report
.
year
=
data
.
year
;
state
.
report
.
year
=
data
.
year
;
state
.
report
.
month
=
data
.
month
;
state
.
report
.
month
=
data
.
month
;
...
...
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