入住信息搜索区调整

This commit is contained in:
962704835@qq.com
2025-10-27 18:49:02 +08:00
parent 07e7a65ae5
commit 1d61d6a2bd

View File

@@ -55,11 +55,11 @@
</picker>
</view>
<!-- 宿舍筛选 -->
<!-- 宿舍筛选 -->
<view class="filter-item">
<text class="filter-label">宿舍</text>
<text class="filter-label">宿舍</text>
<view @click="addRecordsPopup" class="filter-input">
{{ dormOptions[dormIndex] ? dormOptions[dormIndex].roomNo : '请输入'}}
{{ dormValue || '请输入'}}
</view>
</view>
<uni-popup ref="popupTime" class="popup-time" background-color="#ffffff">
@@ -228,7 +228,7 @@
roleGroup: null,
// 存储搜索区高度(非学生有搜索区,学生无)
searchAreaHeight: 0,
dormValue: ''
}
},
onShow() {
@@ -485,6 +485,7 @@
this.floorOptions = []
this.dormIndex = 0
this.dormOptions = []
this.dormValue = ''
},
// 判断是否选择上一个选项
@@ -532,7 +533,7 @@
this.floorOptions = []
this.dormIndex = 0
this.dormOptions = []
this.dormValue = ''
if (this.queryParams.parkId) {
// 根据园区id获取楼栋
let res = await listBuildingByPark(this.queryParams.parkId)
@@ -553,6 +554,7 @@
this.floorOptions = []
this.dormIndex = 0
this.dormOptions = []
this.dormValue = ''
if (this.queryParams.buildingId) {
// 根据楼栋id获取楼层
let res = await listFloorByBuilding(this.queryParams.buildingId)
@@ -572,6 +574,7 @@
this.queryParams.floorId = selectedFloor.id || null
this.dormIndex = 0
this.dormOptions = []
this.dormValue = ''
if (this.queryParams.floorId) {
// 根据楼栋id获取楼层
let res = await listAllRoomByFloor(this.queryParams.floorId)
@@ -598,6 +601,7 @@
this.buildingIndex = 0
this.floorIndex = 0
this.dormIndex = 0
this.dormValue = ''
// 重置筛选参数,保留分页基础参数
this.queryParams = {
...this.queryParams,
@@ -641,6 +645,22 @@
this.$refs.popupTime.close();
},
topersonalReporting() {
if (this.queryParams.buildingId != null) {
this.dormValue = this.buildingOptions[this.buildingIndex].name
}
if (this.queryParams.floorId != null) {
const data = `${this.floorOptions[this.floorIndex].floor}`
if (!data.includes("栋")) {
this.dormValue = this.buildingOptions[this.buildingIndex].name + ' ' + this.floorOptions[this.floorIndex].floor + "层"
} else {
this.dormValue = this.buildingOptions[this.buildingIndex].name + ' ' + this.floorOptions[this.floorIndex].floor
}
}
if (this.queryParams.dormitoryId != null) {
this.dormValue = this.dormOptions[this.dormIndex].roomNo
}
console.log(this.dormValue);
this.resetData()
this.getList()
this.scrollToTop()