|
|
@ -140,6 +140,7 @@ |
|
|
|
agencyListVisible:false, |
|
|
|
orgList: [], |
|
|
|
agencyId: '', |
|
|
|
level: '', |
|
|
|
partyOrgTypeList: [], |
|
|
|
agencyOrgList:[] |
|
|
|
} |
|
|
@ -156,47 +157,51 @@ |
|
|
|
this.agencyId = localStorage.getItem('agencyId') |
|
|
|
this.dataForm.customerId = localStorage.getItem('customerId') |
|
|
|
this.dataForm.staffId = localStorage.getItem('staffId') |
|
|
|
this.keyWords = '' |
|
|
|
//设置党组织类型 |
|
|
|
|
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['dataForm'].resetFields() |
|
|
|
this.dataForm.latitude = '' |
|
|
|
if (this.dataForm.id) { |
|
|
|
this.setPartyOrgType() |
|
|
|
this.getInfo() |
|
|
|
} else { |
|
|
|
this.setPartyOrgType() |
|
|
|
this.initMap() |
|
|
|
if(this.dataForm.orgId) { |
|
|
|
this.dataForm.mySelectOrg = this.dataForm.orgId |
|
|
|
this.dataForm.orgPid = this.dataForm.orgId |
|
|
|
this.dataForm.orgPids = this.dataForm.orgPids ? this.dataForm.orgPids + ':' + this.dataForm.orgId : this.dataForm.orgId |
|
|
|
this.dataForm.partyOrgType = this.dataForm._partyOrgType |
|
|
|
if (this.dataForm.partyOrgType === '0') { // 党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部 |
|
|
|
this.dataForm.partyOrgType = '1' |
|
|
|
} else if (this.dataForm.partyOrgType === '1') { |
|
|
|
this.dataForm.partyOrgType = '2' |
|
|
|
} else if (this.dataForm.partyOrgType === '2') { |
|
|
|
this.dataForm.partyOrgType = '3' |
|
|
|
} else if (this.dataForm.partyOrgType === '3') { |
|
|
|
this.dataForm.partyOrgType = '4' |
|
|
|
} else if (this.dataForm.partyOrgType === '4') { |
|
|
|
this.dataForm.partyOrgType = '5' |
|
|
|
} |
|
|
|
console.log(this.dataForm.orgPid) |
|
|
|
console.log(this.dataForm.orgPids) |
|
|
|
// this.getOrgList() |
|
|
|
console.log(this.dataForm.partyOrgType, this.dataForm.orgPid, this.dataForm.orgPids) |
|
|
|
this.setPartyOrgType_xzxj() |
|
|
|
this.getInfoAgencyLisy() |
|
|
|
} else { |
|
|
|
this.dataForm.mySelectOrg = '' |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
this.setPartyOrgType() |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 设置组织类型 新增党组织 |
|
|
|
setPartyOrgType_xzxj() { |
|
|
|
if (this.dataForm.partyOrgType === '0') { // 党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部 |
|
|
|
this.dataForm.partyOrgType = '1' |
|
|
|
} else if (this.dataForm.partyOrgType === '1') { |
|
|
|
this.dataForm.partyOrgType = '2' |
|
|
|
} else if (this.dataForm.partyOrgType === '2') { |
|
|
|
this.dataForm.partyOrgType = '3' |
|
|
|
} else if (this.dataForm.partyOrgType === '3') { |
|
|
|
this.dataForm.partyOrgType = '4' |
|
|
|
} else if (this.dataForm.partyOrgType === '4') { |
|
|
|
this.dataForm.partyOrgType = '5' |
|
|
|
} |
|
|
|
}, |
|
|
|
//设置组织类型 |
|
|
|
setPartyOrgType() { |
|
|
|
// 社区级:community,街道级:street,区县级: district,市级: city 省级:province |
|
|
|
// 党组织类型 0省委,1市委,2区委,3党工委,4党委,5支部 |
|
|
|
this.level = localStorage.getItem('level') |
|
|
|
this.level = localStorage.getItem('level') ? localStorage.getItem('level') : '' |
|
|
|
if (this.level == 'province') { |
|
|
|
this.partyOrgTypeList = [ |
|
|
|
{value: '0', name: '省委'}, |
|
|
@ -236,35 +241,34 @@ |
|
|
|
}, |
|
|
|
// 选中行政组织 |
|
|
|
changeAgencyOrg () { |
|
|
|
console.log(this.dataForm.agencyId) |
|
|
|
this.getOrgList() |
|
|
|
if(!this.dataForm.orgId){ // 有orgId 证明是从新增下级过来的,新增下级操作 上级党组织不需要查询 |
|
|
|
this.getOrgList() |
|
|
|
} |
|
|
|
}, |
|
|
|
// 选中组织类型 组织类型为支部时不需要选择行政组织 |
|
|
|
changePartyOrgType(value){ |
|
|
|
if(value != '5'){ // 支部 |
|
|
|
this.dataForm.agencyId = '' |
|
|
|
if(value == '5'){ // 支部 不选择行政组织 |
|
|
|
this.dataForm.agencyId = localStorage.getItem('agencyId') |
|
|
|
this.dataForm.agencyPids = '' |
|
|
|
this.getOrgList() |
|
|
|
} else { |
|
|
|
//根据组织类型获取行政组织 |
|
|
|
this.getInfoAgencyLisy() |
|
|
|
} |
|
|
|
//根据组织类型获取行政组织 |
|
|
|
this.getInfoAgencyLisy() |
|
|
|
// this.$http.get('/gov/org/customeragency/getOrgTreeByUserAndType', {params: {agencyId: this.agencyId, orgType:value}}).then(({data: res}) => { |
|
|
|
// if (res.code !== 0) { |
|
|
|
// return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败') |
|
|
|
// } |
|
|
|
// this.agencyOrgList = this.removeEmptyChildren(res.data) |
|
|
|
// }).catch(() => {}) |
|
|
|
}, |
|
|
|
// 获取党组织列表 |
|
|
|
// 获取上级党组织列表 |
|
|
|
getOrgList() { |
|
|
|
if (!this.dataForm.id) { // 修改不做处理 |
|
|
|
this.orgList = [] |
|
|
|
this.dataForm.mySelectOrg = '', // 我选中的当前党组织 |
|
|
|
this.dataForm.orgPid = '', // 党组织的上级ID,没有上级时为0 |
|
|
|
this.dataForm.orgPids = '' |
|
|
|
} |
|
|
|
this.$http.get('/resi/partymember/icPartyOrg/getParentOrgList', {params: {agencyId: this.dataForm.agencyId, partyOrgType: this.dataForm.partyOrgType}}).then(({data: res}) => { |
|
|
|
if (res.code !== 0) { |
|
|
|
return this.$message.error(res.internalMsg ? res.internalMsg : res.msg ? res.msg : '查询失败') |
|
|
|
} |
|
|
|
this.orgList = this.removeEmptyChildren(res.data) |
|
|
|
// this.orgList.unshift({ |
|
|
|
// partyOrgName: '一级组织', |
|
|
|
// id: '0' |
|
|
|
// }); |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
}, |
|
|
@ -309,8 +313,8 @@ |
|
|
|
this.dataForm.agencyId = this.dataForm.agencyId |
|
|
|
//根据组织类型获取行政组织 |
|
|
|
this.getInfoAgencyLisy() |
|
|
|
// 获取上级党组织 |
|
|
|
this.getOrgList() |
|
|
|
console.log(':::::', JSON.stringify(this.dataForm)) |
|
|
|
this.initMap() |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|