Browse Source

退出教室消失面板

zy1125 1 year ago
parent
commit
c25f8ecd52
2 changed files with 31 additions and 4 deletions
  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 4
             <img :src="headImg" alt="" />
5 5
         </div>
6 6
         <el-container>
7
-            <Left  @childMethod="childMethod"></Left>
7
+            <Left ref="childRef" @childMethod="childMethod"></Left>
8 8
             <right></right>
9 9
             <div ref="linedomRef" style="width:1px;height:1px;position: absolute;z-index: 228;background:#ccc;">
10 10
             </div>
@@ -205,9 +205,28 @@ export default ({
205 205
         }
206 206
 
207 207
 
208
-
208
+        const childRef = ref(null);
209 209
         const handleResponseFunction = (data) => {
210 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 230
             if (data == "{isrotate}") {
212 231
                 // console.log("旋转场景了", lineContainer, lineContainer.value);
213 232
                 if (lineContainer.value) {
@@ -346,7 +365,8 @@ export default ({
346 365
             headImg,
347 366
             titleDialog,
348 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 176
         const interDevice = ref([])
177 177
 
178 178
         const roomVisible = ref(false)
179
+
180
+        //消失面板
181
+        const clearPanel=()=>{
182
+            roomVisible.value = false;
183
+        }
184
+
179 185
         const popoverRef = ref(null)
180 186
         const triggerRef = ref({
181 187
             getBoundingClientRect() {
@@ -334,7 +340,8 @@ export default ({
334 340
             classRoomCount,
335 341
             triggerRef,
336 342
             classInfo,
337
-            leftimg
343
+            leftimg,
344
+            clearPanel
338 345
         }
339 346
     },
340 347
 })