Quellcode durchsuchen

退出教室消失面板

zy1125 vor 1 Jahr
Ursprung
Commit
c25f8ecd52
2 geänderte Dateien mit 31 neuen und 4 gelöschten Zeilen
  1. 23 3
      src/components/home.vue
  2. 8 1
      src/components/left.vue

+ 23 - 3
src/components/home.vue

@@ -4,7 +4,7 @@
4
             <img :src="headImg" alt="" />
4
             <img :src="headImg" alt="" />
5
         </div>
5
         </div>
6
         <el-container>
6
         <el-container>
7
-            <Left  @childMethod="childMethod"></Left>
7
+            <Left ref="childRef" @childMethod="childMethod"></Left>
8
             <right></right>
8
             <right></right>
9
             <div ref="linedomRef" style="width:1px;height:1px;position: absolute;z-index: 228;background:#ccc;">
9
             <div ref="linedomRef" style="width:1px;height:1px;position: absolute;z-index: 228;background:#ccc;">
10
             </div>
10
             </div>
@@ -205,9 +205,28 @@ export default ({
205
         }
205
         }
206
 
206
 
207
 
207
 
208
-
208
+        const childRef = ref(null);
209
         const handleResponseFunction = (data) => {
209
         const handleResponseFunction = (data) => {
210
             console.log("从UE返回过来的值", data)
210
             console.log("从UE返回过来的值", data)
211
+
212
+            //如果退出教室
213
+            if(data=='quit_class'){
214
+
215
+                //消失线
216
+                lineContainer.value.remove()
217
+                lineContainer.value = null
218
+                //消失点击详情
219
+                popoverRef.value.style.display = "none"
220
+                //消失面板
221
+                if (childRef.value) {
222
+                    childRef.value.clearPanel();
223
+                }
224
+
225
+                
226
+            }
227
+
228
+
229
+
211
             if (data == "{isrotate}") {
230
             if (data == "{isrotate}") {
212
                 // console.log("旋转场景了", lineContainer, lineContainer.value);
231
                 // console.log("旋转场景了", lineContainer, lineContainer.value);
213
                 if (lineContainer.value) {
232
                 if (lineContainer.value) {
@@ -346,7 +365,8 @@ export default ({
346
             headImg,
365
             headImg,
347
             titleDialog,
366
             titleDialog,
348
             orientation,
367
             orientation,
349
-            childMethod
368
+            childMethod,
369
+            childRef
350
     
370
     
351
         }
371
         }
352
     },
372
     },

+ 8 - 1
src/components/left.vue

@@ -176,6 +176,12 @@ export default ({
176
         const interDevice = ref([])
176
         const interDevice = ref([])
177
 
177
 
178
         const roomVisible = ref(false)
178
         const roomVisible = ref(false)
179
+
180
+        //消失面板
181
+        const clearPanel=()=>{
182
+            roomVisible.value = false;
183
+        }
184
+
179
         const popoverRef = ref(null)
185
         const popoverRef = ref(null)
180
         const triggerRef = ref({
186
         const triggerRef = ref({
181
             getBoundingClientRect() {
187
             getBoundingClientRect() {
@@ -334,7 +340,8 @@ export default ({
334
             classRoomCount,
340
             classRoomCount,
335
             triggerRef,
341
             triggerRef,
336
             classInfo,
342
             classInfo,
337
-            leftimg
343
+            leftimg,
344
+            clearPanel
338
         }
345
         }
339
     },
346
     },
340
 })
347
 })