From 58c0f11fe2f23a1be2dec768f9ac02107301a634 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期五, 19 九月 2025 17:30:36 +0800
Subject: [PATCH] 2025.9.19 数据产品(待完成)

---
 src/components/search-option/FYOptionScene.vue |   35 +++++++++++++++++++++++++++--------
 1 files changed, 27 insertions(+), 8 deletions(-)

diff --git a/src/components/search-option/FYOptionScene.vue b/src/components/search-option/FYOptionScene.vue
index 0786b61..9815fd8 100644
--- a/src/components/search-option/FYOptionScene.vue
+++ b/src/components/search-option/FYOptionScene.vue
@@ -1,9 +1,9 @@
 <template>
-  <el-form-item label="鍦烘櫙绫诲瀷" :prop="prop">
+  <el-form-item :label="label" :prop="prop">
     <el-select
       :model-value="value"
       @change="handleChange"
-      placeholder="鍦烘櫙绫诲瀷"
+      :placeholder="label"
       style="width: 150px"
     >
       <el-option
@@ -24,30 +24,49 @@
     // 鏄惁鍦ㄩ閫夐」澶勬坊鍔犫�滃叏閮ㄢ�濋�夐」
     allOption: {
       type: Boolean,
-      default: true,
+      default: true
+    },
+    label: {
+      type: String,
+      default: '鍦烘櫙绫诲瀷'
     },
     // 1:椋炵窘鐜绯荤粺锛�2锛氶缇界洃绠$郴缁燂紱
     type: {
-      type: Number,
-      default: 1,
+      type: Number || String,
+      default: 1
     },
     // 杩斿洖缁撴灉
     value: Object,
     // 鏄惁榛樿杩斿洖鍒濆閫夐」
     initValue: {
       type: Boolean,
-      default: true,
+      default: true
     },
+    // form琛ㄥ崟缁戝畾灞炴�у悕
     prop: {
       type: String,
       default: '_scenetype'
+    },
+    // 鍒囨崲 type 鍚庯紝褰撳墠閫夐」鏄惁娓呯┖
+    sourceInit: {
+      type: Boolean,
+      default: false
     }
   },
   emits: ['update:value'],
   data() {
     return {
-      sceneTypes: enumScene(this.type, this.allOption),
+      // sceneTypes: enumScene(this.type, this.allOption),
     };
+  },
+  computed: {
+    sceneTypes() {
+      if (this.sourceInit) {
+        // 褰撳洜涓簍ype鎴栬�卆llOption鍙傛暟鍙樺寲寮曡捣閫夐」鍙樻洿鏃讹紝娓呯┖褰撳墠閫夐」
+        this.handleChange();
+      }
+      return enumScene(this.type, this.allOption);
+    }
   },
   methods: {
     handleChange(value) {
@@ -58,6 +77,6 @@
     if (this.initValue) {
       this.handleChange(this.sceneTypes[0]);
     }
-  },
+  }
 };
 </script>

--
Gitblit v1.9.3