mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-26 08:16:47 +08:00
73 lines
2.6 KiB
JavaScript
73 lines
2.6 KiB
JavaScript
/**
|
|
入驻小区
|
|
**/
|
|
(function (vc) {
|
|
var DEFAULT_PAGE = 1;
|
|
var DEFAULT_ROWS = 10;
|
|
vc.extends({
|
|
data: {
|
|
adminRoutePlanInfo: {
|
|
plans: [],
|
|
inspectionRouteId: '',
|
|
|
|
}
|
|
},
|
|
_initMethod: function () {
|
|
},
|
|
_initEvent: function () {
|
|
vc.on('adminRoutePlan', 'switch', function (_data) {
|
|
$that.adminRoutePlanInfo.inspectionRouteId = _data.inspectionRouteId;
|
|
$that.adminRoutePlanInfo.inspectionPlanId = _data.inspectionPlanId;
|
|
|
|
$that._loadAdminRoutePlanData(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
|
|
});
|
|
vc.on('adminRoutePlan', 'paginationPlus', 'page_event',
|
|
function (_currentPage) {
|
|
$that._loadAdminRoutePlanData(_currentPage, DEFAULT_ROWS);
|
|
});
|
|
vc.on('adminRoutePlan', 'notify', function (_data) {
|
|
$that._loadAdminRoutePlanData(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
})
|
|
},
|
|
methods: {
|
|
|
|
_loadAdminRoutePlanData: function (_page, _row) {
|
|
let param = {
|
|
params: {
|
|
inspectionRouteId: $that.adminRoutePlanInfo.inspectionRouteId,
|
|
inspectionPlanId:$that.adminRoutePlanInfo.inspectionPlanId,
|
|
page: _page,
|
|
row: _row
|
|
}
|
|
};
|
|
//发送get请求
|
|
vc.http.apiGet('/inspection.queryAdminRouteInspectionPlan',
|
|
param,
|
|
function (json) {
|
|
let _json = JSON.parse(json);
|
|
$that.adminRoutePlanInfo.plans = _json.data;
|
|
vc.emit('adminRoutePlan', 'paginationPlus', 'init', {
|
|
total: _json.records,
|
|
dataCount: _json.total,
|
|
currentPage: _page
|
|
});
|
|
},
|
|
function () {
|
|
console.log('请求失败处理');
|
|
}
|
|
);
|
|
},
|
|
//查询
|
|
_qureyAdminRoutePlan: function () {
|
|
$that._loadAdminRoutePlanData(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
},
|
|
//重置
|
|
_resetAdminRoutePlan: function () {
|
|
$that.adminRoutePlanInfo.roomNum = "";
|
|
$that._loadAdminRoutePlanData(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
},
|
|
|
|
}
|
|
});
|
|
})(window.vc); |