guanqb
2022-11-10 52d62b0cc471e0eb6978e953ff7558857abad7b6
首页设备鼠标移入移出效果调整
1 files modified
30 ■■■■■ changed files
src/views/home/components/rightContainer.vue 30 ●●●●● patch | view | raw | blame | history
src/views/home/components/rightContainer.vue
@@ -235,6 +235,9 @@
        equipmentEchartsCarousel () {
            let dataLen = this.getEquimentChartData(this.policeName).length
            let curIndex = 0
            if (timer) {
                clearInterval(timer)
            }
            timer = setInterval(() => {
                equipmentmyChart.dispatchAction({ type: 'downplay', seriesIndex: 0, dataIndex: curIndex })
                curIndex = (curIndex + 1) % dataLen
@@ -242,6 +245,33 @@
                    type: 'highlight', seriesIndex: 0, dataIndex: curIndex
                })
            }, 1000)
            equipmentmyChart.on('mouseover', function (param) {
                clearInterval(timer)
                equipmentmyChart.dispatchAction({
                    type: 'downplay',
                    seriesIndex: 0,
                    dataIndex: curIndex
                })
                equipmentmyChart.dispatchAction({
                    type: 'highlight',
                    seriesIndex: 0,
                    dataIndex: param.dataIndex
                })
                curIndex = param.dataIndex
            })
            equipmentmyChart.on('mouseout', function (param) {
                curIndex = param.dataIndex
                if (timer) {
                    clearInterval(timer)
                }
                timer = setInterval(() => {
                    equipmentmyChart.dispatchAction({ type: 'downplay', seriesIndex: 0, dataIndex: curIndex })
                    curIndex = (curIndex + 1) % dataLen
                    equipmentmyChart.dispatchAction({
                        type: 'highlight', seriesIndex: 0, dataIndex: curIndex
                    })
                }, 1000)
            })
        },
        initEventChangeEcharts () {