Browse Source

背景图,智慧教室修改

huliu 1 year ago
parent
commit
ef3120516f

BIN
public/img/bg.png


+ 1 - 1
src/assets/css/home.scss

@@ -11,7 +11,7 @@
11
         margin-bottom: 20px;
11
         margin-bottom: 20px;
12
         height: 70px;
12
         height: 70px;
13
         width: 100%;
13
         width: 100%;
14
-        top: 0;
14
+        top: 10px;
15
 
15
 
16
         img {
16
         img {
17
             width: 100%;
17
             width: 100%;

+ 2 - 0
src/assets/css/right.scss

@@ -225,6 +225,8 @@
225
                         position: absolute;
225
                         position: absolute;
226
                         top: 0;
226
                         top: 0;
227
                         left: 10px;
227
                         left: 10px;
228
+                        width: 80px;
229
+                        background-color: rgba(0, 0, 0, 0.38);
228
                     }
230
                     }
229
                 }
231
                 }
230
             }
232
             }

+ 3 - 3
src/components/CircleProgress.vue

@@ -3,7 +3,7 @@
3
         <div class="number" v-if="textPosition == 'top'">
3
         <div class="number" v-if="textPosition == 'top'">
4
             <ul class="flex">
4
             <ul class="flex">
5
                 <ScrollNum v-for="(num, idx) of numArr" :key="idx" as="li" :i="num" :delay="idx + 1" />
5
                 <ScrollNum v-for="(num, idx) of numArr" :key="idx" as="li" :i="num" :delay="idx + 1" />
6
-                <span> (人)</span>
6
+                <span></span>
7
             </ul>
7
             </ul>
8
         </div>
8
         </div>
9
     </div>
9
     </div>
@@ -11,8 +11,8 @@
11
         <svg viewBox="0 0 96 96" class="svg-circle-progress">
11
         <svg viewBox="0 0 96 96" class="svg-circle-progress">
12
             <circle r="38" cx="48" cy="48" fill="none" stroke-miterlimit="20" stroke-width="4" class="svg-progress"
12
             <circle r="38" cx="48" cy="48" fill="none" stroke-miterlimit="20" stroke-width="4" class="svg-progress"
13
                 style="stroke-dasharray: 275, 279.602; stroke: rgba(255, 255, 255, 0.19)"></circle>
13
                 style="stroke-dasharray: 275, 279.602; stroke: rgba(255, 255, 255, 0.19)"></circle>
14
-            <circle r="38" cx="48" cy="48" fill="none" stroke-miterlimit="20" stroke-width="4" class="svg-progress"
14
+            <circle r="38" transform="rotate(180 48 48)" cx="48" cy="48" fill="none" stroke-miterlimit="20" stroke-width="4"
15
-                :style="`stroke-dasharray: ${progressValue}, 279.602;stroke:${color};`"></circle>
15
+                class="svg-progress" :style="`stroke-dasharray: ${progressValue}, 279.602;stroke:${color};`"></circle>
16
         </svg>
16
         </svg>
17
         <div class="mask">
17
         <div class="mask">
18
             <slot></slot>
18
             <slot></slot>

+ 16 - 45
src/components/Login.vue

@@ -4,20 +4,11 @@
4
             <img :src="loginimg" alt="" style="">
4
             <img :src="loginimg" alt="" style="">
5
             <span @click="login"> 登录</span>
5
             <span @click="login"> 登录</span>
6
         </div>
6
         </div>
7
-        <div class="slogan">
8
-            <span class="slogan1">
9
-                元宇宙智慧校园
10
-            </span>
11
-            <span class="slogan2">
12
-                校园最好的导游
13
-            </span>
14
 
7
 
15
-        </div>
16
     </div>
8
     </div>
17
 </template>
9
 </template>
18
 
10
 
19
 <script >
11
 <script >
20
-import * as echarts from "echarts";
21
 import { ref } from "vue";
12
 import { ref } from "vue";
22
 // import login from '/''
13
 // import login from '/''
