Commit 8cd7b357 by 李伟康

Merge branch 'dev_v1.0.0' of http://192.168.3.233:8090/gh/data-view into dev_v1.0.0

2 parents eb97fa86 df8ac0d8
...@@ -84,7 +84,7 @@ img { ...@@ -84,7 +84,7 @@ img {
} }
.title { .title {
font-size: 12px; font-size: 0.75vw;
color: #e8e8e8; color: #e8e8e8;
// line-height: 2.1vh; // line-height: 2.1vh;
font-weight: 400; font-weight: 400;
......
...@@ -213,8 +213,8 @@ p { ...@@ -213,8 +213,8 @@ p {
.line-item { .line-item {
height: 1.8vh; height: 1.8vh;
width: 100%; width: 100%;
font-size: 10px; font-size: 0.55vw;
padding-bottom: 0.6vh; padding-bottom: 0.3vh;
} }
.line-item:last-of-type { .line-item:last-of-type {
padding-bottom: 0; padding-bottom: 0;
......
...@@ -202,7 +202,7 @@ document.querySelector(`.${this.id}`).nextElementSibling.style = 'animation-iter ...@@ -202,7 +202,7 @@ document.querySelector(`.${this.id}`).nextElementSibling.style = 'animation-iter
<style lang="scss" scoped> <style lang="scss" scoped>
.pie-box { .pie-box {
background: #262525; // background: #262525;
position: relative; position: relative;
flex: 1; flex: 1;
.center-content { .center-content {
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
<div class="title">售后客户价值分析</div> <div class="title">售后客户价值分析</div>
<template v-if="barData.length > 0"> <template v-if="barData.length > 0">
<div class="analyze-content" :style="{ height: height - 5 + 'vh' }"> <div class="analyze-content" :style="{ height: height - 5 + 'vh' }">
<div class="content-left bg"> <div class="content-left">
<div id="analyzeBar" style="height: 100%"></div> <div id="analyzeBar" style="height: 100%"></div>
</div> </div>
<div class="contetn-right bg"> <div class="contetn-right">
<pie-chart :id="chart.id" :list="analyzeData" :height="height - 5 + 'vh'" :radius="chart.radius" :size="chart.size"></pie-chart> <pie-chart :id="chart.id" :list="analyzeData" :height="height - 5 + 'vh'" :radius="chart.radius" :size="chart.size"></pie-chart>
</div> </div>
</div> </div>
......
...@@ -38,6 +38,10 @@ export default { ...@@ -38,6 +38,10 @@ export default {
queryType: 0, queryType: 0,
tooltipFormatterObj: [ tooltipFormatterObj: [
{ {
label: '回店数',
attrName: 'num'
},
{
label: '回店率', label: '回店率',
attrName: 'rate', attrName: 'rate',
addSymbol: '%' addSymbol: '%'
......
...@@ -39,6 +39,10 @@ export default { ...@@ -39,6 +39,10 @@ export default {
dataList: [], dataList: [],
tooltipFormatterObj: [ tooltipFormatterObj: [
{ {
label: '保持数',
attrName: 'num'
},
{
label: '保持率', label: '保持率',
attrName: 'rate', attrName: 'rate',
addSymbol: '%' addSymbol: '%'
...@@ -56,7 +60,7 @@ export default { ...@@ -56,7 +60,7 @@ export default {
] ]
} }
}, },
mounted() { }, mounted() {},
methods: { methods: {
init(val) { init(val) {
this.isEmpty = true this.isEmpty = true
......
...@@ -37,8 +37,11 @@ export default { ...@@ -37,8 +37,11 @@ export default {
storeOrBrandTxt: '品牌', storeOrBrandTxt: '品牌',
queryType: 0, queryType: 0,
dataList: [], dataList: [],
tooltipFormatterObj: tooltipFormatterObj: [
[ {
label: '流失数',
attrName: 'num'
},
{ {
label: '流失率', label: '流失率',
attrName: 'rate', attrName: 'rate',
...@@ -57,7 +60,7 @@ export default { ...@@ -57,7 +60,7 @@ export default {
] ]
} }
}, },
mounted() { }, mounted() {},
methods: { methods: {
init(val) { init(val) {
this.isEmpty = true this.isEmpty = true
......
...@@ -15,7 +15,15 @@ ...@@ -15,7 +15,15 @@
<div v-if="isEmpty" class="empty"> <div v-if="isEmpty" class="empty">
<img src="../../assets/images/empty.png" alt="" /> <img src="../../assets/images/empty.png" alt="" />
</div> </div>
<LineChart v-else ref="lineChartRef" domId="sadayasuChart" :dataList.sync="dataList" :storeOrBrandTxt="storeOrBrandTxt" :tooltipFormatterObj="tooltipFormatterObj" :queryType="queryType"></LineChart> <LineChart
v-else
ref="lineChartRef"
domId="sadayasuChart"
:dataList.sync="dataList"
:storeOrBrandTxt="storeOrBrandTxt"
:tooltipFormatterObj="tooltipFormatterObj"
:queryType="queryType"
></LineChart>
</div> </div>
</div> </div>
</template> </template>
...@@ -38,6 +46,10 @@ export default { ...@@ -38,6 +46,10 @@ export default {
queryType: 0, queryType: 0,
tooltipFormatterObj: [ tooltipFormatterObj: [
{ {
label: '回店数',
attrName: 'num'
},
{
label: '回店率', label: '回店率',
attrName: 'rate', attrName: 'rate',
addSymbol: '%' addSymbol: '%'
...@@ -56,7 +68,7 @@ export default { ...@@ -56,7 +68,7 @@ export default {
dataList: [] dataList: []
} }
}, },
mounted() { }, mounted() {},
methods: { methods: {
init(val) { init(val) {
this.isEmpty = true this.isEmpty = true
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-06-23 15:05:21 * @Date: 2022-06-23 15:05:21
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2022-07-05 17:16:23 * @LastEditTime: 2022-07-07 17:27:53
--> -->
<template> <template>
<div> <div>
...@@ -119,7 +119,7 @@ export default { ...@@ -119,7 +119,7 @@ export default {
res.data.dataList[0].num.forEach((item, index) => { res.data.dataList[0].num.forEach((item, index) => {
this.funnelData[index].num = item this.funnelData[index].num = item
}) })
this.hasData = res.data.dataList[0].num.every(i => i != 0) this.hasData = !res.data.dataList[0].num.every(i => i == 0)
if (this.hasData) this.draw() if (this.hasData) this.draw()
} else { } else {
this.hasData = false this.hasData = false
...@@ -159,7 +159,8 @@ export default { ...@@ -159,7 +159,8 @@ export default {
gap: 2, gap: 2,
label: { label: {
show: true, show: true,
position: 'inside' position: 'inside',
color: '#fff'
}, },
labelLine: { labelLine: {
length: 10, length: 10,
...@@ -187,7 +188,6 @@ export default { ...@@ -187,7 +188,6 @@ export default {
'mouseover', 'mouseover',
utils.debounce(data => { utils.debounce(data => {
this.getSaleTrans(this.paramsData, data.data.type) this.getSaleTrans(this.paramsData, data.data.type)
this.isActive = 1
}), }),
1000 / 60 1000 / 60
) )
...@@ -225,8 +225,7 @@ export default { ...@@ -225,8 +225,7 @@ export default {
}) })
} }
} }
this.flowData = this.isActive == 1 ? this.topList : this.lastList
this.flowData = this.topList
}) })
}, },
// 切换品牌排序 // 切换品牌排序
...@@ -303,7 +302,6 @@ export default { ...@@ -303,7 +302,6 @@ export default {
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
// height: 11.7vh; // height: 11.7vh;
background-color: #262525;
padding: 0 25px; padding: 0 25px;
} }
</style> </style>
...@@ -3,28 +3,16 @@ ...@@ -3,28 +3,16 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-06-23 15:05:21 * @Date: 2022-06-23 15:05:21
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2022-07-04 18:25:19 * @LastEditTime: 2022-07-06 15:07:56
--> -->
<template> <template>
<div> <div>
<div class="title">转化趋势</div> <div class="title">转化趋势</div>
<div <div v-show="hasData" class="linetrend-box">
v-show="hasData" <div id="lineTrend" :style="{ height: height - 4.1 + 'vh' }"></div>
class="linetrend-box"
>
<div
id="lineTrend"
:style="{ height: height - 4.1 + 'vh' }"
></div>
</div> </div>
<div <div v-show="!hasData" class="empty">
v-show="!hasData" <img src="../../assets/images/empty.png" alt="" />
class="empty"
>
<img
src="../../assets/images/empty.png"
alt=""
/>
</div> </div>
</div> </div>
</template> </template>
...@@ -36,7 +24,7 @@ export default { ...@@ -36,7 +24,7 @@ export default {
name: 'Trend', name: 'Trend',
props: ['height'], props: ['height'],
mixins: [changeMixin], mixins: [changeMixin],
data () { data() {
return { return {
echartsTrend: {}, echartsTrend: {},
option: {}, option: {},
...@@ -46,17 +34,17 @@ export default { ...@@ -46,17 +34,17 @@ export default {
hasData: true hasData: true
} }
}, },
mounted () { mounted() {
this.echartsTrend = echarts.init(document.getElementById('lineTrend')) this.echartsTrend = echarts.init(document.getElementById('lineTrend'))
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
this.echartsTrend.resize() this.echartsTrend.resize()
}) })
}, },
methods: { methods: {
init (val) { init(val) {
this.getChartData(val) this.getChartData(val)
}, },
getChartData (val) { getChartData(val) {
var params = { var params = {
req: { req: {
// queryItem: 'enter', // queryItem: 'enter',
...@@ -76,8 +64,8 @@ export default { ...@@ -76,8 +64,8 @@ export default {
.then(res => { .then(res => {
resolve(res.data.dataList) resolve(res.data.dataList)
}) })
.catch(() => { .catch(err => {
reject() reject(err)
}) })
}) })
}) })
...@@ -98,7 +86,7 @@ export default { ...@@ -98,7 +86,7 @@ export default {
this.hasData = false this.hasData = false
}) })
}, },
draw (reportType) { draw(reportType) {
this.option = { this.option = {
tooltip: { tooltip: {
trigger: 'axis', trigger: 'axis',
...@@ -106,39 +94,6 @@ export default { ...@@ -106,39 +94,6 @@ export default {
borderWidth: 0, borderWidth: 0,
backgroundColor: 'rgba(68,68,68,0.80)', backgroundColor: 'rgba(68,68,68,0.80)',
confine: true, confine: true,
// position: (point, params, dom, rect, size) => {
// var x = 0 // x坐标位置
// var y = 0 // y坐标位置
// // 当前鼠标位置
// var pointX = point[0]
// var pointY = point[1]
// // 外层div大小
// // var viewWidth = size.viewSize[0];
// // var viewHeight = size.viewSize[1];
// // 提示框大小
// var boxWidth = size.contentSize[0]
// var boxHeight = size.contentSize[1]
// // boxWidth > pointX 说明鼠标左边放不下提示框
// if (boxWidth > pointX) {
// x = 5
// } else {
// // 左边放的下
// x = pointX - boxWidth
// }
// // boxHeight > pointY 说明鼠标上边放不下提示框
// if (boxHeight > pointY) {
// y = 5
// } else {
// // 上边放得下
// y = pointY - boxHeight
// }
// return [x, y]
// },
textStyle: { textStyle: {
color: '#FFFFFF', color: '#FFFFFF',
fontSize: 8 fontSize: 8
...@@ -149,15 +104,12 @@ export default { ...@@ -149,15 +104,12 @@ export default {
const date = this.dataList[0][index].statDate const date = this.dataList[0][index].statDate
var txt = date + '<br />' var txt = date + '<br />'
e.forEach(item => { e.forEach(item => {
// if (txt) {
// txt = txt + '<br />'
// }
txt = txt + item.seriesName + ':' + item.value + '<br />' txt = txt + item.seriesName + ':' + item.value + '<br />'
}) })
return txt return txt
} }
}, },
color: ['#4FA0FF', '#7CFFB2', '#FDF006', '#EB6001', '#F5AA01', '#BF98FF', '#58D9F9'], color: ['#4FA0FF', '#FF6E76', '#7CFFB2', '#FDF006', '#EB6001'],
grid: { grid: {
left: '3%', left: '3%',
right: '4%', right: '4%',
...@@ -180,7 +132,7 @@ export default { ...@@ -180,7 +132,7 @@ export default {
color: '#606266' color: '#606266'
} }
}, },
splitNumber: 3 splitNumber: 4
}, },
series: [ series: [
{ {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!