优化代码

This commit is contained in:
java110 2022-05-24 16:37:27 +08:00
parent d96d09e84e
commit ffca412f97
3 changed files with 13 additions and 9 deletions

View File

@ -101,15 +101,17 @@
},
function(json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
if (res.status == 200) {
let _json = JSON.parse(json);
if (_json.code == 0) {
//关闭model
$('#addFloorModel').modal('hide');
vc.component.clearAddFloorInfo();
vc.emit('listFloor', 'listFloorData', {});
vc.emit('floorUnitTree','refreshTree',{})
vc.emit('floorUnitTree', 'refreshTree', {})
return;
}
vc.component.addFloorInfo.errorInfo = json;
//vc.component.addFloorInfo.errorInfo = json;
vc.toast(_json.msg);
},
function(errInfo, error) {
console.log('请求失败处理');

View File

@ -101,18 +101,18 @@
},
function(json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
if (res.status == 200) {
let _json = JSON.parse(json);
if (_json.code == 0) {
//关闭model
$('#editFloorModel').modal('hide');
vc.component.clearEditFloorInfo();
vc.emit('listFloor', 'listFloorData', {});
vc.emit('floorUnitTree','refreshTree',{
floorId:$that.editFloorInfo.floorId
vc.emit('floorUnitTree', 'refreshTree', {
floorId: $that.editFloorInfo.floorId
})
return;
}
vc.component.editFloorInfo.errorInfo = json;
vc.toast(_json.msg);
},
function(errInfo, error) {
console.log('请求失败处理');

View File

@ -17,6 +17,7 @@
paymentCds: [],
billTypes: [],
isDefaults: [],
curPage: DEFAULT_PAGE,
conditions: {
configId: '',
feeFlag: '',
@ -54,10 +55,11 @@
_initEvent: function() {
vc.on('feeConfigManage', 'listFeeConfig',
function(_param) {
vc.component._listFeeConfigs(DEFAULT_PAGE, DEFAULT_ROWS);
vc.component._listFeeConfigs($that.feeConfigManageInfo.curPage, DEFAULT_ROWS);
});
vc.on('pagination', 'page_event',
function(_currentPage) {
$that.feeConfigManageInfo.curPage = _currentPage;
vc.component._listFeeConfigs(_currentPage, DEFAULT_ROWS);
});
},