|
@@ -9346,8 +9346,9 @@ return d.keepInvalid=a,l},l.datepickerInput=function(a){if(0===arguments.length)
|
|
|
var getQueryParams = function (params, searchQuery, removeempty) {
|
|
var getQueryParams = function (params, searchQuery, removeempty) {
|
|
|
params.filter = typeof params.filter === 'Object' ? params.filter : (params.filter ? JSON.parse(params.filter) : {});
|
|
params.filter = typeof params.filter === 'Object' ? params.filter : (params.filter ? JSON.parse(params.filter) : {});
|
|
|
params.op = typeof params.op === 'Object' ? params.op : (params.op ? JSON.parse(params.op) : {});
|
|
params.op = typeof params.op === 'Object' ? params.op : (params.op ? JSON.parse(params.op) : {});
|
|
|
- params.filter = $.extend(params.filter, searchQuery.filter);
|
|
|
|
|
- params.op = $.extend(params.op, searchQuery.op);
|
|
|
|
|
|
|
+
|
|
|
|
|
+ params.filter = $.extend({}, params.filter, searchQuery.filter);
|
|
|
|
|
+ params.op = $.extend({}, params.op, searchQuery.op);
|
|
|
//移除empty的值
|
|
//移除empty的值
|
|
|
if (removeempty) {
|
|
if (removeempty) {
|
|
|
$.each(params.filter, function (i, j) {
|
|
$.each(params.filter, function (i, j) {
|
|
@@ -9451,12 +9452,10 @@ return d.keepInvalid=a,l},l.datepickerInput=function(a){if(0===arguments.length)
|
|
|
$("form", that.$commonsearch).trigger("submit");
|
|
$("form", that.$commonsearch).trigger("submit");
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
- var searchQuery = getSearchQuery(that, true);
|
|
|
|
|
var queryParams = that.options.queryParams;
|
|
var queryParams = that.options.queryParams;
|
|
|
//匹配默认搜索值
|
|
//匹配默认搜索值
|
|
|
this.options.queryParams = function (params) {
|
|
this.options.queryParams = function (params) {
|
|
|
- var params = getQueryParams(queryParams(params), searchQuery);
|
|
|
|
|
- return params;
|
|
|
|
|
|
|
+ return queryParams(getQueryParams(params, getSearchQuery(this, true)));
|
|
|
};
|
|
};
|
|
|
this.trigger('post-common-search', that);
|
|
this.trigger('post-common-search', that);
|
|
|
|
|
|
|
@@ -9464,13 +9463,9 @@ return d.keepInvalid=a,l},l.datepickerInput=function(a){if(0===arguments.length)
|
|
|
|
|
|
|
|
BootstrapTable.prototype.onCommonSearch = function () {
|
|
BootstrapTable.prototype.onCommonSearch = function () {
|
|
|
var searchQuery = getSearchQuery(this);
|
|
var searchQuery = getSearchQuery(this);
|
|
|
- var params = getQueryParams(this.options.queryParams({}), searchQuery, true);
|
|
|
|
|
- this.trigger('common-search', this, params, searchQuery);
|
|
|
|
|
|
|
+ this.trigger('common-search', this, searchQuery);
|
|
|
this.options.pageNumber = 1;
|
|
this.options.pageNumber = 1;
|
|
|
- this.options.queryParams = function (options) {
|
|
|
|
|
- return $.extend({}, options, params);
|
|
|
|
|
- };
|
|
|
|
|
- this.refresh({query: params});
|
|
|
|
|
|
|
+ this.refresh({});
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
BootstrapTable.prototype.load = function (data) {
|
|
BootstrapTable.prototype.load = function (data) {
|
|
@@ -9810,7 +9805,7 @@ define('table',['jquery', 'bootstrap', 'moment', 'moment/locale/zh-cn', 'bootstr
|
|
|
require(['dragsort'], function () {
|
|
require(['dragsort'], function () {
|
|
|
//绑定拖动排序
|
|
//绑定拖动排序
|
|
|
$("tbody", table).dragsort({
|
|
$("tbody", table).dragsort({
|
|
|
- itemSelector: 'tr',
|
|
|
|
|
|
|
+ itemSelector: 'tr:visible',
|
|
|
dragSelector: "a.btn-dragsort",
|
|
dragSelector: "a.btn-dragsort",
|
|
|
dragEnd: function () {
|
|
dragEnd: function () {
|
|
|
var data = table.bootstrapTable('getData');
|
|
var data = table.bootstrapTable('getData');
|
|
@@ -14501,7 +14496,7 @@ define("addtabs", function(){});
|
|
|
} else {
|
|
} else {
|
|
|
data = returnData;
|
|
data = returnData;
|
|
|
}
|
|
}
|
|
|
- self.afterInit(self, data.list);
|
|
|
|
|
|
|
+ self.afterInit(self, typeof data.rows !== 'undefined' ? data.rows : (typeof data.list !== 'undefined' ? data.list : []));
|
|
|
},
|
|
},
|
|
|
error: function (jqXHR, textStatus, errorThrown) {
|
|
error: function (jqXHR, textStatus, errorThrown) {
|
|
|
self.ajaxErrorNotify(self, errorThrown);
|
|
self.ajaxErrorNotify(self, errorThrown);
|
|
@@ -15135,7 +15130,7 @@ define("addtabs", function(){});
|
|
|
|
|
|
|
|
//数据结构处理
|
|
//数据结构处理
|
|
|
var json = {};
|
|
var json = {};
|
|
|
- json.originalResult = data.list;
|
|
|
|
|
|
|
+ json.originalResult = typeof data.rows !== 'undefined' ? data.rows : (typeof data.list !== 'undefined' ? data.list : []);
|
|
|
json.cnt_whole = typeof data.total !== 'undefined' ? data.total : (typeof data.totalRow !== 'undefined' ? data.totalRow : data.list.length);
|
|
json.cnt_whole = typeof data.total !== 'undefined' ? data.total : (typeof data.totalRow !== 'undefined' ? data.totalRow : data.list.length);
|
|
|
|
|
|
|
|
json.candidate = [];
|
|
json.candidate = [];
|