haoxuan
2023-12-05 cd388c78650efe85fe4dd41cc439208d58ab6c29
接口轮训时 设备负荷对比柱状图 动画问题修改
2个文件已修改
14 ■■■■ 已修改文件
src/views/cockpitPage/components/DeviceChart.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/cockpitPage/index.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/cockpitPage/components/DeviceChart.vue
@@ -46,6 +46,7 @@
      // },
      startValue: 0,
      endValue: 5,
      chartTimer:null,
    };
  },
  watch: {
@@ -64,6 +65,7 @@
    //在职
    pieChart(chartName, data) {
      let that = this;
      clearInterval(this.chartTimer);
      let chartDomTwo = this.$refs[chartName];
      let myChartTwo = echarts.init(chartDomTwo)
      myChartTwo.dispose()
@@ -205,7 +207,7 @@
          ],
        };
        setInterval(function () {
        this.chartTimer=setInterval(function () {
          if (option.dataZoom[0].endValue == data.datay.length) {
            option.dataZoom[0].startValue = that.startValue;
            option.dataZoom[0].endValue = that.endValue;
src/views/cockpitPage/index.vue
@@ -98,9 +98,9 @@
  },
  mounted() {
    this.getDashboard();
    setInterval(() => {
      this.getDashboard();
    }, 30000);
    // setInterval(() => {
    //   this.getDashboard();
    // }, 30000);
  },
  watch: {},
  methods: {
@@ -119,6 +119,10 @@
        this.setLeftBlock5(res.data);
        // 设备负荷对比
        this.setRightBlock1(res.data);
      }).finally(()=>{
        setTimeout(()=>{
          this.getDashboard()
        },30000)
      });
    },
    // 处理左上数据