Browse Source

图片路径

huliu 1 year ago
parent
commit
4c9180a342

+ 0 - 0
config.js


BIN
dist.zip


+ 2 - 2
index.html

@@ -5,8 +5,8 @@
5 5
   <meta charset="UTF-8" />
6 6
   <link rel="icon" href="/favicon.ico" />
7 7
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
-  <script src="/src/assets/js/leaderline.js"></script>
9
-  <script src="/src/config.js"></script>
8
+  <script src="/js/leaderline.js"></script>
9
+  <script src="/config.js"></script>
10 10
   <title>元宇宙 App</title>
11 11
   <style>
12 12
     * {

+ 1 - 3
src/config.js

@@ -1,7 +1,5 @@
1 1
 window.g = {
2 2
     // 获取数据请求地址
3 3
     BASE_API: "http://192.168.4.219:12397/ioc-server",
4
-
5
-
6
-
4
+    UE_IP: "http://127.0.0.1:80"
7 5
 };

BIN
public/favicon.ico


src/assets/img/1.png → public/img/1.png


src/assets/img/2.png → public/img/2.png


src/assets/img/3.png → public/img/3.png


src/assets/img/4.png → public/img/4.png


src/assets/img/d1.png → public/img/d1.png


src/assets/img/d1_1.png → public/img/d1_1.png


src/assets/img/d1_2.png → public/img/d1_2.png


src/assets/img/d2.png → public/img/d2.png


src/assets/img/d3.png → public/img/d3.png


src/assets/img/head.png → public/img/head.png


src/assets/img/head1.png → public/img/head1.png


src/assets/img/r1.png → public/img/r1.png


src/assets/img/r2.png → public/img/r2.png


src/assets/img/r3.png → public/img/r3.png


src/assets/img/r4.png → public/img/r4.png


src/assets/img/r5.png → public/img/r5.png


src/assets/img/r6.png → public/img/r6.png


src/assets/img/rb1.png → public/img/rb1.png


src/assets/img/rb2.png → public/img/rb2.png


src/assets/js/leaderline.js → public/js/leaderline.js


+ 1 - 1
src/components/UeVideo.vue

@@ -23,7 +23,7 @@ export default {
23 23
 
24 24
       videoInstance = initLoad({
25 25
         context,
26
-        serverUrl: "http://127.0.0.1:80",
26
+        serverUrl: window.g.UE_IP,
27 27
         autoConnection: false,
28 28
         showPlayOverlay: true,
29 29
         qualityControl: true,

+ 16 - 177
src/components/home.vue

@@ -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
 })

+ 6 - 2
src/components/left.vue

@@ -26,7 +26,9 @@
26 26
             <div class="content">
27 27
                 <div class="count" v-for="(item, index) in classCount" :key="index">
28 28
                     <CircleProgress :target-value="item.number" :color="item.color" text-position="bottom">
29
-                        <img :src="'src/assets/img/' + item.imgnumber + '.png'" alt="">
29
+                        <img :src="leftimg + item.imgnumber + '.png'" alt="">
30
+
31
+                        <!-- <img :src="'src/assets/img/' + item.imgnumber + '.png'" alt=""> -->
30 32
                     </CircleProgress>
31 33
                     <div class="text">{{ item.text }}</div>
32 34
                 </div>
@@ -334,6 +336,7 @@ export default ({
334 336
                 }
335 337
             }
336 338
         }
339
+        const leftimg = ref("./img/")
337 340
         return {
338 341
             popoverVisible,
339 342
             classCount,
@@ -346,7 +349,8 @@ export default ({
346 349
             popoverRef,
347 350
             classRoomCount,
348 351
             triggerRef,
349
-            classInfo
352
+            classInfo,
353
+            leftimg
350 354
         }
351 355
     },
352 356
 })

+ 24 - 9
src/components/right.vue

@@ -7,20 +7,20 @@
7 7
             <div class="content">
8 8
                 <div class="logo">
9 9
                     <span>{{ equipmentTotal.total }}</span>
10
-                    <img class="animate" src="../assets/img/d1_1.png" alt="">
11
-                    <img src="../assets/img/d1_2.png" alt="">
10
+                    <img class="animate" :src="d1img" alt="">
11
+                    <img :src="d12img" alt="">
12 12
                     <span><b>总数</b>(个)</span>
