Browse Source

行政组织修改

shibei_master
YUJT 3 years ago
parent
commit
f097014c2e
  1. 75
      src/views/modules/base/organization/organization.vue

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

@ -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,17 +1939,17 @@ 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,
parentAgencyId: this.parentAgencyId,
agencyName: this.agencyForm.agencyName,
level: this.agencyForm.level,
areaCodeSwitch: 'closed',
@ -1990,7 +1979,6 @@ export default {
//
modifyOrgInfo(){
this.judgeOrgInfoLevel = this.breadcrumbArr[this.breadcrumbArr.length-1]
console.log(this.judgeOrgInfoLevel)
if(this.judgeOrgInfoLevel.type === "agency"){
this.getOrgDetailsById()
setTimeout(() => {
@ -1999,7 +1987,7 @@ export default {
this.modifyCityOrgPop = true
} 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

Loading…
Cancel
Save