|
@@ -79,14 +79,16 @@
|
|
|
</div>
|
|
|
<div class='echarts2'>
|
|
|
<div class='title'>待结算</div>
|
|
|
- <div style="width: 100%;height: 600px;" id="container2"></div>
|
|
|
+ <div style="width: 100%;height: 500px;" id="container2"></div>
|
|
|
+ <div class='bottom-title'>金额(万元)</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import {
|
|
|
- getListselectProfit
|
|
|
+ getListselectProfit,
|
|
|
+ getListexpenses
|
|
|
} from '@/api/settlementManagement'
|
|
|
export default {
|
|
|
name: 'hello',
|
|
@@ -96,6 +98,7 @@ export default {
|
|
|
tabledata:{},
|
|
|
linexaxis:[],
|
|
|
linedata:[],
|
|
|
+ barList:[],
|
|
|
status:1,
|
|
|
value1:'2022',
|
|
|
show:true,
|
|
@@ -193,6 +196,14 @@ export default {
|
|
|
|
|
|
},
|
|
|
drawBar(){
|
|
|
+ const _obj = {},that=this
|
|
|
+ getListexpenses(_obj).then(response => {
|
|
|
+ if(response.data){
|
|
|
+ this.barList[0]=response.data[0].freight.toFixed(4)
|
|
|
+ this.barList[1]=response.data[0].withdrawal.toFixed(4)
|
|
|
+ this.barList[2]=response.data[0].collection.toFixed(4)
|
|
|
+ this.barList[3]=response.data[0].invoice.toFixed(4)
|
|
|
+ }
|
|
|
var echart1 = this.$echarts.init(document.getElementById("container2"))//⭐注意是id选择器
|
|
|
var option1 = {
|
|
|
// title: {
|
|
@@ -248,7 +259,7 @@ export default {
|
|
|
{
|
|
|
|
|
|
type: 'bar',
|
|
|
- data: [18203, 23489, 29034, 104970],
|
|
|
+ data: that.barList,
|
|
|
itemStyle: {
|
|
|
normal: {
|
|
|
// 每根柱子颜色设置
|
|
@@ -278,6 +289,9 @@ export default {
|
|
|
]
|
|
|
};
|
|
|
echart1.setOption(option1);
|
|
|
+ }).catch(() => {
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -312,6 +326,9 @@ export default {
|
|
|
.echarts1,.echarts2{
|
|
|
position:relative;width:90%;margin:0 auto; background:#fff;
|
|
|
}
|
|
|
+ .echarts2{
|
|
|
+ padding:20px 0;
|
|
|
+ }
|
|
|
.content{
|
|
|
background:#F5F6F7;
|
|
|
padding:20px 0;
|
|
@@ -334,4 +351,11 @@ export default {
|
|
|
padding:20px 0 20px 3%;
|
|
|
position:absolute;
|
|
|
}
|
|
|
+ .bottom-title{
|
|
|
+ font-size:16px;
|
|
|
+ font-weight:600;
|
|
|
+ position:absolute;
|
|
|
+ right:3%;
|
|
|
+ bottom:20px;
|
|
|
+ }
|
|
|
</style>
|