Parcourir la source

查看教室设备信息消失

zy1125 il y a 1 an
Parent
commit
d74ee00069
2 fichiers modifiés avec 22 ajouts et 2 suppressions
  1. 14 1
      src/components/home.vue
  2. 8 1
      src/components/left.vue

+ 14 - 1
src/components/home.vue

@@ -4,7 +4,7 @@
4 4
             <img :src="headImg" alt="" />
5 5
         </div>
6 6
         <el-container>
7
-            <Left></Left>
7
+            <Left  @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>
@@ -194,6 +194,18 @@ export default ({
194 194
             clickData1.value.y = e.clientY;
195 195
         }
196 196
 
197
+
198
+        //消失线的方法
199
+        const childMethod =()=>{
200
+            
201
+            if (lineContainer.value) {
202
+                    lineContainer.value.remove()
203
+                    lineContainer.value = null
204
+                }
205
+        }
206
+
207
+
208
+
197 209
         const handleResponseFunction = (data) => {
198 210
             console.log("从UE返回过来的值", data)
199 211
             if (data == "{isrotate}") {
@@ -334,6 +346,7 @@ export default ({
334 346
             headImg,
335 347
             titleDialog,
336 348
             orientation,
349
+            childMethod
337 350
     
338 351
         }
339 352
     },

+ 8 - 1
src/components/left.vue

@@ -103,7 +103,7 @@ export default ({
103 103
 
104 104
     name: 'Histogram',
105 105
     components: { ElScrollbar, ElPagination, ElDialog, ElCarousel, ElCarouselItem, CircleProgress },
106
-    setup() {
106
+    setup(_, { emit }) {
107 107
         // 教室分类统计
108 108
         const classRoomCount = ref([])
109 109
 
@@ -189,6 +189,13 @@ export default ({
189 189
         let classInfo = ref({})
190 190
         const handleRoom = function (item) {
191 191
 
192
+
193
+            //查看前隐藏
194
+            let a1=document.getElementById('popoverRef')
195
+            a1.style.display = "none"
196
+
197
+            emit('childMethod');
198
+
192 199
         console.log('kankanitem',item);
193 200
        setTimeout(() => {
194 201
         roomVisible.value = true;