|
|
@@ -3,11 +3,11 @@
|
|
|
* @Autor: lin
|
|
|
* @Date: 2024-04-09 14:26:43
|
|
|
* @LastEditors: lin
|
|
|
- * @LastEditTime: 2024-04-20 09:37:36
|
|
|
+ * @LastEditTime: 2024-04-20 09:45:41
|
|
|
-->
|
|
|
<template>
|
|
|
- <div class="bigBg">
|
|
|
- <el-carousel indicator-position="outside" :autoplay="false" trigger="click" class="deviceBox" :interval="10000"
|
|
|
+ <div class="bigBg" v-loading="loading">
|
|
|
+ <el-carousel indicator-position="outside" trigger="click" class="deviceBox" :interval="10000"
|
|
|
@change="changeSlider">
|
|
|
<el-carousel-item v-for="(item, index) in deviceList" :key="item.id">
|
|
|
<div class="flexBox topBox">
|
|
|
@@ -173,6 +173,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ loading: true,
|
|
|
deviceList: [],
|
|
|
pestTypeList: [], // 害虫类别数组 3D 用
|
|
|
pestTypeBar: [], // 害虫类别数组 柱状图用
|
|
|
@@ -181,7 +182,8 @@ export default {
|
|
|
pestImgList: [], //设备图片
|
|
|
videoList: [], //监控列表 跳出页面要停止
|
|
|
pestLineCheck: [],
|
|
|
- activeIndex: 0
|
|
|
+ activeIndex: 0,
|
|
|
+ timmer:null
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
|
@@ -197,6 +199,7 @@ export default {
|
|
|
this.videoList.forEach(item => {
|
|
|
item.stop()
|
|
|
})
|
|
|
+ clearInterval(this.timmer);
|
|
|
},
|
|
|
methods: {
|
|
|
changeSlider(index) {
|
|
|
@@ -242,6 +245,7 @@ export default {
|
|
|
})
|
|
|
this.setLineOption(pestDateChar, [pestDateCharInfo.day.pestName[0]], xData, [yData], [['#0066ff59', '#0066ff00']], ['#1588F2'], true)
|
|
|
}
|
|
|
+ this.loading = false;
|
|
|
},
|
|
|
/**
|
|
|
* @description: 虫害折线图 切换年月日 由于虫子不一样 所以会默认展示第一种
|
|
|
@@ -330,6 +334,9 @@ export default {
|
|
|
// 默认渲染第一页
|
|
|
this.initCharByIndex(0, 'tem');
|
|
|
})
|
|
|
+ this.timmer = setInterval(() => {
|
|
|
+ this.$router.push('/newHome/home');
|
|
|
+ }, this.deviceList.length * 10000)
|
|
|
})
|
|
|
},
|
|
|
// 折线图带渐变配置
|