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

Merge remote-tracking branch 'origin/ld_databoard_fix' into ld_databoard_fix

# Conflicts:
#	src/module/databoard/databoard/turnover-detail.vue
parents aeb18610 b910bbdc
<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': currentCard === key}" <contrast-card v-for="(data,key) in currentData.head" style="height: 100%;width: 20%;"
:class="{'selectCard': currentCard ===}"
@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/>
...@@ -118,7 +119,7 @@ export default { ...@@ -118,7 +119,7 @@ export default {
currentBtn: "day", currentBtn: "day",
currentLegend: '汽运(元)', currentLegend: '汽运(元)',
currentCard: '营业额', currentCard: '营业额',
chartOption:{ chartOption: {
legend: { legend: {
textStyle: { textStyle: {
color: 'white' color: 'white'
...@@ -143,66 +144,66 @@ export default { ...@@ -143,66 +144,66 @@ export default {
} }
}, },
series: [ series: [
{ {
type: 'bar', type: 'bar',
label: { label: {
show: true, show: true,
position: 'top', position: 'top',
color: "#00CCD2", color: "#00CCD2",
},
color: {
type: 'linear',
x: 0, y: 0, x2: 0, y2: 1,
colorStops: [
{offset: 0, color: '#00CCD2'},
{offset: 1, color: '#00A2FF'}
]
},
}, },
{ color: {
type: 'bar', type: 'linear',
label: { x: 0, y: 0, x2: 0, y2: 1,
show: true, colorStops: [
position: 'top', {offset: 0, color: '#00CCD2'},
color: "#FFFAB7", {offset: 1, color: '#00A2FF'}
}, ]
color: {
type: 'linear',
x: 0, y: 0, x2: 0, y2: 1,
colorStops: [
{offset: 0, color: '#FFFAB7'},
{offset: 1, color: '#FFF459'}
]
},
}, },
{ },
type: 'bar', {
label: { type: 'bar',
show: true, label: {
position: 'top', show: true,
color: "#81FBB8", position: 'top',
}, color: "#FFFAB7",
color: {
type: 'linear',
x: 0, y: 0, x2: 0, y2: 1,
colorStops: [
{offset: 0, color: '#81FBB8'},
{offset: 1, color: '#28C76F'}
]
},
}, },
{ color: {
type: 'line', type: 'linear',
color: 'red', x: 0, y: 0, x2: 0, y2: 1,
data: [] colorStops: [
} {offset: 0, color: '#FFFAB7'},
{offset: 1, color: '#FFF459'}
]
},
},
{
type: 'bar',
label: {
show: true,
position: 'top',
color: "#81FBB8",
},
color: {
type: 'linear',
x: 0, y: 0, x2: 0, y2: 1,
colorStops: [
{offset: 0, color: '#81FBB8'},
{offset: 1, color: '#28C76F'}
]
},
},
{
type: 'line',
color: 'red',
data: []
}
] ]
} }
} }
}, },
watch: {}, watch: {},
methods: { methods: {
back(){ back() {
this.$router.push({path: '/'}); this.$router.push({path: '/'});
}, },
resizeChart() { resizeChart() {
...@@ -253,9 +254,29 @@ export default { ...@@ -253,9 +254,29 @@ export default {
case '铁运营业额': case '铁运营业额':
name = "铁运(元)"; name = "铁运(元)";
break; break;
case '汽运成本':
name = "汽运(元)";
break;
case '水运成本':
name = "水运(元)";
break;
case '铁运成本':
name = "铁运(元)";
break;
case '汽运毛利':
name = "汽运(元)";
break;
case '水运毛利':
name = "水运(元)";
break;
case '铁运毛利':
name = "铁运(元)";
break;
default: default:
break; break;
} }
console.log(name)
if (name) { if (name) {
this.chart.dispatchAction({ this.chart.dispatchAction({
type: 'legendInverseSelect' type: 'legendInverseSelect'
...@@ -344,11 +365,12 @@ input[type="button"] { ...@@ -344,11 +365,12 @@ input[type="button"] {
background-color: #1234a1; background-color: #1234a1;
} }
input[type="button"]:hover{ input[type="button"]:hover {
color: #1234a1 !important; color: #1234a1 !important;
background-color: #00c8d6 !important; background-color: #00c8d6 !important;
} }
.selectedBtn{
.selectedBtn {
color: #1234a1 !important; color: #1234a1 !important;
background-color: #00c8d6 !important; background-color: #00c8d6 !important;
} }
...@@ -357,7 +379,8 @@ input[type="button"]:hover{ ...@@ -357,7 +379,8 @@ input[type="button"]:hover{
color: #00c8d6; color: #00c8d6;
background-color: #1234a1; background-color: #1234a1;
} }
.selectCard{
.selectCard {
background-color: var(--card-background-select-color) !important; background-color: var(--card-background-select-color) !important;
} }
</style> </style>
...@@ -20,9 +20,8 @@ ...@@ -20,9 +20,8 @@
</display-board> </display-board>
<display-board class="trade_middle" corner_size="large"> <display-board class="trade_middle" corner_size="large">
<div style="height: 36%;display: flex;justify-content: space-evenly;padding-top: 1.5rem"> <div style="height: 36%;display: flex;justify-content: space-evenly;padding-top: 1.5rem">
<simple-card v-for="data in mockData.sr" style="width: 30%;height: 100%"> <simple-card v-for="data in arSummary" style="width: 30%;height: 100%">
<title-content-mark style="color: #5eeef4;" :title="data.title" :content="data.value" :mark="'万元'" <title-content-mark style="color: #5eeef4;" :title="data.title" :content="data.value" :mark="'万元'" isCenter isBold/>
isCenter isBold/>
</simple-card> </simple-card>
</div> </div>
<ar-summary-bar ref="arSummaryBar" style="width: 100%; height: 64%;"></ar-summary-bar> <ar-summary-bar ref="arSummaryBar" style="width: 100%; height: 64%;"></ar-summary-bar>
...@@ -223,6 +222,11 @@ export default { ...@@ -223,6 +222,11 @@ export default {
], ],
}, },
}, },
arSummary: [
{title: '累计营业收入(当年)', value: '20,303'},
{title: '应收款(财务)', value: '20,303'},
{title: '应收款(营销)', value: '20,303',},
],
mockData: { mockData: {
zqk: { zqk: {
yszk: { yszk: {
...@@ -459,13 +463,16 @@ export default { ...@@ -459,13 +463,16 @@ export default {
// 获取应收账款数据 // 获取应收账款数据
getArSummaryBar() { getArSummaryBar() {
arSummaryBar().then(res => { arSummaryBar().then(res => {
let data = res.data.data let data = res.data
let seriesData = [] let seriesData = []
seriesData.push(data.unsettled_amount) seriesData.push(data.unsettled_amount)
seriesData.push(data.settled_amount) seriesData.push(data.settled_amount)
seriesData.push(data.unregister_amount) seriesData.push(data.unregister_amount)
seriesData.push(data.receivable_amount) seriesData.push(data.receivable_amount)
seriesData.push(data.cancelled_amount) seriesData.push(data.cancelled_amount)
this.arSummary[0].value = data.total_amount
this.arSummary[1].value = data.unregister_amount
this.arSummary[2].value = data.receivable_amount
this.$refs.arSummaryBar.drawArSummaryBar(seriesData) this.$refs.arSummaryBar.drawArSummaryBar(seriesData)
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
...@@ -474,8 +481,8 @@ export default { ...@@ -474,8 +481,8 @@ export default {
// 获取已开票未收款排行 // 获取已开票未收款排行
getArCompanyList() { getArCompanyList() {
arCompanyList().then(res => { arCompanyList().then(res => {
if (res.data.data.length) { if (res.data.length) {
this.arCompanyList = res.data.data this.arCompanyList = res.data
} }
}).catch(err => { }).catch(err => {
console.log(err); console.log(err);
......
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