懒羊羊
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<template>
  <div id="center">
    <div class="up">
      <div style="width: 100%;font-size: 30px;text-align: center;height: 52px">工单号</div>
      <div style="width: 100%;font-size: 30px;text-align: center;height: 52px">{{workOrderNo}}</div>
      <div style="width: 50%;font-size: 30px;text-align: center;height: 52px">计划数量</div>
      <div style="width: 50%;font-size: 30px;text-align: center;height: 52px">{{planQty}}</div>
      <div style="width: 50%;font-size: 30px;text-align: center;height: 52px">完成数量</div>
      <div style="width: 50%;font-size: 30px;text-align: center;height: 52px">{{actualQty}}</div>
      <div style="width: 99%;height: 200px;">
        <dv-water-level-pond class="dv-wa-le-po" :config="water" />
      </div>
    </div>
    <div class="down">
    </div>
  </div>
</template>
 
<script>
export default {
  data() {
    return {
      planQty: 5,
      actualQty: 4,
      workOrderNo: "M202311020002",
      water: {
        data: [80, 80],
        // shape: 'round',
        formatter: '{value}%',
        waveNum: 3
      },
    }
  },
  mounted() {
    this.tops();
    this.changeTiming();
  },
  methods: {
    tops(){
      this.$http.get('http://192.168.0.249:8083/productionOrdeInfo/center1')
          .then((response)=>{
            this.water = { data: response.data.data.waterLevel}
            this.planQty = response.data.data.planQty;
            this.actualQty = response.data.data.actualQty;
            this.workOrderNo = response.data.data.workOrderNo;
            console.log("----------!!!!!!!!"+response.data.data.planQty)
          })
    },
    changeTiming() {
      setInterval(() => {
        this.tops();
      }, 60000)
    },
  }
}
</script>
 
<style lang="scss" scoped>
#center {
  display: flex;
  flex-direction: column;
  .up {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
  }
  .dv-wa-le-po {
    height: 100%;
  }
}
</style>