浏览代码

一些跳转问题

zhangsijie 1 年之前
父节点
当前提交
f4b628006e
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 7 2
      minggao/src/page/home/newHome/deviceHome.vue

+ 7 - 2
minggao/src/page/home/newHome/deviceHome.vue

@@ -517,7 +517,9 @@ export default {
         this.pestTypeList.push(newArray);
         this.pestTypeBar.push(res.data.data);
         if (index != this.activeIndex) return
-        this.initCharByIndex(this.activeIndex, 'count');
+        if (this.pestTypeBar.length > this.activeIndex) {
+          this.initCharByIndex(this.activeIndex, 'count');
+        }
       })
     },
     // 获取虫害图片数据
@@ -570,7 +572,10 @@ export default {
           value: res.data.data.day.pestName[0]
         });
         if (index != this.activeIndex) return
-        this.initCharByIndex(this.activeIndex, 'pestDate');
+
+        if (this.pestLineDate.length > this.activeIndex) {
+          this.initCharByIndex(this.activeIndex, 'pestDate');
+        }
         // let xData = [];
         // let yData = [];
         // res.data.data.day.countInfo.forEach(pest => {