|
|
@ -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'"> |
|
|
|
<div> |
|
|
|
|
|
|
|
<el-form-item label="所属组织" |
|
|
|
prop="ownerName"> |
|
|
|
<el-cascader class="customer_cascader" |
|
|
|
ref="myCascader" |
|
|
|
size="small" |
|
|
|
v-model="agencyIdArray" |
|
|
|
:options="orgOptions" |
|
|
|
:props="orgOptionProps" |
|
|
|
:show-all-levels="false" |
|
|
|
@change="handleChangeAgency"></el-cascader> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="房主姓名" |
|
|
|
prop="ownerName"> |
|
|
|
<el-input v-model="ownerName" |
|
|
@ -159,6 +171,8 @@ |
|
|
|
:remark="remark" |
|
|
|
:updateStartDate="updateStartDate" |
|
|
|
:updateEndDate="updateEndDate" |
|
|
|
:orgType="orgType" |
|
|
|
:orgId="orgId" |
|
|
|
ref="ref_buildingTable" |
|
|
|
@refreshTree="refreshTree"></room-table> |
|
|
|
|
|
|
@ -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) { |
|
|
|