Commit aeb18610 authored by 王礼鸿 Baimax Wang's avatar 王礼鸿 Baimax Wang

样式格式化提交

parent 24aa888d
...@@ -22,9 +22,7 @@ export default { ...@@ -22,9 +22,7 @@ export default {
// position: 'center', // position: 'center',
fontSize: 12, fontSize: 12,
color: '#5eeef4', color: '#5eeef4',
formatter(param) { formatter:this.formatter
return param.name + '\r\n' + param.value
}
}, },
emphasis: { emphasis: {
label: { label: {
...@@ -87,6 +85,12 @@ export default { ...@@ -87,6 +85,12 @@ export default {
{value: 1100, name: '值2'}, {value: 1100, name: '值2'},
]; ];
}, },
},
formatter:{
type: Function,
default: function (param) {
return param.name + '\r\n' + param.value
},
} }
} }
......
<template> <template>
<div class="turnover-detail"> <div class="turnover-detail">
<div class="card-board"> <div class="card-board">
<contrast-card v-for="(data,key) in currentData.head" style="height: 100%;width: 20%;" :class="{'selectCard': key}" <contrast-card v-for="(data,key) in currentData.head" style="height: 100%;width: 20%;" :class="{'selectCard': currentCard === key}"
@click.native="selectLegend(key)"> @click.native="selectLegend(key)">
<title-content-mark style="color: #369afa;float: left;width: 40%;font-size: 18px" <title-content-mark style="color: #369afa;float: left;width: 40%;font-size: 18px"
:title-style="{'font-weight': 'bold'}" :title="key" :content="data.amount" isBold/> :title-style="{'font-weight': 'bold'}" :title="key" :content="data.amount" isBold/>
...@@ -256,7 +256,6 @@ export default { ...@@ -256,7 +256,6 @@ export default {
default: default:
break; break;
} }
console.log(name)
if (name) { if (name) {
this.chart.dispatchAction({ this.chart.dispatchAction({
type: 'legendInverseSelect' type: 'legendInverseSelect'
...@@ -271,7 +270,7 @@ export default { ...@@ -271,7 +270,7 @@ export default {
this.chartOption.series[3].data = []; this.chartOption.series[3].data = [];
} }
this.currentLegend = name; this.currentLegend = name;
this.currentCard = data.title; this.currentCard = title;
this.chart.setOption(this.chartOption); this.chart.setOption(this.chartOption);
}, },
......
...@@ -133,8 +133,8 @@ ...@@ -133,8 +133,8 @@
</div> </div>
<display-board class="trade_right" title="当日订单量占比"> <display-board class="trade_right" title="当日订单量占比">
<div style="height: 100%; display: flex; flex-direction: column; justify-content: space-around; padding: 0 1rem 0 1rem;"> <div style="height: 100%; display: flex; flex-direction: column; justify-content: space-around; padding: 0 1rem 0 1rem;">
<ring-pie-chart ref="transportTypeChart" style="width: 100%;height: 50%;z-index: 999" name="运输类型占比" :data="transportTypeOrderFinishPie" @click.native="routerTo('/order-proportion')"/> <ring-pie-chart ref="transportTypeChart" style="width: 100%;height: 50%;z-index: 999" name="运输类型占比" :data="transportTypeOrderFinishPie" @click.native="routerTo('/order-proportion')" :formatter="pieDataFormatter"/>
<ring-pie-chart ref="customerChart" style="width: 100%;height: 50%;" name="公司占比" :data="customerOrderFinishPie" @click.native="routerTo('/order-proportion')"/> <ring-pie-chart ref="customerChart" style="width: 100%;height: 50%;" name="公司占比" :data="customerOrderFinishPie" @click.native="routerTo('/order-proportion')" :formatter="pieDataFormatter"/>
</div> </div>
</display-board> </display-board>
</div> </div>
...@@ -151,7 +151,7 @@ import TitleContentMark from "./components/layout/title-content-mark.vue"; ...@@ -151,7 +151,7 @@ import TitleContentMark from "./components/layout/title-content-mark.vue";
import TableColumn from "./components/table/table-column.vue"; import TableColumn from "./components/table/table-column.vue";
import RingPieChart from "./components/chart/ring-pie-chart.vue"; import RingPieChart from "./components/chart/ring-pie-chart.vue";
import {arSummaryBar, arCompanyList, getBusinessConditionDatas, customerOrderFinishPie} from "../api/apiList" import {arSummaryBar, arCompanyList, getBusinessConditionDatas, customerOrderFinishPie} from "../api/apiList"
import {calc_hb_str, calc_tb_str, conver_amont} from "../utils/numUtil"; import {calc_hb_str, calc_tb_str, conver_amont, conver_num_retain} from "../utils/numUtil";
import {getTransportTypeOrderFinishPie,getCustomerOrderFinishPie} from "./databoard/js/indexPieData"; import {getTransportTypeOrderFinishPie,getCustomerOrderFinishPie} from "./databoard/js/indexPieData";
export default { export default {
...@@ -484,6 +484,9 @@ export default { ...@@ -484,6 +484,9 @@ export default {
refreshData(){ refreshData(){
getTransportTypeOrderFinishPie(res => this.transportTypeOrderFinishPie = res,this.today); getTransportTypeOrderFinishPie(res => this.transportTypeOrderFinishPie = res,this.today);
getCustomerOrderFinishPie(res => this.customerOrderFinishPie = res,this.today); getCustomerOrderFinishPie(res => this.customerOrderFinishPie = res,this.today);
},
pieDataFormatter(param){
return param.name + '\r\n' + conver_num_retain(param.value);
} }
}, },
mounted() { mounted() {
......
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