临时
This commit is contained in:
@@ -73,6 +73,12 @@ export const useHouseStore = defineStore('house', () => {
|
||||
currentFloorInfoList.value = (Array.from(floorslist.value) as string[]).sort(sortNumberStr);
|
||||
};
|
||||
|
||||
// 选中房屋
|
||||
const checkoutHouses = ref<string[]>([]);
|
||||
const checkoutHousesFun = (data: string[]) => {
|
||||
checkoutHouses.value = data;
|
||||
};
|
||||
|
||||
// 切换住宅类型
|
||||
const switchHouseType = (housetype: 0 | 1 | 2 | 3) => {
|
||||
getBuildinglistAPI(currentVilageInfo.value.villageId, housetype)
|
||||
@@ -85,14 +91,26 @@ export const useHouseStore = defineStore('house', () => {
|
||||
getHouselistAPI(buildingId).then(() => ElMessage.success('切换成功'));
|
||||
};
|
||||
|
||||
const deleteHouseFun = (houseId: string | string[]) => {
|
||||
console.log('删除房屋');
|
||||
if (typeof houseId === 'string') {
|
||||
console.log('单条删除');
|
||||
} else if (Array.isArray(houseId)) {
|
||||
console.log('批量删除');
|
||||
}
|
||||
};
|
||||
|
||||
return {
|
||||
currentVilageInfo,
|
||||
currentBuildingInfoList,
|
||||
currentBuildingInfo,
|
||||
currentHouseInfoList,
|
||||
currentFloorInfoList,
|
||||
checkoutHouses,
|
||||
checkoutHousesFun,
|
||||
initHouse,
|
||||
switchHouseType,
|
||||
switchBuilding
|
||||
switchBuilding,
|
||||
deleteHouseFun
|
||||
};
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user