소스 검색

优化添加组织功能

wuxw 6 년 전
부모
커밋
0d8d94898f

+ 3 - 1
WebService/src/main/resources/components/orgPackage/add-org/addOrg.js

@@ -13,6 +13,7 @@
                 parentOrgId: '',
                 description: '',
                 belongCommunityId: '',
+                communityId: '',
                 parentOrg:[],
                 belongCommunitys:[]
 
@@ -40,7 +41,7 @@
                     vc.component.addOrgInfo.parentOrgId = _param.parentOrgId;
                     vc.component.addOrgInfo.orgLevel = _param.orgLevel;
                     if(_param.parentOrgId == 3){ // 部门是不能改小区的,是依赖分公司的小区信息
-                        vc.component.addOrgInfo.belongCommunityId = _param.belongCommunityId;
+                        vc.component.addOrgInfo.communityId = _param.belongCommunityId;
                     }
                 }
                 $('#addOrgModel').modal('show');
@@ -114,6 +115,7 @@
             }
             ,
             saveOrgInfo: function () {
+                vc.component.addOrgInfo.belongCommunityId = vc.component.addOrgInfo.communityId;
                 if (!vc.component.addOrgValidate()) {
                     vc.message(vc.validate.errInfo);
 

+ 1 - 1
WebService/src/main/resources/components/orgPackage/edit-org/editOrg.html

@@ -37,7 +37,7 @@
                                     <select class="custom-select" v-model="editOrgInfo.belongCommunityId" v-bind:disabled="addOrgInfo.orgLevel == 3">
                                         <option selected disabled value="">必填,请选择隶属小区</option>
                                         <option  value="9999">入驻所有小区</option>
-                                        <option v-for="belongCommunity in editOrgInfo.belongCommunitys" :value="belongCommunity.belongCommunityId">
+                                        <option v-for="belongCommunity in editOrgInfo.belongCommunitys" :value="belongCommunity.communityId">
                                             {{belongCommunity.name}}
                                         </option>
                                     </select></div>

+ 6 - 4
WebService/src/main/resources/components/orgPackage/edit-org/editOrg.js

@@ -8,6 +8,7 @@
                 orgLevel: '',
                 parentOrgId: '',
                 belongCommunityId: '',
+                communityId: '',
                 description: '',
                 parentOrg: []
 
@@ -30,7 +31,7 @@
                 vc.component.refreshEditOrgInfo();
                 $('#editOrgModel').modal('show');
                 vc.copyObject(_params, vc.component.editOrgInfo);
-                vc.component.editOrgInfo.communityId = vc.getCurrentCommunity().communityId;
+                vc.component.editOrgInfo.communityId = vc.component.editOrgInfo.belongCommunityId;
             });
         },
         methods: {
@@ -104,6 +105,7 @@
                 });
             },
             editOrg: function () {
+                vc.component.editOrgInfo.belongCommunityId = vc.component.editOrgInfo.communityId;
                 if (!vc.component.editOrgValidate()) {
                     vc.message(vc.validate.errInfo);
                     return;
@@ -171,11 +173,11 @@
                     }
                 );
             },
-            _loadEditEnterCommunitys:function () {
+            _loadEditEnterCommunitys: function () {
                 //belongCommunitys
                 var param = {
-                    params:{
-                        _uid:'mmmllnnjhhjjh'
+                    params: {
+                        _uid: 'mmmllnnjhhjjh'
                     }
                 }