修复添加房产-楼层数据的显示问题
This commit is contained in:
parent
1f3e2824ef
commit
5dca603b29
@ -267,8 +267,16 @@ export default {
|
||||
: item.label
|
||||
: "",
|
||||
}).then((res) => {
|
||||
this.filteredFloorsList =
|
||||
this.step == 4 ? this.filteredFloorsList : res.rows;
|
||||
// 对楼层数据进行从大到小排序
|
||||
if(this.step != 4) {
|
||||
res.rows.sort((a, b) => {
|
||||
// 提取楼层数字
|
||||
const floorA = parseInt(a.label.replace(/[^\d]/g, ''));
|
||||
const floorB = parseInt(b.label.replace(/[^\d]/g, ''));
|
||||
return floorA - floorB;
|
||||
});
|
||||
}
|
||||
this.filteredFloorsList = this.step == 4 ? this.filteredFloorsList : res.rows;
|
||||
this.searchList = res.rows;
|
||||
this.searchQuery = "";
|
||||
if (this.step == "1") {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user