Commit 021b8207369ed9549c4d3c6fcb3ded2138e298ff

Authored by panlinlin
1 parent e3943cb0

通过前端文件修复分页错误

src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java
... ... @@ -107,7 +107,7 @@ public class VideoManagerStoragerImpl implements IVideoManagerStorager {
107 107 @Override
108 108 public PageInfo queryChannelsByDeviceId(String deviceId, String query, Boolean hasSubChannel, Boolean online, int page, int count) {
109 109 // 获取到所有正在播放的流
110   - PageHelper.startPage(page+1, count);
  110 + PageHelper.startPage(page, count);
111 111 List<DeviceChannel> all = deviceChannelMapper.queryChannelsByDeviceId(deviceId, null, query, hasSubChannel, online);
112 112 return new PageInfo<>(all);
113 113 }
... ... @@ -119,7 +119,7 @@ public class VideoManagerStoragerImpl implements IVideoManagerStorager {
119 119  
120 120 @Override
121 121 public PageInfo<DeviceChannel> querySubChannels(String deviceId, String parentChannelId, String query, Boolean hasSubChannel, String online, int page, int count) {
122   - PageHelper.startPage(page+1, count);
  122 + PageHelper.startPage(page, count);
123 123 List<DeviceChannel> all = deviceChannelMapper.queryChannelsByDeviceId(deviceId, parentChannelId, null, null, null);
124 124 return new PageInfo<>(all);
125 125 }
... ... @@ -139,7 +139,7 @@ public class VideoManagerStoragerImpl implements IVideoManagerStorager {
139 139 */
140 140 @Override
141 141 public PageInfo<Device> queryVideoDeviceList(int page, int count) {
142   - PageHelper.startPage(page+1, count);
  142 + PageHelper.startPage(page, count);
143 143 List<Device> all = deviceMapper.getDevices();
144 144 return new PageInfo<>(all);
145 145 }
... ...
web_src/src/components/channelList.vue
... ... @@ -151,11 +151,10 @@ export default {
151 151 },
152 152 getDeviceChannelList: function () {
153 153 let that = this;
154   - console.log(this.currentPage - 1)
155 154  
156 155 this.$axios.get(`/api/devices/${this.$route.params.deviceId}/channels`, {
157 156 params: {
158   - page: that.currentPage - 1,
  157 + page: that.currentPage,
159 158 count: that.count,
160 159 query: that.searchSrt,
161 160 online: that.online,
... ... @@ -252,7 +251,7 @@ export default {
252 251  
253 252 this.$axios.get(`/api/subChannels/${this.deviceId}/${this.parentChannelId}/channels`, {
254 253 params: {
255   - page: that.currentPage - 1,
  254 + page: that.currentPage,
256 255 count: that.count,
257 256 query: that.searchSrt,
258 257 online: that.online,
... ...
web_src/src/components/videoList.vue
... ... @@ -134,7 +134,7 @@
134 134 this.getDeviceListLoading = true;
135 135 this.$axios.get(`/api/devices`,{
136 136 params: {
137   - page: that.currentPage - 1,
  137 + page: that.currentPage,
138 138 count: that.count
139 139 }
140 140 } )
... ...