Commit fb803fe2 by 王志慧

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

2 parents f31b7a68 edf15d3c
......@@ -97,7 +97,6 @@ export default {
},
tooltipFormatter(obj) {
var currentItem = this.dataList[obj[0].dataIndex]
console.log(currentItem, 'currentItem')
var txt = ''
txt = currentItem.statDate
this.tooltipFormatterObj.forEach(item => {
......@@ -133,18 +132,18 @@ export default {
})
// 移除图表
this[this.domId].on('globalout', () => {
this.chartAction()
})
// this[this.domId].on('globalout', () => {
// this.chartAction()
// })
},
chartAction(type) {
this[this.domId].dispatchAction({
type: type || 'showTip',
seriesIndex: +this.moveAttr.seriesIndex,
dataIndex: +this.moveAttr.dataIndex
})
},
// chartAction(type) {
// this[this.domId].dispatchAction({
// type: type || 'showTip',
// seriesIndex: +this.moveAttr.seriesIndex,
// dataIndex: +this.moveAttr.dataIndex
// })
// },
getRankList(idx, attrName = 'topList') {
this.dataList[idx][attrName].length ? this.$set(this, 'rankList', this.dataList[idx][attrName]) : this.resetRankList()
......@@ -162,7 +161,7 @@ export default {
this[this.domId].setOption(this.lineOptions)
// 默认展示tooltip
this.chartAction()
// this.chartAction()
this.getRankList(0)
},
......@@ -242,4 +241,18 @@ p {
}
}
}
::v-deep.line-chart {
width: 100%;
height: 100%;
div {
&:nth-child(1) {
width: 100% !important;
height: 100% !important;
canvas {
width: 100% !important;
height: 100% !important;
}
}
}
}
</style>
......@@ -13,7 +13,7 @@
src="@/assets/images/time.svg"
class="icon"
/>
{{now}}
<div class="now">{{now}}</div>
</div>
<div class="bottom flex">
<div class="merchant">已同步门店数:68</div>
......
......@@ -10,7 +10,6 @@ function getLineOptions(obj) {
color: '#FFFFFF',
fontSize: '8px'
},
extraCssText: 'width: 100px;',
formatter: tooltipFormatter || ''
},
grid: {
......@@ -34,7 +33,8 @@ function getLineOptions(obj) {
lineStyle: {
color: '#606266'
}
}
},
splitNumber: 3
},
series: [
{
......
......@@ -84,13 +84,13 @@ export default {
Object.keys(topTempList).forEach(item => {
topList.push({
label: item,
value: this.numAddSymbol(topTempList[item])
value: topTempList[item] ? this.numAddSymbol(topTempList[item]) : '- -'
})
})
Object.keys(lastTempList).forEach(item => {
lastList.push({
label: item,
value: this.numAddSymbol(lastTempList[item])
value: lastTempList[item] ? this.numAddSymbol(lastTempList[item]) : '- -'
})
})
this.dataList.push({
......
......@@ -86,13 +86,13 @@ export default {
Object.keys(topTempList).forEach(item => {
topList.push({
label: item,
value: this.numAddSymbol(topTempList[item])
value: topTempList[item] ? this.numAddSymbol(topTempList[item]) : '- -'
})
})
Object.keys(lastTempList).forEach(item => {
lastList.push({
label: item,
value: this.numAddSymbol(lastTempList[item])
value: lastTempList[item] ? this.numAddSymbol(lastTempList[item]) : '- -'
})
})
this.dataList.push({
......
......@@ -101,13 +101,13 @@ export default {
Object.keys(topTempList).forEach(item => {
topList.push({
label: item,
value: topTempList[item].num?this.numAddSymbol(topTempList[item].num):'- -'
value: topTempList[item].num ? this.numAddSymbol(topTempList[item].num) : '- -'
})
})
Object.keys(lastTempList).forEach(item => {
lastList.push({
label: item,
value: this.numAddSymbol(lastTempList[item].num)
value: lastTempList[item].num ? this.numAddSymbol(lastTempList[item].num) : '- -'
})
})
this.dataList.push({
......
......@@ -15,7 +15,7 @@
<div v-if="isEmpty" class="empty">
<img src="../../assets/images/empty.png" alt="" />
</div>
<LineChart v-else ref="lineChartRef" domId="keepChart" :dataList.sync="dataList" :storeOrBrandTxt="storeOrBrandTxt" :queryType="queryType" :tooltipFormatterObj="tooltipFormatterObj"></LineChart>
<LineChart v-else ref="lineChartRef" domId="keepChart" :dataList.sync="dataList" :storeOrBrandTxt="storeOrBrandTxt" :queryType="queryType"></LineChart>
</div>
</div>
</template>
......@@ -101,13 +101,13 @@ export default {
Object.keys(topTempList).forEach(item => {
topList.push({
label: item,
value: this.numAddSymbol(topTempList[item])
value: topTempList[item] ? this.numAddSymbol(topTempList[item]) : '- -'
})
})
Object.keys(lastTempList).forEach(item => {
lastList.push({
label: item,
value: this.numAddSymbol(lastTempList[item])
value: lastTempList[item] ? this.numAddSymbol(lastTempList[item]) : '- -'
})
})
this.dataList.push({
......
......@@ -37,7 +37,8 @@ export default {
storeOrBrandTxt: '品牌',
queryType: 0,
dataList: [],
tooltipFormatterObj:[
tooltipFormatterObj:
[
{
label: '流失率',
attrName: 'rate',
......@@ -101,13 +102,13 @@ export default {
Object.keys(topTempList).forEach(item => {
topList.push({
label: item,
value: this.numAddSymbol(topTempList[item])
value: topTempList[item] ? this.numAddSymbol(topTempList[item]) : '- -'
})
})
Object.keys(lastTempList).forEach(item => {
lastList.push({
label: item,
value: this.numAddSymbol(lastTempList[item])
value: lastTempList[item] ? this.numAddSymbol(lastTempList[item]) : '- -'
})
})
this.dataList.push({
......
......@@ -84,13 +84,13 @@ export default {
Object.keys(topTempList).forEach(item => {
topList.push({
label: item,
value: this.numAddSymbol(topTempList[item].num)
value: topTempList[item].num ? this.numAddSymbol(topTempList[item].num) : '- -'
})
})
Object.keys(lastTempList).forEach(item => {
lastList.push({
label: item,
value: this.numAddSymbol(lastTempList[item].num)
value: lastTempList[item].num ? this.numAddSymbol(lastTempList[item].num) : '- -'
})
})
this.dataList.push({
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditTime: 2022-07-04 17:32:35
* @LastEditTime: 2022-07-04 18:39:00
-->
<template>
<div>
......@@ -183,15 +183,13 @@ export default {
]
}
this.echartsFunnel.setOption(this.option)
// 鼠标划入
utils.debounce(
this.echartsFunnel.on('mouseover', data => {
this.echartsFunnel.on(
'mouseover',
utils.debounce(data => {
this.getSaleTrans(this.paramsData, data.data.type)
})
}),
1000 / 60
)
// this.echartsFunnel.on('mouseover', data => {
// this.getSaleTrans(this.paramsData, data.data.type)
// })
},
getSaleTrans(val, queryItem = 'enter') {
const params = {
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditTime: 2022-07-04 17:40:52
* @LastEditTime: 2022-07-04 18:25:19
-->
<template>
<div>
......@@ -132,12 +132,14 @@ export default {
},
extraCssText: 'width: 80px;',
formatter: e => {
var txt = ''
const index = e[0].dataIndex
const date = this.dataList[0][index].statDate
var txt = date + '<br />'
e.forEach(item => {
if (txt) {
txt = txt + '<br />'
}
txt = txt + item.seriesName + ':' + item.value
// if (txt) {
// txt = txt + '<br />'
// }
txt = txt + item.seriesName + ':' + item.value + '<br />'
})
return txt
}
......@@ -165,7 +167,7 @@ export default {
color: '#606266'
}
},
splitNumber: 4
splitNumber: 3
},
series: [
{
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!