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