mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-27 16:33:57 +08:00
72 lines
2.6 KiB
JavaScript
72 lines
2.6 KiB
JavaScript
/**
|
|
入驻小区
|
|
**/
|
|
(function (vc) {
|
|
var DEFAULT_PAGE = 1;
|
|
var DEFAULT_ROWS = 10;
|
|
vc.extends({
|
|
data: {
|
|
pointTaskInfo: {
|
|
tasks: [],
|
|
inspectionId: '',
|
|
roomNum: '',
|
|
allOweFeeAmount: '0',
|
|
planUserName:'',
|
|
inspectionStartTime:'',
|
|
inspectionEndTime:'',
|
|
}
|
|
},
|
|
_initMethod: function () {
|
|
},
|
|
_initEvent: function () {
|
|
vc.on('pointTask', 'switch', function (_data) {
|
|
$that.pointTaskInfo.inspectionId = _data.inspectionId;
|
|
$that._loadPointTaskData(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
});
|
|
vc.on('pointTask', 'paginationPlus', 'page_event',
|
|
function (_currentPage) {
|
|
$that._loadPointTaskData(_currentPage, DEFAULT_ROWS);
|
|
});
|
|
vc.on('pointTask', 'notify', function (_data) {
|
|
$that._loadPointTaskData(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
})
|
|
},
|
|
methods: {
|
|
|
|
_loadPointTaskData: function (_page, _row) {
|
|
let param = {
|
|
params: {
|
|
communityId: vc.getCurrentCommunity().communityId,
|
|
inspectionId: $that.pointTaskInfo.inspectionId,
|
|
planUserName: $that.pointTaskInfo.planUserName,
|
|
inspectionStartTime: $that.pointTaskInfo.inspectionStartTime,
|
|
inspectionEndTime: $that.pointTaskInfo.inspectionEndTime,
|
|
page: _page,
|
|
row: _row
|
|
}
|
|
};
|
|
//发送get请求
|
|
vc.http.apiGet('/inspectionTaskDetail.listInspectionTaskDetails',
|
|
param,
|
|
function (json) {
|
|
let _json = JSON.parse(json);
|
|
$that.pointTaskInfo.inspectionTasks = _json.data;
|
|
vc.emit('pointTask', 'paginationPlus', 'init', {
|
|
total: _json.records,
|
|
dataCount: _json.total,
|
|
currentPage: _page
|
|
});
|
|
},
|
|
function () {
|
|
console.log('请求失败处理');
|
|
}
|
|
);
|
|
},
|
|
//查询
|
|
_qureyPointTask: function () {
|
|
$that._loadPointTaskData(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
},
|
|
|
|
}
|
|
});
|
|
})(window.vc); |