Procházet zdrojové kódy

修改配置文件

mifei před 1 měsícem
rodič
revize
6f4282b4c2
5 změnil soubory, kde provedl 87 přidání a 79 odebrání
  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
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
   <meta name="viewport" content="width=device-width, initial-scale=1.0" />
8
   <script src="/js/leaderline.js"></script>
8
   <script src="/js/leaderline.js"></script>
9
   <script src="/config.js"></script>
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
   <title>智慧教室IOC三维系统</title>
13
   <title>智慧教室IOC三维系统</title>
14
   <style>
14
   <style>
15
     * {
15
     * {

+ 21 - 15
src/components/home.vue

@@ -115,11 +115,11 @@
115
         <template #default="scope">
115
         <template #default="scope">
116
           <div
116
           <div
117
             :class="{
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
           </div>
123
           </div>
124
         </template>
124
         </template>
125
       </el-table-column>
125
       </el-table-column>
@@ -132,7 +132,7 @@
132
       </el-table-column>
132
       </el-table-column>
133
     </el-table>
133
     </el-table>
134
     <el-dialog
134
     <el-dialog
135
-      custom-class="deviceDetailsDialog"
135
+      class="deviceDetailsDialog"
136
       v-model="isShowDeviceDetails"
136
       v-model="isShowDeviceDetails"
137
       title="详情"
137
       title="详情"
138
       width="15%"
138
       width="15%"
@@ -143,7 +143,14 @@
143
     >
143
     >
144
       <div class="details-container">
144
       <div class="details-container">
145
         <div>设备名称:{{ deviceDetails.device_name }}</div>
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
         <div>位置:{{ deviceDetails.teach_name }}</div>
154
         <div>位置:{{ deviceDetails.teach_name }}</div>
148
         <div>型号:{{ deviceDetails.device_type_name }}</div>
155
         <div>型号:{{ deviceDetails.device_type_name }}</div>
149
         <!-- <div>质保期:5年</div> -->
156
         <!-- <div>质保期:5年</div> -->
@@ -327,11 +334,11 @@ export default {
327
     let deviceDetailsList = ref([
334
     let deviceDetailsList = ref([
328
       {
335
       {
329
         name: "多媒体设备",
336
         name: "多媒体设备",
330
-        status: "正常",
337
+        heart_status: 0,
331
       },
338
       },
332
       {
339
       {
333
         name: "多媒体设备",
340
         name: "多媒体设备",
334
-        status: "异常",
341
+        heart_status: 1,
335
       },
342
       },
336
     ]);
343
     ]);
337
     let deviceDetails = ref({});
344
     let deviceDetails = ref({});
@@ -470,24 +477,23 @@ export default {
470
 
477
 
471
       if (JSON.parse(data).MainServiceName == "JianKong") {
478
       if (JSON.parse(data).MainServiceName == "JianKong") {
472
         getVideoUrl({ rtsp: JSON.parse(data).MonitorURL }).then((res) => {
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
           videoDialog.value = true;
483
           videoDialog.value = true;
477
-          console.log("32424", videoData.src);
478
         });
484
         });
479
       }
485
       }
480
       if (JSON.parse(data).MainServiceName == "SheBeiLieBiao") {
486
       if (JSON.parse(data).MainServiceName == "SheBeiLieBiao") {
481
         equipmentDetailsApi(JSON.parse(data).ClassroomCode).then((res) => {
487
         equipmentDetailsApi(JSON.parse(data).ClassroomCode).then((res) => {
482
           deviceDialog.value = true;
488
           deviceDialog.value = true;
483
-          console.log("res", res);
484
-
485
           deviceDetailsList.value = res.data;
489
           deviceDetailsList.value = res.data;
486
         });
490
         });
487
       }
491
       }
488
       if (JSON.parse(data).MainServiceName == "KanBanShouQi") {
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
     const windowSize = function () {
499
     const windowSize = function () {

+ 12 - 12
src/components/left.vue

@@ -585,6 +585,10 @@ export default {
585
     };
585
     };
586
     window.addEventListener("resize", function () {
586
     window.addEventListener("resize", function () {
587
       myChart.value.resize();
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
       getClassRoomList();
697
       getClassRoomList();
694
       scrollContainerHeight.value = scrollContainerRef.value.clientHeight;
698
       scrollContainerHeight.value = scrollContainerRef.value.clientHeight;
695
-      window.addEventListener("resize", function () {
696
-        scrollContainerHeight.value = scrollContainerRef.value.clientHeight;
697
-      });
698
     });
699
     });
699
 
700
 
700
     onBeforeUnmount(() => {
701
     onBeforeUnmount(() => {
@@ -718,6 +719,7 @@ export default {
718
       //定时器触发周期
719
       //定时器触发周期
719
       let speed = ref(75);
720
       let speed = ref(75);
720
       timer.value = setInterval(MarqueeTest, speed.value);
721
       timer.value = setInterval(MarqueeTest, speed.value);
722
+      starttimeInterval()
721
     }
723
     }
722
     function MarqueeTest() {
724
     function MarqueeTest() {
723
       return;
725
       return;
@@ -846,10 +848,10 @@ export default {
846
         gisLeaf: gisLeaf.value,
848
         gisLeaf: gisLeaf.value,
847
       });
849
       });
848
       classRoomList.value = [];
850
       classRoomList.value = [];
849
-      setTimeout(() => {
851
+      // setTimeout(() => {
850
         classRoomList.value = res.data;
852
         classRoomList.value = res.data;
851
         // scrollRef.value.reset()
853
         // scrollRef.value.reset()
852
-      }, 0);
854
+      // }, 0);
853
     };
855
     };
854
     let deviceDialog = ref(true);
856
     let deviceDialog = ref(true);
855
     const showDeviceDialog = () => {
857
     const showDeviceDialog = () => {
@@ -932,8 +934,8 @@ export default {
932
 
934
 
933
 .el-popper {
935
 .el-popper {
934
   border: 2px solid #1a2d47 !important;
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
 .el-dropdown-menu {
940
 .el-dropdown-menu {
939
   background: rgba(1, 18, 35, 0.87) !important;
941
   background: rgba(1, 18, 35, 0.87) !important;
@@ -942,23 +944,21 @@ export default {
942
 }
944
 }
943
 .el-dropdown-menu__item {
945
 .el-dropdown-menu__item {
944
   color: rgba(255, 255, 255, 0.75);
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
 .popper__arrow::after {
950
 .popper__arrow::after {
948
-
949
   background: rgba(255, 255, 255, 0.12);
951
   background: rgba(255, 255, 255, 0.12);
950
 }
952
 }
951
 .el-dropdown-menu__item:not(.is-disabled):hover {
953
 .el-dropdown-menu__item:not(.is-disabled):hover {
952
-
953
   background: rgba(255, 255, 255, 0.12);
954
   background: rgba(255, 255, 255, 0.12);
954
   color: rgba(255, 255, 255, 0.75);
955
   color: rgba(255, 255, 255, 0.75);
955
 }
956
 }
956
 .el-dropdown-menu__item:not(.is-disabled):hover {
957
 .el-dropdown-menu__item:not(.is-disabled):hover {
957
-
958
   background: rgba(255, 255, 255, 0.12) !important;
958
   background: rgba(255, 255, 255, 0.12) !important;
959
   color: #fff !important;
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
   background: rgba(255, 255, 255, 0.12) !important;
962
   background: rgba(255, 255, 255, 0.12) !important;
963
   color: #fff !important;
963
   color: #fff !important;
964
 }
964
 }

+ 44 - 49
src/components/right.vue

@@ -98,7 +98,7 @@
98
         </el-carousel>
98
         </el-carousel>
99
         <img
99
         <img
100
           class="video-border"
100
           class="video-border"
101
-          style="height: 100%;width: 100%"
101
+          style="height: 100%; width: 100%"
102
           :src="videoBorder"
102
           :src="videoBorder"
103
           alt=""
103
           alt=""
104
           srcset=""
104
           srcset=""
@@ -124,7 +124,7 @@
124
     top="8%"
124
     top="8%"
125
     style="z-index: 2015; padding: 0"
125
     style="z-index: 2015; padding: 0"
126
   >
126
   >
127
-    <videoPlay  v-bind="videoData" />
127
+    <videoPlay v-bind="videoData" />
128
 
128
 
129
     <!-- {{ videoData.src }} -->
129
     <!-- {{ videoData.src }} -->
130
   </el-dialog>
130
   </el-dialog>
@@ -186,7 +186,7 @@
186
     >
186
     >
187
       <div class="details-container">
187
       <div class="details-container">
188
         <div>设备名称:多媒体设备</div>
188
         <div>设备名称:多媒体设备</div>
189
-        <div>设备状态:<span :class="{ online: true }">在线</span></div>
189
+        <div>设备状态:<span :style="{ online: true }">在线</span></div>
190
         <div>位置:一号教学楼A101</div>
190
         <div>位置:一号教学楼A101</div>
191
         <div>型号:教学设备</div>
191
         <div>型号:教学设备</div>
192
         <div>质保期:5年</div>
192
         <div>质保期:5年</div>
@@ -395,7 +395,7 @@ export default {
395
       console.log("darta", data);
395
       console.log("darta", data);
396
       isShowDeviceDetails.value = true;
396
       isShowDeviceDetails.value = true;
397
     };
397
     };
398
-   
398
+
399
     let swiperRef = ref(null);
399
     let swiperRef = ref(null);
400
     const d1img = ref("./img/d1_1.png");
400
     const d1img = ref("./img/d1_1.png");
401
     const d12img = ref("./img/d1_2.png");
401
     const d12img = ref("./img/d1_2.png");
@@ -472,14 +472,13 @@ export default {
472
   }
472
   }
473
 }
473
 }
474
 .deviceDialog {
474
 .deviceDialog {
475
-
476
   .el-dialog__header {
475
   .el-dialog__header {
477
     height: 39px;
476
     height: 39px;
478
     line-height: 39px;
477
     line-height: 39px;
479
     padding: 0;
478
     padding: 0;
480
     background-color: #1b67d9;
479
     background-color: #1b67d9;
481
     margin-right: 0;
480
     margin-right: 0;
482
-      text-indent: 14px;
481
+    text-indent: 14px;
483
 
482
 
484
     .el-dialog__title {
483
     .el-dialog__title {
485
       color: #fff;
484
       color: #fff;
@@ -496,7 +495,6 @@ export default {
496
       }
495
       }
497
     }
496
     }
498
   }
497
   }
499
-
500
   .el-dialog__body {
498
   .el-dialog__body {
501
     // padding: 10px !important;
499
     // padding: 10px !important;
502
     background-color: rgba(0, 0, 0, 0.5) !important;
500
     background-color: rgba(0, 0, 0, 0.5) !important;
@@ -564,65 +562,62 @@ export default {
564
 }
562
 }
565
 
563
 
566
 .deviceDetailsDialog {
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
 .el-tag .el-tag--success {
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
   display: flex;
615
   display: flex;
620
 }
616
 }
621
 
617
 
622
-
623
-.el-drawer{
618
+.el-drawer {
624
   background-color: transparent !important;
619
   background-color: transparent !important;
625
   padding: 0px !important;
620
   padding: 0px !important;
626
-  box-shadow:none !important;
621
+  box-shadow: none !important;
627
 }
622
 }
628
 </style>
623
 </style>

+ 7 - 0
vite.config.js

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