Merge branch 'master' of https://gitea.zianxin.com/zax/biz-mobile-react-cloud
This commit is contained in:
commit
ff759ff83b
4 files changed
+77
-32
No files matched your search
@@ -3,20 +3,40 @@
|
||||
<view class="room-info">
|
||||
<view class="room-name">{{ detail.roomName }}</view>
|
||||
<view class="room-meta">
|
||||
<text>容量:{{ detail.capacity }}</text>
|
||||
<text>位置:{{ detail.location }}</text>
|
||||
<text>容量:{{ detail.roomCapacity }}人</text>
|
||||
<text>位置:{{ detail.roomLocation || '未设置' }}</text>
|
||||
</view>
|
||||
<view v-if="detail.equipmentNames" class="room-equip">
|
||||
设备:{{ detail.equipmentNames }}
|
||||
<view v-if="detail.roomEquipment" class="room-equip">
|
||||
设备:{{ detail.roomEquipment }}
|
||||
</view>
|
||||
<view v-if="detail.roomStatusText" class="room-status">
|
||||
状态:{{ detail.roomStatusText }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<view class="section-title">预约信息</view>
|
||||
<view class="info-row"><text class="label">预约人:</text>{{ detail.username }}</view>
|
||||
<view class="info-row"><text class="label">预约人:</text>{{ detail.applicantName }}</view>
|
||||
<view class="info-row"><text class="label">预约日期:</text>{{ detail.bookingDate }}</view>
|
||||
<view class="info-row"><text class="label">预约时间:</text>{{ detail.startTime }} ~ {{ detail.endTime }}</view>
|
||||
<view class="info-row"><text class="label">预约状态:</text>{{ getStatusText(detail.checkStatus) }}</view>
|
||||
<view class="info-row"><text class="label">会议时长:</text>{{ detail.duration }}分钟</view>
|
||||
<view class="info-row"><text class="label">预约状态:</text>{{ detail.checkStatusText }}</view>
|
||||
<view class="info-row" v-if="detail.checkReason"><text class="label">审核意见:</text>{{ detail.checkReason }}</view>
|
||||
<view class="info-row" v-if="detail.description"><text class="label">备注:</text>{{ detail.description }}</view>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<view class="section-title">会议配置</view>
|
||||
<view class="info-row"><text class="label">会务服务:</text>{{ detail.needServiceText }}</view>
|
||||
<view class="info-row" v-if="detail.deskLayoutText"><text class="label">桌子摆放:</text>{{ detail.deskLayoutText }}</view>
|
||||
<view class="info-row" v-if="detail.description"><text class="label">备注说明:</text>{{ detail.description }}</view>
|
||||
</view>
|
||||
|
||||
<view class="section">
|
||||
<view class="section-title">系统信息</view>
|
||||
<view class="info-row"><text class="label">创建人:</text>{{ detail.createBy }}</view>
|
||||
<view class="info-row"><text class="label">创建时间:</text>{{ detail.createTime }}</view>
|
||||
<view class="info-row" v-if="detail.updateBy"><text class="label">更新人:</text>{{ detail.updateBy }}</view>
|
||||
<view class="info-row" v-if="detail.updateTime"><text class="label">更新时间:</text>{{ detail.updateTime }}</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
@@ -28,17 +48,6 @@ import meetingRoomApi from '@/sheep/api/meetingRoom'
|
||||
|
||||
const detail = ref<any>({})
|
||||
|
||||
function getStatusText(status: string) {
|
||||
const map: Record<string, string> = {
|
||||
'1': '审核中',
|
||||
'2': '审核通过',
|
||||
'3': '审核拒绝',
|
||||
'4': '已取消',
|
||||
'5': '已结束',
|
||||
}
|
||||
return map[status] || status
|
||||
}
|
||||
|
||||
onLoad(async (options: any) => {
|
||||
const id = options.id
|
||||
if (!id) return
|
||||
@@ -73,6 +82,12 @@ onLoad(async (options: any) => {
|
||||
.room-equip {
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
margin-bottom: 8rpx;
|
||||
}
|
||||
.room-status {
|
||||
font-size: 24rpx;
|
||||
color: #ff6b35;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
.section {
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
>
|
||||
<view class="time-range">{{ slot.startTime }} - {{ slot.endTime }}</view>
|
||||
<view class="time-status">
|
||||
<text v-if="slot.status === 'booked'">🚫 已预约: {{ slot.bookedBy?.userName }}</text>
|
||||
<text v-if="slot.status === 'booked'">🚫 已预约</text>
|
||||
<text v-else-if="slot.status === 'disabled'">🚫 不可预约</text>
|
||||
<text v-else>✓ 可预约</text>
|
||||
</view>
|
||||
@@ -89,7 +89,7 @@
|
||||
:class="['layout-option', selectedLayout === layout.id ? 'active' : '']"
|
||||
@tap="selectLayout(layout.id)"
|
||||
>
|
||||
<text class="layout-name">{{ layout.name }}</text>
|
||||
<text class="layout-name">{{ layout.layoutName }}</text>
|
||||
<text class="layout-desc">{{ layout.description }}</text>
|
||||
</view>
|
||||
</view>
|
||||
@@ -245,6 +245,7 @@ const fetchDeskLayouts = async () => {
|
||||
if (response.code === 0 && response.data) {
|
||||
deskLayouts.value = response.data
|
||||
console.log('Desk layouts data:', deskLayouts.value)
|
||||
console.log('First layout item structure:', deskLayouts.value[0])
|
||||
} else {
|
||||
console.error('Failed to fetch desk layouts:', response)
|
||||
}
|
||||
@@ -302,7 +303,31 @@ function selectService(value: string) {
|
||||
|
||||
// 选择桌子摆放形态
|
||||
function selectLayout(layoutId: string) {
|
||||
console.log('selectLayout called with layoutId:', layoutId)
|
||||
selectedLayout.value = layoutId
|
||||
console.log('selectedLayout.value set to:', selectedLayout.value)
|
||||
}
|
||||
|
||||
// 获取选中的桌子摆放形态名称
|
||||
const getSelectedLayoutName = () => {
|
||||
console.log('getSelectedLayoutName - selectedLayout.value:', selectedLayout.value)
|
||||
console.log('getSelectedLayoutName - deskLayouts.value:', deskLayouts.value)
|
||||
|
||||
if (!selectedLayout.value) {
|
||||
console.log('No layout selected, returning 未选择')
|
||||
return '未选择'
|
||||
}
|
||||
|
||||
const selectedLayoutItem = deskLayouts.value.find(layout => layout.id === selectedLayout.value)
|
||||
console.log('Found selected layout item:', selectedLayoutItem)
|
||||
|
||||
if (selectedLayoutItem) {
|
||||
console.log('Returning layout name:', selectedLayoutItem.layoutName)
|
||||
return selectedLayoutItem.layoutName
|
||||
} else {
|
||||
console.log('Layout item not found, returning 未选择')
|
||||
return '未选择'
|
||||
}
|
||||
}
|
||||
|
||||
// 确认预约
|
||||
@@ -331,6 +356,10 @@ async function confirmReserve() {
|
||||
const startSlot = timeSlots.value[selectedTime.value[0]]
|
||||
const endSlot = timeSlots.value[selectedTime.value[selectedTime.value.length - 1]]
|
||||
|
||||
const deskLayoutName = getSelectedLayoutName()
|
||||
console.log('选中的桌子摆放形态ID:', selectedLayout.value)
|
||||
console.log('桌子摆放形态名称:', deskLayoutName)
|
||||
|
||||
const res = await meetingRoomApi.bookMeetingRoom(roomId.value, {
|
||||
date,
|
||||
startTime: startSlot.startTime,
|
||||
@@ -339,7 +368,7 @@ async function confirmReserve() {
|
||||
description: '',
|
||||
attendees: [],
|
||||
need_service: needService.value,
|
||||
desk_layout: selectedLayout.value
|
||||
deskLayout: deskLayoutName
|
||||
})
|
||||
|
||||
console.log('预约接口响应:', res)
|
||||
|
||||
@@ -23,7 +23,8 @@
|
||||
<view class="card-info">
|
||||
<view>预约日期:{{ item.bookingDate }}</view>
|
||||
<view>时间:{{ item.startTime }} ~ {{ item.endTime }}</view>
|
||||
<view>申请人:{{ item.createBy }}</view>
|
||||
<view>申请人:{{ item.applicantName }}</view>
|
||||
<view>创建时间:{{ item.createTime }}</view>
|
||||
</view>
|
||||
<view class="card-footer">
|
||||
<view class="card-btn" @tap="viewDetail(item)">查看详情</view>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div v-for="item in services" :key="item.name" class="service-item" @click="goPage(item)">
|
||||
<div class="service-icon-wrapper">
|
||||
<image :src="item.icon" class="service-icon" />
|
||||
<view v-if="item.name === 'todo' && todoCount > 0" class="badge">{{ todoCount > 99 ? "99+" : todoCount }}</view>
|
||||
<view v-if="item.name === 'todo' && todoCount > 0" class="badge">{{ todoCount > 99 ? '99+' : todoCount }}</view>
|
||||
</div>
|
||||
<div class="service-label">{{ item.label }}</div>
|
||||
</div>
|
||||
@@ -80,7 +80,7 @@ async function fetchTodoCount() {
|
||||
todoCount.value = responseData.data.total || 0
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("获取待办数量失败:", error)
|
||||
console.error('获取待办数量失败:', error)
|
||||
todoCount.value = 0
|
||||
}
|
||||
}
|
||||
@@ -96,14 +96,14 @@ onMounted(() => {
|
||||
|
||||
function goPage(item) {
|
||||
// 访客邀约功能正在开发中
|
||||
// if (item.name === 'visitor') {
|
||||
// uni.showToast({
|
||||
// title: '访客邀约功能正在开发中',
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
if (item.name === 'visitor') {
|
||||
uni.showToast({
|
||||
title: '访客邀约功能正在开发中',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
if (item.url) {
|
||||
uni.navigateTo({ url: item.url })
|
||||
|
||||
Reference in new issue
Block a user