mirror of https://gitee.com/y_project/RuoYi.git
新增回显数据字典(字符串数组)
parent
68a4e6de5f
commit
0df61a6336
|
@ -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("<span class='%s'>%s </span>", listClass, dict.dictLabel));
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
return actions.join('');
|
||||
},
|
||||
// 显示表格指定列
|
||||
showColumn: function(column, tableId) {
|
||||
var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
|
||||
|
|
Loading…
Reference in New Issue