diff --git a/src/views/modules/base/organization/organization.vue b/src/views/modules/base/organization/organization.vue index bf2591cf..47bab968 100644 --- a/src/views/modules/base/organization/organization.vue +++ b/src/views/modules/base/organization/organization.vue @@ -518,6 +518,7 @@ + - + + + + + + @@ -680,6 +690,12 @@ export default { agencyId:'', customerId:'' }, + // 当前用户信息,用于获取组织区划 + userForm:{ + areaCode:'', + level:'', + parentAgencyId:'' + }, keyWords: '', typeList:[], // 性别字典 @@ -749,6 +765,8 @@ export default { breadcrumbArr: [], // 面包屑 当前所属机构ID currentBreadCrumbKey: '', + // 组织区划数据 + zonings:[], // 校验 rules: { departmentName:[ @@ -780,7 +798,6 @@ export default { } }, addNewAgency(val) { - console.log('555555555555555',val) if (val) { setTimeout(() => { let _t = this @@ -1535,9 +1552,53 @@ export default { this.entryGrid(orgId) } }, + // 获取当前用户信息 + async getUser(){ + const url = '/data/report/screen/agency/agencydetail-multic' + + let params = { + agencyId:localStorage.getItem('agencyId') + } + + const { data, code, msg } = await requestPost(url,params) + + if(code === 0){ + console.log(data) + this.userForm.areaCode = data.areaCode + this.userForm.level = data.level + this.userForm.parentAgencyId = data.agencyId + this.getZoning() + }else{ + this.$message.error(msg) + } + }, + // 获取组织区划信息 + async getZoning(){ + const url = '/data/aggregator/org/nextlevelareacodelist' + + let params = { + areaCode:this.userForm.areaCode, + level:this.userForm.level, + parentAgencyId:this.userForm.parentAgencyId + } + + const { data, code, msg } = await requestPost(url,params) + + if(code === 0){ + this.zonings = data + }else{ + this.$message.error(msg) + } + + }, + + handelZoing(val){ + console.log(val) + }, addAgency(row){ this.addNewAgency = true + this.getUser() }, // 新增组织确定按钮 submitaddNewAgency(){ @@ -1588,8 +1649,8 @@ export default { \ No newline at end of file