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-ui/src/views/evaluation/index.vue |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

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