优化停车场分页问题

This commit is contained in:
java110 2021-09-23 12:20:11 +08:00
parent 0d9d39ff45
commit b8dabc6d99
2 changed files with 45 additions and 37 deletions

View File

@ -53,6 +53,7 @@
</tr>
</tbody>
</table>
<vc:create namespace="chooseParkingArea" path="frame/paginationPlus"></vc:create>
</div>
</div>

View File

@ -18,6 +18,9 @@
vc.component._refreshChooseParkingAreaInfo();
vc.component._loadAllParkingAreaInfo(1, 10, '');
});
vc.on('chooseParkingArea', 'paginationPlus', 'page_event', function (_currentPage) {
vc.component._loadAllParkingAreaInfo(_currentPage, 10, '');
});
},
methods: {
_loadAllParkingAreaInfo: function (_page, _row, _name) {
@ -37,6 +40,10 @@
function (json) {
var _parkingAreaInfo = JSON.parse(json);
vc.component.chooseParkingAreaInfo.parkingAreas = _parkingAreaInfo.parkingAreas;
vc.emit('chooseParkingArea', 'paginationPlus', 'init', {
total: _parkingAreaInfo.records,
currentPage: _page
});
}, function () {
console.log('请求失败处理');
}