소스 검색

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

RuoYi 6 년 전
부모
커밋
33788ecd02

+ 7 - 0
ruoyi-admin/src/main/resources/static/ruoyi/js/ry-ui.js

@@ -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;

+ 7 - 0
ruoyi-admin/src/main/resources/templates/monitor/online/online.html

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

+ 7 - 0
ruoyi-admin/src/main/resources/templates/tool/gen/gen.html

@@ -56,6 +56,13 @@
 		            checkbox: true
 		        },
 		        {
+                    title: "序号",
+                    align: "center",
+                    formatter: function (value, row, index) {
+                 	    return $.table.serialNumber(index);
+                    }
+                },
+		        {
 		            field: 'tableName',
 		            title: '表名称',
 		            width: '20%',