23
 export default ({
14
 export default ({
@@ -44,10 +35,12 @@ export default ({
44
     height: 100%;
35
     height: 100%;
45
     margin: 0;
36
     margin: 0;
46
     padding: 0;
37
     padding: 0;
38
+    overflow: hidden;
47
     // border: 1px solid red;
39
     // border: 1px solid red;
48
-    z-index: 888;
40
+
49
     // background-color: darkcyan;
41
     // background-color: darkcyan;
50
     background: url('/public/img/bg.png');
42
     background: url('/public/img/bg.png');
43
+
51
     background-size: cover;
44
     background-size: cover;
52
     z-index: 888;
45
     z-index: 888;
53
 
46
 
@@ -55,11 +48,18 @@ export default ({
55
 }
48
 }
56
 
49
 
57
 .loginbutton {
50
 .loginbutton {
51
+    position: absolute;
52
+    bottom: 10%;
53
+    left: 46%;
58
     display: flex;
54
     display: flex;
59
-
55
+    background: #6171FF;
60
     align-items: center;
56
     align-items: center;
61
-    position: absolute;
57
+    justify-content: center;
62
-    right: 0;
58
+
59
+    width: 160px;
60
+    border-radius: 20px;
61
+    padding: 10px;
62
+    cursor: pointer;
63
 
63
 
64
     img {
64
     img {
65
         width: 24px;
65
         width: 24px;
@@ -67,42 +67,13 @@ export default ({
67
     }
67
     }
68
 
68
 
69
     span {
69
     span {
70
-        cursor: pointer;
71
         color: #FFF;
70
         color: #FFF;
72
         font-family: PingFang SC;
71
         font-family: PingFang SC;
73
-        font-size: 18px;
72
+        font-size: 20px;
74
         font-style: normal;
73
         font-style: normal;
75
-        font-weight: 700;
74
+        font-weight: 400;
75
+        line-height: 24px;
76
         margin-left: 3px;
76
         margin-left: 3px;
77
     }
77
     }
78
 }
78
 }
79
-
80
-.slogan {
81
-    width: 635px;
82
-    display: flex;
83
-    flex-direction: column;
84
-    // border: 1px solid aliceblue;
85
-    color: #fff;
86
-    // display: ;
87
-    font-family: MF LangQian (Noncommercial);
88
-
89
-    font-size: 64px;
90
-    font-style: normal;
91
-    font-weight: 400;
92
-    line-height: 126px;
93
-    position: absolute;
94
-    bottom: 246px;
95
-    left: 112px;
96
-
97
-    .slogan1 {
98
-        display: flex;
99
-
100
-    }
101
-
102
-    .slogan2 {
103
-        display: flex;
104
-
105
-        justify-content: flex-end
106
-    }
107
-}
108
 </style>
79
 </style>

+ 13 - 12
src/components/right.vue

@@ -58,18 +58,15 @@
58
 
58
 
59
                             <div class="room" v-for="(item, index) in item.activeMonitor.array" :key="index">
59
                             <div class="room" v-for="(item, index) in item.activeMonitor.array" :key="index">
60
                                 <span>{{ item.title }}</span>
60
                                 <span>{{ item.title }}</span>
61
-                                <img :src="deviceImg + 'rb2.png'" alt="" @click="lookVideo(item.src)">
61
+                                <img :src="deviceImg + 'rb2.png'" alt="" @click="lookVideo(item)">
62
-                                <!-- <img :src="'src/assets/img/' + 'rb2' + '.png'" alt="" @click="lookVideo(item.src)"> -->
63
                             </div>
62
                             </div>
64
                         </div>
63
                         </div>
65
 
64
 
66
-                        <p style="margin-top: 5px;">{{ item.activeMonitor.title }}</p>
65
+                        <p style="margin-top: 5px;">{{ item.activeMonitor.title1 }}</p>
67
                         <div class="interactclass">
66
                         <div class="interactclass">
68
-                            <div class="room" v-for="(item, index) in item.activeMonitor.array" :key="index">
67
+                            <div class="room" v-for="(item, index) in item.activeMonitor.array1" :key="index">
69
                                 <span>{{ item.title }}</span>
68
                                 <span>{{ item.title }}</span>
70
                                 <img :src="deviceImg + 'rb2.png'" alt="" @click="lookVideo(item.src)">
69
                                 <img :src="deviceImg + 'rb2.png'" alt="" @click="lookVideo(item.src)">
71
-
72
-                                <!-- <img :src="'src/assets/img/' + 'rb2' + '.png'" alt="" @click="lookVideo(item.src)"> -->
73
                             </div>
70
                             </div>
74
                         </div>
71
                         </div>
75
                     </el-carousel-item>
72
                     </el-carousel-item>
@@ -80,7 +77,7 @@
80
     </el-aside>
77
     </el-aside>
81
 
78
 
82
     <!-- 视频播放弹框 -->
79
     <!-- 视频播放弹框 -->
83
-    <el-dialog class="videoDialog" v-model="videoDialog" title="互动教师1" width="60%" align="center" top="4%">
80
+    <el-dialog class="videoDialog" v-model="videoDialog" :title="dialogTitle" width="60%" align="center" top="4%">
84
         <videoPlay v-bind="videoData" />
81
         <videoPlay v-bind="videoData" />
85
         <!-- {{ videoData.src }} -->
82
         <!-- {{ videoData.src }} -->
86
     </el-dialog>
83
     </el-dialog>
@@ -104,7 +101,7 @@ export default ({
104
             width: "100%", //播放器高度
101
             width: "100%", //播放器高度
105
             height: "100%", //播放器高度
102
             height: "100%", //播放器高度
106
             color: "red", //主题色
103
             color: "red", //主题色
107
-            title: "互动教室", //视频名称
104
+            // title: "互动教室", //视频名称
108
             // src: "https://cdn.jsdelivr.net/gh/xdlumia/files/video-play/IronMan.mp4", //视频源
105
             // src: "https://cdn.jsdelivr.net/gh/xdlumia/files/video-play/IronMan.mp4", //视频源
109
             src: "",
106
             src: "",
110
             type: "m3u8",
107
             type: "m3u8",
@@ -131,12 +128,15 @@ export default ({
131
         });
128
         });
132
         //视频播放弹框
129
         //视频播放弹框
133
         const videoDialog = ref(false)
130
         const videoDialog = ref(false)
131
+        const dialogTitle = ref("")
134
         // 播放视频
132
         // 播放视频
135
-        const lookVideo = function (src) {
133
+        const lookVideo = function (item) {
136
             videoDialog.value = true;
134
             videoDialog.value = true;
137
-            // console.log("点击了播放视频", 12312312, "播放路径", src)
135
+            dialogTitle.value = item.title
138
-            getVideoUrl({ "rtsp": src }).then((res) => {
136
+            console.log("点击了播放视频", 12312312, "播放路径", item)
137
+            getVideoUrl({ "rtsp": item.src }).then((res) => {
139
                 console.log("视频处理", res);
138
                 console.log("视频处理", res);
139
+
140
                 videoData.src = res.data.httpFlv
140
                 videoData.src = res.data.httpFlv
141
             })
141
             })
142
             // videoData.src = src
142
             // videoData.src = src
@@ -190,7 +190,8 @@ export default ({
190
             d12img,
190
             d12img,
191
             d2img,
191
             d2img,
192
             d3img,
192
             d3img,
193
-            deviceImg
193
+            deviceImg,
194
+            dialogTitle
194
         }
195
         }
195
     },
196
     },
196
 })
197
 })

+ 1 - 1
src/request/api.js

@@ -16,4 +16,4 @@ export const getDevice = () => service.get("/wisdomClass/deviceStatistic")
16
 
16
 
17
 export const getClassDetail = (deviceCode) => service.get(`/wisdomClass/deviceDetail/${deviceCode}`)
17
 export const getClassDetail = (deviceCode) => service.get(`/wisdomClass/deviceDetail/${deviceCode}`)
18
 
18
 
19
-export const getVideoUrl = (data) => service.post(`/ioc-server/camera/getUrl`, data)
19
+export const getVideoUrl = (data) => service.post(`/camera/getUrl`, data)

+ 1 - 1
src/request/http.js

@@ -44,7 +44,7 @@ service.interceptors.response.use(
44
                     console.error("网络错误,请稍后再试");
44
                     console.error("网络错误,请稍后再试");
45
                     break;
45
                     break;
46
                 case 404:
46
                 case 404:
47
-                    console.eroor("请求路径出错");
47
+                    console.error("请求路径出错");
48
                     break;
48
                     break;
49
 
49
 
50
                 default:
50
                 default: