|
@@ -5,14 +5,27 @@
|
|
|
unitInfo:{
|
|
unitInfo:{
|
|
|
units:[],
|
|
units:[],
|
|
|
_currentFloorId:'',
|
|
_currentFloorId:'',
|
|
|
|
|
+ moreCondition:false,
|
|
|
|
|
+ conditions:{
|
|
|
|
|
+ floorId:'',
|
|
|
|
|
+ floorName:'',
|
|
|
|
|
+ unitNum:'',
|
|
|
|
|
+ layerCount:'',
|
|
|
|
|
+ lift:'',
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
_initMethod:function(){
|
|
_initMethod:function(){
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
_initEvent:function(){
|
|
_initEvent:function(){
|
|
|
|
|
+ vc.on('unit','chooseFloor',function(_param){
|
|
|
|
|
+ vc.component.conditions.floorId = _param.floorId;
|
|
|
|
|
+ vc.component.conditions.floorName = _param.floorName;
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
vc.on('unit','loadUnit',function(_param){
|
|
vc.on('unit','loadUnit',function(_param){
|
|
|
|
|
+ vc.component.conditions.floorId = _param.floorId;
|
|
|
vc.component._loadUnits(_param);
|
|
vc.component._loadUnits(_param);
|
|
|
});
|
|
});
|
|
|
vc.on('unit','loadData',function(_param){
|
|
vc.on('unit','loadData',function(_param){
|
|
@@ -22,23 +35,21 @@
|
|
|
methods:{
|
|
methods:{
|
|
|
_loadUnits:function(_param){
|
|
_loadUnits:function(_param){
|
|
|
vc.component.unitInfo._currentFloorId=_param.floorId;
|
|
vc.component.unitInfo._currentFloorId=_param.floorId;
|
|
|
|
|
+ vc.component.unitInfo.conditions.communityId = vc.getCurrentCommunity().communityId;
|
|
|
var param = {
|
|
var param = {
|
|
|
- params:{
|
|
|
|
|
- floorId:_param.floorId,
|
|
|
|
|
- communityId:vc.getCurrentCommunity().communityId
|
|
|
|
|
- }
|
|
|
|
|
- };
|
|
|
|
|
|
|
+ params:vc.component.unitInfo.conditions
|
|
|
|
|
+ };
|
|
|
//发送get请求
|
|
//发送get请求
|
|
|
- vc.http.get('unit',
|
|
|
|
|
- 'loadUnits',
|
|
|
|
|
- param,
|
|
|
|
|
- function(json){
|
|
|
|
|
- var _unitInfo = JSON.parse(json);
|
|
|
|
|
- vc.component.unitInfo.units = _unitInfo;
|
|
|
|
|
-
|
|
|
|
|
- },function(){
|
|
|
|
|
- console.log('请求失败处理');
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ vc.http.get('unit',
|
|
|
|
|
+ 'loadUnits',
|
|
|
|
|
+ param,
|
|
|
|
|
+ function(json){
|
|
|
|
|
+ var _unitInfo = JSON.parse(json);
|
|
|
|
|
+ vc.component.unitInfo.units = _unitInfo;
|
|
|
|
|
+ },
|
|
|
|
|
+ function(){
|
|
|
|
|
+ console.log('请求失败处理');
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
_openDeleteUnitModel:function(_unit){
|
|
_openDeleteUnitModel:function(_unit){
|
|
|
_unit.floorId = vc.component.unitInfo._currentFloorId;
|
|
_unit.floorId = vc.component.unitInfo._currentFloorId;
|
|
@@ -47,6 +58,21 @@
|
|
|
_openEditUnitModel:function(_unit){
|
|
_openEditUnitModel:function(_unit){
|
|
|
_unit.floorId = vc.component.unitInfo._currentFloorId;
|
|
_unit.floorId = vc.component.unitInfo._currentFloorId;
|
|
|
vc.emit('editUnit','openUnitModel',_unit);
|
|
vc.emit('editUnit','openUnitModel',_unit);
|
|
|
|
|
+ },
|
|
|
|
|
+ _openChooseFloorMethod:function(){
|
|
|
|
|
+ vc.emit('searchFloor','openSearchFloorModel',{});
|
|
|
|
|
+ },
|
|
|
|
|
+ openAddUnitModel(){
|
|
|
|
|
+ vc.emit('addUnit','addUnitModel',{
|
|
|
|
|
+ floorId:vc.component.unitInfo.conditions.floorId
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ _moreCondition:function(){
|
|
|
|
|
+ if(vc.component.unitInfo.moreCondition){
|
|
|
|
|
+ vc.component.unitInfo.moreCondition = false;
|
|
|
|
|
+ }else{
|
|
|
|
|
+ vc.component.unitInfo.moreCondition = true;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|