|
@@ -1,7 +1,7 @@
|
1
|
1
|
<template>
|
2
|
2
|
<div class="container">
|
3
|
3
|
<div class="header">
|
4
|
|
- <img src="../assets/img/head.png" alt="" />
|
|
4
|
+ <img :src="headImg" alt="" />
|
5
|
5
|
</div>
|
6
|
6
|
<el-container>
|
7
|
7
|
<left></left>
|
|
@@ -41,7 +41,7 @@ import { videoPlay } from "vue3-video-play";
|
41
|
41
|
import CircleProgress from './CircleProgress.vue';
|
42
|
42
|
import Left from './left.vue'
|
43
|
43
|
import Right from './right.vue'
|
44
|
|
-import LeaderLine from "../assets/js/leaderline.js"
|
|
44
|
+import LeaderLine from "../../public/js/leaderline.js"
|
45
|
45
|
import { getClassDetail } from '../request/api.js'
|
46
|
46
|
export default ({
|
47
|
47
|
name: 'Histogram',
|
|
@@ -76,46 +76,7 @@ export default ({
|
76
|
76
|
], //显示所有按钮,
|
77
|
77
|
});
|
78
|
78
|
// 物联设备类型统计
|
79
|
|
- const interDevice = ref(
|
80
|
|
- [
|
81
|
|
- // {
|
82
|
|
- // number: 98,
|
83
|
|
- // color: "#63ABFF",
|
84
|
|
- // icon: 'r1',
|
85
|
|
- // text: "显示系统"
|
86
|
|
- // },
|
87
|
|
- // {
|
88
|
|
- // number: 185,
|
89
|
|
- // color: "#63FFC7",
|
90
|
|
- // icon: 'r2',
|
91
|
|
- // text: "控制设备"
|
92
|
|
- // },
|
93
|
|
- // {
|
94
|
|
- // number: 58,
|
95
|
|
- // color: "#918EFF",
|
96
|
|
- // icon: 'r3',
|
97
|
|
- // text: "音频设备"
|
98
|
|
- // },
|
99
|
|
- // {
|
100
|
|
- // number: 68,
|
101
|
|
- // color: "#00C8E3",
|
102
|
|
- // icon: 'r4',
|
103
|
|
- // text: "录播设备"
|
104
|
|
- // },
|
105
|
|
- // {
|
106
|
|
- // number: 189,
|
107
|
|
- // color: "#FFBB54",
|
108
|
|
- // icon: 'r5',
|
109
|
|
- // text: "环境设备"
|
110
|
|
- // },
|
111
|
|
- // {
|
112
|
|
- // number: 98,
|
113
|
|
- // color: "#00CF78",
|
114
|
|
- // icon: 'r6',
|
115
|
|
- // text: "安全管理"
|
116
|
|
- // },
|
117
|
|
-
|
118
|
|
- ])
|
|
79
|
+ const interDevice = ref([])
|
119
|
80
|
// 位置弹框
|
120
|
81
|
let centerDialogVisible = ref(false)
|
121
|
82
|
// 获取点击点数据
|
|
@@ -251,146 +212,23 @@ export default ({
|
251
|
212
|
}
|
252
|
213
|
|
253
|
214
|
|
254
|
|
-
|
255
|
|
- // linedomRef.value.style.top = json.y + "px";
|
256
|
|
- // linedomRef.value.style.left = json.x + "px";
|
257
|
|
-
|
258
|
|
-
|
259
|
|
- // console.log("看一下---小圆点的值--top", linedomRef.value.style.top)
|
260
|
|
- // console.log("看一下---小圆点的值--left", linedomRef.value.style.left)
|
261
|
|
-
|
262
|
|
- // // 弹出框位置
|
263
|
|
-
|
264
|
|
- // popoverRef.value.style.display = "block"
|
265
|
|
- // switch (json.direction) {
|
266
|
|
- // case "Left":
|
267
|
|
- // popoverRef.value.style.top = json.y - 30 + 'px'
|
268
|
|
- // popoverRef.value.style.left = json.x - 320 + 'px'
|
269
|
|
- // break;
|
270
|
|
- // case "Up":
|
271
|
|
- // popoverRef.value.style.top = (json.y - 350) + 'px'
|
272
|
|
- // popoverRef.value.style.left = (json.x - 120) + 'px'
|
273
|
|
- // break;
|
274
|
|
- // case "Right":
|
275
|
|
- // popoverRef.value.style.top = (Number(json.y)) + 'px'
|
276
|
|
- // popoverRef.value.style.left = Number(json.x) + 100 + 'px'
|
277
|
|
-
|
278
|
|
- // break;
|
279
|
|
- // case "Down":
|
280
|
|
- // popoverRef.value.style.top = (Number(json.y) + 100) + 'px'
|
281
|
|
- // popoverRef.value.style.left = Number(json.x) + 'px'
|
282
|
|
- // break;
|
283
|
|
- // default:
|
284
|
|
- // popoverRef.value.style.top = json.y - 60 + 'px'
|
285
|
|
- // popoverRef.value.style.left = json.x + 'px'
|
286
|
|
-
|
287
|
|
- // break;
|
288
|
|
- // }
|
289
|
|
- // if (lineContainer.value) {
|
290
|
|
- // lineContainer.value.remove()
|
291
|
|
- // }
|
292
|
|
- // setTimeout(() => {
|
293
|
|
- // lineContainer.value = new LeaderLine(linedomRef.value, popoverRef.value, lineStyleOption.value)
|
294
|
|
- // lineContainer.value.show('draw', {
|
295
|
|
- // duration: 1000, //持续时长
|
296
|
|
- // timing: 'ease-in' // 动画函数
|
297
|
|
- // })
|
298
|
|
- // lineContainer.value.endPlugOutline = true;
|
299
|
|
- // lineContainer.value.startPlugOutline = true;
|
300
|
|
- // lineContainer.value.position();
|
301
|
|
- // }, 3000);
|
302
|
|
-
|
|
215
|
+ }
|
|
216
|
+ const getWindowInfo = function () {
|
|
217
|
+ console.log("监听一下窗口是不是改了", lineContainer);
|
|
218
|
+ setTimeout(() => {
|
|
219
|
+ if (lineContainer) {
|
|
220
|
+ console.log("怎么没有变黄啊");
|
|
221
|
+ lineContainer.value.position();
|
|
222
|
+ }
|
|
223
|
+ }, 0);
|
303
|
224
|
|
304
|
225
|
}
|
305
|
226
|
onMounted(() => {
|
306
|
|
- // window.addEventListener('mousedown', mouseClick);
|
307
|
|
-
|
308
|
|
- // 监听一下页面点击情况
|
309
|
|
- // addResponseEventListener("open", (data) => {
|
310
|
|
- // if (data) {
|
311
|
|
- // let json = eval("(" + data + ")");//转对象
|
312
|
|
- // clickData.value = json;
|
313
|
|
- // console.log("clickData---点击的数据", json)
|
314
|
|
- // // console.log("看一下", linedomRef.value.style.top, json, "json")
|
315
|
|
- // visible.value = true
|
316
|
|
- // linedomRef.value.style.top = json.y + "px";
|
317
|
|
- // linedomRef.value.style.left = json.x + "px";
|
318
|
|
-
|
319
|
|
- // // let dot = {
|
320
|
|
- // // x: json.x,
|
321
|
|
- // // y: json.y - 80
|
322
|
|
- // // }
|
323
|
|
- // console.log("看一下---小圆点的值--top", linedomRef.value.style.top)
|
324
|
|
- // console.log("看一下---小圆点的值--left", linedomRef.value.style.left)
|
325
|
|
-
|
326
|
|
- // // 弹出框位置
|
327
|
|
- // // popoverRef.value.style.display = "block"
|
328
|
|
- // // popoverRef.value.style.top = json.y - 60 + 'px'
|
329
|
|
- // // popoverRef.value.style.left = json.x + 'px'
|
330
|
|
- // popoverRef.value.style.display = "block"
|
331
|
|
- // // alert(json.x, json.y)
|
332
|
|
- // switch (json.direction) {
|
333
|
|
- // case "Left":
|
334
|
|
- // // mousemoveHandler(json.x - 380, dot.y)
|
335
|
|
- // popoverRef.value.style.top = json.y - 60 + 'px'
|
336
|
|
- // popoverRef.value.style.left = json.x - 380 + 'px'
|
337
|
|
-
|
338
|
|
- // break;
|
339
|
|
- // case "Up":
|
340
|
|
- // // console.log("在最上面", json.x, json.x - 100);
|
341
|
|
- // // mousemoveHandler(dot.x - 80, dot.y - 200);
|
342
|
|
- // popoverRef.value.style.top = (json.y - 350) + 'px'
|
343
|
|
- // popoverRef.value.style.left = (json.x - 120) + 'px'
|
344
|
|
-
|
345
|
|
- // break;
|
346
|
|
- // case "Right":
|
347
|
|
- // console.log("没有走到这里来吗", 12312);
|
348
|
|
- // popoverRef.value.style.top = (Number(json.y)) + 'px'
|
349
|
|
- // popoverRef.value.style.left = Number(json.x) + 100 + 'px'
|
350
|
|
-
|
351
|
|
- // // mousemoveHandler(Number(json.x) + 30, Number(json.y) - 80)
|
352
|
|
- // break;
|
353
|
|
- // case "Down":
|
354
|
|
- // popoverRef.value.style.top = (Number(json.y) + 100) + 'px'
|
355
|
|
- // popoverRef.value.style.left = Number(json.x) + 'px'
|
356
|
|
- // break;
|
357
|
|
- // default:
|
358
|
|
- // popoverRef.value.style.top = json.y - 60 + 'px'
|
359
|
|
- // popoverRef.value.style.left = json.x + 'px'
|
360
|
|
-
|
361
|
|
- // break;
|
362
|
|
- // }
|
363
|
|
- // if (lineContainer.value) {
|
364
|
|
- // lineContainer.value.remove()
|
365
|
|
- // }
|
366
|
|
- // setTimeout(() => {
|
367
|
|
- // lineContainer.value = new LeaderLine(linedomRef.value, popoverRef.value, lineStyleOption.value)
|
368
|
|
- // lineContainer.value.show('draw', {
|
369
|
|
- // duration: 1000, //持续时长
|
370
|
|
- // timing: 'ease-in' // 动画函数
|
371
|
|
- // })
|
372
|
|
- // lineContainer.value.endPlugOutline = true;
|
373
|
|
- // lineContainer.value.startPlugOutline = true;
|
374
|
|
- // lineContainer.value.position();
|
375
|
|
- // }, 0);
|
376
|
|
-
|
377
|
|
-
|
378
|
|
-
|
379
|
|
- // }
|
380
|
|
- // })
|
381
|
|
-
|
382
|
|
- addResponseEventListener("End", handleResponseFunction)
|
383
|
|
- // addResponseEventListener("End", (data) => {
|
384
|
|
- // let json = eval("(" + data + ")");
|
385
|
|
- // // clickData.value = json;
|
386
|
|
- // // classDevice()
|
387
|
|
- // // // classDevice()
|
388
|
|
- // console.log("移动结束", 123123, data)
|
389
|
|
-
|
390
|
|
- // })
|
|
227
|
+ addResponseEventListener("End", handleResponseFunction);
|
|
228
|
+ window.addEventListener('resize', getWindowInfo);
|
391
|
229
|
|
392
|
230
|
})
|
393
|
|
-
|
|
231
|
+ const headImg = ref('./img/head.png')
|
394
|
232
|
return {
|
395
|
233
|
centerDialogVisible,
|
396
|
234
|
interDevice,
|
|
@@ -406,6 +244,7 @@ export default ({
|
406
|
244
|
lineContainer,
|
407
|
245
|
classDeviceInfo,
|
408
|
246
|
mouseClick,
|
|
247
|
+ headImg
|
409
|
248
|
}
|
410
|
249
|
},
|
411
|
250
|
})
|