62 lines
2.4 KiB
JavaScript
62 lines
2.4 KiB
JavaScript
/**
|
|
入驻小区
|
|
**/
|
|
(function (vc) {
|
|
var DEFAULT_PAGE = 1;
|
|
var DEFAULT_ROWS = 10;
|
|
vc.extends({
|
|
data: {
|
|
aStaffDetailAccessControlInfo: {
|
|
machineTranslates: [],
|
|
staffId: '',
|
|
}
|
|
},
|
|
_initMethod: function () {
|
|
},
|
|
_initEvent: function () {
|
|
vc.on('aStaffDetailAccessControl', 'switch', function (_data) {
|
|
$that.aStaffDetailAccessControlInfo.staffId = _data.staffId;
|
|
$that._loadAStaffDetailAccessControlData(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
});
|
|
vc.on('aStaffDetailAccessControl', 'paginationPlus', 'page_event',
|
|
function (_currentPage) {
|
|
$that._loadAStaffDetailAccessControlData(_currentPage, DEFAULT_ROWS);
|
|
});
|
|
},
|
|
methods: {
|
|
_loadAStaffDetailAccessControlData: function (_page, _row) {
|
|
let param = {
|
|
params: {
|
|
page: _page,
|
|
row: _row,
|
|
objId: $that.aStaffDetailAccessControlInfo.staffId,
|
|
typeCd: '8899'
|
|
}
|
|
};
|
|
//发送get请求
|
|
vc.http.apiGet('/machineTranslate.listAdminMachineTranslates',
|
|
param,
|
|
function (json) {
|
|
let _roomInfo = JSON.parse(json);
|
|
$that.aStaffDetailAccessControlInfo.machineTranslates = _roomInfo.machineTranslates;
|
|
vc.emit('aStaffDetailAccessControl', 'paginationPlus', 'init', {
|
|
total: _roomInfo.records,
|
|
dataCount: _roomInfo.total,
|
|
currentPage: _page
|
|
});
|
|
},
|
|
function () {
|
|
console.log('请求失败处理');
|
|
}
|
|
);
|
|
},
|
|
//查询
|
|
_qureyAStaffDetailAccessControl: function () {
|
|
$that._loadAStaffDetailAccessControlData(DEFAULT_PAGE, DEFAULT_ROWS);
|
|
},
|
|
_openEditMachineTranslateModel: function (_machineTranslate) {
|
|
vc.emit('editMachineTranslate', 'openEditMachineTranslateModal', _machineTranslate);
|
|
},
|
|
}
|
|
});
|
|
})(window.vc); |