|
|
|
@ -28,7 +28,9 @@ |
|
|
|
<div class="resi-cell-value"> |
|
|
|
<span style="width:100px;text-align: right;padding-right:14px;display: inline-block; ">所属房屋:</span> |
|
|
|
<el-select v-model.trim="formData.villageId" placeholder="请选择小区" size="small" remote filterable clearable |
|
|
|
class="u-item-width-communitycascader" @clear="handleClearVillage" @change="handleChangeV" :remote-method="getValiheList"> |
|
|
|
class="u-item-width-communitycascader" @clear="handleClearVillage" @change="handleChangeV" :remote-method="getValiheList" |
|
|
|
v-el-select-loadmore="loadmore" |
|
|
|
> |
|
|
|
<el-option v-for="item in optionsV" :key="item.value" :label="item.label" :value="item.value"> |
|
|
|
</el-option> |
|
|
|
</el-select> |
|
|
|
@ -193,6 +195,7 @@ export default { |
|
|
|
pageSize: window.localStorage.getItem("pageSize") || 20, |
|
|
|
total: 1, |
|
|
|
|
|
|
|
optionsVPageNo:1, |
|
|
|
showAdd: false, |
|
|
|
showEdit: false, |
|
|
|
// showDetail: false, |
|
|
|
@ -232,8 +235,29 @@ export default { |
|
|
|
|
|
|
|
this.getTableData(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
directives: { |
|
|
|
//这个是写到data外面 与mounted同级 |
|
|
|
"el-select-loadmore": { |
|
|
|
bind(el, binding) { |
|
|
|
const SELECTWRAP_DOM = el.querySelector( |
|
|
|
".el-select-dropdown .el-select-dropdown__wrap" |
|
|
|
); |
|
|
|
SELECTWRAP_DOM.addEventListener("scroll", function () { |
|
|
|
const condition = |
|
|
|
this.scrollHeight - this.scrollTop <= this.clientHeight; |
|
|
|
if (condition) { |
|
|
|
binding.value(); |
|
|
|
} |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
methods: { |
|
|
|
loadmore() { |
|
|
|
this.optionsVPageNo++; |
|
|
|
this.getValiheList(); |
|
|
|
}, |
|
|
|
handleChangeV(val) { |
|
|
|
console.log('小区val', val) |
|
|
|
this.formData.buildId = '' |
|
|
|
@ -250,17 +274,14 @@ export default { |
|
|
|
console.log('单元val', val) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
getValiheList(quarterName) { |
|
|
|
|
|
|
|
this.$http |
|
|
|
.post('/actual/base/communityQuarters/listQuartersOptions', { |
|
|
|
gridId: '', |
|
|
|
agencyId: '', |
|
|
|
neighborHoodName: quarterName, |
|
|
|
pageNo: 0, |
|
|
|
// pageSize: |
|
|
|
pageNo: this.optionsVPageNo, |
|
|
|
pageSize:20 |
|
|
|
// agencyId: user.agencyId |
|
|
|
}) |
|
|
|
.then(({ data: res }) => { |
|
|
|
@ -268,7 +289,7 @@ export default { |
|
|
|
return this.$message.error(res.msg) |
|
|
|
} else { |
|
|
|
console.log('获取查询详情成功', res.data) |
|
|
|
this.optionsV = res.data |
|
|
|
this.optionsV = [...this.optionsV, ...res.data]; |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
|