footerCenter.vue
3.32 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<template>
<div>
<div class="title-text">第四层</div>
<div style="width: 100%; height: 80%; position: relative; left: 0vw; top: 5vw;">
<div class="tishenji">提升机</div>
<div id="bubble-containerFoxe"></div>
</div>
<div style="color: white;margin:2vh 0 0 7vw;display: flex;">
<div
style="display: flex;
justify-content: flex-start;
align-items: center;"
>
<div style="width: 1vw;height: 1vw;background: #98afdb;"></div>
<div
style=" font-size: 1vw;
width: 5vw;
margin-left: 0.3vw; "
>
过道
</div>
</div>
<div
style="display: flex;
justify-content: flex-start;
align-items: center;"
>
<div style="width: 1vw;height: 1vw;background: #006fdf;"></div>
<div
style=" font-size: 1vw;
width: 3vw;
margin-left: 0.3vw; "
>
库位
</div>
</div>
<div
style="display: flex;
justify-content: flex-start;
align-items: center;"
>
<div style="width: 1vw;height: 1vw;background: #A0169D;"></div>
<div
style=" font-size: 1vw;
width: 5vw;
margin-left: 0.3vw; "
>
行走路线
</div>
</div>
</div>
</div>
</template>
<script>
export default {
data() {
return {
sysinfo: [],
}
},
methods: {
sed(data) {
this.agvLineData = data
var agvLineDatas = this.agvLineData
if (agvLineDatas) {
function formatMarkInfo(agvLineDatas) {
return agvLineDatas.map((item) => ({
id: `a_${item.barcode}`,
taskNumber: item.taskNo,
carCode: item.agvNo,
speed: item.speed,
status: item.agvState,
// startLandmark: item.startLandmark,
// endLandmark: item.endLandmark,
battery: item.voltage,
}))
}
var markInfos = formatMarkInfo(agvLineDatas)
window.findMarkInfo(markInfos, this.sysinfo)
this.sysinfo = markInfos
}
let temp = data.map((item) => item.taskPathPoints.map((point) => point.barcode))
const idsToUpdate = new Set()
temp.forEach((pair) => {
pair.forEach((id) => {
idsToUpdate.add(id)
})
})
window.coordinatelistFoxe.forEach((item) => {
if (item && idsToUpdate.has(item.id)) {
item.bgcolor = '#A0169D'
} else {
item.bgcolor = ''
}
})
let coordinatelist = window.coordinatelistFoxe
let agvMarkList = []
coordinatelist.forEach((i) => {
agvMarkList.push({ ...i, top: i.y * 1.3 + 'vw', left: i.x * 1.3 + 2 + 'vw' })
})
window.initMarksLine('#bubble-containerFoxe', agvMarkList)
},
},
mounted() {
debugger
let coordinatelist = window.coordinatelistFoxe
let agvMarkList = []
coordinatelist.forEach((i) => {
agvMarkList.push({ ...i, top: i.y * 1.3 + 'vw', left: i.x * 1.3 + 2 + 'vw' })
})
window.initMarksLine('#bubble-containerFoxe', agvMarkList)
// this.getAGVDataOne()
// this.getAGVDataTwo()
// this.getAGVDataThere()
// this.intInterval()
},
}
</script>
<style>
.title-text {
width: 100%;
height: 4vh;
font-size: 3vh;
font-weight: 600;
color: #fff;
text-align: center;
}
</style>