From c622702a7b9357a45df08361dfab4dcc690fc95c Mon Sep 17 00:00:00 2001
From: wlzboy <66905212@qq.com>
Date: 星期一, 29 九月 2025 08:43:50 +0800
Subject: [PATCH] fix:优化index.vue支持 selected

---
 ruoyi-admin/src/main/resources/application-prod.yml |    2 +-
 ruoyi-admin/src/main/resources/application.yml      |    2 +-
 ruoyi-ui/src/views/evaluation/index.vue             |   14 +++++++++++++-
 3 files changed, 15 insertions(+), 3 deletions(-)

diff --git a/ruoyi-admin/src/main/resources/application-prod.yml b/ruoyi-admin/src/main/resources/application-prod.yml
index 7807de7..779cce8 100644
--- a/ruoyi-admin/src/main/resources/application-prod.yml
+++ b/ruoyi-admin/src/main/resources/application-prod.yml
@@ -88,4 +88,4 @@
 min:
   apiUrl: https://api.966120.com.cn/v1/   #娴嬭瘯鐜锛歭ocalhost:8011
 qrcode:
-  defaultUrl: http://gzgj.966120.com/evaluation?vehicle={vehicleNo}
\ No newline at end of file
+  defaultUrl: https://gzgj.966120.com.cn/evaluation?vehicle={vehicleNo}
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index d118c32..67cb140 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -56,7 +56,7 @@
     basename: i18n/messages
   profiles:
     # 鐜 dev|test|prod
-    active: prod
+    active: dev
   # 鏂囦欢涓婁紶
   servlet:
     multipart:
diff --git a/ruoyi-ui/src/views/evaluation/index.vue b/ruoyi-ui/src/views/evaluation/index.vue
index e0fae2a..2d58018 100644
--- a/ruoyi-ui/src/views/evaluation/index.vue
+++ b/ruoyi-ui/src/views/evaluation/index.vue
@@ -97,6 +97,7 @@
                     v-for="option in getDimensionOptions(dimension)" 
                     :key="option.value" 
                     :label="option.value"
+                    
                     :aria-label="option.label">
                     {{ option.label }}
                   </el-radio>
@@ -385,7 +386,18 @@
     getDimensionOptions(dimension) {
       if (!dimension.options) return [];
       try {
-        return JSON.parse(dimension.options);
+        const options = JSON.parse(dimension.options);
+        
+        // 妫�鏌ユ槸鍚︽湁榛樿閫変腑鐨勯�夐」
+        const defaultSelected = options.find(option => option.selected === true);
+        if (defaultSelected && !this.selectedOptions[dimension.dimensionId]) {
+          // 璁剧疆榛樿閫変腑
+          this.$set(this.selectedOptions, dimension.dimensionId, defaultSelected.value);
+          // 鍚屾椂鏇存柊evaluationDetails
+          this.updateDimensionOption(dimension.dimensionId, defaultSelected.value);
+        }
+        
+        return options;
       } catch (error) {
         console.error('Error parsing options for', dimension.dimensionName, ':', error);
         return [];

--
Gitblit v1.9.1