Commit 218c277f by 胡悦

修复bug

1 parent 862a2c61
......@@ -201,6 +201,15 @@ const getNMonth = (n, fmt = 'yyyy-MM-dd') => {
return new Date(new Date().setMonth(new Date().getMonth() + n)).format(fmt)
}
const debounce = function(func, wait = 200) {
let timeout
return function(event) {
clearTimeout(timeout)
timeout = setTimeout(() => {
func.call(this, event)
}, wait)
}
}
const utils = {
removeLocalStorage,
setClipboardData,
......@@ -228,7 +237,8 @@ const utils = {
numAddSymbol,
getCurrentDate,
getNDate,
getNMonth
getNMonth,
debounce
}
Object.keys(utils).map(key => {
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-06-23 15:05:21
* @LastEditors: huyue
* @LastEditTime: 2022-07-01 14:26:28
* @LastEditTime: 2022-07-04 17:32:35
-->
<template>
<div>
......@@ -42,6 +42,7 @@
<script>
import { changeMixin } from '@/mixins'
import datas from '../../utils/data'
import utils from '../../utils/util'
import * as echarts from 'echarts'
export default {
name: 'Flow',
......@@ -183,9 +184,14 @@ export default {
}
this.echartsFunnel.setOption(this.option)
// 鼠标划入
this.echartsFunnel.on('mouseover', data => {
this.getSaleTrans(this.paramsData, data.data.type)
})
utils.debounce(
this.echartsFunnel.on('mouseover', data => {
this.getSaleTrans(this.paramsData, data.data.type)
})
)
// 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-01 15:43:48
* @LastEditTime: 2022-07-04 17:40:52
-->
<template>
<div>
......@@ -164,7 +164,8 @@ export default {
lineStyle: {
color: '#606266'
}
}
},
splitNumber: 4
},
series: [
{
......@@ -173,7 +174,6 @@ export default {
symbol: 'circle',
smooth: true,
showSymbol: false,
stack: 'Total',
data: []
},
{
......@@ -182,7 +182,6 @@ export default {
symbol: 'circle',
smooth: true,
showSymbol: false,
stack: 'Total',
data: []
},
{
......@@ -191,7 +190,6 @@ export default {
symbol: 'circle',
smooth: true,
showSymbol: false,
stack: 'Total',
data: []
},
{
......@@ -200,7 +198,6 @@ export default {
symbol: 'circle',
showSymbol: false,
smooth: true,
stack: 'Total',
data: []
},
{
......@@ -209,7 +206,6 @@ export default {
symbol: 'circle',
showSymbol: false,
smooth: true,
stack: 'Total',
data: []
}
]
......@@ -220,7 +216,6 @@ export default {
const month = new Date(e.statDate).getMonth()
xData.push(reportType == 0 ? `${month == 0 ? '1月' : `${Number(month) + 1}月`}` : e.statDate)
})
this.list.forEach((i, index) => {
this.option.series[index].data = this.dataList[index].map(item => item.num)
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!