ry-ui新增序列号生成方法

dep_wangsr
RuoYi 6 years ago committed by Limy
parent 5724b1a1b9
commit 40607cc3a1

@ -67,6 +67,13 @@
return { rows: [], total: 0 }; return { rows: [], total: 0 };
} }
}, },
// 序列号生成
serialNumber: function (index) {
var table = $('#bootstrap-table').bootstrapTable('getOptions');
var pageSize = table.pageSize;
var pageNumber = table.pageNumber;
return pageSize * (pageNumber - 1) + index + 1;
},
// 搜索-默认第一个form // 搜索-默认第一个form
search: function(formId) { search: function(formId) {
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId; var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;

@ -52,6 +52,13 @@
escape: true, escape: true,
columns: [{ columns: [{
checkbox: true checkbox: true
},
{
title: "序号",
align: "center",
formatter: function (value, row, index) {
return $.table.serialNumber(index);
}
}, },
{ {
field: 'sessionId', field: 'sessionId',

@ -54,6 +54,13 @@
search: false, search: false,
columns: [{ columns: [{
checkbox: true checkbox: true
},
{
title: "序号",
align: "center",
formatter: function (value, row, index) {
return $.table.serialNumber(index);
}
}, },
{ {
field: 'tableName', field: 'tableName',

Loading…
Cancel
Save