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

pull/58/MERGE
RuoYi 2018-12-28 17:33:15 +08:00
parent 3d3017804d
commit 33788ecd02
3 changed files with 21 additions and 0 deletions

View File

@ -67,6 +67,13 @@
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
search: function(formId) {
var currentId = $.common.isEmpty(formId) ? $('form').attr('id') : formId;

View File

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

View File

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