|
|
|
@ -27,7 +27,11 @@ export const getters: GenGetters = { |
|
|
|
return this.buildingList.find(building => building.buildingCode === this.device.buildingCode) ?? ({} as Building) |
|
|
|
}, |
|
|
|
currentBuildingFloorsList() { |
|
|
|
return this.currentBuilding.floorList ?? [] |
|
|
|
const floors = this.currentBuilding.floorList ?? [] |
|
|
|
if (!floors?.length) { |
|
|
|
return [] |
|
|
|
} |
|
|
|
return floors.filter(floor => floor.status === 0) |
|
|
|
}, |
|
|
|
recommendList() { |
|
|
|
return this.BrandInfo?.recommendList ?? [] |
|
|
|
@ -35,8 +39,8 @@ export const getters: GenGetters = { |
|
|
|
brandFloorList() { |
|
|
|
const brandBuilding = this.BrandInfo.buildingList?.find(item => item.buildingCode === this.device.buildingCode) |
|
|
|
const mergeFloorList = [ |
|
|
|
{ floorCode: 'ALL', floor: 'ALL', floorOrder: -1, floorMapUrl: '', floorMapCode: 'ALL' }, |
|
|
|
...(brandBuilding?.floorList ?? []) |
|
|
|
{ floorCode: 'ALL', floor: 'ALL', floorOrder: -1, floorMapUrl: '', floorMapCode: 'ALL', status: 0 as const }, |
|
|
|
...(brandBuilding?.floorList?.filter(floor => floor.status === 0) ?? []) |
|
|
|
] |
|
|
|
return mergeFloorList |
|
|
|
}, |
|
|
|
|