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 { ...@@ -173,7 +173,7 @@ export default {
}, },
rich: { rich: {
a: { a: {
color: '#c8c8c8', color: '#c8c8c8'
}, },
b: { b: {
color: '#ffffff66', color: '#ffffff66',
......
...@@ -6,10 +6,29 @@ ...@@ -6,10 +6,29 @@
* @LastEditTime: 2023-07-26 14:32:32 * @LastEditTime: 2023-07-26 14:32:32
--> -->
<template> <template>
<div> <div class="trends-box">
<box-title title="业务趋势"></box-title> <box-title title="业务趋势"></box-title>
<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> <BarLineChart ref="purchaseRef" height="44.89vh" domId="business" :dataList.sync="dataList" :tooltipFormatterObj="tooltipFormatterObj"></BarLineChart>
</div> </div>
<div v-else class="empty">
<Empty></Empty>
</div>
</div>
</template> </template>
<script> <script>
...@@ -75,3 +94,45 @@ export default { ...@@ -75,3 +94,45 @@ export default {
} }
} }
</script> </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 { ...@@ -76,7 +76,6 @@ export default {
created() { created() {
const { merchantid, year } = this.$route.query const { merchantid, year } = this.$route.query
console.log(merchantid);
this.merchantid = merchantid this.merchantid = merchantid
this.getMerchantOverview(merchantid, year) this.getMerchantOverview(merchantid, year)
}, },
...@@ -84,7 +83,6 @@ export default { ...@@ -84,7 +83,6 @@ export default {
methods: { methods: {
// 获取门店的总展业时间&最近订单时间、总产值&本月产值等 // 获取门店的总展业时间&最近订单时间、总产值&本月产值等
async getMerchantOverview(merchantid, year) { async getMerchantOverview(merchantid, year) {
console.log(this.merchantid);
const _data = await this.api.boutique.getMerchantOverview({ MerchantId: merchantid, year }) const _data = await this.api.boutique.getMerchantOverview({ MerchantId: merchantid, year })
const _dataList = _data.data.dataList[0] const _dataList = _data.data.dataList[0]
this.$bus.$emit('boutiqueDate', { this.$bus.$emit('boutiqueDate', {
......
...@@ -6,10 +6,29 @@ ...@@ -6,10 +6,29 @@
* @LastEditTime: 2023-07-21 16:32:58 * @LastEditTime: 2023-07-21 16:32:58
--> -->
<template> <template>
<div> <div class="trends-box">
<box-title title="业务趋势"></box-title> <box-title title="业务趋势"></box-title>
<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> <BarLineChart ref="purchaseRef" height="58vh" domId="business" :dataList.sync="dataList" :tooltipFormatterObj="tooltipFormatterObj"></BarLineChart>
</div> </div>
<div v-else class="empty">
<Empty></Empty>
</div>
</div>
</template> </template>
<script> <script>
...@@ -26,6 +45,7 @@ export default { ...@@ -26,6 +45,7 @@ export default {
}, },
data() { data() {
return { return {
isEmpty: false,
tooltipFormatterObj: [ tooltipFormatterObj: [
{ {
label: '商城', label: '商城',
...@@ -41,12 +61,10 @@ export default { ...@@ -41,12 +61,10 @@ export default {
addSymbol: '%' addSymbol: '%'
} }
], ],
dataList: [], dataList: []
isEmpty: false
} }
}, },
mounted() { mounted() {},
},
methods: { methods: {
init() { init() {
this.getDataList() this.getDataList()
...@@ -72,6 +90,44 @@ export default { ...@@ -72,6 +90,44 @@ export default {
} }
} }
</script> </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> </style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!