From b3f85b60ba9e39572e686009d36b5e5d7e81e910 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期四, 11 七月 2019 20:30:10 +0800
Subject: [PATCH] 合并远程信息

---
 WebService/src/main/resources/components/unit/unit.js |   17 +++++++++++++----
 1 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/WebService/src/main/resources/components/unit/unit.js b/WebService/src/main/resources/components/unit/unit.js
index 023fae3..cedddf4 100644
--- a/WebService/src/main/resources/components/unit/unit.js
+++ b/WebService/src/main/resources/components/unit/unit.js
@@ -11,25 +11,30 @@
 
         },
         _initEvent:function(){
+
             vc.on('unit','loadUnit',function(_param){
+                vc.component._loadUnits(_param);
+            });
+            vc.on('unit','loadData',function(_param){
                 vc.component._loadUnits(_param);
             });
         },
         methods:{
             _loadUnits:function(_param){
-                vc.component.staffPrivilegeInfo._currentFloorId=_param.floorId;
+                vc.component.unitInfo._currentFloorId=_param.floorId;
                 var param = {
                     params:{
-                        floorId:_param.floorId
+                        floorId:_param.floorId,
+                        communityId:vc.getCurrentCommunity().communityId
                     }
                 };
              //鍙戦�乬et璇锋眰
             vc.http.get('unit',
-                         'loadUnit',
+                         'loadUnits',
                           param,
                           function(json){
                              var _unitInfo = JSON.parse(json);
-                             vc.component.unitInfo.units = _unitInfo.datas;
+                             vc.component.unitInfo.units = _unitInfo;
 
                           },function(){
                              console.log('璇锋眰澶辫触澶勭悊');
@@ -38,6 +43,10 @@
             _openDeleteUnitModel:function(_unit){
                 _unit.floorId = vc.component.unitInfo._currentFloorId;
                 vc.emit('deleteUnit','openUnitModel',_unit);
+            },
+            _openEditUnitModel:function(_unit){
+                _unit.floorId = vc.component.unitInfo._currentFloorId;
+                vc.emit('editUnit','openUnitModel',_unit);
             }
         }
     });

--
Gitblit v1.8.0