Ver código fonte

样式调整

huliu 1 ano atrás
pai
commit
993589c759
3 arquivos alterados com 48 adições e 113 exclusões
  1. 33 2
      src/components/UeVideo.vue
  2. 15 40
      src/components/home.vue
  3. 0 71
      src/components/right.vue

+ 33 - 2
src/components/UeVideo.vue

@@ -1,6 +1,7 @@
1
 
1
 
2
 <template>
2
 <template>
3
   <div ref="video" id="player"></div>
3
   <div ref="video" id="player"></div>
4
+  <Login :class="loginShow ? '' : 'hidden'"></Login>
4
   <home></home>
5
   <home></home>
5
   <!-- <div @click="toUE" style="position: absolute;top: 5%; left: 50%;background-color: darkcyan;z-index: 200">向UE发信息</div> -->
6
   <!-- <div @click="toUE" style="position: absolute;top: 5%; left: 50%;background-color: darkcyan;z-index: 200">向UE发信息</div> -->
6
 </template>
7
 </template>
@@ -17,13 +18,26 @@ export default {
17
   setup(props, context) {
18
   setup(props, context) {
18
     let video = ref(null);
19
     let video = ref(null);
19
     let videoInstance = ref(null);
20
     let videoInstance = ref(null);
21
+    const loginShow = ref(true);
22
+    // 获取用户信息
23
+    const getUserInfo = (url) => {
24
+      let userurl = "   https://weizhi.huanghuai.edu.cn/cmccr-server/center/cas/v1/getUser?casLoginUrl=https://cas.huanghuai.edu.cn/cas/serviceValidate?"
25
+        + url + "&service=https://weizhi.huanghuai.edu.cn/cmips/"
26
+      // axios.get(userurl).then(res => {
20
 
27
 
28
+      // })
29
+      console.log("是否有url", url)
30
+      if (url) {
31
+        loginShow.value = false
32
+      }
33
+
34
+    }
21
     onMounted(() => {
35
     onMounted(() => {
22
 
36
 
23
       videoInstance = initLoad({
37
       videoInstance = initLoad({
24
         context,
38
         context,
25
         serverUrl: window.g.UE_IP,
39
         serverUrl: window.g.UE_IP,
26
-        autoConnection: false,
40
+        autoConnection: true,
27
         showPlayOverlay: true,
41
         showPlayOverlay: true,
28
         qualityControl: true,
42
         qualityControl: true,
29
         inputOptions: {
43
         inputOptions: {
@@ -33,6 +47,19 @@ export default {
33
       });
47
       });
34
       console.log("video.videoInstance", videoInstance);
48
       console.log("video.videoInstance", videoInstance);
35
 
49
 
50
+      let search = window.location.href.split("?")[1];
51
+      getUserInfo(search)
52
+      // console.log(search, "编码")
53
+      // let code = result.split("?")[0]; //去掉&之后的冗余部分
54
+
55
+      // console.log(result);
56
+      // // window.addEventListener('hashchange', pathChange);
57
+      // const searchParams = currentUrl.searchParams;
58
+      // let ticket = searchParams.get("ticket"); // 'devpoint'
59
+      // console.log("ticket", ticket);
60
+      // searchParams.get("page"); // '1'
61
+
62
+
36
     });
63
     });
37
     // function handleResponseFunction(data) {
64
     // function handleResponseFunction(data) {
38
     //   console.log("从UE返回过来的值", data)
65
     //   console.log("从UE返回过来的值", data)
@@ -47,7 +74,7 @@ export default {
47
 
74
 
48
     return {
75
     return {
49
       video,
76
       video,
50
-      toUE
77
+      loginShow
51
     };
78
     };
52
   },
79
   },
53
 };
80
 };
@@ -59,4 +86,8 @@ export default {
59
   position: absolute;
86
   position: absolute;
60
   overflow: hidden;
87
   overflow: hidden;
61
 }
88
 }
89
+
90
+.hidden {
91
+  display: none;
92
+}
62
 </style>
93
 </style>

+ 15 - 40
src/components/home.vue

@@ -1,5 +1,4 @@
1
 <template>
1
 <template>
2
-    <!-- <Login></Login> -->
3
     <div class="container">
2
     <div class="container">
4
         <div class="header">
3
         <div class="header">
5
             <img :src="headImg" alt="" />
4
             <img :src="headImg" alt="" />
@@ -7,20 +6,14 @@
7
         <el-container>
6
         <el-container>
8
             <left></left>
7
             <left></left>
9
             <right></right>
8
             <right></right>
10
-            <div ref="linedomRef"
9
+            <div ref="linedomRef" style="width:1px;height:1px;position: absolute;z-index: 228;background:#ccc;">
11
-                style="width:1px;height:1px;position: absolute;z-index: 228;border-radius:15px;background:#ccc;border: 1px solid darkcyan;">
12
             </div>
10
             </div>
13
 
11
 
14
         </el-container>
12
         </el-container>
15
-
16
-
17
-
18
         <div ref="popoverRef" id="popoverRef" class="modelInfo">
13
         <div ref="popoverRef" id="popoverRef" class="modelInfo">
19
             <div class="model-detail">
14
             <div class="model-detail">
20
-
21
                 <span v-for="item in classDeviceInfo">
15
                 <span v-for="item in classDeviceInfo">
22
-                    <!-- {{ item }} -->
16
+
23
-                    <!-- {{ item.value === "在线" }} -->
24
                     <span class="title">{{ item && item.name }}: </span>
17
                     <span class="title">{{ item && item.name }}: </span>
25
                     <span :class="item.online ? 'green' : item.online == 'false' ? 'red' : ''">{{ item && item.value }}
18
                     <span :class="item.online ? 'green' : item.online == 'false' ? 'red' : ''">{{ item && item.value }}
26
                     </span>
19
                     </span>
@@ -31,7 +24,7 @@
31
 
24
 
32
 
25
 
33
         <!-- 视频播放弹框 -->
26
         <!-- 视频播放弹框 -->
34
-        <el-dialog class="videoDialog" v-model="videoDialog" title="互动教师1" width="60%" align="center" top="4%">
27
+        <el-dialog class="videoDialog" v-model="videoDialog" :title="titleDialog" width="60%" align="center" top="4%">
35
             <videoPlay v-bind="videoData" @play="onPlay" />
28
             <videoPlay v-bind="videoData" @play="onPlay" />
36
         </el-dialog>
29
         </el-dialog>
37
     </div>
30
     </div>
@@ -58,13 +51,15 @@ export default ({
58
     name: 'Histogram',
51
     name: 'Histogram',
59
     components: { Login, Left, Right, ElScrollbar, ElPagination, ElDialog, videoPlay, ElCarousel, ElCarouselItem, CircleProgress },
52
     components: { Login, Left, Right, ElScrollbar, ElPagination, ElDialog, videoPlay, ElCarousel, ElCarouselItem, CircleProgress },
60
     setup() {
53
     setup() {
54
+        const titleDialog = ref("")
61
         // 视频数据
55
         // 视频数据
62
         const videoData = reactive({
56
         const videoData = reactive({
63
             width: "100%", //播放器高度
57
             width: "100%", //播放器高度
64
             height: "100%", //播放器高度
58
             height: "100%", //播放器高度
65
             color: "red", //主题色
59
             color: "red", //主题色
66
             title: "互动教室", //视频名称
60
             title: "互动教室", //视频名称
67
-            src: "https://cdn.jsdelivr.net/gh/xdlumia/files/video-play/IronMan.mp4", //视频源
61
+            // src: "https://cdn.jsdelivr.net/gh/xdlumia/files/video-play/IronMan.mp4", //视频源
62
+            src: '',
68
             muted: false, //静音
63
             muted: false, //静音
69
             webFullScreen: false,
64
             webFullScreen: false,
70
             // speedRate: ["0.75", "1.0", "1.25", "1.5", "2.0"], //播放倍速
65
             // speedRate: ["0.75", "1.0", "1.25", "1.5", "2.0"], //播放倍速
@@ -119,7 +114,6 @@ export default ({
119
         const videoDialog = ref(false)
114
         const videoDialog = ref(false)
120
         // 播放视频
115
         // 播放视频
121
         const lookVideo = function () {
116
         const lookVideo = function () {
122
-
123
             videoDialog.value = true;
117
             videoDialog.value = true;
124
             console.log("点击了播放视频", 12312312)
118
             console.log("点击了播放视频", 12312312)
125
         }
119
         }
@@ -167,26 +161,25 @@ export default ({
167
         }
161
         }
168
         const handleResponseFunction = (data) => {
162
         const handleResponseFunction = (data) => {
169
             // console.log("从UE返回过来的值", data)
163
             // console.log("从UE返回过来的值", data)
170
-            console.log("重新变了坐标", 2423423423);
171
             let json = eval("(" + data + ")");//转对象
164
             let json = eval("(" + data + ")");//转对象
172
-            clickData.value = json;
165
+            // clickData.value = json;
173
             console.log("clickData---点击的数据", json)
166
             console.log("clickData---点击的数据", json)
167
+            if (json.videoUrl) {
168
+                videoDialog.value = true;
169
+                videoData.src = json.videoUrl
170
+                titleDialog.value = "互动教室"
171
+                return
172
+            }
174
             if (json.deviceCode) {
173
             if (json.deviceCode) {
175
                 getClassDetail(json.deviceCode).then(res => {
174
                 getClassDetail(json.deviceCode).then(res => {
176
                     classDeviceInfo.value = res.data;
175
                     classDeviceInfo.value = res.data;
177
                     classDeviceInfo.value.map(i => {
176
                     classDeviceInfo.value.map(i => {
178
-                        // if (i.name === "设备状态") {
179
-                        //     i.online = true
180
-                        // } else {
181
-                        //     i.online = "no"
182
-                        // }
183
                         if (i.value == "在线") {
177
                         if (i.value == "在线") {
184
                             i.online = true
178
                             i.online = true
185
                         }
179
                         }
186
                         if (i.value == "离线") {
180
                         if (i.value == "离线") {
187
                             i.online = false
181
                             i.online = false
188
                         }
182
                         }
189
-                        // i.online = i.name === "设备状态" ? true : false
190
                     })
183
                     })
191
                     console.log("json.y ", json,);
184
                     console.log("json.y ", json,);
192
                     linedomRef.value.style.top = (clickData.value.y) + "px";
185
                     linedomRef.value.style.top = (clickData.value.y) + "px";
@@ -245,33 +238,14 @@ export default ({
245
             // console.log("监听一下窗口是不是改了--click", lineContainer);
238
             // console.log("监听一下窗口是不是改了--click", lineContainer);
246
             callUIInteraction("windowSizeChange")
239
             callUIInteraction("windowSizeChange")
247
         }
240
         }
248
-        const getUserInfo = (url) => {
249
-            let userurl = "   https://weizhi.huanghuai.edu.cn/cmccr-server/center/cas/v1/getUser?casLoginUrl=https://cas.huanghuai.edu.cn/cas/serviceValidate?"
250
-                + url + "&service=https://weizhi.huanghuai.edu.cn/cmips/"
251
-            // axios.get(userurl).then(res => {
252
-
253
-            // })
254
-
255
 
241
 
256
 
242
 
257
-        }
258
         onMounted(() => {
243
         onMounted(() => {
259
             addResponseEventListener("444", handleResponseFunction);
244
             addResponseEventListener("444", handleResponseFunction);
260
             window.addEventListener('resize', windowSize);
245
             window.addEventListener('resize', windowSize);
261
             // window.addEventListener('click', windowSize);
246
             // window.addEventListener('click', windowSize);
262
             // addResponseEventListener("widowSizeChange", windoChangeFunction);
247
             // addResponseEventListener("widowSizeChange", windoChangeFunction);
263
 
248
 
264
-            let search = window.location.hash.split("?")[1];
265
-            getUserInfo(search)
266
-            // console.log(search, "编码")
267
-            // let code = result.split("?")[0]; //去掉&之后的冗余部分
268
-
269
-            // console.log(result);
270
-            // // window.addEventListener('hashchange', pathChange);
271
-            // const searchParams = currentUrl.searchParams;
272
-            // let ticket = searchParams.get("ticket"); // 'devpoint'
273
-            // console.log("ticket", ticket);
274
-            // searchParams.get("page"); // '1'
275
 
249
 
276
 
250
 
277
         })
251
         })
@@ -291,7 +265,8 @@ export default ({
291
             lineContainer,
265
             lineContainer,
292
             classDeviceInfo,
266
             classDeviceInfo,
293
             mouseClick,
267
             mouseClick,
294
-            headImg
268
+            headImg,
269
+            titleDialog
295
         }
270
         }
296
     },
271
     },
297
 })
272
 })

+ 0 - 71
src/components/right.vue

@@ -141,77 +141,6 @@ export default ({
141
         }
141
         }
142
         // 物联设备
142
         // 物联设备
143
         let equipmentTotal = ref({})
143
         let equipmentTotal = ref({})
144
-        //智慧教室实时监控---数据
145
-        // const carouselData = ref([
146
-        //     {
147
-        //         activeMonitor: {
148
-        //             title: "多屏互动教室",
149
-        //             array: [
150
-        //                 {
151
-        //                     title: "互动教室22",
152
-        //                     poster: 'rb1',
153
-        //                     src: '',
154
-        //                 },
155
-        //                 {
156
-        //                     title: "互动教室22",
157
-        //                     poster: 'rb2',
158
-        //                     src: '',
159
-        //                 }
160
-        //             ]
161
-        //         },
162
-        //         wisdomMonitor:
163
-        //         {
164
-        //             title: "多屏智慧教室",
165
-        //             array: [
166
-        //                 {
167
-        //                     title: "智慧教室11",
168
-        //                     poster: 'rb1',
169
-        //                     src: '',
170
-        //                 },
171
-        //                 {
172
-        //                     title: "智慧教室11",
173
-        //                     poster: 'rb2',
174
-        //                     src: '',
175
-        //                 }
176
-        //             ]
177
-        //         }
178
-        //     },
179
-        //     {
180
-        //         activeMonitor: {
181
-        //             title: "多屏互动教室",
182
-        //             array: [
183
-        //                 {
184
-        //                     title: "互动教室33",
185
-        //                     poster: 'rb1',
186
-        //                     src: '',
187
-        //                 },
188
-        //                 {
189
-        //                     title: "互动教室33",
190
-        //                     poster: 'rb2',
191
-        //                     src: '',
192
-        //                 }
193
-        //             ]
194
-        //         },
195
-
196
-        //         wisdomMonitor:
197
-        //         {
198
-        //             title: "多屏智慧教室",
199
-        //             array: [
200
-        //                 {
201
-        //                     title: "智慧教室22",
202
-        //                     poster: 'rb1',
203
-        //                     src: '',
204
-        //                 },
205
-        //                 {
206
-        //                     title: "智慧教室22",
207
-        //                     poster: 'rb2',
208
-        //                     src: '',
209
-        //                 }
210
-        //             ]
211
-        //         }
212
-        //     }
213
-
214
-        // ]);
215
         // 物联设备类型统计
144
         // 物联设备类型统计
216
         let interDevice = ref([])
145
         let interDevice = ref([])
217
         // 智慧教室
146
         // 智慧教室