mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-26 16:19:44 +08:00
61 lines
2.1 KiB
JavaScript
61 lines
2.1 KiB
JavaScript
/**
|
|
入驻小区
|
|
**/
|
|
(function (vc) {
|
|
var DEFAULT_PAGE = 1;
|
|
var DEFAULT_ROWS = 10;
|
|
vc.extends({
|
|
data: {
|
|
aStaffDetailContractInfo: {
|
|
contracts: [],
|
|
staffId: '',
|
|
tel: ''
|
|
}
|
|
},
|
|
_initMethod: function () {
|
|
},
|
|
_initEvent: function () {
|
|
vc.on('aStaffDetailContract', 'switch', function (_data) {
|
|
$that.aStaffDetailContractInfo.staffId = _data.staffId;
|
|
$that.aStaffDetailContractInfo.tel = _data.tel;
|
|
$that._loadAStaffDetailContractData(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
});
|
|
vc.on('aStaffDetailContract', 'paginationPlus', 'page_event',
|
|
function (_currentPage) {
|
|
$that._loadAStaffDetailContractData(_currentPage, DEFAULT_ROWS);
|
|
});
|
|
},
|
|
methods: {
|
|
_loadAStaffDetailContractData: function (_page, _row) {
|
|
let param = {
|
|
params: {
|
|
page: _page,
|
|
row: _row,
|
|
operatorLink: $that.aStaffDetailContractInfo.tel,
|
|
}
|
|
};
|
|
//发送get请求
|
|
vc.http.apiGet('/contract.queryAdminContract',
|
|
param,
|
|
function (json) {
|
|
let _roomInfo = JSON.parse(json);
|
|
$that.aStaffDetailContractInfo.contracts = _roomInfo.data;
|
|
vc.emit('aStaffDetailContract', 'paginationPlus', 'init', {
|
|
total: _roomInfo.records,
|
|
dataCount: _roomInfo.total,
|
|
currentPage: _page
|
|
});
|
|
},
|
|
function () {
|
|
console.log('请求失败处理');
|
|
}
|
|
);
|
|
},
|
|
//查询
|
|
_qureyAStaffDetailContract: function () {
|
|
$that._loadAStaffDetailContractData(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
},
|
|
|
|
}
|
|
});
|
|
})(window.vc); |