| 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
 | | <template> |  |     <div> |  |       <Chart :cdata="cdata" /> |  |     </div> |  |   </template> |  |    |  |   <script> |  |   import Chart from './chart.vue'; |  |   import axios from 'axios'; |  |   export default { |  |     data () { |  |       return { |  |         cdata: { |  |           xData: ["空托", "实托", "待检", "合格", "检修中"], |  |           seriesData: [] |  |         } |  |       } |  |     }, |  |     components: { |  |       Chart, |  |     }, |  |     mounted () { |  |       this.changeTiming() |  |     }, |  |     methods: { |  |       changeTiming() { |  |           this.changeNumber() |  |         setInterval(() => { |  |           this.changeNumber() |  |         }, 3000) |  |       }, |  |       changeNumber() { |  |         axios.post("http://localhost:8098/api/VV_Container/GetContainerMessage", { |  |           MainData: { |  |             AGVName: "负极" |  |           } |  |         }).then((res) => { |  |           let GetLocationEmptyOrStored = [ |  |             {value:res.empty+1,name:'空托'}, |  |             {value:res.full+1,name:"实托"}, |  |             {value:res.waitCheck+1,name:"待检"}, |  |             {value:res.qualified+1,name:"合格"}, |  |             {value:res.checkIng+1,name:"检修中"} |  |           ] |  |           this.cdata.seriesData = GetLocationEmptyOrStored |  |         }).catch((res) => { |  |           console.log(res) |  |         }) |  |       } |  |     } |  |   } |  |   </script> |  |    |  |   <style lang="scss" scoped> |  |   </style> | 
 |