|
|
@ -63,17 +63,10 @@ |
|
|
|
>新增</el-button> |
|
|
|
</template> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button v-show="agenButton" |
|
|
|
size="mini" |
|
|
|
type="warning" |
|
|
|
icon="el-icon-plus" |
|
|
|
@click="entryAgency(scope.row)" |
|
|
|
>进入</el-button> |
|
|
|
<el-button v-show="agenButtonTwo" |
|
|
|
size="mini" |
|
|
|
<el-button size="mini" |
|
|
|
type="warning" |
|
|
|
icon="el-icon-plus" |
|
|
|
@click="entryAgencyTwo(scope.row)" |
|
|
|
@click="entryAgency(scope.row.agencyId)" |
|
|
|
>进入</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
@ -98,7 +91,7 @@ |
|
|
|
size="mini" |
|
|
|
type="warning" |
|
|
|
icon="el-icon-plus" |
|
|
|
@click="entryCommunity(scope.row)" |
|
|
|
@click="entryDepartment(scope.row.departmentId)" |
|
|
|
>进入</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
@ -123,7 +116,7 @@ |
|
|
|
size="mini" |
|
|
|
type="warning" |
|
|
|
icon="el-icon-plus" |
|
|
|
@click="entryGrid(scope.row)" |
|
|
|
@click="entryGrid(scope.row.gridId)" |
|
|
|
>进入</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
@ -567,8 +560,6 @@ import { requestPost } from "@/js/dai/request"; |
|
|
|
export default { |
|
|
|
data(){ |
|
|
|
return{ |
|
|
|
agenButtonTwo:false, |
|
|
|
agenButton:true, |
|
|
|
// 新增组织弹窗 |
|
|
|
addNewAgency:false, |
|
|
|
// 本级人员是否显示 |
|
|
@ -1177,11 +1168,11 @@ export default { |
|
|
|
this.addNewAgency = false |
|
|
|
}, |
|
|
|
// 进入网格,查询网格所属人员 |
|
|
|
entryGrid(row){ |
|
|
|
entryGrid(gridId){ |
|
|
|
this.gridDataPeo = [] |
|
|
|
this.communityDataPeo =[] |
|
|
|
this.agencyDataPeo = [] |
|
|
|
this.gridOrgId = row.gridId |
|
|
|
this.gridOrgId = gridId |
|
|
|
this.deptPeo = false |
|
|
|
this.GridWorkPeo = true |
|
|
|
this.levelPeo = false |
|
|
@ -1192,14 +1183,14 @@ export default { |
|
|
|
this.officeList = false |
|
|
|
this.GridList = false |
|
|
|
this.GridPeo() |
|
|
|
this.assembleBreadcrumbArr(row.gridId, 'grid') |
|
|
|
this.assembleBreadcrumbArr(gridId, 'grid') |
|
|
|
}, |
|
|
|
// 进入社区,查询社区所属人员 |
|
|
|
entryCommunity(row){ |
|
|
|
entryDepartment(departmentId){ |
|
|
|
this.gridDataPeo = [] |
|
|
|
this.communityDataPeo = [] |
|
|
|
this.agencyDataPeo = [] |
|
|
|
this.communityOrgId = row.departmentId |
|
|
|
this.communityOrgId = departmentId |
|
|
|
this.levelPeo = false |
|
|
|
this.deptPeo = true |
|
|
|
this.GridWorkPeo = false |
|
|
@ -1210,54 +1201,30 @@ export default { |
|
|
|
this.OrganizationList = false |
|
|
|
this.officeList = false |
|
|
|
this.communityPeo() |
|
|
|
this.assembleBreadcrumbArr(row.departmentId, 'department') |
|
|
|
this.assembleBreadcrumbArr(departmentId, 'department') |
|
|
|
}, |
|
|
|
|
|
|
|
// 进入组织,重新渲染 |
|
|
|
entryAgency(row){ |
|
|
|
this.tableData = [] |
|
|
|
this.communityData = [] |
|
|
|
this.gridData = [] |
|
|
|
this.gridDataPeo = [] |
|
|
|
this.agencyDataPeo = [] |
|
|
|
this.communityDataPeo = [] |
|
|
|
this.agencyId = row.agencyId |
|
|
|
this.getCommunityList() |
|
|
|
this.getGridList() |
|
|
|
this.communityOpen = true |
|
|
|
this.gridOpen = true |
|
|
|
this.anId = row.agencyId |
|
|
|
this.agencyPeo() |
|
|
|
this.entry = true |
|
|
|
this.levelPeo = true |
|
|
|
this.agencyId = row.agencyId |
|
|
|
this.agenButton = false |
|
|
|
this.agenButtonTwo = true |
|
|
|
this.getAgencyList() |
|
|
|
this.assembleBreadcrumbArr(row.agencyId, 'agency') |
|
|
|
}, |
|
|
|
entryAgencyTwo(row){ |
|
|
|
entryAgency(agencyId){ |
|
|
|
this.tableData = [] |
|
|
|
this.communityData = [] |
|
|
|
this.gridData = [] |
|
|
|
this.gridDataPeo = [] |
|
|
|
this.agencyDataPeo = [] |
|
|
|
this.communityDataPeo = [] |
|
|
|
this.agencyId = row.agencyId |
|
|
|
this.agencyId = agencyId |
|
|
|
this.getCommunityList() |
|
|
|
this.getGridList() |
|
|
|
this.communityOpen = true |
|
|
|
this.gridOpen = true |
|
|
|
this.anId = row.agencyId |
|
|
|
this.anId = agencyId |
|
|
|
this.agencyPeo() |
|
|
|
this.entry = true |
|
|
|
this.levelPeo = true |
|
|
|
this.agencyId = row.agencyId |
|
|
|
this.agencyId = agencyId |
|
|
|
this.getAgencyList() |
|
|
|
this.assembleBreadcrumbArr(row.agencyId, 'agency') |
|
|
|
this.OrganizationList = false |
|
|
|
this.assembleBreadcrumbArr(agencyId, 'agency') |
|
|
|
}, |
|
|
|
|
|
|
|
// 新增组织 |
|
|
|
addCommunity(row){ |
|
|
|
|
|
|
@ -1480,11 +1447,24 @@ export default { |
|
|
|
} |
|
|
|
const { data, code, msg } = await requestPost(url, params) |
|
|
|
if(code === 0){ |
|
|
|
if (data.level === 'community') { |
|
|
|
this.OrganizationList = false |
|
|
|
} else { |
|
|
|
this.OrganizationList = true |
|
|
|
} |
|
|
|
if (this.breadcrumbArr.length === 0) { |
|
|
|
this.breadcrumbArr = [{id: data.agencyId, name: data.agencyName, type: orgType}] |
|
|
|
} else { |
|
|
|
let breadcrumb = {id: data.agencyId, name: data.agencyName, type: orgType} |
|
|
|
this.breadcrumbArr.push(breadcrumb) |
|
|
|
let hasBreadcrumbArr = false |
|
|
|
this.breadcrumbArr.forEach(function (bc) { |
|
|
|
if (bc.id === id) { |
|
|
|
hasBreadcrumbArr = true |
|
|
|
} |
|
|
|
}) |
|
|
|
if (hasBreadcrumbArr === false) { |
|
|
|
let breadcrumb = {id: data.agencyId, name: data.agencyName, type: orgType} |
|
|
|
this.breadcrumbArr.push(breadcrumb) |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
@ -1499,8 +1479,16 @@ export default { |
|
|
|
if (this.breadcrumbArr.length === 0) { |
|
|
|
this.breadcrumbArr = [{id: data.departmentId, name: data.departmentName, type: orgType}] |
|
|
|
} else { |
|
|
|
let breadcrumb = {id: data.departmentId, name: data.departmentName, type: orgType} |
|
|
|
this.breadcrumbArr.push(breadcrumb) |
|
|
|
let hasBreadcrumbArr = false |
|
|
|
this.breadcrumbArr.forEach(function (bc) { |
|
|
|
if (bc.id === id) { |
|
|
|
hasBreadcrumbArr = true |
|
|
|
} |
|
|
|
}) |
|
|
|
if (hasBreadcrumbArr === false) { |
|
|
|
let breadcrumb = {id: data.departmentId, name: data.departmentName, type: orgType} |
|
|
|
this.breadcrumbArr.push(breadcrumb) |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
@ -1515,8 +1503,16 @@ export default { |
|
|
|
if (this.breadcrumbArr.length === 0) { |
|
|
|
this.breadcrumbArr = [{id: data.grid, name: data.gridName, type: orgType}] |
|
|
|
} else { |
|
|
|
let breadcrumb = {id: data.grid, name: data.gridName, type: orgType} |
|
|
|
this.breadcrumbArr.push(breadcrumb) |
|
|
|
let hasBreadcrumbArr = false |
|
|
|
this.breadcrumbArr.forEach(function (bc) { |
|
|
|
if (bc.id === id) { |
|
|
|
hasBreadcrumbArr = true |
|
|
|
} |
|
|
|
}) |
|
|
|
if (hasBreadcrumbArr === false) { |
|
|
|
let breadcrumb = {id: data.grid, name: data.gridName, type: orgType} |
|
|
|
this.breadcrumbArr.push(breadcrumb) |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.$message.error(msg) |
|
|
@ -1525,8 +1521,19 @@ export default { |
|
|
|
}, |
|
|
|
|
|
|
|
async refreshThisPage (index) { |
|
|
|
console.log(this.currentBreadCrumbKey) |
|
|
|
console.log(this.breadcrumbArr) |
|
|
|
const selectOrg = this.breadcrumbArr[index] |
|
|
|
this.breadcrumbArr = this.breadcrumbArr.slice(0, index + 1) |
|
|
|
|
|
|
|
const orgId = selectOrg.id |
|
|
|
const orgType = selectOrg.type |
|
|
|
|
|
|
|
if (orgType === 'agency') { |
|
|
|
this.entryAgency(orgId) |
|
|
|
} else if (orgType === 'department') { |
|
|
|
this.entryDepartment(orgId) |
|
|
|
} else if (orgType === 'grid') { |
|
|
|
this.entryGrid(orgId) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
addAgency(row){ |
|
|
|