From f63a76f661e852d3b2f6cb3c5ee02d07c49e9fa9 Mon Sep 17 00:00:00 2001
From: abbfun <819589789@qq.com>
Date: Sat, 23 Apr 2022 22:36:48 +0800
Subject: [PATCH] spring-cloud.version 2021.0.1 官方推荐对应 spring-cloud-alibaba 2021.0.1.0 spring-cloud.version 2021.0.1 对应 spring-cloud-alibaba 2021.0.1.0, 官方说明 https://github.com/alibaba/spring-cloud-alibaba/wiki/%E7%89%88%E6%9C%AC%E8%AF%B4%E6%98%8E#%E6%AF%95%E4%B8%9A%E7%89%88%E6%9C%AC%E4%BE%9D%E8%B5%96%E5%85%B3%E7%B3%BB%E6%8E%A8%E8%8D%90%E4%BD%BF%E7%94%A8

---
 ruoyi-ui/src/utils/ruoyi.js |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js
index aa6192b..e001def 100644
--- a/ruoyi-ui/src/utils/ruoyi.js
+++ b/ruoyi-ui/src/utils/ruoyi.js
@@ -70,6 +70,9 @@
 
 // 回显数据字典 
 export function selectDictLabel(datas, value) {
+  if (value === undefined) {
+    return "";
+  }
   var actions = [];
   Object.keys(datas).some((key) => {
     if (datas[key].value == ('' + value)) {
@@ -77,23 +80,31 @@
       return true;
     }
   })
+  if (actions.length === 0) {
+    actions.push(value);
+  }
   return actions.join('');
 }
 
 // 回显数据字典(字符串数组)
 export function selectDictLabels(datas, value, separator) {
-  if(value === undefined) {
+  if (value === undefined) {
     return "";
   }
   var actions = [];
   var currentSeparator = undefined === separator ? "," : separator;
   var temp = value.split(currentSeparator);
   Object.keys(value.split(currentSeparator)).some((val) => {
+    var match = false;
     Object.keys(datas).some((key) => {
       if (datas[key].value == ('' + temp[val])) {
         actions.push(datas[key].label + currentSeparator);
+        match = true;
       }
     })
+    if (!match) {
+      actions.push(temp[val] + currentSeparator);
+    }
   })
   return actions.join('').substring(0, actions.join('').length - 1);
 }

--
Gitblit v1.9.3