Commit 3a58c193a83e011ece16889e7a9a1e3bd97051ee

Authored by liujun001
1 parent 8c7752db

修改分页无法选择条数

src/main/java/com/bsth/controller/video/VideoController.java
@@ -58,12 +58,12 @@ public class VideoController { @@ -58,12 +58,12 @@ public class VideoController {
58 @GetMapping("/tree/table") 58 @GetMapping("/tree/table")
59 public Map<String, Object> queryTreeTable(@RequestParam Map<String, Object> map, 59 public Map<String, Object> queryTreeTable(@RequestParam Map<String, Object> map,
60 @RequestParam(defaultValue = "0") int page, 60 @RequestParam(defaultValue = "0") int page,
61 - @RequestParam(defaultValue = "10") int size, 61 + @RequestParam(defaultValue = "10") int limit,
62 @RequestParam(defaultValue = "id") String order, 62 @RequestParam(defaultValue = "id") String order,
63 @RequestParam(defaultValue = "DESC") String direction) { 63 @RequestParam(defaultValue = "DESC") String direction) {
64 Map<String, Object> result = new HashMap<>(); 64 Map<String, Object> result = new HashMap<>();
65 page = page - 1; 65 page = page - 1;
66 - Map<String, Object> queryResult = carsController.list(map, page, size, order, direction); 66 + Map<String, Object> queryResult = carsController.list(map, page, limit, order, direction);
67 if (MapUtils.isEmpty(queryResult)) { 67 if (MapUtils.isEmpty(queryResult)) {
68 result.put("status", ResponseCode.ERROR); 68 result.put("status", ResponseCode.ERROR);
69 return result; 69 return result;
src/main/resources/static/pages/video/video.js
@@ -32,7 +32,7 @@ function initTree(data) { @@ -32,7 +32,7 @@ function initTree(data) {
32 32
33 33
34 function initTable(treeNode) { 34 function initTable(treeNode) {
35 - var queryURL = "/video/tree/table?size=5"; 35 + var queryURL = "/video/tree/table?1=1";
36 if (treeNode) { 36 if (treeNode) {
37 if (treeNode.data.type === 1) { 37 if (treeNode.data.type === 1) {
38 queryURL = queryURL + "&businessCode_eq=" + treeNode.data.code; 38 queryURL = queryURL + "&businessCode_eq=" + treeNode.data.code;
@@ -57,8 +57,6 @@ function initTable(treeNode) { @@ -57,8 +57,6 @@ function initTable(treeNode) {
57 return; 57 return;
58 } 58 }
59 }); 59 });
60 -  
61 -  
62 }); 60 });
63 61
64 treeTable.on('tool(treeTable)', function (obj) { 62 treeTable.on('tool(treeTable)', function (obj) {
@@ -104,7 +102,10 @@ function initTreeTableOption(queryURL) { @@ -104,7 +102,10 @@ function initTreeTableOption(queryURL) {
104 url: queryURL, 102 url: queryURL,
105 loading: true, 103 loading: true,
106 treeColIndex: 1, 104 treeColIndex: 1,
  105 + even:true,
107 treeSpid: 0, 106 treeSpid: 0,
  107 + limit:5,
  108 + limits :[5,10,20,50],
108 maxHeight: '701px', 109 maxHeight: '701px',
109 cols: [[ 110 cols: [[
110 {field: 'name', title: '车辆编号', width: 140}, 111 {field: 'name', title: '车辆编号', width: 140},