| | |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.org.IAddOrgSMO; |
| | | import com.java110.web.smo.org.IListOrgsSMO; |
| | | import com.java110.web.smo.org.IListParentOrgsSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | |
| | | private IAddOrgSMO addOrgSMOImpl; |
| | | |
| | | @Autowired |
| | | private IListOrgsSMO listOrgsSMOImpl; |
| | | |
| | | @Autowired |
| | | private IListParentOrgsSMO listParentOrgsSMOImpl; |
| | | |
| | | /** |
| | |
| | | public ResponseEntity<String> save(IPageData pd){ |
| | | return addOrgSMOImpl.saveOrg(pd); |
| | | } |
| | | /** |
| | | * 查询组织管理列表 |
| | | * @param pd 页面数据封装 |
| | | * @return 返回 ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> list(IPageData pd){ |
| | | return listOrgsSMOImpl.listOrgs(pd); |
| | | } |
| | | |
| | | |
| | | |
| | | public ResponseEntity<String> getParentOrg(IPageData pd){ |
| | |
| | | public void setListParentOrgsSMOImpl(IListParentOrgsSMO listParentOrgsSMOImpl) { |
| | | this.listParentOrgsSMOImpl = listParentOrgsSMOImpl; |
| | | } |
| | | |
| | | public IListOrgsSMO getListOrgsSMOImpl() { |
| | | return listOrgsSMOImpl; |
| | | } |
| | | |
| | | public void setListOrgsSMOImpl(IListOrgsSMO listOrgsSMOImpl) { |
| | | this.listOrgsSMOImpl = listOrgsSMOImpl; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.org.IDeleteOrgSMO; |
| | | import com.java110.web.smo.org.IListOrgsSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | @Component("deleteOrg") |
| | | public class DeleteOrgComponent { |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private IDeleteOrgSMO deleteOrgSMOImpl; |
| | | |
| | |
| | | |
| | | import com.java110.core.context.IPageData; |
| | | import com.java110.web.smo.org.IEditOrgSMO; |
| | | import com.java110.web.smo.org.IListOrgsSMO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | */ |
| | | @Component("editOrg") |
| | | public class EditOrgComponent { |
| | | @Autowired |
| | | private IListOrgsSMO listOrgsSMOImpl; |
| | | |
| | | @Autowired |
| | | private IEditOrgSMO editOrgSMOImpl; |
| | |
| | | return editOrgSMOImpl.updateOrg(pd); |
| | | } |
| | | |
| | | /** |
| | | * 查询组织管理列表 |
| | | * @param pd 页面数据封装 |
| | | * @return 返回 ResponseEntity 对象 |
| | | */ |
| | | public ResponseEntity<String> list(IPageData pd){ |
| | | return listOrgsSMOImpl.listOrgs(pd); |
| | | } |
| | | |
| | | public IEditOrgSMO getEditOrgSMOImpl() { |
| | | return editOrgSMOImpl; |
| | | } |
| | |
| | | public void setEditOrgSMOImpl(IEditOrgSMO editOrgSMOImpl) { |
| | | this.editOrgSMOImpl = editOrgSMOImpl; |
| | | } |
| | | |
| | | public IListOrgsSMO getListOrgsSMOImpl() { |
| | | return listOrgsSMOImpl; |
| | | } |
| | | |
| | | public void setListOrgsSMOImpl(IListOrgsSMO listOrgsSMOImpl) { |
| | | this.listOrgsSMOImpl = listOrgsSMOImpl; |
| | | } |
| | | } |
| | |
| | | <div class="col-sm-10"> |
| | | <select class="custom-select" v-model="addOrgInfo.parentOrgId"> |
| | | <option selected disabled value="">必填,请选择上级组织</option> |
| | | <option v-for="parentOrg in addOrgInfo.parentOrg" :value="parentOrg.orgId">{{parentOrg.parentOrgName}}</option> |
| | | <option v-for="parentOrg in addOrgInfo.parentOrg" :value="parentOrg.orgId">{{parentOrg.orgName}}</option> |
| | | </select></div> |
| | | </div> |
| | | <div class="form-group row"> |
| | |
| | | errInfo:"组织级别不能为空" |
| | | }, |
| | | { |
| | | limit:"maxin", |
| | | param:"2,50", |
| | | errInfo:"报修人名称必须在2至50字符之间" |
| | | limit:"num", |
| | | param:"", |
| | | errInfo:"组织级别错误" |
| | | }, |
| | | ], |
| | | 'addOrgInfo.parentOrgId':[ |
| | |
| | | }, |
| | | ], |
| | | 'addOrgInfo.description':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"描述不能为空" |
| | | }, |
| | | |
| | | { |
| | | limit:"maxLength", |
| | | param:"200", |
| | |
| | | }, |
| | | clearAddOrgInfo:function(){ |
| | | vc.component.addOrgInfo = { |
| | | orgName:'', |
| | | orgLevel:'', |
| | | parentOrgId:'', |
| | | description:'', |
| | | orgName:'', |
| | | orgLevel:'', |
| | | parentOrgId:'', |
| | | description:'', |
| | | parentOrg:[] |
| | | }; |
| | | }, |
| | | _addOrgListParentOrgInfo:function(){ |
| | |
| | | }; |
| | | |
| | | //发送get请求 |
| | | vc.http.get('orgManage', |
| | | vc.http.get('addOrg', |
| | | 'list', |
| | | param, |
| | | function(json,res){ |
| | |
| | | orgLevel:'', |
| | | parentOrgId:'', |
| | | description:'', |
| | | parentOrg:[] |
| | | |
| | | } |
| | | }, |
| | | watch:{ |
| | | "editOrgInfo.orgLevel":{//深度监听,可监听到对象、数组的变化 |
| | | handler(val, oldVal){ |
| | | vc.component._editOrgListParentOrgInfo(); |
| | | }, |
| | | deep:true |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | |
| | | }, |
| | |
| | | errInfo:"组织级别不能为空" |
| | | }, |
| | | { |
| | | limit:"maxin", |
| | | param:"2,50", |
| | | errInfo:"报修人名称必须在2至50字符之间" |
| | | limit:"num", |
| | | param:"", |
| | | errInfo:"组织级别错误" |
| | | }, |
| | | ], |
| | | 'editOrgInfo.parentOrgId':[ |
| | |
| | | }, |
| | | ], |
| | | 'editOrgInfo.description':[ |
| | | { |
| | | limit:"required", |
| | | param:"", |
| | | errInfo:"描述不能为空" |
| | | }, |
| | | |
| | | { |
| | | limit:"maxLength", |
| | | param:"200", |
| | |
| | | orgLevel:'', |
| | | parentOrgId:'', |
| | | description:'', |
| | | |
| | | parentOrg:[] |
| | | } |
| | | }, |
| | | _editOrgListParentOrgInfo:function(){ |
| | | |
| | | |
| | | var _tmpOrgLevel = vc.component.editOrgInfo.orgLevel; |
| | | |
| | | if(_tmpOrgLevel > 1){ |
| | | _tmpOrgLevel = _tmpOrgLevel-1; |
| | | } |
| | | |
| | | var param = { |
| | | params:{ |
| | | orgLevel:_tmpOrgLevel, |
| | | page: 1, |
| | | row: 30, |
| | | } |
| | | }; |
| | | |
| | | //发送get请求 |
| | | vc.http.get('editOrg', |
| | | 'list', |
| | | param, |
| | | function(json,res){ |
| | | var _orgManageInfo=JSON.parse(json); |
| | | vc.component.editOrgInfo.parentOrg = _orgManageInfo.orgs; |
| | | },function(errInfo,error){ |
| | | console.log('请求失败处理'); |
| | | } |
| | | ); |
| | | } |
| | | } |
| | | }); |