Commit 391d46b1 by 匡雅琴

加提示

1 parent e23bbd58
......@@ -6,9 +6,28 @@
* @LastEditTime: 2023-07-26 14:32:32
-->
<template>
<div>
<div class="trends-box">
<box-title title="业务趋势"></box-title>
<BarLineChart ref="purchaseRef" height="44.89vh" domId="business" :dataList.sync="dataList" :tooltipFormatterObj="tooltipFormatterObj"></BarLineChart>
<div v-if="!isEmpty">
<div class="legend">
<div class="legend-item">
<span class="legend-total legend-span"></span>
<span>总产值</span>
</div>
<div class="legend-item">
<span class="legend-percus legend-span"></span>
<span>客单价</span>
</div>
<div class="legend-item">
<img class="icon-line" src="@/assets/images/icon-line.png" alt="" />
转化率
</div>
</div>
<BarLineChart ref="purchaseRef" height="44.89vh" domId="business" :dataList.sync="dataList" :tooltipFormatterObj="tooltipFormatterObj"></BarLineChart>
</div>
<div v-else class="empty">
<Empty></Empty>
</div>
</div>
</template>
......@@ -75,3 +94,45 @@ export default {
}
}
</script>
<style lang="scss" scoped>
.trends-box {
position: relative;
}
.legend {
display: flex;
position: absolute;
right: 1.39vw;
top: 2.22vh;
&-item {
display: flex;
align-items: center;
color: #fff;
margin-right: 1.67vw;
&:last-child {
margin-right: 0;
}
img {
width: 1.32vw;
height: 1vh;
margin-right: 0.28vw;
}
.icon-line {
width: 0.98vw;
height: 0.56vh;
}
.legend-span {
width: 0.56vw;
height: 0.89vh;
margin-right: 0.28vw;
}
.legend-total {
background-image: linear-gradient(180deg, #22d8ff 0%, #5c56ff 100%);
}
.legend-percus {
background-image: linear-gradient(180deg, #2ad190 1%, #00b7df 100%);
}
}
}
</style>
......@@ -6,9 +6,28 @@
* @LastEditTime: 2023-07-21 16:32:58
-->
<template>
<div>
<div class="trends-box">
<box-title title="业务趋势"></box-title>
<BarLineChart ref="purchaseRef" height="58vh" domId="business" :dataList.sync="dataList" :tooltipFormatterObj="tooltipFormatterObj"></BarLineChart>
<div v-if="!isEmpty">
<div class="legend">
<div class="legend-item">
<span class="legend-total legend-span"></span>
<span>总产值</span>
</div>
<div class="legend-item">
<span class="legend-percus legend-span"></span>
<span>客单价</span>
</div>
<div class="legend-item">
<img class="icon-line" src="@/assets/images/icon-line.png" alt="" />
转化率
</div>
</div>
<BarLineChart ref="purchaseRef" height="58vh" domId="business" :dataList.sync="dataList" :tooltipFormatterObj="tooltipFormatterObj"></BarLineChart>
</div>
<div v-else class="empty">
<Empty></Empty>
</div>
</div>
</template>
......@@ -26,6 +45,7 @@ export default {
},
data() {
return {
isEmpty: false,
tooltipFormatterObj: [
{
label: '商城',
......@@ -41,12 +61,10 @@ export default {
addSymbol: '%'
}
],
dataList: [],
isEmpty: false
dataList: []
}
},
mounted() {
},
mounted() {},
methods: {
init() {
this.getDataList()
......@@ -72,6 +90,44 @@ export default {
}
}
</script>
<style lang="scss">
<style lang="scss" scoped>
.trends-box {
position: relative;
}
.legend {
display: flex;
position: absolute;
right: 1.39vw;
top: 2.22vh;
&-item {
display: flex;
align-items: center;
color: #fff;
margin-right: 1.67vw;
&:last-child {
margin-right: 0;
}
img {
width: 1.32vw;
height: 1vh;
margin-right: 0.28vw;
}
.icon-line {
width: 0.98vw;
height: 0.56vh;
}
.legend-span {
width: 0.56vw;
height: 0.89vh;
margin-right: 0.28vw;
}
.legend-total {
background-image: linear-gradient(180deg, #22d8ff 0%, #5c56ff 100%);
}
.legend-percus {
background-image: linear-gradient(180deg, #2ad190 1%, #00b7df 100%);
}
}
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!