mifei 1 месяц назад
Родитель
Сommit
6f4282b4c2
5 измененных файлов с 87 добавлено и 79 удалено
  1. 3 3
      index.html
  2. 21 15
      src/components/home.vue
  3. 12 12
      src/components/left.vue
  4. 44 49
      src/components/right.vue
  5. 7 0
      vite.config.js

+ 3 - 3
index.html

@@ -7,9 +7,9 @@
7 7
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8 8
   <script src="/js/leaderline.js"></script>
9 9
   <script src="/config.js"></script>
10
-  <link type="text/css" rel="stylesheet" href="./player.css" />
11
-  <script src="./ueapp.js"></script>
12
-  <script src="./webRtcPlayer.js"></script>
10
+  <link type="text/css" rel="stylesheet" href="/player.css" />
11
+  <script src="/ueapp.js"></script>
12
+  <script src="/webRtcPlayer.js"></script>
13 13
   <title>智慧教室IOC三维系统</title>
14 14
   <style>
15 15
     * {

+ 21 - 15
src/components/home.vue

@@ -115,11 +115,11 @@
115 115
         <template #default="scope">
116 116
           <div
117 117
             :class="{
118
-              normal: scope.row.status == '正常',
119
-              error: scope.row.status == '异常',
118
+              normal: scope.row.heart_status == 0,
119
+              error: scope.row.heart_status == 1,
120 120
             }"
121 121
           >
122
-            <div>{{ scope.row.heart_status }}</div>
122
+            <div>{{ scope.row.heart_status == 0 ? "在线" : "异常" }}</div>
123 123
           </div>
124 124
         </template>
125 125
       </el-table-column>
@@ -132,7 +132,7 @@
132 132
       </el-table-column>
133 133
     </el-table>
134 134
     <el-dialog
135
-      custom-class="deviceDetailsDialog"
135
+      class="deviceDetailsDialog"
136 136
       v-model="isShowDeviceDetails"
137 137
       title="详情"
138 138
       width="15%"
@@ -143,7 +143,14 @@
143 143
     >
144 144
       <div class="details-container">
145 145
         <div>设备名称:{{ deviceDetails.device_name }}</div>
146
-        <div>设备状态:<span :class="{ online: true }">在线</span></div>
146
+        <div>
147
+          设备状态:<span
148
+            :style="{
149
+              color: deviceDetails.heart_status == 0 ? '#30fcaa' : '#ff352e',
150
+            }"
151
+            >{{ deviceDetails.heart_status == 0 ? "在线" : "异常" }}</span
152
+          >
153
+        </div>
147 154
         <div>位置:{{ deviceDetails.teach_name }}</div>
148 155
         <div>型号:{{ deviceDetails.device_type_name }}</div>
149 156
         <!-- <div>质保期:5年</div> -->
