feat: 新增工单中心、房间巡查、失物招领等业务模块

- 新增工单中心(ticket_center)与工单工作台(ticket_workbench)页面
- 新增房间巡查(room_inspection)与失物招领发布(lost_found_publish)页面
- 预约看样流程新增房型/楼栋/楼层选择器组件
- 新增工具模块: booking-entry、privacy、reservation-flow
- api/index.js 补充楼层列表、看样提交等接口
- locales/messages.js 补充多语言文案
- manifest.json 开启微信小程序隐私检查
- 完善登录、注册、申请详情、账单等相关页面交互
This commit is contained in:
liangjian
2026-07-24 09:35:46 +08:00
parent 9fea127de1
commit 445bd850f4
36 changed files with 9281 additions and 340 deletions

View File

@@ -0,0 +1,314 @@
<template>
<view class="building-selector">
<view
class="selector-header tn-flex tn-flex-row-between tn-flex-col-center"
:class="{ 'selector-header--disabled': !areaCode }"
@click="handleOpen"
>
<view class="selected-info">
<view class="selected-name tn-text-ellipsis" :class="{ 'is-empty': !selectedBuilding }">
{{ selectedBuilding ? getBuildingDisplayName(selectedBuilding) : placeholderText }}
</view>
</view>
<text class="tn-icon-right" :class="areaCode ? 'tn-color-gray' : 'tn-color-disabled'"></text>
</view>
<tn-popup v-model="showPopup" mode="bottom" length="72%" :borderRadius="32" :closeBtn="true">
<view class="popup-content">
<view class="popup-header">
<text class="popup-title">{{ t('popupTitle') }}</text>
</view>
<scroll-view scroll-y class="building-list-scroll">
<view v-if="isLoading" class="loading-state tn-padding-xl tn-text-center">
<tn-loading mode="circle"></tn-loading>
<view class="tn-margin-top-sm tn-color-gray">{{ t('loadingText') }}</view>
</view>
<view v-else-if="!buildingList.length" class="empty-state tn-padding-xl tn-text-center">
<text class="tn-color-gray">{{ t('emptyText') }}</text>
</view>
<view v-else class="building-list">
<view
v-for="item in buildingList"
:key="item.code"
class="building-item"
:class="{ 'is-active': selectedBuilding && selectedBuilding.code === item.code }"
@click="handleSelect(item)"
>
<text class="building-name">{{ getBuildingDisplayName(item) }}</text>
<text v-if="selectedBuilding && selectedBuilding.code === item.code" class="tn-icon-success-circle-fill building-check"></text>
</view>
</view>
</scroll-view>
</view>
</tn-popup>
</view>
</template>
<script>
import { buildingPagination } from '@/api/index.js'
function normalizeText(value) {
if (value === undefined || value === null) {
return ''
}
return String(value).trim()
}
function normalizeBuildingItem(item = {}) {
return {
areaCode: normalizeText(item.areaCode),
code: normalizeText(item.code),
name: normalizeText(item.name),
nameEn: normalizeText(item.nameEn),
sort: Number(item.sort || 0),
buildingSections: Array.isArray(item.buildingSections) ? item.buildingSections : []
}
}
export default {
name: 'BuildingSelector',
props: {
value: {
type: String,
default: ''
},
areaCode: {
type: String,
default: ''
},
roomTypeCode: {
type: String,
default: ''
}
},
data() {
return {
showPopup: false,
isLoading: false,
buildingList: [],
selectedBuilding: null
}
},
computed: {
language() {
return this.$getLanguage ? this.$getLanguage() : 'zh'
},
placeholderText() {
return this.areaCode ? this.t('selectBuilding') : this.t('selectAreaFirst')
}
},
watch: {
value() {
this.syncSelection()
},
language() {
this.loadData(true)
},
areaCode() {
this.handleAreaChange()
},
roomTypeCode(newVal, oldVal) {
if (newVal !== oldVal) {
this.handleRoomTypeChange()
}
}
},
mounted() {
this.loadData()
},
methods: {
t(key, params) {
return this.$tm('pkgService.submit_request.components.BuildingSelector', key, params)
},
handleOpen() {
if (!this.areaCode) {
uni.showToast({
title: this.t('selectAreaFirst'),
icon: 'none'
})
return
}
this.showPopup = true
this.loadData()
},
handleAreaChange() {
this.buildingList = []
this.selectedBuilding = null
if (this.value) {
this.$emit('input', '')
this.$emit('change', { building: null })
}
if (!this.areaCode) {
return
}
this.loadData(true)
},
handleRoomTypeChange() {
this.buildingList = []
this.selectedBuilding = null
if (this.value) {
this.$emit('input', '')
this.$emit('change', { building: null })
}
if (!this.areaCode) {
return
}
this.loadData(true)
},
loadData(force = false) {
if (!this.areaCode) {
return Promise.resolve()
}
if (!force && this.buildingList.length) {
this.syncSelection()
return Promise.resolve()
}
this.isLoading = true
return buildingPagination({
AreaCode: this.areaCode,
PageIndex: 1,
PageSize: 100
}, this.language)
.then((res) => {
const payload = res && res.data ? res.data : res
const rawList = Array.isArray(payload && payload.data)
? payload.data
: (Array.isArray(payload) ? payload : [])
this.buildingList = rawList
.map(item => normalizeBuildingItem(item))
.filter(item => item.code)
.sort((a, b) => a.sort - b.sort || a.code.localeCompare(b.code))
this.syncSelection()
})
.catch((error) => {
console.error('load building list error', error)
this.buildingList = []
this.selectedBuilding = null
uni.showToast({
title: this.t('loadFailed'),
icon: 'none'
})
})
.finally(() => {
this.isLoading = false
})
},
syncSelection() {
if (!this.value || !this.buildingList.length) {
this.selectedBuilding = null
return
}
this.selectedBuilding = this.buildingList.find(item => item.code === this.value) || null
},
handleSelect(item) {
this.selectedBuilding = item
this.$emit('input', item.code)
this.$emit('change', { building: item })
this.showPopup = false
},
getBuildingDisplayName(item = {}) {
if (this.language === 'en') {
return item.nameEn || item.name || item.code || ''
}
return item.name || item.nameEn || item.code || ''
}
}
}
</script>
<style scoped lang="scss">
.building-selector {
width: 100%;
}
.selector-header {
background: #FFFFFF;
border-radius: 20rpx;
padding: 26rpx 32rpx;
border: 1rpx solid rgba($brand-primary, 0.15);
box-shadow: 0 4rpx 12rpx rgba($brand-primary, 0.05);
min-height: 100rpx;
}
.selector-header--disabled {
opacity: 0.72;
}
.selected-info {
flex: 1;
overflow: hidden;
}
.selected-name {
font-size: 28rpx;
color: #1A2233;
font-weight: 600;
&.is-empty {
color: #A0B0C0;
font-weight: normal;
}
}
.popup-content {
display: flex;
flex-direction: column;
height: 100%;
background: #F8FAFF;
}
.popup-header {
padding: 40rpx 30rpx 20rpx;
text-align: center;
border-bottom: 1px dashed rgba($brand-primary, 0.15);
background: #FFFFFF;
}
.popup-title {
font-size: 32rpx;
font-weight: 700;
color: #1A2233;
}
.building-list-scroll {
flex: 1;
height: 0;
padding: 20rpx 30rpx 60rpx;
}
.building-list {
display: flex;
flex-direction: column;
gap: 18rpx;
}
.building-item {
display: flex;
align-items: center;
justify-content: space-between;
background: #FFFFFF;
border-radius: 20rpx;
padding: 28rpx 30rpx;
border: 1rpx solid rgba($brand-primary, 0.12);
transition: all 0.2s ease;
&.is-active {
border-color: rgba($brand-primary, 0.5);
box-shadow: 0 8rpx 20rpx rgba($brand-primary, 0.08);
}
}
.building-name {
font-size: 28rpx;
color: #1A2233;
}
.building-check {
color: $brand-primary;
font-size: 30rpx;
}
</style>

