|
@@ -240,13 +240,13 @@ let lineStyle= {
|
|
}
|
|
}
|
|
let sectionOption={
|
|
let sectionOption={
|
|
tooltip: {
|
|
tooltip: {
|
|
- trigger: 'item',
|
|
|
|
|
|
+ trigger: 'axis',
|
|
|
|
|
|
- axisPointer: {
|
|
|
|
- // 坐标轴指示器,坐标轴触发有效
|
|
|
|
- type: 'line', // 默认为直线,可选为:'line' | 'shadow',
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
|
|
+ axisPointer: {
|
|
|
|
+ // 坐标轴指示器,坐标轴触发有效
|
|
|
|
+ type: 'line', // 默认为直线,可选为:'line' | 'shadow',
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
|
|
},
|
|
},
|
|
legend: {
|
|
legend: {
|
|
@@ -289,13 +289,13 @@ let sectionOption={
|
|
data: [],
|
|
data: [],
|
|
color:'#8A2BE2'
|
|
color:'#8A2BE2'
|
|
},
|
|
},
|
|
- {
|
|
|
|
- name: '',
|
|
|
|
- type: 'line',
|
|
|
|
- // smooth: true,
|
|
|
|
- data: [],
|
|
|
|
- color:'rgba(0,0,0,0)'
|
|
|
|
- }
|
|
|
|
|
|
+ // {
|
|
|
|
+ // name: '',
|
|
|
|
+ // type: 'line',
|
|
|
|
+ // // smooth: true,
|
|
|
|
+ // data: [],
|
|
|
|
+ // color:'rgba(0,0,0,0)'
|
|
|
|
+ // }
|
|
]
|
|
]
|
|
}
|
|
}
|
|
|
|
|
|
@@ -523,20 +523,20 @@ export default {
|
|
}
|
|
}
|
|
|
|
|
|
});
|
|
});
|
|
- res.result.list.forEach((item)=>{
|
|
|
|
- if(!item.costProportion){
|
|
|
|
- // console.log(item.costProportion)
|
|
|
|
- this.tabCost.huanbi.y.push('-')
|
|
|
|
|
|
+ // res.result.list.forEach((item)=>{
|
|
|
|
+ // if(!item.costProportion){
|
|
|
|
+ // // console.log(item.costProportion)
|
|
|
|
+ // this.tabCost.huanbi.y.push('-')
|
|
|
|
|
|
|
|
|
|
- }else{
|
|
|
|
|
|
+ // }else{
|
|
|
|
|
|
- let huanbi=(item.costProportion*100).toFixed(2)+'%'
|
|
|
|
|
|
+ // let huanbi=(item.costProportion*100).toFixed(2)+'%'
|
|
|
|
|
|
- this.tabCost.huanbi.y.push(huanbi)
|
|
|
|
|
|
+ // this.tabCost.huanbi.y.push(huanbi)
|
|
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ // }
|
|
|
|
+ // })
|
|
this.sectionOption.legend.data=['今天','昨天'];
|
|
this.sectionOption.legend.data=['今天','昨天'];
|
|
this.sectionOption.xAxis[0].data=this.tabCost.today.x;
|
|
this.sectionOption.xAxis[0].data=this.tabCost.today.x;
|
|
this.sectionOption.series[0].data=this.tabCost.today.y;
|
|
this.sectionOption.series[0].data=this.tabCost.today.y;
|