|
@@ -1,5 +1,4 @@
|
1
|
1
|
<template>
|
2
|
|
- <!-- <Login></Login> -->
|
3
|
2
|
<div class="container">
|
4
|
3
|
<div class="header">
|
5
|
4
|
<img :src="headImg" alt="" />
|
|
@@ -7,20 +6,14 @@
|
7
|
6
|
<el-container>
|
8
|
7
|
<left></left>
|
9
|
8
|
<right></right>
|
10
|
|
- <div ref="linedomRef"
|
11
|
|
- style="width:1px;height:1px;position: absolute;z-index: 228;border-radius:15px;background:#ccc;border: 1px solid darkcyan;">
|
|
9
|
+ <div ref="linedomRef" style="width:1px;height:1px;position: absolute;z-index: 228;background:#ccc;">
|
12
|
10
|
</div>
|
13
|
11
|
|
14
|
12
|
</el-container>
|
15
|
|
-
|
16
|
|
-
|
17
|
|
-
|
18
|
13
|
<div ref="popoverRef" id="popoverRef" class="modelInfo">
|
19
|
14
|
<div class="model-detail">
|
20
|
|
-
|
21
|
15
|
<span v-for="item in classDeviceInfo">
|
22
|
|
- <!-- {{ item }} -->
|
23
|
|
- <!-- {{ item.value === "在线" }} -->
|
|
16
|
+
|
24
|
17
|
<span class="title">{{ item && item.name }}: </span>
|
25
|
18
|
<span :class="item.online ? 'green' : item.online == 'false' ? 'red' : ''">{{ item && item.value }}
|
26
|
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
|
28
|
<videoPlay v-bind="videoData" @play="onPlay" />
|
36
|
29
|
</el-dialog>
|
37
|
30
|
</div>
|
|
@@ -58,13 +51,15 @@ export default ({
|
58
|
51
|
name: 'Histogram',
|
59
|
52
|
components: { Login, Left, Right, ElScrollbar, ElPagination, ElDialog, videoPlay, ElCarousel, ElCarouselItem, CircleProgress },
|
60
|
53
|
setup() {
|
|
54
|
+ const titleDialog = ref("")
|
61
|
55
|
// 视频数据
|
62
|
56
|
const videoData = reactive({
|
63
|
57
|
width: "100%", //播放器高度
|
64
|
58
|
height: "100%", //播放器高度
|
65
|
59
|
color: "red", //主题色
|
66
|
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
|
63
|
muted: false, //静音
|
69
|
64
|
webFullScreen: false,
|
70
|
65
|
// speedRate: ["0.75", "1.0", "1.25", "1.5", "2.0"], //播放倍速
|
|
@@ -119,7 +114,6 @@ export default ({
|
119
|
114
|
const videoDialog = ref(false)
|
120
|
115
|
// 播放视频
|
121
|
116
|
const lookVideo = function () {
|
122
|
|
-
|
123
|
117
|
videoDialog.value = true;
|
124
|
118
|
console.log("点击了播放视频", 12312312)
|
125
|
119
|
}
|
|
@@ -167,26 +161,25 @@ export default ({
|
167
|
161
|
}
|
168
|
162
|
const handleResponseFunction = (data) => {
|
169
|
163
|
// console.log("从UE返回过来的值", data)
|
170
|
|
- console.log("重新变了坐标", 2423423423);
|
171
|
164
|
let json = eval("(" + data + ")");//转对象
|
172
|
|
- clickData.value = json;
|
|
165
|
+ // clickData.value = json;
|
173
|
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
|
173
|
if (json.deviceCode) {
|
175
|
174
|
getClassDetail(json.deviceCode).then(res => {
|
176
|
175
|
classDeviceInfo.value = res.data;
|
177
|
176
|
classDeviceInfo.value.map(i => {
|
178
|
|
- // if (i.name === "设备状态") {
|
179
|
|
- // i.online = true
|
180
|
|
- // } else {
|
181
|
|
- // i.online = "no"
|
182
|
|
- // }
|
183
|
177
|
if (i.value == "在线") {
|
184
|
178
|
i.online = true
|
185
|
179
|
}
|
186
|
180
|
if (i.value == "离线") {
|
187
|
181
|
i.online = false
|
188
|
182
|
}
|
189
|
|
- // i.online = i.name === "设备状态" ? true : false
|
190
|
183
|
})
|
191
|
184
|
console.log("json.y ", json,);
|
192
|
185
|
linedomRef.value.style.top = (clickData.value.y) + "px";
|
|
@@ -245,33 +238,14 @@ export default ({
|
245
|
238
|
// console.log("监听一下窗口是不是改了--click", lineContainer);
|
246
|
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
|
243
|
onMounted(() => {
|
259
|
244
|
addResponseEventListener("444", handleResponseFunction);
|
260
|
245
|
window.addEventListener('resize', windowSize);
|
261
|
246
|
// window.addEventListener('click', windowSize);
|
262
|
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
|
265
|
lineContainer,
|
292
|
266
|
classDeviceInfo,
|
293
|
267
|
mouseClick,
|
294
|
|
- headImg
|
|
268
|
+ headImg,
|
|
269
|
+ titleDialog
|
295
|
270
|
}
|
296
|
271
|
},
|
297
|
272
|
})
|