Commit 5560970c by 胡悦

Merge branch 'v1.0.0' of http://192.168.3.233:8090/h5/glsk-data-view-pd into v1.0.0

2 parents a970b4b2 2ba288ef
......@@ -173,7 +173,7 @@ export default {
},
rich: {
a: {
color: '#c8c8c8',
color: '#c8c8c8'
},
b: {
color: '#ffffff66',
......
<!--
* @Description:
* @Description:
* @Author: huyue
* @Date: 2023-07-19 17:18:33
* @LastEditors: huyue
* @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>
......@@ -76,7 +76,6 @@ export default {
created() {
const { merchantid, year } = this.$route.query
console.log(merchantid);
this.merchantid = merchantid
this.getMerchantOverview(merchantid, year)
},
......@@ -84,7 +83,6 @@ export default {
methods: {
// 获取门店的总展业时间&最近订单时间、总产值&本月产值等
async getMerchantOverview(merchantid, year) {
console.log(this.merchantid);
const _data = await this.api.boutique.getMerchantOverview({ MerchantId: merchantid, year })
const _dataList = _data.data.dataList[0]
this.$bus.$emit('boutiqueDate', {
......
<!--
* @Description:
* @Description:
* @Author: huyue
* @Date: 2023-07-19 17:18:33
* @LastEditors: huyue
* @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!