Commit b22a8cb3 by 姜雷

调整首页充值部分样式

parent 623264ef
...@@ -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 * 20; let height = this.data.length * 50;
this.chart.changeHeight(height); this.chart.changeHeight(height);
// this.updateSlider(); // this.updateSlider();
this.updateData(); this.updateData();
......
...@@ -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,
......
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