@@ -327,11 +334,11 @@ export default {
327 334
     let deviceDetailsList = ref([
328 335
       {
329 336
         name: "多媒体设备",
330
-        status: "正常",
337
+        heart_status: 0,
331 338
       },
332 339
       {
333 340
         name: "多媒体设备",
334
-        status: "异常",
341
+        heart_status: 1,
335 342
       },
336 343
     ]);
337 344
     let deviceDetails = ref({});
@@ -470,24 +477,23 @@ export default {
470 477
 
471 478
       if (JSON.parse(data).MainServiceName == "JianKong") {
472 479
         getVideoUrl({ rtsp: JSON.parse(data).MonitorURL }).then((res) => {
473
-          //   videoData.src = res.data.httpFlv;
474
-          videoData.src =
475
-            "https://weizhi.huanghuai.edu.cn/jk/hls/9159eba9-b4c6-4a4b-a8ff-a1dd94c88bae.m3u8";
480
+            videoData.src = res.data.httpFlv;
481
+          // videoData.src =
482
+          //   "https://weizhi.huanghuai.edu.cn/jk/hls/9159eba9-b4c6-4a4b-a8ff-a1dd94c88bae.m3u8";
476 483
           videoDialog.value = true;
477
-          console.log("32424", videoData.src);
478 484
         });
479 485
       }
480 486
       if (JSON.parse(data).MainServiceName == "SheBeiLieBiao") {
481 487
         equipmentDetailsApi(JSON.parse(data).ClassroomCode).then((res) => {
482 488
           deviceDialog.value = true;
483
-          console.log("res", res);
484
-
485 489
           deviceDetailsList.value = res.data;
486 490
         });
487 491
       }
488 492
       if (JSON.parse(data).MainServiceName == "KanBanShouQi") {
489
-        isShowLeft.value = JSON.parse(data).PutAwayState;
490
-        isShowRight.value = JSON.parse(data).PutAwayState;
493
+        console.log("看看这个-------", Boolean(JSON.parse(data).PutAwayState));
494
+        
495
+        isShowLeft.value = JSON.parse(data).PutAwayState=="true" ? true: false;
496
+        isShowRight.value = JSON.parse(data).PutAwayState=="true" ? true: false;
491 497
       }
492 498
     };
493 499
     const windowSize = function () {

+ 12 - 12
src/components/left.vue

@@ -585,6 +585,10 @@ export default {
585 585
     };
586 586
     window.addEventListener("resize", function () {
587 587
       myChart.value.resize();
588
+      if(scrollContainerHeight.value){
589
+        scrollContainerHeight.value = scrollContainerRef.value.clientHeight;
590
+
591
+      }
588 592
     });
589 593
 
590 594
     // 物联设备类型统计
@@ -692,9 +696,6 @@ export default {
692 696
       //获取教室列表数据
693 697
       getClassRoomList();
694 698
       scrollContainerHeight.value = scrollContainerRef.value.clientHeight;
695
-      window.addEventListener("resize", function () {
696
-        scrollContainerHeight.value = scrollContainerRef.value.clientHeight;
697
-      });
698 699
     });
699 700
 
700 701
     onBeforeUnmount(() => {
@@ -718,6 +719,7 @@ export default {
718 719
       //定时器触发周期
719 720
       let speed = ref(75);
720 721
       timer.value = setInterval(MarqueeTest, speed.value);
722
+      starttimeInterval()
721 723
     }
722 724
     function MarqueeTest() {
723 725
       return;
@@ -846,10 +848,10 @@ export default {
846 848
         gisLeaf: gisLeaf.value,
847 849
       });
848 850
       classRoomList.value = [];
849
-      setTimeout(() => {
851
+      // setTimeout(() => {
850 852
         classRoomList.value = res.data;
851 853
         // scrollRef.value.reset()
852
-      }, 0);
854
+      // }, 0);
853 855
     };
854 856
     let deviceDialog = ref(true);
855 857
     const showDeviceDialog = () => {
@@ -932,8 +934,8 @@ export default {
932 934
 
933 935
 .el-popper {
934 936
   border: 2px solid #1a2d47 !important;
935
-    background: rgba(1, 18, 35, 0.87) !important;
936
-    border-radius: 1px !important;
937
+  background: rgba(1, 18, 35, 0.87) !important;
938
+  border-radius: 1px !important;
937 939
 }
938 940
 .el-dropdown-menu {
939 941
   background: rgba(1, 18, 35, 0.87) !important;
@@ -942,23 +944,21 @@ export default {
942 944
 }
943 945
 .el-dropdown-menu__item {
944 946
   color: rgba(255, 255, 255, 0.75);
945
-  border-radius: 2px !important;border-radius: 2px !important;
947
+  border-radius: 2px !important;
948
+  border-radius: 2px !important;
946 949
 }
947 950
 .popper__arrow::after {
948
-
949 951
   background: rgba(255, 255, 255, 0.12);
950 952
 }
951 953
 .el-dropdown-menu__item:not(.is-disabled):hover {
952
-
953 954
   background: rgba(255, 255, 255, 0.12);
954 955
   color: rgba(255, 255, 255, 0.75);
955 956
 }
956 957
 .el-dropdown-menu__item:not(.is-disabled):hover {
957
-
958 958
   background: rgba(255, 255, 255, 0.12) !important;
959 959
   color: #fff !important;
960 960
 }
961
-.el-dropdown-menu__item:not(.is-disabled):focus{
961
+.el-dropdown-menu__item:not(.is-disabled):focus {
962 962
   background: rgba(255, 255, 255, 0.12) !important;
963 963
   color: #fff !important;
964 964
 }

+ 44 - 49
src/components/right.vue

@@ -98,7 +98,7 @@
98 98
         </el-carousel>
99 99
         <img
100 100
           class="video-border"
101
-          style="height: 100%;width: 100%"
101
+          style="height: 100%; width: 100%"
102 102
           :src="videoBorder"
103 103
           alt=""
104 104
           srcset=""
@@ -124,7 +124,7 @@
124 124
     top="8%"
125 125
     style="z-index: 2015; padding: 0"
126 126
   >
127
-    <videoPlay  v-bind="videoData" />
127
+    <videoPlay v-bind="videoData" />
128 128
 
129 129
     <!-- {{ videoData.src }} -->
130 130
   </el-dialog>
@@ -186,7 +186,7 @@
186 186
     >
187 187
       <div class="details-container">
188 188
         <div>设备名称:多媒体设备</div>
189
-        <div>设备状态:<span :class="{ online: true }">在线</span></div>
189
+        <div>设备状态:<span :style="{ online: true }">在线</span></div>
190 190
         <div>位置:一号教学楼A101</div>
191 191
         <div>型号:教学设备</div>
192 192
         <div>质保期:5年</div>
@@ -395,7 +395,7 @@ export default {
395 395
       console.log("darta", data);
396 396
       isShowDeviceDetails.value = true;
397 397
     };
398
-   
398
+
399 399
     let swiperRef = ref(null);
400 400
     const d1img = ref("./img/d1_1.png");
401 401
     const d12img = ref("./img/d1_2.png");
@@ -472,14 +472,13 @@ export default {
472 472
   }
473 473
 }
474 474
 .deviceDialog {
475
-
476 475
   .el-dialog__header {
477 476
     height: 39px;
478 477
     line-height: 39px;
479 478
     padding: 0;
480 479
     background-color: #1b67d9;
481 480
     margin-right: 0;
482
-      text-indent: 14px;
481
+    text-indent: 14px;
483 482
 
484 483
     .el-dialog__title {
485 484
       color: #fff;
@@ -496,7 +495,6 @@ export default {
496 495
       }
497 496
     }
498 497
   }
499
-
500 498
   .el-dialog__body {
501 499
     // padding: 10px !important;
502 500
     background-color: rgba(0, 0, 0, 0.5) !important;
@@ -564,65 +562,62 @@ export default {
564 562
 }
565 563
 
566 564
 .deviceDetailsDialog {
565
+  .el-dialog__header {
566
+    height: 39px;
567
+    line-height: 39px;
568
+    padding: 0px;
569
+    background-color: #1b67d9;
570
+    margin-right: 0;
571
+    text-indent: 10px;
567 572
 
573
+    .el-dialog__title {
574
+      color: #fff;
575
+      font-family: Inter;
576
+    }
568 577
 
569
-    .el-dialog__header {
570
-        height: 49px;
571
-        line-height: 49px;
572
-        padding: 0px;
573
-        background-color: #1b67d9;
574
-        margin-right: 0;
575
-        text-indent: 10px;
576
-
577
-        .el-dialog__title {
578
-            color: #fff;
579
-            font-family: Inter;
580
-        }
581
-
582
-        .el-dialog__headerbtn {
583
-            top: 0px;
578
+    .el-dialog__headerbtn {
579
+      top: 0px;
584 580
 
585
-            i {
586
-                color: #fff;
587
-                font-size: 20px;
588
-                font-weight: bold;
589
-            }
590
-        }
581
+      i {
582
+        color: #fff;
583
+        font-size: 20px;
584
+        font-weight: bold;
585
+      }
591 586
     }
587
+  }
592 588
 
593
-    .el-dialog__body {
594
-        padding: 10px !important;
595
-        background-color: rgba(0, 0, 0, 0.8) !important;
589
+  .el-dialog__body {
590
+    padding: 10px !important;
591
+    background-color: rgba(0, 0, 0, 0.2) !important;
596 592
 
597
-        .details-container {
598
-            color: #fff;
593
+    .details-container {
594
+      color: #fff;
599 595
 
600
-            /* text/pc/03-55-Regular */
601
-            font-family: "Alibaba PuHuiTi 2.0";
602
-            font-size: 12px;
603
-            font-style: normal;
604
-            font-weight: 400;
605
-            line-height: normal;
606
-            line-height: 30px;
596
+      /* text/pc/03-55-Regular */
597
+      font-family: "Alibaba PuHuiTi 2.0";
598
+      font-size: 12px;
599
+      font-style: normal;
600
+      font-weight: 400;
601
+      line-height: normal;
602
+      line-height: 30px;
607 603
 
608
-            .online {
609
-                color: #30fcaa;
610
-            }
611
-        }
604
+      .online {
605
+        color: #30fcaa !important;
606
+      }
612 607
     }
608
+  }
613 609
 }
614 610
 
615 611
 .el-tag .el-tag--success {
616
-    --el-tag-text-color: #000;
612
+  --el-tag-text-color: #000;
617 613
 }
618
-.d-player-video{
614
+.d-player-video {
619 615
   display: flex;
620 616
 }
621 617
 
622
-
623
-.el-drawer{
618
+.el-drawer {
624 619
   background-color: transparent !important;
625 620
   padding: 0px !important;
626
-  box-shadow:none !important;
621
+  box-shadow: none !important;
627 622
 }
628 623
 </style>

+ 7 - 0
vite.config.js

@@ -14,6 +14,13 @@ import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
14 14
 import postCssPxToRem from "postcss-pxtorem";
15 15
 
16 16
 export default defineConfig({
17
+  assetsDir: "static",
18
+  publicPath: "./", // 确保所有静态资源的路径都是相对于根路径的
19
+  resolve: {
20
+    alias: {
21
+      '@': '/src',
22
+    },
23
+  },
17 24
   base: './',//相对路径
18 25
   build: {
19 26
     minify: 'terser',