View File

@@ -0,0 +1,308 @@
<template>
<view class="floor-selector">
<view
class="selector-header tn-flex tn-flex-row-between tn-flex-col-center"
@click="handleOpen"
>
<view class="selected-info">
<view class="selected-name tn-text-ellipsis" :class="{ 'is-empty': !selectedFloor }">
{{ selectedFloor ? getFloorDisplayName(selectedFloor) : placeholderText }}
</view>
</view>
<text class="tn-icon-right tn-color-gray"></text>
</view>
<tn-popup v-model="showPopup" mode="bottom" length="72%" :borderRadius="32" :closeBtn="true">
<view class="popup-content">
<view class="popup-header">
<text class="popup-title">{{ t('popupTitle') }}</text>
</view>
<scroll-view scroll-y class="floor-list-scroll">
<view v-if="isLoading" class="loading-state tn-padding-xl tn-text-center">
<tn-loading mode="circle"></tn-loading>
<view class="tn-margin-top-sm tn-color-gray">{{ t('loadingText') }}</view>
</view>
<view v-else-if="!floorList.length" class="empty-state tn-padding-xl tn-text-center">
<text class="tn-color-gray">{{ t('emptyText') }}</text>
</view>
<view v-else class="floor-list">
<view
class="floor-item floor-item--clear"
:class="{ 'is-active': !selectedFloor }"
@click="handleClear"
>
<text class="floor-name">{{ t('clearSelection') }}</text>
<text v-if="!selectedFloor" class="tn-icon-success-circle-fill floor-check"></text>
</view>
<view
v-for="item in floorList"
:key="item.value"
class="floor-item"
:class="{ 'is-active': selectedFloor && selectedFloor.value === item.value }"
@click="handleSelect(item)"
>
<text class="floor-name">{{ getFloorDisplayName(item) }}</text>
<text v-if="selectedFloor && selectedFloor.value === item.value" class="tn-icon-success-circle-fill floor-check"></text>
</view>
</view>
</scroll-view>
</view>
</tn-popup>
</view>
</template>
<script>
import { getEnums } from '@/api/index.js'
function pickFirstDefined(...values) {
const matched = values.find(value => value !== undefined && value !== null && value !== '')
return matched === undefined ? '' : matched
}
function normalizeFloorValue(value) {
if (value === undefined || value === null) {
return ''
}
return String(value).trim()
}
function resolveFloorList(response) {
const payload = response && response.data !== undefined ? response.data : response
if (Array.isArray(payload)) {
const floorEnum = payload.find(item => item && item.code === 'FloorLevelEnum')
if (floorEnum && Array.isArray(floorEnum.data)) {
return floorEnum.data
}
return payload
}
if (payload && Array.isArray(payload.data)) {
return payload.data
}
if (payload && payload.data && Array.isArray(payload.data.data)) {
return payload.data.data
}
if (payload && Array.isArray(payload.items)) {
return payload.items
}
if (payload && Array.isArray(payload.records)) {
return payload.records
}
return []
}
function normalizeFloorItem(item = {}) {
const code = normalizeFloorValue(pickFirstDefined(item.key, item.code, item.value))
const name = normalizeFloorValue(pickFirstDefined(item.cname, item.nameZh, item.labelZh, item.name, item.value))
const nameEn = normalizeFloorValue(pickFirstDefined(item.ename, item.nameEn, item.labelEn, item.descriptionEn, ''))
return {
value: code || name,
code,
name,
nameEn,
sort: Number(pickFirstDefined(item.sort, item.key, 0))
}
}
export default {
name: 'FloorSelector',
props: {
value: {
type: [String, Number],
default: ''
}
},
data() {
return {
showPopup: false,
isLoading: false,
floorList: [],
selectedFloor: null
}
},
computed: {
language() {
return this.$getLanguage ? this.$getLanguage() : 'zh'
},
placeholderText() {
return this.t('selectFloor')
}
},
watch: {
value() {
this.syncSelection()
},
language() {
this.loadData(true)
}
},
mounted() {
this.loadData()
},
methods: {
t(key, params) {
return this.$tm('pkgService.submit_request.components.FloorSelector', key, params)
},
handleOpen() {
this.showPopup = true
this.loadData()
},
loadData(force = false) {
if (!force && this.floorList.length) {
this.syncSelection()
return Promise.resolve()
}
this.isLoading = true
return getEnums({}, this.language)
.then((res) => {
const rawList = resolveFloorList(res)
this.floorList = rawList
.map(item => normalizeFloorItem(item))
.filter(item => item.value)
.sort((a, b) => a.sort - b.sort || a.value.localeCompare(b.value))
this.syncSelection()
})
.catch((error) => {
console.error('load floor list error', error)
this.floorList = []
this.selectedFloor = null
uni.showToast({
title: this.t('loadFailed'),
icon: 'none'
})
})
.finally(() => {
this.isLoading = false
})
},
syncSelection() {
const currentValue = normalizeFloorValue(this.value)
if (!currentValue || !this.floorList.length) {
this.selectedFloor = null
return
}
this.selectedFloor = this.floorList.find(item => item.value === currentValue) || null
},
handleSelect(item) {
this.selectedFloor = item
this.$emit('input', item.value)
this.$emit('change', { floor: item })
this.showPopup = false
},
handleClear() {
this.selectedFloor = null
this.$emit('input', '')
this.$emit('change', { floor: null })
this.showPopup = false
},
getFloorDisplayName(item = {}) {
if (this.language === 'en') {
return item.nameEn || item.name || item.code || ''
}
return item.name || item.nameEn || item.code || ''
}
}
}
</script>
<style scoped lang="scss">
.floor-selector {
width: 100%;
}
.selector-header {
background: #FFFFFF;
border-radius: 20rpx;
padding: 26rpx 32rpx;
border: 1rpx solid rgba($brand-primary, 0.15);
box-shadow: 0 4rpx 12rpx rgba($brand-primary, 0.05);
min-height: 100rpx;
}
.selected-info {
flex: 1;
overflow: hidden;
}
.selected-name {
font-size: 28rpx;
color: #1A2233;
font-weight: 600;
&.is-empty {
color: #A0B0C0;
font-weight: normal;
}
}
.popup-content {
display: flex;
flex-direction: column;
height: 100%;
background: #F8FAFF;
}
.popup-header {
padding: 40rpx 30rpx 20rpx;
text-align: center;
border-bottom: 1px dashed rgba($brand-primary, 0.15);
background: #FFFFFF;
}
.popup-title {
font-size: 32rpx;
font-weight: 700;
color: #1A2233;
}
.floor-list-scroll {
flex: 1;
height: 0;
padding: 20rpx 30rpx 60rpx;
}
.floor-list {
display: flex;
flex-direction: column;
gap: 18rpx;
}
.floor-item {
display: flex;
align-items: center;
justify-content: space-between;
background: #FFFFFF;
border-radius: 20rpx;
padding: 28rpx 30rpx;
border: 1rpx solid rgba($brand-primary, 0.12);
transition: all 0.2s ease;
&.is-active {
border-color: rgba($brand-primary, 0.5);
box-shadow: 0 8rpx 20rpx rgba($brand-primary, 0.08);
}
}
.floor-item--clear {
border-style: dashed;
}
.floor-name {
font-size: 28rpx;
color: #1A2233;
}
.floor-check {
color: $brand-primary;
font-size: 30rpx;
}
</style>

