From 5879e886acb82a1cf7cc108b279c731157f147e7 Mon Sep 17 00:00:00 2001 From: dsgler <1832002325@qq.com> Date: Wed, 26 Mar 2025 22:55:34 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=BA=E2=80=9C=E9=9D=A2=E8=AF=95?= =?UTF-8?q?=E6=97=A5=E5=B8=B8=E2=80=9D=E6=B7=BB=E5=8A=A0"all"=E6=9F=A5?= =?UTF-8?q?=E7=9C=8B=E6=89=80=E6=9C=89=E5=88=86=E7=BB=84=E7=9A=84=E9=80=89?= =?UTF-8?q?=E9=A1=B9=EF=BC=8C=E5=8E=9F=E5=9E=8B=E5=9B=BE=E4=B8=8A=E6=98=AF?= =?UTF-8?q?=E6=9C=89=E7=9A=84=EF=BC=8C=E5=B8=8C=E6=9C=9B=E8=BF=99=E6=A0=B7?= =?UTF-8?q?=E8=83=BD=E8=AE=A9=E8=BF=99=E4=B8=AA=E9=A1=B5=E9=9D=A2=E4=B8=8D?= =?UTF-8?q?=E9=82=A3=E4=B9=88=E5=8F=8D=E4=BA=BA=E7=B1=BB=EF=BC=9B=E4=B8=8D?= =?UTF-8?q?=E8=BF=87=E7=9B=AE=E5=89=8D=E7=9A=84=E5=AE=9E=E7=8E=B0=E5=8F=AF?= =?UTF-8?q?=E8=83=BD=E4=B8=8D=E5=A4=AA=E8=A7=84=E8=8C=83=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E8=BF=87=E6=88=91=E8=A7=89=E5=BE=97=E6=8C=BA=E5=A5=BD=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/interview/schedule/allGroups.ts | 2 ++ .../schedule/components/schedules.vue | 21 +++++++++++++------ src/views/interview/schedule/index.vue | 10 +++++++-- 3 files changed, 25 insertions(+), 8 deletions(-) create mode 100644 src/views/interview/schedule/allGroups.ts diff --git a/src/views/interview/schedule/allGroups.ts b/src/views/interview/schedule/allGroups.ts new file mode 100644 index 0000000..a13a919 --- /dev/null +++ b/src/views/interview/schedule/allGroups.ts @@ -0,0 +1,2 @@ +const allGroups = Symbol('all'); +export default allGroups; diff --git a/src/views/interview/schedule/components/schedules.vue b/src/views/interview/schedule/components/schedules.vue index 91459d2..d5150e1 100644 --- a/src/views/interview/schedule/components/schedules.vue +++ b/src/views/interview/schedule/components/schedules.vue @@ -6,7 +6,11 @@ }}
- {{ currentGroup }} + + {{ + currentGroup === allGroups ? allGroups.description : currentGroup + }} +
@@ -81,6 +85,7 @@ import router from '@/router'; import { Group } from '@/constants/team'; import { computed } from 'vue'; import { useI18n } from 'vue-i18n'; +import allGroups from '../allGroups'; interface CandidateInfo { name: string; @@ -96,13 +101,17 @@ const props = defineProps<{ const { t } = useI18n(); -const currentGroup = defineModel({ +const currentGroup = defineModel({ required: true, }); -const groups = computed(() => - Object.values(Group).filter((x) => x !== Group.Unique), -); +const groups = computed(() => { + const ret: (Group | typeof allGroups)[] = Object.values(Group).filter( + (x) => x !== Group.Unique, + ); + ret.unshift(allGroups); + return ret; +}); const goManagement = () => { router.push({ name: 'interviewMangement' }); diff --git a/src/views/interview/schedule/index.vue b/src/views/interview/schedule/index.vue index 7610ca1..df7526c 100644 --- a/src/views/interview/schedule/index.vue +++ b/src/views/interview/schedule/index.vue @@ -25,6 +25,7 @@ import useRecruitmentStore from '@/store/modules/recruitment'; import dayjs from 'dayjs'; import calender from './components/calendar.vue'; import schedules from './components/schedules.vue'; +import allGroups from './allGroups'; // 格式化日期 const formatToday = (date: Date) => { @@ -55,7 +56,7 @@ function Duration(start: Date, end: Date) { } provide('formatToday', formatToday); -const currentGroup = ref(Group.Web); +const currentGroup = ref(allGroups); const selectedDate = ref('2024-01-01'); const recStore = useRecruitmentStore(); @@ -105,7 +106,12 @@ const filteredApps = computed(() => step === 'GroupInterview' ? selectedDate.value === formatDate(groupStartDate) : selectedDate.value === formatDate(teamStartDate); - const isGroup = group === currentGroup.value; + let isGroup: boolean; + if (currentGroup.value === allGroups) { + isGroup = true; + } else { + isGroup = group === currentGroup.value; + } return isStep && isGroup && isTime; }, ),