Commit c706c058 by 胡悦

提交

1 parent 0447caf7
...@@ -3,19 +3,13 @@ ...@@ -3,19 +3,13 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-06-23 15:05:21 * @Date: 2022-06-23 15:05:21
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2022-06-29 14:39:49 * @LastEditTime: 2022-06-29 14:55:32
--> -->
<template> <template>
<div> <div>
<!-- <div v-show="!hasData"> <div v-if="hasData" class="flow-box">
<div class="title">客流转化</div>
<div class="empty">
<img src="../../assets/images/empty.png" alt="" />
</div>
</div> -->
<div class="flow-box">
<div class="flow-left"> <div class="flow-left">
<div class="title inline">客流转化{{ hasData }}</div> <div class="title inline" style="padding-left: 0">客流转化</div>
<div class="chart-box"> <div class="chart-box">
<div id="flow" :style="{ height: height - 4.1 + 'vh' }"></div> <div id="flow" :style="{ height: height - 4.1 + 'vh' }"></div>
</div> </div>
...@@ -36,6 +30,12 @@ ...@@ -36,6 +30,12 @@
</div> </div>
</div> </div>
</div> </div>
<div v-else>
<div class="title">客流转化</div>
<div class="empty">
<img src="../../assets/images/empty.png" alt="" />
</div>
</div>
</div> </div>
</template> </template>
...@@ -109,7 +109,7 @@ export default { ...@@ -109,7 +109,7 @@ export default {
option: {}, option: {},
echartsFunnel: '', echartsFunnel: '',
funnelDom: '', funnelDom: '',
hasData: false hasData: true
} }
}, },
mounted() { mounted() {
...@@ -126,7 +126,7 @@ export default { ...@@ -126,7 +126,7 @@ export default {
console.log(val) console.log(val)
this.getSaletTotal() this.getSaletTotal()
}, },
getSaleTrans() { getSaletTotal() {
const params = { const params = {
req: { req: {
corporateGroupName: '集团1', corporateGroupName: '集团1',
...@@ -135,7 +135,7 @@ export default { ...@@ -135,7 +135,7 @@ export default {
} }
} }
this.api.sales.saleTotal(params).then(res => { this.api.sales.saleTotal(params).then(res => {
// console.log(res.data) console.log(res.data)
if (res.code === '0') { if (res.code === '0') {
res.data.dataList[0].num.forEach((item, index) => { res.data.dataList[0].num.forEach((item, index) => {
this.funnelData[index].value = item this.funnelData[index].value = item
...@@ -157,7 +157,6 @@ export default { ...@@ -157,7 +157,6 @@ export default {
borderWidth: 0 borderWidth: 0
}, },
color: ['rgba(235, 96, 2, 1)', 'rgba(235, 96, 2, .8)', 'rgba(235, 96, 2, .6)', 'rgba(235, 96, 2, .4)', 'rgba(245, 170, 2, .8)'], color: ['rgba(235, 96, 2, 1)', 'rgba(235, 96, 2, .8)', 'rgba(235, 96, 2, .6)', 'rgba(235, 96, 2, .4)', 'rgba(245, 170, 2, .8)'],
// color: [, , , , ].reverse(),
series: [ series: [
{ {
name: '漏斗图', name: '漏斗图',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!