Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcxy-system
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-system
Commits
b22a8cb3
Commit
b22a8cb3
authored
Apr 19, 2019
by
姜雷
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整首页充值部分样式
parent
623264ef
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
22 deletions
+28
-22
chart.vue
src/containers/Dashboard/CustomerRecharge/chart.vue
+24
-21
Dashboard.js
src/containers/Dashboard/Dashboard.js
+4
-1
No files found.
src/containers/Dashboard/CustomerRecharge/chart.vue
View file @
b22a8cb3
...
...
@@ -103,25 +103,25 @@ export default {
});
const
dv
=
this
.
ds
.
createView
().
source
(
this
.
data
);
this
.
dv
=
dv
;
dv
.
transform
({
type
:
'filter'
,
callback
:
obj
=>
{
if
(
_
.
isNil
(
this
.
ds
.
state
.
startRadio
)
||
_
.
isNil
(
this
.
ds
.
state
.
endRadio
)
)
{
return
true
;
}
const
dataIndex
=
_
.
findIndex
(
this
.
data
,
{
areaName
:
obj
.
areaName
,
});
const
currentRadio
=
dataIndex
/
this
.
data
.
length
;
return
(
currentRadio
>=
this
.
ds
.
state
.
startRadio
&&
currentRadio
<=
this
.
ds
.
state
.
endRadio
);
},
});
//
dv.transform({
//
type: 'filter',
//
callback: obj => {
//
if (
//
_.isNil(this.ds.state.startRadio) ||
//
_.isNil(this.ds.state.endRadio)
//
) {
//
return true;
//
}
//
const dataIndex = _.findIndex(this.data, {
//
areaName: obj.areaName,
//
});
//
const currentRadio = dataIndex / this.data.length;
//
return (
//
currentRadio >= this.ds.state.startRadio &&
//
currentRadio
<=
this
.
ds
.
state
.
endRadio
//
);
//
},
//
});
this
.
chart
=
new
G2
.
Chart
({
container
:
'CustomerRechargeChart'
,
...
...
@@ -140,7 +140,10 @@ export default {
});
this
.
chart
.
axis
(
'areaName'
,
{
label
:
{
offsetX
:
10
,
offsetX
:
-
80
,
htmlTemplate
(
text
,
item
,
index
)
{
return
`<div style="width: 85px">
${
text
}
</div>`
;
},
},
});
this
.
chart
.
axis
(
'rechargeMoney'
,
{
...
...
@@ -242,7 +245,7 @@ export default {
let
spanNum
=
4
/
arrLength
;
this
.
ds
.
setState
(
'endRadio'
,
spanNum
);
this
.
dv
.
source
(
this
.
data
);
let
height
=
this
.
data
.
length
*
2
0
;
let
height
=
this
.
data
.
length
*
5
0
;
this
.
chart
.
changeHeight
(
height
);
// this.updateSlider();
this
.
updateData
();
...
...
src/containers/Dashboard/Dashboard.js
View file @
b22a8cb3
...
...
@@ -84,9 +84,12 @@ const actions = {
entity
.
date
=
formatDate
(
nowTime
,
'yyyy-MM-dd'
);
break
;
}
if
(
data
&&
data
.
areaId
)
{
if
(
data
&&
data
.
updatePercentList
)
{
entity
.
areaId
=
data
.
areaId
;
}
if
(
data
&&
data
.
updateEuipmentList
)
{
entity
.
serviceId
=
data
.
serviceId
;
}
return
fetchConsumeList
({
data
:
{
...
entity
,
...
...
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