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
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 {
...
@@ -103,25 +103,25 @@ export default {
});
});
const
dv
=
this
.
ds
.
createView
().
source
(
this
.
data
);
const
dv
=
this
.
ds
.
createView
().
source
(
this
.
data
);
this
.
dv
=
dv
;
this
.
dv
=
dv
;
dv
.
transform
({
//
dv.transform({
type
:
'filter'
,
//
type: 'filter',
callback
:
obj
=>
{
//
callback: obj => {
if
(
//
if (
_
.
isNil
(
this
.
ds
.
state
.
startRadio
)
||
//
_.isNil(this.ds.state.startRadio) ||
_
.
isNil
(
this
.
ds
.
state
.
endRadio
)
//
_.isNil(this.ds.state.endRadio)
)
{
//
) {
return
true
;
//
return true;
}
//
}
const
dataIndex
=
_
.
findIndex
(
this
.
data
,
{
//
const dataIndex = _.findIndex(this.data, {
areaName
:
obj
.
areaName
,
//
areaName: obj.areaName,
});
//
});
const
currentRadio
=
dataIndex
/
this
.
data
.
length
;
//
const currentRadio = dataIndex / this.data.length;
return
(
//
return (
currentRadio
>=
this
.
ds
.
state
.
startRadio
&&
//
currentRadio >= this.ds.state.startRadio &&
currentRadio
<=
this
.
ds
.
state
.
endRadio
//
currentRadio
<=
this
.
ds
.
state
.
endRadio
);
//
);
},
//
},
});
//
});
this
.
chart
=
new
G2
.
Chart
({
this
.
chart
=
new
G2
.
Chart
({
container
:
'CustomerRechargeChart'
,
container
:
'CustomerRechargeChart'
,
...
@@ -140,7 +140,10 @@ export default {
...
@@ -140,7 +140,10 @@ export default {
});
});
this
.
chart
.
axis
(
'areaName'
,
{
this
.
chart
.
axis
(
'areaName'
,
{
label
:
{
label
:
{
offsetX
:
10
,
offsetX
:
-
80
,
htmlTemplate
(
text
,
item
,
index
)
{
return
`<div style="width: 85px">
${
text
}
</div>`
;
},
},
},
});
});
this
.
chart
.
axis
(
'rechargeMoney'
,
{
this
.
chart
.
axis
(
'rechargeMoney'
,
{
...
@@ -242,7 +245,7 @@ export default {
...
@@ -242,7 +245,7 @@ export default {
let
spanNum
=
4
/
arrLength
;
let
spanNum
=
4
/
arrLength
;
this
.
ds
.
setState
(
'endRadio'
,
spanNum
);
this
.
ds
.
setState
(
'endRadio'
,
spanNum
);
this
.
dv
.
source
(
this
.
data
);
this
.
dv
.
source
(
this
.
data
);
let
height
=
this
.
data
.
length
*
2
0
;
let
height
=
this
.
data
.
length
*
5
0
;
this
.
chart
.
changeHeight
(
height
);
this
.
chart
.
changeHeight
(
height
);
// this.updateSlider();
// this.updateSlider();
this
.
updateData
();
this
.
updateData
();
...
...
src/containers/Dashboard/Dashboard.js
View file @
b22a8cb3
...
@@ -84,9 +84,12 @@ const actions = {
...
@@ -84,9 +84,12 @@ const actions = {
entity
.
date
=
formatDate
(
nowTime
,
'yyyy-MM-dd'
);
entity
.
date
=
formatDate
(
nowTime
,
'yyyy-MM-dd'
);
break
;
break
;
}
}
if
(
data
&&
data
.
areaId
)
{
if
(
data
&&
data
.
updatePercentList
)
{
entity
.
areaId
=
data
.
areaId
;
entity
.
areaId
=
data
.
areaId
;
}
}
if
(
data
&&
data
.
updateEuipmentList
)
{
entity
.
serviceId
=
data
.
serviceId
;
}
return
fetchConsumeList
({
return
fetchConsumeList
({
data
:
{
data
:
{
...
entity
,
...
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