|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="wadah">
|
|
|
- <el-carousel indicator-position="outside" class="flow-carousel" :autoplay="false" @change="changeCarousel">
|
|
|
+ <el-carousel ref="carousel" indicator-position="outside" class="flow-carousel" :autoplay="false" @change="changeCarousel">
|
|
|
<el-carousel-item
|
|
|
v-for="(item, index) in categoryType"
|
|
|
:key="index"
|
|
@@ -43,6 +43,7 @@
|
|
|
import { getassayConfigPage, getStatisticsPage } from '@/api/dcApi/assayMngApi'
|
|
|
import flowCurve from './flowCurve.vue'
|
|
|
import moment from 'moment'
|
|
|
+import eventBus from '@/utils/bus.js'
|
|
|
import MultipleData from '../../components/multipleData/multipleData.vue'
|
|
|
export default {
|
|
|
components: {
|
|
@@ -73,6 +74,29 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ created() {
|
|
|
+ eventBus.$on('waterActiveT', (data) => {
|
|
|
+ switch (data.id) {
|
|
|
+ case 'graphContainer1':
|
|
|
+ this.$refs.carousel.setActiveItem(5)
|
|
|
+ break
|
|
|
+ case 'graphContainer2':
|
|
|
+ this.$refs.carousel.setActiveItem(3)
|
|
|
+ break
|
|
|
+ case 'graphContainer3':
|
|
|
+ this.$refs.carousel.setActiveItem(2)
|
|
|
+ break
|
|
|
+ case 'graphContainer4':
|
|
|
+ this.$refs.carousel.setActiveItem(1)
|
|
|
+ break
|
|
|
+ default:
|
|
|
+ break
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ beforeDestroy() {
|
|
|
+ eventBus.$off('waterActiveT')
|
|
|
+ },
|
|
|
methods: {
|
|
|
changeCarousel(val) {
|
|
|
this.reportTitle = val
|