Commit b22a8cb3 by 姜雷

调整首页充值部分样式

parent 623264ef
......@@ -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 * 20;
let height = this.data.length * 50;
this.chart.changeHeight(height);
// this.updateSlider();
this.updateData();
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment