diff --git a/src/views/components/resiForm.vue b/src/views/components/resiForm.vue index a918057f9..01c70abe9 100644 --- a/src/views/components/resiForm.vue +++ b/src/views/components/resiForm.vue @@ -1951,7 +1951,7 @@ export default { }, // 证件号失去焦点事件 handleValidBlur (item) { - + console.log(item); if (item.formName !== 'idNum') return if (!isCard(this.form.idNum) && !isPassport(this.form.idNum)) return const { user } = this.$store.state diff --git a/src/views/components/resiSearch.vue b/src/views/components/resiSearch.vue index 6fdf20724..ff828fe1a 100644 --- a/src/views/components/resiSearch.vue +++ b/src/views/components/resiSearch.vue @@ -156,7 +156,9 @@ clearable class="u-item-width-communitycascader" @clear="handleClearVillage" - @change="handleChangeV"> + @change="handleChangeV" + v-el-select-loadmore="loadmore" + > { @@ -851,7 +875,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(() => { diff --git a/src/views/modules/base/residentManagement/louzhang/louzhangList.vue b/src/views/modules/base/residentManagement/louzhang/louzhangList.vue index c859e1c19..e9badd8a4 100644 --- a/src/views/modules/base/residentManagement/louzhang/louzhangList.vue +++ b/src/views/modules/base/residentManagement/louzhang/louzhangList.vue @@ -28,7 +28,9 @@
所属房屋: + class="u-item-width-communitycascader" @clear="handleClearVillage" @change="handleChangeV" :remote-method="getValiheList" + v-el-select-loadmore="loadmore" + > @@ -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(() => { diff --git a/src/views/modules/base/residentManagement/oldPeople/oldPeople.vue b/src/views/modules/base/residentManagement/oldPeople/oldPeople.vue index 03286a54d..baf4bf95f 100644 --- a/src/views/modules/base/residentManagement/oldPeople/oldPeople.vue +++ b/src/views/modules/base/residentManagement/oldPeople/oldPeople.vue @@ -614,10 +614,10 @@ .catch((err) => { console.log("失败", err); file.onError(); //上传失败的文件会从文件列表中删除 - }); + }); this.importLoading = false; this.importBtnTitle = "导入"; - }, + }, // 搜索事件 handleSearch(val) { console.log(this.formData);