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
8167011d
Commit
8167011d
authored
May 30, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into 'test'
修改首页活跃有数据不重刷 See merge request
!128
parents
d8c20240
fc2fd526
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
29 additions
and
17 deletions
+29
-17
CustomerRegister.vue
...ontainers/Dashboard/CustomerRegister/CustomerRegister.vue
+21
-11
ActiveUserByMonth.vue
...shboard/CustomerRegister/components/ActiveUserByMonth.vue
+1
-0
Dashboard.js
src/containers/Dashboard/Dashboard.js
+7
-0
Home.vue
src/containers/HomePage/Home.vue
+0
-6
No files found.
src/containers/Dashboard/CustomerRegister/CustomerRegister.vue
View file @
8167011d
...
@@ -6,7 +6,8 @@
...
@@ -6,7 +6,8 @@
<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"
:value=
"filters.reportYear"
@
input=
"val => updateFilters(
{reportYear: val})"
type="year"
type="year"
value-format="yyyy"
value-format="yyyy"
placeholder="请选择"
placeholder="请选择"
...
@@ -15,7 +16,8 @@
...
@@ -15,7 +16,8 @@
</search-item>
</search-item>
<search-item
label=
"校区"
>
<search-item
label=
"校区"
>
<area-select
<area-select
v-model
.
trim=
"campusFilters.areaId"
:value=
"filters.reportAreaId"
@
input=
"val => updateFilters(
{reportAreaId: val})"
:accessType="isAdmin?0:1"
:accessType="isAdmin?0:1"
/>
/>
</search-item>
</search-item>
...
@@ -57,6 +59,7 @@ import { mapGetters, mapActions } from 'vuex';
...
@@ -57,6 +59,7 @@ import { mapGetters, mapActions } from 'vuex';
import
RegisterByMonth
from
'./components/RegisterByMonth'
;
import
RegisterByMonth
from
'./components/RegisterByMonth'
;
import
RegisterByDay
from
'./components/RegisterByDay'
;
import
RegisterByDay
from
'./components/RegisterByDay'
;
import
ActiveUserByMonth
from
'./components/ActiveUserByMonth'
;
import
ActiveUserByMonth
from
'./components/ActiveUserByMonth'
;
import
{
getFilters
}
from
'@/utils/index'
;
export
default
{
export
default
{
name
:
'CustomerRegister'
,
name
:
'CustomerRegister'
,
...
@@ -84,10 +87,19 @@ export default {
...
@@ -84,10 +87,19 @@ export default {
'registePerMonth'
,
'registePerMonth'
,
'activeUser'
,
'activeUser'
,
'loading'
,
'loading'
,
'reportMounted'
,
'filters'
,
]),
]),
},
},
mounted
()
{
if
(
!
this
.
reportMounted
)
{
this
.
fetchReportList
({
isAdmin
:
this
.
isAdmin
?
1
:
0
,
});
}
},
methods
:
{
methods
:
{
...
mapActions
(
'Dashboard'
,
[
'fetchReportList'
]),
...
mapActions
(
'Dashboard'
,
[
'fetchReportList'
,
'updateFilters'
]),
changeReportYearHandle
(
val
)
{
changeReportYearHandle
(
val
)
{
if
(
val
)
{
if
(
val
)
{
let
areaId
=
this
.
campusFilters
.
areaId
;
let
areaId
=
this
.
campusFilters
.
areaId
;
...
@@ -110,22 +122,20 @@ export default {
...
@@ -110,22 +122,20 @@ export default {
},
},
changeReportMonthHandle
(
month
)
{
changeReportMonthHandle
(
month
)
{
console
.
log
(
month
);
console
.
log
(
month
);
let
year
=
this
.
campusFilters
.
year
;
let
filters
=
getFilters
(
this
.
filters
);
let
areaId
=
this
.
campusFilters
.
areaId
;
this
.
fetchReportList
({
this
.
fetchReportList
({
isAdmin
:
this
.
isAdmin
?
1
:
0
,
isAdmin
:
this
.
isAdmin
?
1
:
0
,
year
:
year
?
y
ear
:
null
,
year
:
filters
.
reportYear
?
filters
.
reportY
ear
:
null
,
areaId
:
areaId
?
a
reaId
:
null
,
areaId
:
filters
.
reportAreaId
?
filters
.
reportA
reaId
:
null
,
month
:
month
,
month
:
month
,
});
});
},
},
searchList
()
{
searchList
()
{
let
year
=
this
.
campusFilters
.
year
;
let
filters
=
getFilters
(
this
.
filters
);
let
areaId
=
this
.
campusFilters
.
areaId
;
this
.
fetchReportList
({
this
.
fetchReportList
({
isAdmin
:
this
.
isAdmin
?
1
:
0
,
isAdmin
:
this
.
isAdmin
?
1
:
0
,
year
:
year
?
y
ear
:
null
,
year
:
filters
.
reportYear
?
filters
.
reportY
ear
:
null
,
areaId
:
areaId
?
a
reaId
:
null
,
areaId
:
filters
.
reportAreaId
?
filters
.
reportA
reaId
:
null
,
});
});
},
},
},
},
...
...
src/containers/Dashboard/CustomerRegister/components/ActiveUserByMonth.vue
View file @
8167011d
...
@@ -50,6 +50,7 @@ export default {
...
@@ -50,6 +50,7 @@ export default {
position
:
'top'
,
position
:
'top'
,
title
:
null
,
title
:
null
,
marker
:
'square'
,
marker
:
'square'
,
clickable
:
false
,
})
})
.
interval
()
.
interval
()
.
position
(
'month*count'
)
.
position
(
'month*count'
)
...
...
src/containers/Dashboard/Dashboard.js
View file @
8167011d
...
@@ -26,6 +26,8 @@ const initFilters = () => ({
...
@@ -26,6 +26,8 @@ const initFilters = () => ({
operateId
:
undefined
,
operateId
:
undefined
,
choiceareaIds
:
[],
choiceareaIds
:
[],
timeType
:
0
,
// 0 本日,1 本月, 2 本年
timeType
:
0
,
// 0 本日,1 本月, 2 本年
reportYear
:
''
,
reportAreaId
:
undefined
,
});
});
const
filtersStore
=
initFiltersStore
(
initFilters
);
const
filtersStore
=
initFiltersStore
(
initFilters
);
const
nowTime
=
new
Date
();
const
nowTime
=
new
Date
();
...
@@ -51,6 +53,7 @@ const state = () => ({
...
@@ -51,6 +53,7 @@ const state = () => ({
percentList
:
[],
percentList
:
[],
},
},
report
:
{
report
:
{
mounted
:
false
,
year
:
new
Date
().
getFullYear
(),
year
:
new
Date
().
getFullYear
(),
month
:
new
Date
().
getMonth
()
+
1
,
month
:
new
Date
().
getMonth
()
+
1
,
registePerDay
:
[],
registePerDay
:
[],
...
@@ -65,6 +68,7 @@ const state = () => ({
...
@@ -65,6 +68,7 @@ const state = () => ({
});
});
const
getters
=
{
const
getters
=
{
reportMounted
:
state
=>
state
.
report
.
mounted
,
reportYear
:
state
=>
state
.
report
.
year
,
reportYear
:
state
=>
state
.
report
.
year
,
reportMonth
:
state
=>
state
.
report
.
month
,
reportMonth
:
state
=>
state
.
report
.
month
,
registePerDay
:
state
=>
state
.
report
.
registePerDay
,
registePerDay
:
state
=>
state
.
report
.
registePerDay
,
...
@@ -277,6 +281,9 @@ const mutations = {
...
@@ -277,6 +281,9 @@ const mutations = {
state
.
loading
.
equipment
=
fetching
;
state
.
loading
.
equipment
=
fetching
;
},
},
[
LOADING_REGIST
](
state
,
fetching
)
{
[
LOADING_REGIST
](
state
,
fetching
)
{
if
(
fetching
)
{
state
.
report
.
mounted
=
true
;
}
state
.
loading
.
regist
=
fetching
;
state
.
loading
.
regist
=
fetching
;
},
},
};
};
...
...
src/containers/HomePage/Home.vue
View file @
8167011d
...
@@ -34,15 +34,9 @@ export default {
...
@@ -34,15 +34,9 @@ export default {
item
=>
item
.
menuCode
===
process
.
env
.
VUE_APP_REGISTER_DASHBOARD_CODE
item
=>
item
.
menuCode
===
process
.
env
.
VUE_APP_REGISTER_DASHBOARD_CODE
);
);
if
(
item
)
{
if
(
item
)
{
this
.
fetchReportList
({
isAdmin
:
this
.
isAdmin
?
1
:
0
,
});
this
.
show
=
true
;
this
.
show
=
true
;
}
}
},
},
methods
:
{
...
mapActions
(
'Dashboard'
,
[
'fetchReportList'
]),
},
};
};
</
script
>
</
script
>
...
...
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