Browse Source

组织区划

shibei_master
HAHA 3 years ago
parent
commit
a2b5c3146c
  1. 73
      src/views/modules/base/organization/organization.vue

73
src/views/modules/base/organization/organization.vue

@ -518,6 +518,7 @@
</div> </div>
</el-dialog> </el-dialog>
<!-- 新增组织 -->
<el-dialog <el-dialog
title="新增组织" title="新增组织"
:visible.sync="addNewAgency" :visible.sync="addNewAgency"
@ -529,7 +530,16 @@
</el-form-item> </el-form-item>
<!-- 组织区划 --> <!-- 组织区划 -->
<el-form-item label="组织区划">
<el-select v-model="zonings.areaCode" placeholder="请选择组织区划" @change="handelZoing">
<el-option
v-for="item in zonings"
:key="item.areaCode"
:label="item.areaName"
:value="item.areaCode">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="组织编码"> <el-form-item label="组织编码">
<el-input v-model="agencyForm.code" placeholder="请输入组织编码"></el-input> <el-input v-model="agencyForm.code" placeholder="请输入组织编码"></el-input>
@ -680,6 +690,12 @@ export default {
agencyId:'', agencyId:'',
customerId:'' customerId:''
}, },
// ,
userForm:{
areaCode:'',
level:'',
parentAgencyId:''
},
keyWords: '', keyWords: '',
typeList:[], typeList:[],
// //
@ -749,6 +765,8 @@ export default {
breadcrumbArr: [], breadcrumbArr: [],
// ID // ID
currentBreadCrumbKey: '', currentBreadCrumbKey: '',
//
zonings:[],
// //
rules: { rules: {
departmentName:[ departmentName:[
@ -780,7 +798,6 @@ export default {
} }
}, },
addNewAgency(val) { addNewAgency(val) {
console.log('555555555555555',val)
if (val) { if (val) {
setTimeout(() => { setTimeout(() => {
let _t = this let _t = this
@ -1535,9 +1552,53 @@ export default {
this.entryGrid(orgId) 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){ addAgency(row){
this.addNewAgency = true this.addNewAgency = true
this.getUser()
}, },
// //
submitaddNewAgency(){ submitaddNewAgency(){
@ -1588,8 +1649,8 @@ export default {
<style scoped> <style scoped>
#container { #container {
width: 50%; width: 100%;
height: 50%; height: 100%;
} }
#info{ #info{
left: 20px; left: 20px;
@ -1601,7 +1662,7 @@ export default {
border-radius: 3px; border-radius: 3px;
} }
#con { #con {
width: 50%; width: 100%;
height: 50%; height: 100%;
} }
</style> </style>
Loading…
Cancel
Save