懒羊羊
2023-12-12 776fbe36aec576c164c9edfe6be13d833eaef7b9
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
47
48
49
50
51
52
<template>
  <div>
    <Chart :cdata="cdata" />
  </div>
</template>
 
<script>
import Chart from './chart.vue';
export default {
  data () {
    return {
      cdata: {
        xData: ["MC10S-01", "MC10S-02", "MC10S-03", "MZ207"],
        seriesData: [
          { value: 5, name: "MC10S-01" },
          { value: 2, name: "MC10S-02" },
          { value: 4, name: "MC10S-03" },
          { value: 8, name: "MZ207" },
          // { value: 20, name: "data5" },
          // { value: 35, name: "data6" }
        ]
      }
    }
  },
  components: {
    Chart,
  },
  mounted () {
    this.tops();
  },
  methods: {
    tops(){
      this.$http.get('http://192.168.0.249:8083/equipmentInfo/centerLeft1')
          .then((response)=>{
            this.cdata = {
              xData: response.data.data.xData,
              seriesData : response.data.data.seriesData
            }
            console.log(response.data.data.seriesData)
          })
    },
    changeTiming() {
      setInterval(() => {
        this.tops();
      }, 60000)
    },
  }
}
</script>
 
<style lang="scss" scoped>
</style>