diff --git a/src/views/modules/base/community/community.vue b/src/views/modules/base/community/community.vue index 8c8f8f1f9..250bf2de0 100644 --- a/src/views/modules/base/community/community.vue +++ b/src/views/modules/base/community/community.vue @@ -15,6 +15,7 @@ :props="defaultProps" :highlight-current="true" node-key="id" + :default-expanded-keys="openNodes" :expand-on-click-node="false" :filter-node-method="filterNode" @node-click="handleNodeClick" @@ -39,6 +40,17 @@ :label-width="'80px'">
+ + + @@ -216,6 +230,17 @@ export default { children: 'children', label: 'showName' }, + orgOptions: [], + orgOptionProps: { + multiple: false, + value: 'agencyId', + label: 'agencyName', + children: 'subAgencyList', + checkStrictly: true + }, + agencyIdArray: [], + orgType: '', + orgId: '', selTreeObj: {}, @@ -280,6 +305,7 @@ export default { await this.loadOrgData() await this.loadTree() + await this.getOrgTreeList() await this.$refs['ref_communityTable'].loadTable(true, this.selTreeObj) if (this.treeData.length > 0) { @@ -304,6 +330,34 @@ export default { ...mapGetters(['clientHeight', 'iframeHeight']) }, methods: { + async getOrgTreeList () { + let url = '/gov/org/customeragency/agencygridtree' + let params = {} + const { data, code, msg } = await requestPost(url, params) + + if (code === 0) { + this.orgOptions = [] + this.orgOptions.push(data) + + } else { + this.$message.error(msg) + } + + }, + handleChangeAgency (val) { + let obj = this.$refs["myCascader"].getCheckedNodes()[0].data + if (obj) { + + this.orgType = obj.level === 'grid' ? 'grid' : 'agency' + this.orgId = obj.agencyId + + } else { + this.orgType = '' + this.orgId = '' + } + + + }, async lazyLoadTree (node, resolve) { console.log(node) // debugger @@ -324,12 +378,6 @@ export default { } } - // this.$http.get(`/sys/region/list?pid=${tree.id}`).then(({ data: res }) => { - // if (res.code !== 0) { - // return this.$message.error(res.msg) - // } - // resolve(res.data) - // }).catch(() => { }) }, @@ -356,10 +404,14 @@ export default { this.remark = '' this.updateStartDate = '' this.updateEndDate = '' + this.orgType = '' + this.orgId = '' this.pageSize = 10 this.pageNo = 1 + this.agencyIdArray = [] + }, async loadTree (isRefresh) { diff --git a/src/views/modules/base/community/roomTable.vue b/src/views/modules/base/community/roomTable.vue index 1adca7f56..a03e289c7 100644 --- a/src/views/modules/base/community/roomTable.vue +++ b/src/views/modules/base/community/roomTable.vue @@ -438,10 +438,12 @@ export default { sortType: this.sortType, updateStartDate: this.updateStartDate, updateEndDate: this.updateEndDate, - neighborHoodId: this.neighborHoodId, - buildingId: this.buildingId, - buildingUnitId: this.buildingUnitId, - houseId: this.houseId, + // neighborHoodId: this.neighborHoodId, + // buildingId: this.buildingId, + // buildingUnitId: this.buildingUnitId, + // houseId: this.houseId, + orgType: this.orgType, + orgId: this.orgId, }; const url = "/gov/org/house/houselist"; @@ -956,6 +958,14 @@ export default { type: String, default: "", }, + orgType: { + type: String, + default: "", + }, + orgId: { + type: String, + default: "", + }, }, };