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 382330b3f..b110f6fd5 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 @@ -539,6 +539,9 @@ var table = { return false; } }); + if (actions.length === 0) { + actions.push($.common.sprintf("%s", value)) + } return actions.join(''); }, // 回显数据字典(字符串数组) @@ -549,13 +552,18 @@ var table = { var currentSeparator = $.common.isEmpty(separator) ? "," : separator; var actions = []; $.each(value.split(currentSeparator), function(i, val) { + var match = false $.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)); + actions.push($.common.sprintf("%s", listClass, dict.dictLabel)); + match = true return false; } }); + if (!match) { + actions.push($.common.sprintf(" %s ", val)); + } }); return actions.join(''); },