mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 21:59:12 +08:00
优化代码
This commit is contained in:
parent
96c7646c60
commit
2bdd4e3691
@ -6,7 +6,7 @@
|
||||
<th class="text-center">车辆状态</th>
|
||||
<th class="text-center">车牌号</th>
|
||||
<th class="text-center">进场时间</th>
|
||||
<th class="text-center">在场时间(小时)</th>
|
||||
<th class="text-center">在场时间</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@ -2,10 +2,13 @@
|
||||
入驻小区
|
||||
**/
|
||||
(function (vc) {
|
||||
var DEFAULT_PAGE = 1;
|
||||
var DEFAULT_ROWS = 10;
|
||||
vc.extends({
|
||||
data: {
|
||||
parkingAreaControlInCarInfo: {
|
||||
carIns: []
|
||||
carIns: [],
|
||||
paId: ''
|
||||
|
||||
}
|
||||
},
|
||||
@ -13,10 +16,42 @@
|
||||
|
||||
},
|
||||
_initEvent: function () {
|
||||
|
||||
vc.on('parkingAreaControlInCar', 'switch', function (_data) {
|
||||
$that.parkingAreaControlInCarInfo.paId = _data.paId;
|
||||
$that._loadParkingAreaControlInCarData(DEFAULT_PAGE, DEFAULT_ROWS);
|
||||
});
|
||||
vc.on('parkingAreaControlInCar', 'paginationPlus', 'page_event',
|
||||
function (_currentPage) {
|
||||
vc.component._loadParkingAreaControlInCarData(_currentPage, DEFAULT_ROWS);
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
|
||||
_loadParkingAreaControlInCarData: function (_page, _row) {
|
||||
let param = {
|
||||
params: {
|
||||
page: _page,
|
||||
row: _row,
|
||||
communityId: vc.getCurrentCommunity().communityId,
|
||||
paId: $that.parkingAreaControlInCarInfo.paId,
|
||||
}
|
||||
};
|
||||
//发送get请求
|
||||
vc.http.apiGet('/carInout.listCarInParkingAreaCmd',
|
||||
param,
|
||||
function (json) {
|
||||
let _feeConfigInfo = JSON.parse(json);
|
||||
vc.component.parkingAreaControlInCarInfo.total = _feeConfigInfo.total;
|
||||
vc.component.parkingAreaControlInCarInfo.records = _feeConfigInfo.records;
|
||||
vc.component.parkingAreaControlInCarInfo.carIns = _feeConfigInfo.data;
|
||||
vc.emit('parkingAreaControlInCar', 'paginationPlus', 'init', {
|
||||
total: _feeConfigInfo.records,
|
||||
currentPage: _page
|
||||
});
|
||||
}, function () {
|
||||
console.log('请求失败处理');
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
});
|
||||
})(window.vc);
|
||||
Loading…
Reference in New Issue
Block a user