区分预约完成和取消状态标识

This commit is contained in:
2026-07-12 11:51:52 +08:00
parent 157af9f45b
commit 58498db422
8 changed files with 424 additions and 30 deletions
@@ -243,7 +243,11 @@ const timeRange = (item: ArtistCalendarAppointment) => `${formatClock(item.appoi
/** weekText is a local helper used by this page script. */
const weekText = (key: string) => ['周日', '周一', '周二', '周三', '周四', '周五', '周六'][new Date(`${key}T00:00:00`).getDay()] || ''
/** statusClass is a local helper used by this page script. */
const statusClass = (status: number) => status === 2 ? 'is-completed' : 'is-pending'
const statusClass = (status: number) => {
if (status === 2) return 'is-completed'
if (status === 3) return 'is-cancelled'
return 'is-pending'
}
onMounted(loadAppointments)
</script>
@@ -267,9 +271,13 @@ onMounted(loadAppointments)
.day-label strong { font-size: 20px; }
.day-label span, .day-label em { color: var(--text-secondary); font-style: normal; font-size: 12px; }
.day-line { position: relative; display: grid; gap: 10px; padding-left: 18px; border-left: 2px solid var(--theme-border); }
.appointment-block { width: 100%; display: grid; gap: 5px; padding: 14px 16px; border: 1px solid var(--theme-border); border-radius: 8px; background: var(--theme-card-bg); text-align: left; color: var(--text-primary); box-shadow: 0 10px 22px color-mix(in srgb, var(--theme-primary) 8%, transparent); cursor: pointer; transition: transform .18s ease, border-color .18s ease; }
.appointment-block { position: relative; width: 100%; display: grid; gap: 5px; overflow: hidden; padding: 14px 16px; border: 1px solid var(--theme-border); border-radius: 8px; background: var(--theme-card-bg); text-align: left; color: var(--text-primary); box-shadow: 0 10px 22px color-mix(in srgb, var(--theme-primary) 8%, transparent); cursor: pointer; transition: transform .18s ease, border-color .18s ease; }
.appointment-block:hover { transform: translateY(-2px); border-color: var(--theme-primary); }
.appointment-block.is-completed { background: #f5fff7; border-color: #c8ead1; }
.appointment-block.is-cancelled { background: #fff5f6; border-color: #e8c7cc; }
.appointment-block.is-completed::after, .appointment-block.is-cancelled::after { content: ""; position: absolute; right: 10px; left: 10px; top: 50%; border-top: 3px solid; pointer-events: none; transform: rotate(-10deg); transform-origin: center; }
.appointment-block.is-completed::after { border-color: rgba(69, 130, 91, 0.78); }
.appointment-block.is-cancelled::after { border-color: rgba(198, 78, 91, 0.8); }
.appointment-block .time { color: var(--theme-primary); font-weight: 700; }
.appointment-block small { color: var(--text-secondary); }
.detail-body { display: grid; gap: 18px; }