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
163b55d6
Commit
163b55d6
authored
May 29, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'test'
修改首页用户活跃展示 See merge request
!121
parents
f47261e1
a441ba89
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
24 deletions
+62
-24
CustomerRegister.vue
...ontainers/Dashboard/CustomerRegister/CustomerRegister.vue
+23
-3
ActiveUserByMonth.vue
...shboard/CustomerRegister/components/ActiveUserByMonth.vue
+23
-18
RegisterByMonth.vue
...Dashboard/CustomerRegister/components/RegisterByMonth.vue
+1
-1
Dashboard.js
src/containers/Dashboard/Dashboard.js
+15
-1
Home.vue
src/containers/HomePage/Home.vue
+0
-1
No files found.
src/containers/Dashboard/CustomerRegister/CustomerRegister.vue
View file @
163b55d6
<
template
>
<
template
>
<div
<div
class=
"Dashboard-Row Dashboard-DataCard"
class=
"Dashboard-Row Dashboard-DataCard
Dashboard-Register
"
v-loading=
"loading.regist"
v-loading=
"loading.regist"
>
>
<div
class=
"Dashboard-SearchBar"
>
<div
class=
"Dashboard-SearchBar"
>
<search-item
label=
"年份"
>
<search-item
label=
"年份"
>
<el-date-picker
<el-date-picker
v-model
.
trim=
"campusFilters.year"
v-model
.
trim=
"campusFilters.year"
@
change=
"changeReportYearHandle"
type=
"year"
type=
"year"
value-format=
"yyyy"
value-format=
"yyyy"
placeholder=
"请选择"
placeholder=
"请选择"
...
@@ -17,10 +16,15 @@
...
@@ -17,10 +16,15 @@
<search-item
label=
"校区"
>
<search-item
label=
"校区"
>
<area-select
<area-select
v-model
.
trim=
"campusFilters.areaId"
v-model
.
trim=
"campusFilters.areaId"
@
input=
"changeReportAreaHandle"
:accessType=
"isAdmin?0:1"
:accessType=
"isAdmin?0:1"
/>
/>
</search-item>
</search-item>
<search-item
label=
""
>
<el-button
@
click=
"searchList"
type=
"primary"
>
搜索
</el-button>
</search-item>
</div>
</div>
<div
class=
"Dashboard-CampusData"
>
<div
class=
"Dashboard-CampusData"
>
<div
class=
"Dashboard-CampusItem"
>
<div
class=
"Dashboard-CampusItem"
>
...
@@ -36,10 +40,14 @@
...
@@ -36,10 +40,14 @@
</div>
</div>
<RegisterByDay
:data=
"registePerDay"
/>
<RegisterByDay
:data=
"registePerDay"
/>
</div>
</div>
</div>
<div
class=
"Dashboard-CampusData"
>
<div
class=
"Dashboard-CampusItem"
>
<div
class=
"Dashboard-CampusItem"
>
<div
class=
"Dashboard-title"
>
{{
reportYear
}}
年每月活跃数据
</div>
<div
class=
"Dashboard-title"
>
{{
reportYear
}}
年每月活跃数据
</div>
<ActiveUserByMonth
:data=
"activeUser"
/>
<ActiveUserByMonth
:data=
"activeUser"
/>
</div>
</div>
<div
class=
"Dashboard-CampusItem"
>
</div>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
...
@@ -111,12 +119,24 @@ export default {
...
@@ -111,12 +119,24 @@ export default {
month
:
month
,
month
:
month
,
});
});
},
},
searchList
()
{
let
year
=
this
.
campusFilters
.
year
;
let
areaId
=
this
.
campusFilters
.
areaId
;
this
.
fetchReportList
({
isAdmin
:
this
.
isAdmin
?
1
:
0
,
year
:
year
?
year
:
null
,
areaId
:
areaId
?
areaId
:
null
,
});
},
},
},
};
};
</
script
>
</
script
>
<
style
lang=
"scss"
>
<
style
lang=
"scss"
>
.Dashboard
{
.Dashboard
{
.Dashboard-Row.Dashboard-Register
{
height
:
auto
;
}
.Dashboard-DataCard
{
.Dashboard-DataCard
{
background-color
:
#fff
;
background-color
:
#fff
;
border-radius
:
8px
;
border-radius
:
8px
;
...
...
src/containers/Dashboard/CustomerRegister/components/ActiveUserByMonth.vue
View file @
163b55d6
...
@@ -16,6 +16,7 @@ export default {
...
@@ -16,6 +16,7 @@ export default {
{
value
:
'monthAppActive'
,
name
:
'APP活跃用户'
},
{
value
:
'monthAppActive'
,
name
:
'APP活跃用户'
},
{
value
:
'monthHardActive'
,
name
:
'硬件活跃用户'
},
{
value
:
'monthHardActive'
,
name
:
'硬件活跃用户'
},
{
value
:
'allActive'
,
name
:
'两者兼具'
},
{
value
:
'allActive'
,
name
:
'两者兼具'
},
{
value
:
'total'
,
name
:
'全部活跃'
},
],
],
};
};
},
},
...
@@ -25,14 +26,12 @@ export default {
...
@@ -25,14 +26,12 @@ export default {
container
:
'ActiveUserByMonth'
,
container
:
'ActiveUserByMonth'
,
forceFit
:
true
,
forceFit
:
true
,
height
:
this
.
height
,
height
:
this
.
height
,
padding
:
[
50
,
4
0
],
padding
:
[
30
,
20
,
30
,
2
0
],
});
});
this
.
chart
this
.
chart
.
source
(
this
.
data
,
{
.
source
(
this
.
data
,
{
month
:
{
month
:
{
min
:
1
,
type
:
'cat'
,
max
:
12
,
tickCount
:
12
,
},
},
mark
:
{
mark
:
{
type
:
'cat'
,
type
:
'cat'
,
...
@@ -46,22 +45,28 @@ export default {
...
@@ -46,22 +45,28 @@ export default {
showTitle
:
false
,
showTitle
:
false
,
});
});
// 图例
// 图例
this
.
chart
.
legend
({
position
:
'top'
,
title
:
null
,
marker
:
'square'
,
});
// .axis('count', false)
// .axis('mark', {
// formatter: value => {
// let service = this.serviceList.find(item => item.value === value);
// return service ? `${service.name}` : '';
// },
// });
this
.
chart
this
.
chart
.
legend
({
.
interval
()
position
:
'top'
,
title
:
null
,
marker
:
'square'
,
})
.
axis
(
'count'
,
false
)
.
axis
(
'mark'
,
{
formatter
:
value
=>
{
let
service
=
this
.
serviceList
.
find
(
item
=>
item
.
value
===
value
);
return
service
?
`
${
service
.
name
}
`
:
''
;
},
})
.
intervalStack
()
.
position
(
'month*count'
)
.
position
(
'month*count'
)
.
color
(
'mark'
,
[
'#4e82fb'
,
'#ffc934'
,
'#26c9a8'
]);
.
color
(
'mark'
,
[
'#4e82fb'
,
'#ffc934'
,
'#26c9a8'
])
.
adjust
([
{
type
:
'dodge'
,
marginRatio
:
1
/
32
,
},
]);
this
.
chart
.
render
();
this
.
chart
.
render
();
},
},
...
...
src/containers/Dashboard/CustomerRegister/components/RegisterByMonth.vue
View file @
163b55d6
...
@@ -24,7 +24,7 @@ export default {
...
@@ -24,7 +24,7 @@ export default {
container
:
'RegisterByMonth'
,
container
:
'RegisterByMonth'
,
forceFit
:
true
,
forceFit
:
true
,
height
:
this
.
height
,
height
:
this
.
height
,
padding
:
[
0
,
20
,
30
,
20
],
padding
:
[
3
0
,
20
,
30
,
20
],
});
});
this
.
chart
this
.
chart
.
source
(
this
.
data
,
{
.
source
(
this
.
data
,
{
...
...
src/containers/Dashboard/Dashboard.js
View file @
163b55d6
...
@@ -210,6 +210,7 @@ const mutations = {
...
@@ -210,6 +210,7 @@ const mutations = {
[
GET_REPORT_DATA
]:
(
state
,
data
)
=>
{
[
GET_REPORT_DATA
]:
(
state
,
data
)
=>
{
state
.
report
.
year
=
data
.
year
;
state
.
report
.
year
=
data
.
year
;
state
.
report
.
month
=
data
.
month
;
state
.
report
.
month
=
data
.
month
;
let
dayList
=
new
Array
(
31
).
fill
({
count
:
0
});
let
dayList
=
new
Array
(
31
).
fill
({
count
:
0
});
dayList
=
dayList
.
map
((
v
,
idx
)
=>
({
...
v
,
days
:
idx
+
1
}));
dayList
=
dayList
.
map
((
v
,
idx
)
=>
({
...
v
,
days
:
idx
+
1
}));
data
.
dayVos
.
map
(
val
=>
{
data
.
dayVos
.
map
(
val
=>
{
...
@@ -218,7 +219,20 @@ const mutations = {
...
@@ -218,7 +219,20 @@ const mutations = {
});
});
state
.
report
.
registePerDay
=
dayList
;
state
.
report
.
registePerDay
=
dayList
;
state
.
report
.
registePerMonth
=
data
.
list
;
state
.
report
.
registePerMonth
=
data
.
list
;
state
.
report
.
activeUser
=
data
.
listCount
;
let
activeList
=
new
Array
(
12
).
fill
({
count
:
0
,
mark
:
'total'
});
activeList
=
activeList
.
map
((
v
,
idx
)
=>
({
...
v
,
month
:
idx
+
1
}));
data
.
listCount
.
map
(
val
=>
{
let
idx
=
val
.
month
-
1
;
if
(
val
.
mark
===
'monthAppActive'
||
val
.
mark
===
'monthHardActive'
)
{
activeList
[
idx
].
count
+=
val
.
count
;
}
});
let
activeAppList
=
data
.
listCount
.
filter
(
val
=>
val
.
mark
===
'monthAppActive'
);
activeList
.
push
.
apply
(
activeList
,
activeAppList
);
state
.
report
.
activeUser
=
activeList
;
},
},
[
GET_TITLE_DATA
](
state
,
data
)
{
[
GET_TITLE_DATA
](
state
,
data
)
{
state
.
title
=
data
;
state
.
title
=
data
;
...
...
src/containers/HomePage/Home.vue
View file @
163b55d6
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
<div
class=
"Dashboard Home-Dashboard"
>
<div
class=
"Dashboard Home-Dashboard"
>
<CustomerRegister
<CustomerRegister
v-if=
"show"
v-if=
"show"
class=
"Dashboard-Row Dashboard-DataCard"
:isAdmin=
"isAdmin"
:isAdmin=
"isAdmin"
/>
/>
</div>
</div>
...
...
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