From f3acb8ce787f3df0eda633031473be4e6a9ff448 Mon Sep 17 00:00:00 2001
From: zmc <zmc_li@foxmail.com>
Date: 星期四, 12 十月 2023 16:56:28 +0800
Subject: [PATCH] 油烟 更新了实时监控页面

---
 src/sfc/ShopNameAndID.vue |   33 +++++++++++++++++++++------------
 1 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/src/sfc/ShopNameAndID.vue b/src/sfc/ShopNameAndID.vue
index 7fcfa4d..fef27ec 100644
--- a/src/sfc/ShopNameAndID.vue
+++ b/src/sfc/ShopNameAndID.vue
@@ -5,14 +5,16 @@
 import axiosInstanceInstance from '../utils/request.js'
 export default {
   // 榛樿閫夋嫨涓�涓�
-  // props:{
-  //   devId:{
-  //     type: Array,
-  //     default: ['鍏ㄩ儴','鍏ㄩ儴'],
-  //   }
+  props:{
+    devId:{
+      type: Array,
+      default(){
+        return ['鍏ㄩ儴','鍏ㄩ儴']
+      }
+    }
      
-  // }
-  props:['devId'],
+  },
+  // props:['devId'],
   emits: ['submitId'],
   data() {
     return {
@@ -50,12 +52,19 @@
               ]
             };
           });
-          console.log(this.optionsShop);
         });
         
         // 鎵撳紑鏃堕粯璁ゅ睍绀轰竴涓簵閾�
       this.deviceId = this.devId
-    }
+    },
+    changeDev(){
+      if(this.deviceId == null){
+        this.deviceId = ['','']
+        this.$emit('submitId', this.deviceId[1])
+      }else{
+      this.$emit('submitId', this.deviceId[1])
+      }
+    },
   }
 };
 </script>
@@ -67,11 +76,11 @@
         v-model="deviceId"
         :options="optionsShop"
         :props="{ expandTrigger: 'hover' }"
-      
-        @change="$emit('submitId', deviceId[1])"
+        @change="changeDev"
         placeholder="鍏ㄩ儴"
+        clearable
       />
-      <!--   @visible-change="getDeviceInfo" -->
+      <!--   @change="$emit('submitId', deviceId[1])"  @change="changeDev"-->
     </span>
   </div>
 </template>

--
Gitblit v1.9.3