Commit 0df61a63 by RuoYi

新增回显数据字典(字符串数组)

parent 68a4e6de
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment