-

+
党群服务站
-

+
楼院党小组
-

+
党员中心户
@@ -127,11 +135,11 @@ export default {
screenTopCount,
houseDialog
},
- data() {
+ data () {
return {
headerList: [
{ title: "序号", coulmn: 'index', width: '100px' },
- { title: "党员", coulmn: 'kernelMemberNameConcat' },
+ { title: "党员中心户", coulmn: 'kernelMemberNameConcat' },
{ title: "地址", coulmn: 'address' }
],
headerStyle: [
@@ -166,7 +174,7 @@ export default {
zhongxinhuList: [], // 党员中心户列表
}
},
- async mounted() {
+ async mounted () {
this.showInfo = false
// const { user } = this.$store.state
// this.agencyId = user.agencyId
@@ -198,7 +206,7 @@ export default {
this.pageNo = val
this.getList()
},
- getList() {
+ getList () {
this.tableData = []
this.visibleLoading = true
let params = {
@@ -221,7 +229,7 @@ export default {
this.$message.error(err)
})
},
- async getCount() {
+ async getCount () {
const url = "/pli/power/data/axis/statistics"
let params = {
agencyId: this.agencyId
@@ -268,7 +276,7 @@ export default {
this.$message.error(msg)
}
},
- async getStructTree() {
+ async getStructTree () {
const url = "/pli/power/data/axis/structTree"
let params = {
agencyId: this.agencyId
@@ -284,7 +292,7 @@ export default {
this.$message.error(msg)
}
},
- getMapData() {
+ getMapData () {
const params1 = {
axisStructId: this.axisStructId,
agencyId: this.agencyId,
@@ -357,69 +365,69 @@ export default {
// },
//获取组织数据
async getAgencylist () {
- const url = '/data/aggregator/org/agencytree'
- let params = {
- agencyId: this.agencyId,
- client:'gov'
- }
- const { data, code, msg } = await requestPost(url,params)
- if (code === 0) {
- let _data
- if (data) {
- _data = this.removeByOrgType(data, 'agency')
- if (_data) {
- this.agencytree = this.removeEmptySubOrgList(_data)
- // 如果有子集就进入循环,如果没有就默认取第一个的id
- this.agencyId = this.agencytree[0].subOrgList && this.agencytree[0].subOrgList.length > 0 ? this.setListAgencyId_one(this.agencytree[0].subOrgList) : this.agencytree[0].orgId
- }
- }
- } else {
- this.$message.error(msg)
+ const url = '/data/aggregator/org/agencytree'
+ let params = {
+ agencyId: this.agencyId,
+ client: 'gov'
+ }
+ const { data, code, msg } = await requestPost(url, params)
+ if (code === 0) {
+ let _data
+ if (data) {
+ _data = this.removeByOrgType(data, 'agency')
+ if (_data) {
+ this.agencytree = this.removeEmptySubOrgList(_data)
+ // 如果有子集就进入循环,如果没有就默认取第一个的id
+ this.agencyId = this.agencytree[0].subOrgList && this.agencytree[0].subOrgList.length > 0 ? this.setListAgencyId_one(this.agencytree[0].subOrgList) : this.agencytree[0].orgId
+ }
}
+ } else {
+ this.$message.error(msg)
+ }
},
removeByOrgType (orgArray, orgType) {
- if (orgArray && orgArray.length > 0) {
- for (let p = orgArray.length - 1; p >= 0; p--) {
- let orgInfo = orgArray[p]
- if (orgInfo) {
- if (orgInfo.orgType !== orgType) {
- orgArray.splice(p, 1)
- } else {
- this.removeByOrgType(orgInfo.subOrgList, orgType)
- }
- }
+ if (orgArray && orgArray.length > 0) {
+ for (let p = orgArray.length - 1; p >= 0; p--) {
+ let orgInfo = orgArray[p]
+ if (orgInfo) {
+ if (orgInfo.orgType !== orgType) {
+ orgArray.splice(p, 1)
+ } else {
+ this.removeByOrgType(orgInfo.subOrgList, orgType)
}
+ }
}
- return orgArray
+ }
+ return orgArray
},
removeEmptySubOrgList (orgArray) {
- orgArray.forEach((orgInfo) => {
- if (orgInfo && orgInfo.subOrgList) {
- if (orgInfo.subOrgList.length === 0) {
- orgInfo.subOrgList = undefined
- } else {
- this.removeEmptySubOrgList(orgInfo.subOrgList)
- }
- }
- })
- return orgArray;
+ orgArray.forEach((orgInfo) => {
+ if (orgInfo && orgInfo.subOrgList) {
+ if (orgInfo.subOrgList.length === 0) {
+ orgInfo.subOrgList = undefined
+ } else {
+ this.removeEmptySubOrgList(orgInfo.subOrgList)
+ }
+ }
+ })
+ return orgArray;
},
// 取最后一级组织的第一条数据的 orgId
- setListAgencyId_one(subOrgList) {
+ setListAgencyId_one (subOrgList) {
if (subOrgList[0].subOrgList && subOrgList[0].subOrgList.length > 0) {
return this.setAgencyId_two(subOrgList[0].subOrgList)
} else {
return subOrgList[0].orgId
}
},
- setAgencyId_two(subOrgList) {
+ setAgencyId_two (subOrgList) {
if (subOrgList[0].subOrgList && subOrgList[0].subOrgList.length > 0) {
return this.setListAgencyId_one(subOrgList[0].subOrgList)
} else {
return subOrgList[0].orgId
}
},
- async handleChangeAgencytree() {
+ async handleChangeAgencytree () {
this.pageNo = 1
this.pageSize = 5
this.total = 0
@@ -457,7 +465,7 @@ export default {
>