| | |
| | | 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 |
| | |
| | | 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 () { |