From c35074e0e33054bb6c5ada22f8104422ae953b17 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 21 二月 2025 17:19:04 +0800
Subject: [PATCH] 1. 新增默认加载时先判断各选项是否获取完成逻辑

---
 src/views/realtimemode/component/DeviceChange.vue |   28 ++++++++++++++++++----------
 1 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/src/views/realtimemode/component/DeviceChange.vue b/src/views/realtimemode/component/DeviceChange.vue
index 3772b7d..345b996 100644
--- a/src/views/realtimemode/component/DeviceChange.vue
+++ b/src/views/realtimemode/component/DeviceChange.vue
@@ -31,18 +31,26 @@
     handleClick() {
       this.$emit('change', this.formSearch);
     }
+  },
+  watch: {
+    // 褰撹澶囩紪鍙烽娆′粠鍚庣鑾峰彇鏃讹紝瑙﹀彂閫氱煡浜嬩欢
+    ['formSearch.deviceCode'](nV, oV) {
+      if (oV == undefined && nV != oV) {
+        this.handleClick();
+      }
+    }
+  },
+  mounted() {
+    // 褰撹澶囩紪鍙峰凡缁忎粠鍚庣鑾峰彇瀹屾垚鏃讹紝鐩存帴瑙﹀彂閫氱煡浜嬩欢
+    if (this.formSearch.deviceCode) {
+      this.handleClick();
+    }
   }
 };
 </script>
-<style lang="scss">
-.map-date-selector {
-  display: inline-block;
-  position: relative;
-  /* left: 0;
-      right: 0;
-      top: 0px; */
-  /* padding: 0 4px; */
-  /* color: ffffffbd; */
-  /* background-color: antiquewhite; */
+<style scoped lang="scss">
+.el-form-item {
+  margin-bottom: 0px;
+  margin-right: 8px !important;
 }
 </style>

--
Gitblit v1.9.3