1
huangxiaoqiang
2025-04-16 9757426ed62d7d4b1479dc0a431002f676983d6b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<template>
  <div>
    <Chart :cdata="cdata" />
  </div>
</template>
 
<script>
import Chart from "./chart.vue";
import axios from "@/api/ajax.js"
export default {
  data() {
    return {
      isActivation: true,
      cdata: {
        category: ["2/1", "2/2", "2/3", "2/4", "2/5", "2/6", "2/7"],
        actionData: [],
      },
    };
  },
  components: {
    Chart,
  },
  mounted() {
    this.GetActivation();
    setInterval(() => {
      this.GetActivation();
    }, 5000);
  },
  methods: {
    GetActivation() {
      axios.post("/api/dt_equipinforecord/GetActivation", null, "").then((x) => {
        if (x.data.status) {
          this.cdata.category = [];
          for (let index = 0; index < x.data.data.time.length; index++) {
            this.cdata.category.push(x.data.data.time[index]);
            this.cdata.actionData.push(x.data.data.rate[index]);
          }
        }
      });
    },
  },
};
</script>
 
<style lang="scss" scoped>
</style>