|
@@ -85,8 +85,20 @@
|
|
|
selected: [],
|
|
selected: [],
|
|
|
calendar: [],
|
|
calendar: [],
|
|
|
})
|
|
})
|
|
|
|
|
+ const instRoomType = ref(10)
|
|
|
|
|
+ const getInstDetails = async () => {
|
|
|
|
|
+ try {
|
|
|
|
|
+ const [err, res]: ToResponse = await to(instApi.getDetail({ id: instId.value }));
|
|
|
|
|
+ if (!err && res?.data) {
|
|
|
|
|
+ instRoomType.value = res.data.instRoomType || 10;
|
|
|
|
|
+ }
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ console.error('获取仪器详情失败:', error);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
// 获取系统设置时间间隔
|
|
// 获取系统设置时间间隔
|
|
|
const getTimeSplit = async () => {
|
|
const getTimeSplit = async () => {
|
|
|
|
|
+ await getInstDetails()
|
|
|
const [err, res]: ToResponse = await to(
|
|
const [err, res]: ToResponse = await to(
|
|
|
instApi.getSettingDetail({
|
|
instApi.getSettingDetail({
|
|
|
instId: Number(instId.value),
|
|
instId: Number(instId.value),
|
|
@@ -108,6 +120,13 @@
|
|
|
instId: instId.value,
|
|
instId: instId.value,
|
|
|
date: currentDate,
|
|
date: currentDate,
|
|
|
dateType: 'week',
|
|
dateType: 'week',
|
|
|
|
|
+ currentUser: false,
|
|
|
|
|
+ }
|
|
|
|
|
+ if (instRoomType.value == 20) {
|
|
|
|
|
+ // 这里需要获取当前用户ID,您需要根据实际情况获取当前用户ID
|
|
|
|
|
+ params.currentUser = true;
|
|
|
|
|
+ console.log('房间类型,只查看自己的预约记录');
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
await Promise.all([
|
|
await Promise.all([
|
|
|
instApi.getAppointInfo({ ...params }),
|
|
instApi.getAppointInfo({ ...params }),
|
|
@@ -275,6 +294,7 @@
|
|
|
}
|
|
}
|
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
|
instId.value = route.query.id ? +route.query.id : 0
|
|
instId.value = route.query.id ? +route.query.id : 0
|
|
|
|
|
+
|
|
|
getTimeSplit()
|
|
getTimeSplit()
|
|
|
})
|
|
})
|
|
|
</script>
|
|
</script>
|