From af08ea779a8c4518e2a410646f057c58583044ce Mon Sep 17 00:00:00 2001 From: RuoYi Date: Sat, 20 Jun 2020 17:22:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=9B=9E=E6=98=BE=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E5=AD=97=E5=85=B8=EF=BC=88=E5=AD=97=E7=AC=A6=E4=B8=B2?= =?UTF-8?q?=E6=95=B0=E7=BB=84=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/static/ruoyi/js/ry-ui.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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;