From 4f7702b22a715272e9210571c69b80b4eb89ef4f Mon Sep 17 00:00:00 2001
From: Lyy <1250400743@qq.com>
Date: Mon, 17 Aug 2020 17:05:33 +0800
Subject: [PATCH] update ruoyi-framework/src/main/java/com/ruoyi/framework/config/SecurityConfig.java. 修改注释,CRSF禁用
---
ruoyi-ui/src/utils/ruoyi.js | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/ruoyi-ui/src/utils/ruoyi.js b/ruoyi-ui/src/utils/ruoyi.js
index 08fbd9d..0c0f590 100644
--- a/ruoyi-ui/src/utils/ruoyi.js
+++ b/ruoyi-ui/src/utils/ruoyi.js
@@ -78,17 +78,18 @@
}
// 回显数据字典(字符串数组)
-export function selectDictLabels (datas = {}, value = '', separator = ',') {
- const actions = []
- const temp = value.split(separator)
- temp.forEach((_, index) => {
- Object.keys(datas).forEach(key => {
- if (datas[key].dictValue === temp[index].toString()) {
- actions.push(datas[key].dictLabel)
- }
- })
- })
- return actions.join(separator)
+export function selectDictLabels(datas, value, separator) {
+ var actions = [];
+ var currentSeparator = undefined === separator ? "," : separator;
+ var temp = value.split(currentSeparator);
+ Object.keys(value.split(currentSeparator)).some((val) => {
+ Object.keys(datas).some((key) => {
+ if (datas[key].dictValue == ('' + temp[val])) {
+ actions.push(datas[key].dictLabel + currentSeparator);
+ }
+ })
+ })
+ return actions.join('').substring(0, actions.join('').length - 1);
}
// 通用下载方法
@@ -145,4 +146,3 @@
});
return treeData != '' ? treeData : data;
}
-
--
Gitblit v1.9.2