|
|
@ -21,11 +21,11 @@ |
|
|
|
<el-table-column prop="contacts" label="联系人"></el-table-column> |
|
|
|
<el-table-column prop="mobile" label="联系人电话"></el-table-column> |
|
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width"> |
|
|
|
<template slot="header" slot-scope="scope"> |
|
|
|
<template slot="header"> |
|
|
|
<el-button size="mini" |
|
|
|
type="primary" |
|
|
|
icon="el-icon-plus" |
|
|
|
@click="addAgency(scope.row)" |
|
|
|
@click="addAgency()" |
|
|
|
>新增</el-button> |
|
|
|
</template> |
|
|
|
<template slot-scope="scope"> |
|
|
@ -97,7 +97,7 @@ |
|
|
|
<el-table v-show="currentAgencyStaffTableFlag" |
|
|
|
:data="agencyStaffTableListData" |
|
|
|
style="width: 100%" |
|
|
|
height="250"> |
|
|
|
height="350"> |
|
|
|
<el-table-column prop="name" label="本级工作人员名字" width="260"></el-table-column> |
|
|
|
<el-table-column prop="roles" label="本级工作人员职责" width="260"> |
|
|
|
<template slot-scope="scope"> |
|
|
@ -142,7 +142,7 @@ |
|
|
|
</el-table> |
|
|
|
|
|
|
|
<!-- 下级机关单位/基层科室工作人员 --> |
|
|
|
<el-table height="250" v-show="departmentStaffTableFlag" |
|
|
|
<el-table height="350" v-show="departmentStaffTableFlag" |
|
|
|
:data="departmentStaffTableListData" |
|
|
|
style="width: 100%"> |
|
|
|
<el-table-column prop="name" label="下级机关单位/基层科室工作人员" width="260"></el-table-column> |
|
|
@ -168,7 +168,7 @@ |
|
|
|
<el-table v-show="gridStaffTableFlag" |
|
|
|
:data="gridStaffTableListData" |
|
|
|
style="width: 100%" |
|
|
|
height="250"> |
|
|
|
height="350"> |
|
|
|
<el-table-column prop="name" label="网格工作人员名字" width="260"></el-table-column> |
|
|
|
<el-table-column prop="roles" label="网格工作人员职责" width="260"> |
|
|
|
<template slot-scope="scope"> |
|
|
@ -698,6 +698,13 @@ export default { |
|
|
|
// 当前被操作的网格的ID |
|
|
|
currentGridOrgId:'63d5ff92ea981b1c58e4914ac894c610', |
|
|
|
|
|
|
|
// 当前被操作的组织的级别 |
|
|
|
currentAgencyLevel: localStorage.getItem("level"), |
|
|
|
currentAreaCode: '', |
|
|
|
parentAreaCode: '', |
|
|
|
parentAgencyId: localStorage.getItem("agencyId"), |
|
|
|
parentAgencyLevel: localStorage.getItem("level"), |
|
|
|
|
|
|
|
// 经纬度坐标 |
|
|
|
lat:'11', |
|
|
|
lng:'11', |
|
|
@ -793,12 +800,6 @@ export default { |
|
|
|
agencyId:'', |
|
|
|
customerId:'' |
|
|
|
}, |
|
|
|
// 当前用户信息,用于获取组织区划 |
|
|
|
userForm:{ |
|
|
|
areaCode:'', |
|
|
|
level:'', |
|
|
|
parentAgencyId:'' |
|
|
|
}, |
|
|
|
// 组织详细信息 |
|
|
|
OrgDetailsForm:{ |
|
|
|
level:'', |
|
|
@ -1747,6 +1748,13 @@ export default { |
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
if(code === 0){ |
|
|
|
// 社区级为最低级组织,不展示下级组织列表 |
|
|
|
this.currentAgencyLevel = data.level |
|
|
|
this.currentAreaCode = data.areaCode |
|
|
|
if (data.parentList && data.parentList.length > 0) { |
|
|
|
this.parentAreaCode = data.parentList[data.parentList.length-1].areaCode |
|
|
|
this.parentAgencyId = data.parentList[data.parentList.length-1].id |
|
|
|
this.parentAgencyLevel = data.parentList[data.parentList.length-1].level |
|
|
|
} |
|
|
|
if (data.level === 'community') { |
|
|
|
this.agencyTableFlag = false |
|
|
|
} else { |
|
|
@ -1892,33 +1900,14 @@ export default { |
|
|
|
this.assembleBreadcrumbArr(orgId, 'grid') |
|
|
|
} */ |
|
|
|
}, |
|
|
|
// 获取当前用户信息 |
|
|
|
async getUser(){ |
|
|
|
const url = '/gov/org/agency/agencydetail' |
|
|
|
|
|
|
|
let params = { |
|
|
|
agencyId: this.currentAgencyId |
|
|
|
} |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url,params) |
|
|
|
|
|
|
|
if(code === 0){ |
|
|
|
this.userForm.areaCode = data.areaCode |
|
|
|
this.userForm.level = data.level |
|
|
|
this.userForm.parentAgencyId = data.agencyId |
|
|
|
this.getZoning() |
|
|
|
}else{ |
|
|
|
this.$message.error(msg) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 获取组织区划信息 |
|
|
|
async getZoning(){ |
|
|
|
async getZoning(areaCode, parentAgencyId, parentAgencyLevel){ |
|
|
|
const url = '/data/aggregator/org/nextlevelareacodelist' |
|
|
|
|
|
|
|
let params = { |
|
|
|
areaCode:this.userForm.areaCode, |
|
|
|
level:this.userForm.level, |
|
|
|
parentAgencyId:this.userForm.parentAgencyId |
|
|
|
areaCode: areaCode, |
|
|
|
level: parentAgencyLevel, |
|
|
|
parentAgencyId: parentAgencyId |
|
|
|
} |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url,params) |
|
|
@ -1950,27 +1939,27 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
addAgency(row){ |
|
|
|
addAgency(){ |
|
|
|
this.createAgencyDialogFlag = true |
|
|
|
this.addNewAgencyRest() |
|
|
|
this.getUser() |
|
|
|
this.getZoning(this.currentAreaCode, this.currentAgencyId, this.currentAgencyLevel) |
|
|
|
}, |
|
|
|
// 新增组织确定按钮 |
|
|
|
async submitaddNewAgency(){ |
|
|
|
const url = '/gov/org/agency/addagency-v2' |
|
|
|
|
|
|
|
let params = { |
|
|
|
parentAgencyId:this.userForm.parentAgencyId, |
|
|
|
agencyName:this.agencyForm.agencyName, |
|
|
|
level:this.agencyForm.level, |
|
|
|
areaCodeSwitch:'closed', |
|
|
|
areaCode:this.agencyForm.areaCode, |
|
|
|
areaName:this.agencyForm.areaName, |
|
|
|
contacts:this.agencyForm.contacts, |
|
|
|
mobile:this.agencyForm.mobile, |
|
|
|
code:this.agencyForm.code, |
|
|
|
latitude:this.latitude, |
|
|
|
longitude:this.longitude |
|
|
|
parentAgencyId: this.parentAgencyId, |
|
|
|
agencyName: this.agencyForm.agencyName, |
|
|
|
level: this.agencyForm.level, |
|
|
|
areaCodeSwitch: 'closed', |
|
|
|
areaCode: this.agencyForm.areaCode, |
|
|
|
areaName: this.agencyForm.areaName, |
|
|
|
contacts: this.agencyForm.contacts, |
|
|
|
mobile: this.agencyForm.mobile, |
|
|
|
code: this.agencyForm.code, |
|
|
|
latitude: this.latitude, |
|
|
|
longitude: this.longitude |
|
|
|
} |
|
|
|
|
|
|
|
const { data, code, msg } = await requestPost(url,params) |
|
|
@ -1990,16 +1979,15 @@ export default { |
|
|
|
// 修改面包屑 |
|
|
|
modifyOrgInfo(){ |
|
|
|
this.judgeOrgInfoLevel = this.breadcrumbArr[this.breadcrumbArr.length-1] |
|
|
|
console.log(this.judgeOrgInfoLevel) |
|
|
|
if(this.judgeOrgInfoLevel.type === "agency"){ |
|
|
|
this.getOrgDetailsById() |
|
|
|
setTimeout(() => { |
|
|
|
if(this.OrgDetailsForm.level === "district"){ |
|
|
|
/** 修改市区级弹窗 */ |
|
|
|
this.modifyCityOrgPop = true |
|
|
|
}else { |
|
|
|
} else { |
|
|
|
/** 街道级和社区级弹窗 */ |
|
|
|
this.getUser() |
|
|
|
this.getZoning(this.parentAreaCode, this.parentAgencyId, this.parentAgencyLevel) |
|
|
|
this.streetOrCommunity = true |
|
|
|
} |
|
|
|
}, 1000); |
|
|
@ -2026,6 +2014,15 @@ export default { |
|
|
|
const { data, code, msg } = await requestPost(url,params) |
|
|
|
|
|
|
|
if(code === 0){ |
|
|
|
|
|
|
|
this.currentAgencyLevel = data.level |
|
|
|
this.currentAreaCode = data.areaCode |
|
|
|
if (data.parentList && data.parentList.length > 0) { |
|
|
|
this.parentAreaCode = data.parentList[data.parentList.length-1].areaCode |
|
|
|
this.parentAgencyId = data.parentList[data.parentList.length-1].id |
|
|
|
this.parentAgencyLevel = data.parentList[data.parentList.length-1].level |
|
|
|
} |
|
|
|
|
|
|
|
this.OrgDetailsForm.level = data.level |
|
|
|
this.OrgDetailsForm.agencyName = data.agencyName |
|
|
|
this.OrgDetailsForm.code = data.code |
|
|
|