|
|
|
@ -477,8 +477,9 @@ var table = {
|
|
|
|
|
var currentId = $.common.isEmpty(tableId) ? table.options.id : tableId;
|
|
|
|
|
$("#" + currentId).bootstrapTable('refreshOptions', options);
|
|
|
|
|
},
|
|
|
|
|
// 查询表格指定列值
|
|
|
|
|
selectColumns: function(column) {
|
|
|
|
|
// 查询表格指定列值 deDuplication( true去重、false不去重)
|
|
|
|
|
selectColumns: function(column, deDuplication) {
|
|
|
|
|
var distinct = $.common.isEmpty(deDuplication) ? true : deDuplication;
|
|
|
|
|
var rows = $.map($("#" + table.options.id).bootstrapTable('getSelections'), function (row) {
|
|
|
|
|
return $.common.getItemField(row, column);
|
|
|
|
|
});
|
|
|
|
@ -490,7 +491,7 @@ var table = {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return $.common.uniqueFn(rows);
|
|
|
|
|
return distinct ? $.common.uniqueFn(rows) : rows;
|
|
|
|
|
},
|
|
|
|
|
// 获取当前页选中或者取消的行ID
|
|
|
|
|
affectedRowIds: function(rows) {
|
|
|
|
@ -505,8 +506,9 @@ var table = {
|
|
|
|
|
}
|
|
|
|
|
return rowIds;
|
|
|
|
|
},
|
|
|
|
|
// 查询表格首列值
|
|
|
|
|
selectFirstColumns: function() {
|
|
|
|
|
// 查询表格首列值deDuplication( true去重、false不去重)
|
|
|
|
|
selectFirstColumns: function(deDuplication) {
|
|
|
|
|
var distinct = $.common.isEmpty(deDuplication) ? true : deDuplication;
|
|
|
|
|
var rows = $.map($("#" + table.options.id).bootstrapTable('getSelections'), function (row) {
|
|
|
|
|
return $.common.getItemField(row, table.options.columns[1].field);
|
|
|
|
|
});
|
|
|
|
@ -518,7 +520,7 @@ var table = {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return $.common.uniqueFn(rows);
|
|
|
|
|
return distinct ? $.common.uniqueFn(rows) : rows;
|
|
|
|
|
},
|
|
|
|
|
// 回显数据字典
|
|
|
|
|
selectDictLabel: function(datas, value) {
|
|
|
|
@ -630,12 +632,13 @@ var table = {
|
|
|
|
|
refresh: function() {
|
|
|
|
|
$.bttTable.bootstrapTreeTable('refresh');
|
|
|
|
|
},
|
|
|
|
|
// 查询表格树指定列值
|
|
|
|
|
selectColumns: function(column) {
|
|
|
|
|
// 查询表格树指定列值deDuplication( true去重、false不去重)
|
|
|
|
|
selectColumns: function(column, deDuplication) {
|
|
|
|
|
var distinct = $.common.isEmpty(deDuplication) ? true : deDuplication;
|
|
|
|
|
var rows = $.map($.bttTable.bootstrapTreeTable('getSelections'), function (row) {
|
|
|
|
|
return $.common.getItemField(row, column);
|
|
|
|
|
});
|
|
|
|
|
return $.common.uniqueFn(rows);
|
|
|
|
|
return distinct ? $.common.uniqueFn(rows) : rows;
|
|
|
|
|
},
|
|
|
|
|
// 请求获取数据后处理回调函数,校验异常状态提醒
|
|
|
|
|
responseHandler: function(res) {
|
|
|
|
|