mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2026-04-27 05:49:37 +08:00
Merge branch 'master' of https://gitee.com/y_project/RuoYi-Cloud
Conflicts: ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/auth/AuthLogic.java ruoyi-modules/ruoyi-gen/src/main/java/com/ruoyi/gen/util/VelocityUtils.java ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/index.vue.vm ruoyi-modules/ruoyi-gen/src/main/resources/vm/vue/v3/index.vue.vm ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysMenuMapper.xml
This commit is contained in:
@@ -70,6 +70,9 @@ export function addDateRange(params, dateRange, propName) {
|
||||
|
||||
// 回显数据字典
|
||||
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 @@ export function selectDictLabel(datas, value) {
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user