|
@@ -10,15 +10,24 @@
|
10
|
10
|
</div>
|
11
|
11
|
|
12
|
12
|
</el-container>
|
13
|
|
- <div ref="popoverRef" id="popoverRef" class="modelInfo">
|
14
|
|
- <div class="model-detail">
|
15
|
|
- <span v-for="item in classDeviceInfo">
|
16
|
|
-
|
17
|
|
- <span class="title">{{ item && item.name }}: </span>
|
18
|
|
- <span :class="item.online ? 'green' : item.online == 'false' ? 'red' : ''">{{ item && item.value }}
|
19
|
|
- </span>
|
20
|
|
-
|
21
|
|
- </span>
|
|
13
|
+ <div ref="popoverRef" id="popoverRef" class="modelInfo" >
|
|
14
|
+ <div class="model-detail" >
|
|
15
|
+ <div v-for="item in classDeviceInfo" style="margin-bottom: 5px;">
|
|
16
|
+
|
|
17
|
+ <div style="width: 180px;text-align: center;height: 30px;line-height: 30px;font-size: 12px;color: #fff; background-color: #49484890;: blur(20px);">
|
|
18
|
+ {{ item[0].value }}
|
|
19
|
+ </div>
|
|
20
|
+ <div v-for="item2 in item" style="width: 180px;height: 30px;display: flex;align-items: center;">
|
|
21
|
+
|
|
22
|
+ <span style="color: #fff;margin-left: 5px; font-weight: 700;"> {{ item2.name }} :</span>
|
|
23
|
+ <span v-if="item2.value!='在线'" style=" font-family: 100; margin-left: 5px;color: #ffffffeb;">{{ item2.value }}</span>
|
|
24
|
+ <span v-else style=" font-family: 100; margin-left: 5px;color: #10C383;">{{ item2.value }}</span>
|
|
25
|
+ </div>
|
|
26
|
+
|
|
27
|
+ <!-- <span :class="item.online ? 'green' : item.online == 'false' ? 'red' : ''">213
|
|
28
|
+ </span> -->
|
|
29
|
+
|
|
30
|
+ </div>
|
22
|
31
|
</div>
|
23
|
32
|
</div>
|
24
|
33
|
|
|
@@ -144,13 +153,13 @@ export default ({
|
144
|
153
|
})
|
145
|
154
|
const classDeviceInfo = ref([])
|
146
|
155
|
const classDataLoaded = ref(false)
|
147
|
|
- const classDevice = async function (deviceCode) {
|
148
|
|
- let res = await getClassDetail(deviceCode)
|
149
|
|
- console.log("获取到了当前点击物体得详情", res)
|
150
|
|
- classDeviceInfo.value = res.data;
|
151
|
|
- classDataLoaded.value = true
|
|
156
|
+ // const classDevice = async function (deviceCode) {
|
|
157
|
+ // let res = await getClassDetail(deviceCode)
|
|
158
|
+ // console.log("获取到了当前点击物体得详情", res)
|
|
159
|
+ // classDeviceInfo.value = res.data;
|
|
160
|
+ // classDataLoaded.value = true
|
152
|
161
|
|
153
|
|
- }
|
|
162
|
+ // }
|
154
|
163
|
const clickData1 = ref({})
|
155
|
164
|
const mouseClick = function (e) {
|
156
|
165
|
// console.log("屏幕点击位置看", e)
|
|
@@ -186,15 +195,18 @@ export default ({
|
186
|
195
|
console.log('sadasd',json.deviceCode);
|
187
|
196
|
let replacedStr = json.deviceCode.replace("/", "A");
|
188
|
197
|
getClassDetail(replacedStr).then(res => {
|
|
198
|
+ console.log('sad21312',res);
|
189
|
199
|
classDeviceInfo.value = res.data;
|
190
|
|
- classDeviceInfo.value.map(i => {
|
191
|
|
- if (i.value == "在线") {
|
192
|
|
- i.online = true
|
193
|
|
- }
|
194
|
|
- if (i.value == "离线") {
|
195
|
|
- i.online = false
|
196
|
|
- }
|
197
|
|
- })
|
|
200
|
+
|
|
201
|
+ console.log('asd2121',classDeviceInfo.value);
|
|
202
|
+ // classDeviceInfo.value.map(i => {
|
|
203
|
+ // if (i.value == "在线") {
|
|
204
|
+ // i.online = true
|
|
205
|
+ // }
|
|
206
|
+ // if (i.value == "离线") {
|
|
207
|
+ // i.online = false
|
|
208
|
+ // }
|
|
209
|
+ // })
|
198
|
210
|
console.log("json.y ", json,);
|
199
|
211
|
linedomRef.value.style.top = (clickData.value.y) + "px";
|
200
|
212
|
linedomRef.value.style.left = (clickData.value.x) + "px";
|
|
@@ -214,7 +226,7 @@ export default ({
|
214
|
226
|
popoverRef.value.style.left = (json.x - 120) + 'px'
|
215
|
227
|
break;
|
216
|
228
|
case "Right":
|
217
|
|
- popoverRef.value.style.top = (Number(json.y)) + 'px'
|
|
229
|
+ popoverRef.value.style.top = (Number(json.y)) -100+ 'px'
|
218
|
230
|
popoverRef.value.style.left = Number(json.x) + 100 + 'px'
|
219
|
231
|
|
220
|
232
|
break;
|