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
fb00b90d
Commit
fb00b90d
authored
Apr 02, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
选择不同区块查询新数据
parent
68b04e81
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
5 deletions
+81
-5
Dashboard.js
src/containers/Dashboard/Dashboard.js
+16
-0
Dashboard.vue
src/containers/Dashboard/Dashboard.vue
+32
-2
CampusRank.vue
src/containers/Dashboard/components/CampusRank.vue
+17
-2
SeviceRatio.vue
src/containers/Dashboard/components/SeviceRatio.vue
+16
-1
No files found.
src/containers/Dashboard/Dashboard.js
View file @
fb00b90d
...
@@ -7,6 +7,8 @@ import {
...
@@ -7,6 +7,8 @@ import {
const
GET_CONSUME_DATA
=
'GET_CONSUME_DATA'
;
const
GET_CONSUME_DATA
=
'GET_CONSUME_DATA'
;
const
GET_REPORT_DATA
=
'GET_REPORT_DATA'
;
const
GET_REPORT_DATA
=
'GET_REPORT_DATA'
;
const
GET_TITLE_DATA
=
'GET_TITLE_DATA'
;
const
GET_TITLE_DATA
=
'GET_TITLE_DATA'
;
const
GET_PERCENT_DATA
=
'GET_PERCENT_DATA'
;
const
GET_EUIPMENT_DATA
=
'GET_EUIPMENT_DATA'
;
const
state
=
()
=>
({
const
state
=
()
=>
({
consume
:
{
consume
:
{
...
@@ -48,6 +50,14 @@ const actions = {
...
@@ -48,6 +50,14 @@ const actions = {
},
},
}).
then
(
res
=>
{
}).
then
(
res
=>
{
let
list
=
res
.
data
;
let
list
=
res
.
data
;
if
(
entity
&&
entity
.
updatePercentList
)
{
commit
(
GET_PERCENT_DATA
,
list
);
return
;
}
if
(
entity
&&
entity
.
updateEuipmentList
)
{
commit
(
GET_EUIPMENT_DATA
,
list
);
return
;
}
commit
(
GET_CONSUME_DATA
,
list
);
commit
(
GET_CONSUME_DATA
,
list
);
});
});
},
},
...
@@ -75,6 +85,12 @@ const mutations = {
...
@@ -75,6 +85,12 @@ const mutations = {
state
.
consume
.
list
=
data
.
list
;
state
.
consume
.
list
=
data
.
list
;
state
.
consume
.
percentList
=
data
.
percentList
;
state
.
consume
.
percentList
=
data
.
percentList
;
},
},
[
GET_PERCENT_DATA
]:
(
state
,
data
)
=>
{
state
.
consume
.
percentList
=
data
.
percentList
;
},
[
GET_EUIPMENT_DATA
]:
(
state
,
data
)
=>
{
state
.
consume
.
consumeHardVos
=
data
.
consumeHardVos
;
},
[
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
;
...
...
src/containers/Dashboard/Dashboard.vue
View file @
fb00b90d
...
@@ -67,7 +67,10 @@
...
@@ -67,7 +67,10 @@
/>
/>
</search-item>
</search-item>
</div>
</div>
<CampusRank
:data=
"campusRankList"
/>
<CampusRank
:data=
"campusRankList"
:changeCampusHandle=
"changeCampusHandle"
/>
</div>
</div>
<div
class=
"Dashboard-DataCard"
>
<div
class=
"Dashboard-DataCard"
>
<div
class=
"Dashboard-title"
>
<div
class=
"Dashboard-title"
>
...
@@ -77,7 +80,10 @@
...
@@ -77,7 +80,10 @@
<div
class=
"Dashboard-title-text"
>
各服务消费占比
</div>
<div
class=
"Dashboard-title-text"
>
各服务消费占比
</div>
<div
class=
"Dashboard-title-top"
>
TOP1
</div>
<div
class=
"Dashboard-title-top"
>
TOP1
</div>
</div>
</div>
<SeviceRatio
:data=
"seviceRatioList"
/>
<SeviceRatio
:data=
"seviceRatioList"
:changeServiceHandle=
"changeServiceHandle"
/>
</div>
</div>
<div
class=
"Dashboard-DataCard"
>
<div
class=
"Dashboard-DataCard"
>
<div
class=
"Dashboard-title"
>
<div
class=
"Dashboard-title"
>
...
@@ -207,6 +213,30 @@ export default {
...
@@ -207,6 +213,30 @@ export default {
});
});
}
}
},
},
changeCampusHandle
(
data
)
{
let
operateId
=
this
.
operatorFilters
.
operateId
;
let
year
=
this
.
operatorFilters
.
year
;
let
month
=
this
.
operatorFilters
.
month
;
this
.
fetchConsumeList
({
year
:
year
?
year
:
null
,
month
:
month
?
month
:
null
,
operateId
:
operateId
?
operateId
:
null
,
areaId
:
data
.
areaId
,
updatePercentList
:
true
,
});
},
changeServiceHandle
(
data
)
{
let
operateId
=
this
.
operatorFilters
.
operateId
;
let
year
=
this
.
operatorFilters
.
year
;
let
month
=
this
.
operatorFilters
.
month
;
this
.
fetchConsumeList
({
year
:
year
?
year
:
null
,
month
:
month
?
month
:
null
,
operateId
:
operateId
?
operateId
:
null
,
serviceId
:
data
.
serviceId
,
updateEuipmentList
:
true
,
});
},
},
},
};
};
</
script
>
</
script
>
...
...
src/containers/Dashboard/components/CampusRank.vue
View file @
fb00b90d
...
@@ -11,6 +11,11 @@ import chartMixin from '../chartMixin';
...
@@ -11,6 +11,11 @@ import chartMixin from '../chartMixin';
export
default
{
export
default
{
name
:
'CampusRank'
,
name
:
'CampusRank'
,
mixins
:
[
chartMixin
],
mixins
:
[
chartMixin
],
props
:
{
changeCampusHandle
:
{
type
:
Function
,
},
},
data
()
{
data
()
{
let
totle
=
this
.
data
.
reduce
((
count
,
item
)
=>
count
+
item
.
count
,
0
);
let
totle
=
this
.
data
.
reduce
((
count
,
item
)
=>
count
+
item
.
count
,
0
);
return
{
return
{
...
@@ -19,6 +24,7 @@ export default {
...
@@ -19,6 +24,7 @@ export default {
totle
:
totle
,
totle
:
totle
,
percentDom
:
null
,
percentDom
:
null
,
areaNameDom
:
null
,
areaNameDom
:
null
,
SelectedDataIndex
:
null
,
};
};
},
},
mounted
()
{
mounted
()
{
...
@@ -116,19 +122,28 @@ export default {
...
@@ -116,19 +122,28 @@ export default {
alignY
:
'middle'
,
alignY
:
'middle'
,
});
});
this
.
chart
.
render
();
this
.
chart
.
render
();
this
.
chart
.
on
(
'
plot
click'
,
this
.
clickHandle
);
this
.
chart
.
on
(
'
interval:
click'
,
this
.
clickHandle
);
},
},
updateData
()
{
updateData
()
{
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
;
if
(
data
)
{
this
.
changeSelected
(
data
);
this
.
chartGeom
.
setSelected
(
data
);
}
else
{
this
.
chartGeom
.
setSelected
(
this
.
data
[
0
]);
this
.
chartGeom
.
setSelected
(
this
.
data
[
0
]);
this
.
changeSelected
(
this
.
data
[
0
]);
this
.
changeSelected
(
this
.
data
[
0
]);
this
.
SelectedDataIndex
=
this
.
data
[
0
];
}
}
}
},
},
clickHandle
(
ev
)
{
clickHandle
(
ev
)
{
if
(
ev
.
data
)
{
let
data
=
ev
.
data
.
_origin
;
let
data
=
ev
.
data
.
_origin
;
if
(
this
.
SelectedDataIndex
.
areaId
!==
data
.
areaId
)
{
this
.
SelectedDataIndex
=
data
;
this
.
changeSelected
(
data
);
this
.
changeSelected
(
data
);
this
.
changeCampusHandle
(
data
);
}
}
},
},
changeSelected
(
data
)
{
changeSelected
(
data
)
{
...
...
src/containers/Dashboard/components/SeviceRatio.vue
View file @
fb00b90d
...
@@ -12,12 +12,18 @@ import chartMixin from '../chartMixin';
...
@@ -12,12 +12,18 @@ import chartMixin from '../chartMixin';
export
default
{
export
default
{
name
:
'SeviceRatio'
,
name
:
'SeviceRatio'
,
mixins
:
[
chartMixin
],
mixins
:
[
chartMixin
],
props
:
{
changeServiceHandle
:
{
type
:
Function
,
},
},
data
()
{
data
()
{
let
totle
=
this
.
data
.
reduce
((
count
,
item
)
=>
count
+
item
.
count
,
0
);
let
totle
=
this
.
data
.
reduce
((
count
,
item
)
=>
count
+
item
.
count
,
0
);
return
{
return
{
totle
:
totle
,
totle
:
totle
,
percentDom
:
null
,
percentDom
:
null
,
serviceNameDom
:
null
,
serviceNameDom
:
null
,
SelectedDataIndex
:
null
,
};
};
},
},
mounted
()
{
mounted
()
{
...
@@ -102,14 +108,23 @@ export default {
...
@@ -102,14 +108,23 @@ export default {
updateData
()
{
updateData
()
{
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
;
if
(
data
)
{
this
.
changeSelected
(
data
);
this
.
chartGeom
.
setSelected
(
data
);
}
else
{
this
.
chartGeom
.
setSelected
(
this
.
data
[
0
]);
this
.
chartGeom
.
setSelected
(
this
.
data
[
0
]);
this
.
changeSelected
(
this
.
data
[
0
]);
this
.
changeSelected
(
this
.
data
[
0
]);
this
.
SelectedDataIndex
=
this
.
data
[
0
];
}
}
}
},
},
clickHandle
(
ev
)
{
clickHandle
(
ev
)
{
if
(
ev
.
data
)
{
let
data
=
ev
.
data
.
_origin
;
if
(
this
.
SelectedDataIndex
.
serviceId
!==
data
.
serviceId
)
{
let
data
=
ev
.
data
.
_origin
;
let
data
=
ev
.
data
.
_origin
;
this
.
changeSelected
(
data
);
this
.
changeSelected
(
data
);
this
.
changeServiceHandle
(
data
);
}
}
},
},
changeSelected
(
data
)
{
changeSelected
(
data
)
{
...
...
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