View File

@@ -1,6 +1,6 @@
<template>
<view class="room-type-selector">
<view class="selector-header tn-flex tn-flex-row-between tn-flex-col-center" @click="showPopup = true">
<view class="selector-header tn-flex tn-flex-row-between tn-flex-col-center" @click="openSelector">
<view class="selected-info">
<view class="selected-name tn-text-ellipsis" :class="{ 'is-empty': !selectedRoomType }">
{{ selectedRoomType ? getRoomTypeDisplayName(selectedRoomType) : t('selectRoomType') }}
@@ -24,11 +24,11 @@
<view class="tn-margin-top-sm tn-color-gray">{{ t('loadingRoomTypes') }}</view>
</view>
<view v-else-if="!areaList.length" class="empty-state tn-padding-xl tn-text-center">
<view v-else-if="!displayAreaList.length" class="empty-state tn-padding-xl tn-text-center">
<text class="tn-color-gray">{{ t('emptyRoomTypes') }}</text>
</view>
<view v-else class="area-group" v-for="(area, index) in areaList" :key="area.code">
<view v-else class="area-group" v-for="(area, index) in displayAreaList" :key="area.code">
<view class="area-title tn-flex tn-flex-row-between tn-flex-col-center" @click="toggleArea(index)">
<view class="tn-flex tn-flex-col-center">
<text class="area-dot"></text>
@@ -69,6 +69,10 @@ export default {
initialAreaCode: {
type: String,
default: ''
},
buildingCode: {
type: String,
default: ''
}
},
data() {
@@ -84,6 +88,19 @@ export default {
computed: {
language() {
return this.$getLanguage ? this.$getLanguage() : 'zh'
},
displayAreaList() {
if (!this.buildingCode) {
return this.areaList
}
return this.areaList
.map(area => ({
...area,
roomTypes: Array.isArray(area.roomTypes)
? area.roomTypes.filter(roomType => !roomType.buildingCode || roomType.buildingCode === this.buildingCode)
: []
}))
.filter(area => area.roomTypes && area.roomTypes.length > 0)
}
},
watch: {
@@ -92,6 +109,9 @@ export default {
},
language() {
this.loadData(true)
},
buildingCode() {
this.syncSelection()
}
},
mounted() {
@@ -101,6 +121,10 @@ export default {
t(key) {
return this.$translate(this.i18n, key)
},
openSelector() {
this.showPopup = true
this.loadData()
},
loadData(force = false) {
if (!force && this.areaList.length > 0) return
@@ -131,14 +155,16 @@ export default {
})
},
syncSelection() {
if (!this.areaList.length) return
if (!this.displayAreaList.length) return
let foundArea = null
let foundRoom = null
const previousAreaCode = this.selectedArea && this.selectedArea.code ? this.selectedArea.code : ''
const previousRoomCode = this.selectedRoomType && this.selectedRoomType.code ? this.selectedRoomType.code : ''
// Try to find by room type code
if (this.value) {
for (const area of this.areaList) {
for (const area of this.displayAreaList) {
const room = area.roomTypes.find(r => r.code === this.value)
if (room) {
foundArea = area
@@ -150,7 +176,7 @@ export default {
// If not found by room, try to find by initial area code
if (!foundRoom && this.initialAreaCode) {
foundArea = this.areaList.find(a => a.code === this.initialAreaCode)
foundArea = this.displayAreaList.find(a => a.code === this.initialAreaCode)
}
if (foundArea) {
@@ -159,11 +185,17 @@ export default {
this.selectedRoomType = foundRoom
}
// If we found the room, or we just want to initialize the area but no room yet
if (foundRoom && this.value !== foundRoom.code) {
this.$emit('input', foundRoom.code)
this.$emit('change', { area: foundArea, roomType: foundRoom })
if (foundRoom) {
if (this.value !== foundRoom.code) {
this.$emit('input', foundRoom.code)
}
if (previousAreaCode !== foundArea.code || previousRoomCode !== foundRoom.code) {
this.$emit('change', { area: foundArea, roomType: foundRoom })
}
}
} else {
this.selectedArea = null
this.selectedRoomType = null
}
},
handleSelect(area, roomType) {

View File

@@ -12,7 +12,7 @@
</tn-nav-bar>
<scroll-view class="page-scroll" scroll-y @scroll="handleScroll" :show-scrollbar="false">
<view class="page-content tn-padding" :style="{ paddingTop: vuex_custom_bar_height + 'px', paddingBottom: '60rpx' }">
<view class="page-content tn-padding" :style="{ paddingTop: vuex_custom_bar_height + 'px', paddingBottom: pageBottomPadding }">
<view class="hero-header tn-margin-bottom-xl">
<view class="hero-badge">
<text class="badge-dot"></text>
@@ -20,13 +20,6 @@
</view>
<view class="hero-title">{{ pageTitle }}</view>
<view class="hero-desc">{{ pageDesc }}</view>
<view v-if="sourceSummaryList.length" class="tn-margin-top-lg">
<view v-for="item in sourceSummaryList" :key="item.label" class="source-row tn-flex tn-flex-row-between">
<text class="source-row__label">{{ item.label }}</text>
<text class="source-row__value">{{ item.value }}</text>
</view>
</view>
</view>
<view class="form-card tn-margin-top-xl">
@@ -41,7 +34,15 @@
@change="handleRoomTypeChange"
/>
</view>
<view v-if="showFloorSelector" class="form-item tn-margin-top">
<view class="form-label">{{ floorLabel }}</view>
<floor-selector
v-model="form.intendedFloorLevel"
@change="handleFloorChange"
/>
</view>
<view v-if="showPreferenceSelectors" class="form-item tn-margin-top">
<view class="form-label">{{ t('hobbyLabel') }}</view>
<tag-selector
@@ -79,13 +80,22 @@
<textarea class="form-textarea" :placeholder="remarkPlaceholder" v-model="form.remark"></textarea>
</view>
<view class="submit-btn btn-primary tn-margin-top-xl" :class="{ 'submit-btn--disabled': isSubmitting }" @click="submitRequest">
<view v-if="!showFloatingSubmitBtn" class="submit-btn btn-primary tn-margin-top-xl" :class="{ 'submit-btn--disabled': isSubmitting }" @click="submitRequest">
<text class="tn-text-bold">{{ isSubmitting ? t('submitting') : primaryActionText }}</text>
</view>
</view>
</view>
</scroll-view>
<view v-if="showFloatingSubmitBtn" class="floating-submit-bar">
<view class="floating-submit-bar__inner">
<view class="submit-btn btn-primary" :class="{ 'submit-btn--disabled': isSubmitting }" @click="submitRequest">
<text class="tn-text-bold">{{ isSubmitting ? t('submitting') : primaryActionText }}</text>
</view>
</view>
</view>
</view>
</template>
@@ -98,6 +108,7 @@ import { getStoredUser } from '../../utils/flow'
import TagSelector from './components/TagSelector.vue'
import DateRangeSelector from './components/DateRangeSelector.vue'
import RoomTypeSelector from './components/RoomTypeSelector.vue'
import FloorSelector from './components/FloorSelector.vue'
function createDefaultForm() {
const now = new Date()
@@ -107,6 +118,7 @@ function createDefaultForm() {
return {
intendedAreaCode: '',
intendedRoomTypeCode: '',
intendedFloorLevel: '',
roomSlotHeight: 1,
hobbiesAndInterestsTagKeys: [],
lifestyleHabitsTagKeys: [],
@@ -564,7 +576,8 @@ export default {
components: {
TagSelector,
DateRangeSelector,
RoomTypeSelector
RoomTypeSelector,
FloorSelector
},
data() {
return {
@@ -743,12 +756,27 @@ export default {
roomTypeLabel() {
return this.getBusinessText('roomTypeLabel') || this.t('applyRoomType')
},
pageBottomPadding() {
return this.showFloatingSubmitBtn ? '220rpx' : '60rpx'
},
showFloatingSubmitBtn() {
return this.isRoomTypeApply
},
floorLabel() {
return this.getBusinessText('floorLabel') || this.t('floorLabel')
},
showRoomTypeSelector() {
if (this.isRoomTypeApply) {
return true
}
return this.businessConfig ? this.businessConfig.showRoomTypeSelector !== false : true
},
showFloorSelector() {
if (this.isRoomTypeApply) {
return true
}
return this.businessConfig ? this.businessConfig.showFloorSelector !== false : true
},
showPreferenceSelectors() {
if (this.isRoomTypeApply) {
return true
@@ -775,41 +803,6 @@ export default {
},
dateRangeEndPlaceholder() {
return this.getBusinessText('dateRangeEndPlaceholder') || this.t('selectCheckoutDate')
},
sourceSummaryList() {
const payload = this.sourcePayload || {}
if (!Object.keys(payload).length) {
return []
}
const roomTypeName = this.language === 'en'
? (payload.roomTypeNameEn || payload.roomTypeName || '')
: (payload.roomTypeName || '')
const roomLabel = this.language === 'en'
? (payload.roomLabelEn || payload.currentRoomLabelEn || payload.roomLabel || payload.currentRoomLabel || '')
: (payload.roomLabel || payload.currentRoomLabel || '')
const areaName = this.language === 'en'
? (payload.areaLabelEn || payload.areaNameEn || payload.areaLabel || payload.areaName || '')
: (payload.areaLabel || payload.areaName || '')
const list = []
if (roomTypeName) {
list.push({ label: this.t('applyRoomType'), value: roomTypeName })
}
if (roomLabel) {
list.push({ label: this.t('currentRoom'), value: roomLabel })
}
if (areaName) {
list.push({ label: this.t('areaLabel'), value: areaName })
}
if (payload.price) {
list.push({ label: this.t('referencePrice'), value: payload.price })
}
if (payload.payMethod) {
list.push({ label: this.t('paymentMethod'), value: localizePayMethodText(payload.payMethod, this.language) })
}
if (this.pageTitle) {
list.push({ label: this.t('applicationType'), value: this.pageTitle })
}
return list
}
},
watch: {
@@ -943,6 +936,7 @@ export default {
...defaultForm,
intendedAreaCode: this.sourcePayload.areaCode || '',
intendedRoomTypeCode: this.sourcePayload.roomTypeCode || '',
intendedFloorLevel: this.sourcePayload.intendedFloorLevel || this.sourcePayload.IntendedFloorLevel || '',
remark: '',
start: this.sourcePayload.start || defaultForm.start,
end: this.sourcePayload.end || ''
@@ -967,18 +961,31 @@ export default {
this.sourcePayload.roomTypeCode = roomType.code
this.sourcePayload.roomTypeName = roomType.name
this.sourcePayload.roomTypeNameEn = roomType.nameEn || ''
this.sourcePayload.selectedRoomTypeBuildingCode = roomType.buildingCode || ''
this.sourcePayload.selectedRoomTypeBuildingSectionCode = roomType.buildingSectionCode || ''
this.sourcePayload.selectedRoomTypeBuildingName = roomType.buildingName || ''
this.sourcePayload.selectedRoomTypeBuildingSectionName = roomType.buildingSectionName || ''
if (area) {
this.sourcePayload.areaCode = area.code
this.sourcePayload.areaName = area.name
this.sourcePayload.areaNameEn = area.nameEn || ''
}
if (roomType.price) {
this.sourcePayload.price = roomType.price
}
}
},
handleFloorChange({ floor }) {
if (!this.sourcePayload) {
this.sourcePayload = {}
}
this.sourcePayload.intendedFloorLevel = floor && floor.value ? floor.value : ''
this.sourcePayload.intendedFloorName = floor
? (this.language === 'en' ? (floor.nameEn || floor.name || '') : (floor.name || floor.nameEn || ''))
: ''
},
loadDictOptions() {
this.dictLoading = true
return Promise.all([
@@ -1052,6 +1059,7 @@ export default {
return {
intendedAreaCode: this.form.intendedAreaCode || null,
intendedRoomTypeCode: this.form.intendedRoomTypeCode || null,
IntendedFloorLevel: this.form.intendedFloorLevel || null,
roomSlotHeight: Number(this.form.roomSlotHeight),
hobbiesAndInterestsTagKeys: this.showPreferenceSelectors && this.form.hobbiesAndInterestsTagKeys.length ? this.form.hobbiesAndInterestsTagKeys : null,
lifestyleHabitsTagKeys: this.showPreferenceSelectors && this.form.lifestyleHabitsTagKeys.length ? this.form.lifestyleHabitsTagKeys : null,
@@ -1276,6 +1284,22 @@ export default {
pointer-events: none;
}
.floating-submit-bar {
position: fixed;
left: 0;
right: 0;
bottom: 0;
z-index: 30;
padding: 20rpx 24rpx calc(20rpx + env(safe-area-inset-bottom));
background: linear-gradient(180deg, rgba(248, 250, 255, 0) 0%, rgba(248, 250, 255, 0.92) 24%, #F8FAFF 100%);
backdrop-filter: blur(16rpx);
-webkit-backdrop-filter: blur(16rpx);
}
.floating-submit-bar__inner {
max-width: 100%;
}
.source-row {
padding: 24rpx 0;
border-bottom: 1px dashed rgba($brand-primary, 0.15);
@@ -1286,6 +1310,10 @@ export default {
padding-bottom: 8rpx;
}
.source-row--interactive:active {
opacity: 0.8;
}
.source-row__label {
color: #6A7A99;
font-size: 26rpx;
@@ -1301,4 +1329,5 @@ export default {
margin-left: 24rpx;
word-break: break-word;
}
</style>