Commit 218c277f by 胡悦

修复bug

1 parent 862a2c61
...@@ -201,6 +201,15 @@ const getNMonth = (n, fmt = 'yyyy-MM-dd') => { ...@@ -201,6 +201,15 @@ const getNMonth = (n, fmt = 'yyyy-MM-dd') => {
return new Date(new Date().setMonth(new Date().getMonth() + n)).format(fmt) 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 = { const utils = {
removeLocalStorage, removeLocalStorage,
setClipboardData, setClipboardData,
...@@ -228,7 +237,8 @@ const utils = { ...@@ -228,7 +237,8 @@ const utils = {
numAddSymbol, numAddSymbol,
getCurrentDate, getCurrentDate,
getNDate, getNDate,
getNMonth getNMonth,
debounce
} }
Object.keys(utils).map(key => { Object.keys(utils).map(key => {
......
...@@ -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-01 14:26:28 * @LastEditTime: 2022-07-04 17:32:35
--> -->
<template> <template>
<div> <div>
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
<script> <script>
import { changeMixin } from '@/mixins' import { changeMixin } from '@/mixins'
import datas from '../../utils/data' import datas from '../../utils/data'
import utils from '../../utils/util'
import * as echarts from 'echarts' import * as echarts from 'echarts'
export default { export default {
name: 'Flow', name: 'Flow',
...@@ -183,9 +184,14 @@ export default { ...@@ -183,9 +184,14 @@ export default {
} }
this.echartsFunnel.setOption(this.option) this.echartsFunnel.setOption(this.option)
// 鼠标划入 // 鼠标划入
utils.debounce(
this.echartsFunnel.on('mouseover', data => { this.echartsFunnel.on('mouseover', data => {
this.getSaleTrans(this.paramsData, data.data.type) this.getSaleTrans(this.paramsData, data.data.type)
}) })
)
// this.echartsFunnel.on('mouseover', data => {
// this.getSaleTrans(this.paramsData, data.data.type)
// })
}, },
getSaleTrans(val, queryItem = 'enter') { getSaleTrans(val, queryItem = 'enter') {
const params = { const params = {
......
...@@ -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-01 15:43:48 * @LastEditTime: 2022-07-04 17:40:52
--> -->
<template> <template>
<div> <div>
...@@ -164,7 +164,8 @@ export default { ...@@ -164,7 +164,8 @@ export default {
lineStyle: { lineStyle: {
color: '#606266' color: '#606266'
} }
} },
splitNumber: 4
}, },
series: [ series: [
{ {
...@@ -173,7 +174,6 @@ export default { ...@@ -173,7 +174,6 @@ export default {
symbol: 'circle', symbol: 'circle',
smooth: true, smooth: true,
showSymbol: false, showSymbol: false,
stack: 'Total',
data: [] data: []
}, },
{ {
...@@ -182,7 +182,6 @@ export default { ...@@ -182,7 +182,6 @@ export default {
symbol: 'circle', symbol: 'circle',
smooth: true, smooth: true,
showSymbol: false, showSymbol: false,
stack: 'Total',
data: [] data: []
}, },
{ {
...@@ -191,7 +190,6 @@ export default { ...@@ -191,7 +190,6 @@ export default {
symbol: 'circle', symbol: 'circle',
smooth: true, smooth: true,
showSymbol: false, showSymbol: false,
stack: 'Total',
data: [] data: []
}, },
{ {
...@@ -200,7 +198,6 @@ export default { ...@@ -200,7 +198,6 @@ export default {
symbol: 'circle', symbol: 'circle',
showSymbol: false, showSymbol: false,
smooth: true, smooth: true,
stack: 'Total',
data: [] data: []
}, },
{ {
...@@ -209,7 +206,6 @@ export default { ...@@ -209,7 +206,6 @@ export default {
symbol: 'circle', symbol: 'circle',
showSymbol: false, showSymbol: false,
smooth: true, smooth: true,
stack: 'Total',
data: [] data: []
} }
] ]
...@@ -220,7 +216,6 @@ export default { ...@@ -220,7 +216,6 @@ export default {
const month = new Date(e.statDate).getMonth() const month = new Date(e.statDate).getMonth()
xData.push(reportType == 0 ? `${month == 0 ? '1月' : `${Number(month) + 1}月`}` : e.statDate) xData.push(reportType == 0 ? `${month == 0 ? '1月' : `${Number(month) + 1}月`}` : e.statDate)
}) })
this.list.forEach((i, index) => { this.list.forEach((i, index) => {
this.option.series[index].data = this.dataList[index].map(item => item.num) 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!