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