Browse Source

优化组织 编辑时的联动性

wuxw 7 years ago
parent
commit
bc555177b6

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

@@ -19,7 +19,6 @@
                                 <div class="col-sm-10">
                                     <select class="custom-select" v-model="editOrgInfo.orgLevel">
                                         <option selected disabled value="">必填,请选择组织级别</option>
-                                        <option value="1">公司级</option>
                                         <option value="2">分公司级</option>
                                         <option value="3">部门级</option>
                                     </select></div>
@@ -28,10 +27,8 @@
                                 <label class="col-sm-2 col-form-label">上级组织</label>
                                 <div class="col-sm-10">
                                     <select class="custom-select" v-model="editOrgInfo.parentOrgId">
-                                        <option selected disabled value="">必填,请选择上级ID</option>
-                                        <option value="1">公司级</option>
-                                        <option value="2">分公司级</option>
-                                        <option value="3">部门级</option>
+                                        <option selected disabled value="">必填,请选择上级组织</option>
+                                        <option v-for="parentOrg in editOrgInfo.parentOrg" :value="parentOrg.orgId">{{parentOrg.orgName}}</option>
                                     </select></div>
                             </div>
                             <div class="form-group row">

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

@@ -21,7 +21,7 @@
             }
          },
          _initMethod:function(){
-
+            vc.component._editOrgListParentOrgInfo();
          },
          _initEvent:function(){
              vc.on('editOrg','openEditOrgModal',function(_params){

+ 2 - 2
WebService/src/main/resources/components/orgPackage/org-manage/orgManage.js

@@ -42,9 +42,9 @@
                 handler(val, oldVal){
                     if(val == ''){
                         vc.component.orgManageInfo.conditions.parentOrgId = vc.component.orgManageInfo.conditions.headOrgId;
-                        return ;
+                    }else{
+                        vc.component.orgManageInfo.conditions.parentOrgId = val;
                     }
-                   vc.component.orgManageInfo.conditions.parentOrgId = val;
                    vc.component._listOrgs(DEFAULT_PAGE, DEFAULT_ROWS);
                 },
                 deep:true