diff --git a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js index bc0fe69b..2b07117c 100644 --- a/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js +++ b/ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js @@ -499,6 +499,21 @@ var table = { }); return actions.join(''); }, + // 回显数据字典(字符串数组) + selectDictLabels: function(datas, value, separator) { + var currentSeparator = $.common.isEmpty(separator) ? "," : separator; + var actions = []; + $.each(value.split(currentSeparator), function(i, val) { + $.each(datas, function(index, dict) { + if (dict.dictValue == ('' + val)) { + var listClass = $.common.equals("default", dict.listClass) || $.common.isEmpty(dict.listClass) ? "" : "badge badge-" + dict.listClass; + actions.push($.common.sprintf("%s ", listClass, dict.dictLabel)); + return false; + } + }); + }); + return actions.join(''); + }, // 显示表格指定列 showColumn: function(column, tableId) { var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;