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
dca6ad7b
Commit
dca6ad7b
authored
May 31, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改首页活跃展示
parent
1581c9b5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
50 additions
and
21 deletions
+50
-21
CustomerRegister.vue
...ontainers/Dashboard/CustomerRegister/CustomerRegister.vue
+17
-15
RegisterByDay.vue
...s/Dashboard/CustomerRegister/components/RegisterByDay.vue
+1
-1
RegisterByMonth.vue
...Dashboard/CustomerRegister/components/RegisterByMonth.vue
+5
-1
Dashboard.js
src/containers/Dashboard/Dashboard.js
+26
-2
Home.vue
src/containers/HomePage/Home.vue
+1
-2
No files found.
src/containers/Dashboard/CustomerRegister/CustomerRegister.vue
View file @
dca6ad7b
<
template
>
<div
class=
"Dashboard-Row Dashboard-DataCard Dashboard-Register"
v-loading=
"loading.regist"
>
<div
class=
"Dashboard-Row Dashboard-DataCard Dashboard-Register"
>
<div
class=
"Dashboard-SearchBar"
>
<search-item
label=
"年份"
>
<el-date-picker
...
...
@@ -23,20 +20,29 @@
</search-item>
<search-item
label=
""
>
<el-button
:loading=
"loading.regist"
@
click=
"searchList"
type=
"primary"
>
搜索
</el-button>
</search-item>
</div>
<div
class=
"Dashboard-CampusData"
>
<div
class=
"Dashboard-CampusItem"
>
<div
class=
"Dashboard-CampusItem"
v-loading=
"loading.regist"
>
<div
class=
"Dashboard-title"
>
{{
reportYear
}}
年每月注册数据
</div>
<RegisterByMonth
:data=
"registePerMonth"
:changeReportMonthHandle=
"changeReportMonthHandle"
/>
</div>
<div
class=
"Dashboard-CampusItem"
>
</div>
<div
class=
"Dashboard-CampusData"
>
<div
class=
"Dashboard-CampusItem"
v-loading=
"loading.regist || loading.registByDay"
>
<div
class=
"Dashboard-title"
>
{{
reportYear
}}
年
{{
reportMonth
}}
月注册数据
</div>
...
...
@@ -44,12 +50,13 @@
</div>
</div>
<div
class=
"Dashboard-CampusData"
>
<div
class=
"Dashboard-CampusItem"
>
<div
class=
"Dashboard-CampusItem"
v-loading=
"loading.regist"
>
<div
class=
"Dashboard-title"
>
{{
reportYear
}}
年每月活跃数据
</div>
<ActiveUserByMonth
:data=
"activeUser"
/>
</div>
<div
class=
"Dashboard-CampusItem"
>
</div>
</div>
</div>
</
template
>
...
...
@@ -122,20 +129,15 @@ export default {
},
changeReportMonthHandle
(
month
)
{
console
.
log
(
month
);
let
filters
=
getFilters
(
this
.
filters
);
this
.
fetchReportList
({
isAdmin
:
this
.
isAdmin
?
1
:
0
,
year
:
filters
.
reportYear
?
filters
.
reportYear
:
null
,
areaId
:
filters
.
reportAreaId
?
filters
.
reportAreaId
:
null
,
month
:
month
,
updateRegisteByDay
:
true
,
});
},
searchList
()
{
let
filters
=
getFilters
(
this
.
filters
);
this
.
fetchReportList
({
isAdmin
:
this
.
isAdmin
?
1
:
0
,
year
:
filters
.
reportYear
?
filters
.
reportYear
:
null
,
areaId
:
filters
.
reportAreaId
?
filters
.
reportAreaId
:
null
,
});
},
},
...
...
src/containers/Dashboard/CustomerRegister/components/RegisterByDay.vue
View file @
dca6ad7b
...
...
@@ -39,7 +39,7 @@ export default {
})
.
line
()
.
position
(
'days*count'
);
this
.
chart
.
area
().
position
(
'days*count'
);
this
.
chart
.
line
().
position
(
'days*count'
);
this
.
chart
.
render
();
},
},
...
...
src/containers/Dashboard/CustomerRegister/components/RegisterByMonth.vue
View file @
dca6ad7b
...
...
@@ -44,7 +44,11 @@ export default {
})
.
interval
()
.
position
(
'month*count'
)
.
color
(
'#4e82fb'
);
.
color
(
'#4e82fb'
)
.
label
(
'count'
,
{
// position: 'middle',
offset
:
10
,
});
this
.
chart
.
render
();
this
.
chart
.
on
(
'plotclick'
,
this
.
clickHandle
);
},
...
...
src/containers/Dashboard/Dashboard.js
View file @
dca6ad7b
...
...
@@ -21,12 +21,13 @@ const LOADING_AREA = 'LOADING_AREA';
const
LOADING_SERVICE
=
'LOADING_SERVICE'
;
const
LOADING_EQUIPMENT
=
'LOADING_EQUIPMENT'
;
const
LOADING_REGIST
=
'LOADING_REGIST'
;
const
LOADING_REGIST_BY_DAY
=
'LOADING_REGIST_BY_DAY'
;
const
initFilters
=
()
=>
({
operateId
:
undefined
,
choiceareaIds
:
[],
timeType
:
0
,
// 0 本日,1 本月, 2 本年
reportYear
:
''
,
reportYear
:
new
Date
().
getFullYear
().
toString
()
,
reportAreaId
:
undefined
,
});
const
filtersStore
=
initFiltersStore
(
initFilters
);
...
...
@@ -38,6 +39,7 @@ const state = () => ({
service
:
false
,
equipment
:
false
,
regist
:
false
,
registByDay
:
false
,
},
consume
:
{
areaInfo
:
{
...
...
@@ -154,8 +156,19 @@ const actions = {
commit
(
LOADING_AREA
,
false
);
});
},
fetchReportList
({
commit
},
entity
)
{
fetchReportList
({
commit
,
getters
},
entity
)
{
let
filters
=
getFilters
(
getters
.
filters
);
if
(
filters
.
reportYear
)
{
entity
.
year
=
filters
.
reportYear
;
}
if
(
filters
.
reportAreaId
)
{
entity
.
year
=
filters
.
reportAreaId
;
}
if
(
entity
&&
entity
.
updateRegisteByDay
)
{
commit
(
LOADING_REGIST_BY_DAY
,
true
);
}
else
{
commit
(
LOADING_REGIST
,
true
);
}
return
fetchReportList
({
params
:
{
...
entity
,
...
...
@@ -164,11 +177,19 @@ const actions = {
.
then
(
res
=>
{
let
list
=
res
.
data
;
commit
(
GET_REPORT_DATA
,
list
);
if
(
entity
&&
entity
.
updateRegisteByDay
)
{
commit
(
LOADING_REGIST_BY_DAY
,
false
);
}
else
{
commit
(
LOADING_REGIST
,
false
);
}
})
.
catch
(
err
=>
{
console
.
error
(
err
);
if
(
entity
&&
entity
.
updateRegisteByDay
)
{
commit
(
LOADING_REGIST_BY_DAY
,
false
);
}
else
{
commit
(
LOADING_REGIST
,
false
);
}
});
},
fetchTitleList
({
commit
})
{
...
...
@@ -286,6 +307,9 @@ const mutations = {
}
state
.
loading
.
regist
=
fetching
;
},
[
LOADING_REGIST_BY_DAY
](
state
,
fetching
)
{
state
.
loading
.
registByDay
=
fetching
;
},
};
export
default
{
...
...
src/containers/HomePage/Home.vue
View file @
dca6ad7b
...
...
@@ -42,7 +42,6 @@ export default {
<
style
lang=
"scss"
>
.Home-Dashboard.Dashboard
{
padding
:
22px
34px
0
;
overflow-y
:
hidden
;
padding
:
22px
34px
;
}
</
style
>
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