13 13
                 </div>
14 14
                 <div class="list">
15 15
                     <div class="item_r">
16
-                        <img src="../assets/img/d2.png" alt="">
16
+                        <img :src="d2img" alt="">
17 17
                         <div class="percent">
18 18
                             在线&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{ equipmentTotal.online }}
19 19
                             <span>(个)</span>
20 20
                         </div>
21 21
                     </div>
22 22
                     <div class="item_r">
23
-                        <img src="../assets/img/d3.png" alt="">
23
+                        <img :src="d3img" alt="">
24 24
                         <div class="percent">
25 25
                             离线&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {{ equipmentTotal.underline }}
26 26
                             <span>(个)</span>
@@ -37,7 +37,8 @@
37 37
             <div class="contentwrap">
38 38
                 <div class="count" v-for="(item, index) in interDevice" :key="index">
39 39
                     <CircleProgress :target-value="item.number" :color="item.color" text-position="top">
40
-                        <img :src="'src/assets/img/' + item.icon + '.png'" alt="">
40
+                        <img :src="deviceImg + item.icon + '.png'" alt="">
41
+                        <!-- <img :src="'src/assets/img/' + item.icon + '.png'" alt=""> -->
41 42
                     </CircleProgress>
42 43
                     <div class="text">{{ item.text }}</div>
43 44
                 </div>
@@ -55,7 +56,8 @@
55 56
                         <div class="interactclass">
56 57
                             <div class="room" v-for="(item, index) in item.activeMonitor.array" :key="index">
57 58
                                 <span>{{ item.title }}</span>
58
-                                <img :src="'src/assets/img/' + 'rb2' + '.png'" alt="" @click="lookVideo(item.src)">
59
+                                <img :src="deviceImg + 'rb2.png'" alt="" @click="lookVideo(item.src)">
60
+                                <!-- <img :src="'src/assets/img/' + 'rb2' + '.png'" alt="" @click="lookVideo(item.src)"> -->
59 61
                             </div>
60 62
                         </div>
61 63
 
@@ -63,7 +65,9 @@
63 65
                         <div class="interactclass">
64 66
                             <div class="room" v-for="(item, index) in item.activeMonitor.array" :key="index">
65 67
                                 <span>{{ item.title }}</span>
66
-                                <img :src="'src/assets/img/' + 'rb2' + '.png'" alt="" @click="lookVideo(item.src)">
68
+                                <img :src="deviceImg + 'rb2.png'" alt="" @click="lookVideo(item.src)">
69
+
70
+                                <!-- <img :src="'src/assets/img/' + 'rb2' + '.png'" alt="" @click="lookVideo(item.src)"> -->
67 71
                             </div>
68 72
                         </div>
69 73
                     </el-carousel-item>
@@ -87,6 +91,7 @@ import { videoPlay } from "vue3-video-play";
87 91
 import CircleProgress from './CircleProgress.vue';
88 92
 import { getDevice } from '../request/api';
89 93
 
94
+
90 95
 export default ({
91 96
     name: 'Histogram',
92 97
     components: { videoPlay, ElCarousel, ElCarouselItem, CircleProgress },
@@ -228,8 +233,13 @@ export default ({
228 233
 
229 234
         onMounted(() => {
230 235
             getDeviceData()
231
-
232 236
         })
237
+        const d1img = ref('./img/d1_1.png');
238
+        const d12img = ref('./img/d1_2.png');
239
+        const d2img = ref('./img/d2.png');
240
+        const d3img = ref('./img/d3.png')
241
+        const deviceImg = ref('./img/')
242
+
233 243
         return {
234 244
             interDevice,
235 245
             videoData,
@@ -237,7 +247,12 @@ export default ({
237 247
             videoDialog,
238 248
             lookVideo,
239 249
             carouselData,
240
-            equipmentTotal
250
+            equipmentTotal,
251
+            d1img,
252
+            d12img,
253
+            d2img,
254
+            d3img,
255
+            deviceImg
241 256
         }
242 257
     },
243 258
 })