| | |
| | | <script> |
| | | let equipmentmyChart |
| | | let eventchangemychart |
| | | let timer |
| | | |
| | | import historyArr from '@/assets/data/activitysData/history.js' |
| | | import underwayArr from '@/assets/data/activitysData/underway.js' |
| | |
| | | this.$nextTick(() => { |
| | | window.addEventListener("resize", this.echartsResize) |
| | | }) |
| | | this.equipmentEchartsCarousel() |
| | | }, |
| | | methods: { |
| | | actTabClick (type) { |
| | |
| | | y2: 20 |
| | | }, |
| | | } |
| | | }, |
| | | |
| | | equipmentEchartsCarousel () { |
| | | let dataLen = this.getEquimentChartData(this.policeName).length |
| | | let curIndex = 0 |
| | | timer = setInterval(() => { |
| | | equipmentmyChart.dispatchAction({ type: 'downplay', seriesIndex: 0, dataIndex: curIndex }) |
| | | curIndex = (curIndex + 1) % dataLen |
| | | equipmentmyChart.dispatchAction({ |
| | | type: 'highlight', seriesIndex: 0, dataIndex: curIndex |
| | | }) |
| | | }, 1000) |
| | | }, |
| | | |
| | | initEventChangeEcharts () { |
| | |
| | | eventchangemychart.dispose() |
| | | eventchangemychart = null |
| | | } |
| | | |
| | | clearInterval(timer) |
| | | } |
| | | } |
| | | </script> |