重构项目文件夹目录
This commit is contained in:
@@ -0,0 +1,340 @@
|
||||
const planningApi = require('../../api/planning')
|
||||
const dateUtil = require('../../utils/date')
|
||||
const mock = require('../../utils/mock')
|
||||
|
||||
Page({
|
||||
data: {
|
||||
viewMode: 'month',
|
||||
viewModes: [
|
||||
{ value: 'day', label: '日' },
|
||||
{ value: 'week', label: '周' },
|
||||
{ value: 'month', label: '月' }
|
||||
],
|
||||
monthDisplayMode: 'count',
|
||||
monthDisplayModes: [
|
||||
{ value: 'count', label: '单量' },
|
||||
{ value: 'blocks', label: '点阵' },
|
||||
{ value: 'rows', label: '横条' }
|
||||
],
|
||||
monthRowLabelVisible: false,
|
||||
weekLabels: ['一', '二', '三', '四', '五', '六', '日'],
|
||||
currentDate: new Date(),
|
||||
currentDateText: dateUtil.formatDate(new Date()),
|
||||
selectedArtistId: '',
|
||||
selectedArtistName: '全部员工',
|
||||
dateTitle: '',
|
||||
rangeText: '',
|
||||
weekRange: '',
|
||||
businessStartTime: '10:00',
|
||||
businessEndTime: '22:00',
|
||||
artists: [],
|
||||
appointments: [],
|
||||
daySummaries: [],
|
||||
monthDays: [],
|
||||
weekDays: [],
|
||||
dayLanes: [],
|
||||
hours: [],
|
||||
timelineHeight: 720,
|
||||
laneWidth: 720,
|
||||
laneItemWidth: 240,
|
||||
dayTotal: 0,
|
||||
freeArtistCount: 0,
|
||||
pendingCount: 0,
|
||||
loading: false
|
||||
},
|
||||
|
||||
onLoad() {
|
||||
this.loadCalendar()
|
||||
},
|
||||
|
||||
onShow() {
|
||||
if (this._needRefresh) {
|
||||
this._needRefresh = false
|
||||
this.loadCalendar()
|
||||
}
|
||||
},
|
||||
|
||||
switchView(event) {
|
||||
this.setData({ viewMode: event.currentTarget.dataset.mode })
|
||||
this.prepareView()
|
||||
this.loadCalendar()
|
||||
},
|
||||
|
||||
switchMonthDisplay(event) {
|
||||
this.setData({ monthDisplayMode: event.currentTarget.dataset.mode })
|
||||
},
|
||||
|
||||
toggleMonthRowLabel() {
|
||||
this.setData({ monthRowLabelVisible: !this.data.monthRowLabelVisible })
|
||||
},
|
||||
|
||||
selectArtist(event) {
|
||||
const id = event.currentTarget.dataset.id || ''
|
||||
const artist = this.data.artists.find(item => String(item.id) === String(id))
|
||||
this.setData({
|
||||
selectedArtistId: id,
|
||||
selectedArtistName: artist ? artist.name : '全部员工'
|
||||
})
|
||||
this.prepareView()
|
||||
},
|
||||
|
||||
selectDate(event) {
|
||||
const currentDate = dateUtil.formatDate(event.currentTarget.dataset.date)
|
||||
this.setData({
|
||||
currentDate,
|
||||
currentDateText: currentDate,
|
||||
viewMode: this.data.viewMode === 'month' ? 'day' : this.data.viewMode
|
||||
})
|
||||
this.prepareView()
|
||||
},
|
||||
|
||||
prevRange() {
|
||||
this.shiftRange(-1)
|
||||
},
|
||||
|
||||
nextRange() {
|
||||
this.shiftRange(1)
|
||||
},
|
||||
|
||||
goToday() {
|
||||
const today = new Date()
|
||||
this.setData({
|
||||
currentDate: today,
|
||||
currentDateText: dateUtil.formatDate(today)
|
||||
})
|
||||
this.loadCalendar()
|
||||
},
|
||||
|
||||
shiftRange(direction) {
|
||||
let next
|
||||
if (this.data.viewMode === 'month') {
|
||||
next = dateUtil.addMonths(this.data.currentDateText, direction)
|
||||
} else if (this.data.viewMode === 'week') {
|
||||
next = dateUtil.addDays(this.data.currentDateText, direction * 7)
|
||||
} else {
|
||||
next = dateUtil.addDays(this.data.currentDateText, direction)
|
||||
}
|
||||
this.setData({
|
||||
currentDate: next,
|
||||
currentDateText: dateUtil.formatDate(next)
|
||||
})
|
||||
this.loadCalendar()
|
||||
},
|
||||
|
||||
async loadCalendar() {
|
||||
const range = this.resolveRange()
|
||||
this.setData({ loading: true })
|
||||
try {
|
||||
const data = await planningApi.calendar({
|
||||
startDate: range.start,
|
||||
endDate: range.end,
|
||||
artistId: this.data.selectedArtistId || undefined
|
||||
})
|
||||
this.applyCalendar(data)
|
||||
} catch (error) {
|
||||
this.applyCalendar(mock.buildCalendar(this.data.currentDateText))
|
||||
} finally {
|
||||
this.setData({ loading: false })
|
||||
}
|
||||
},
|
||||
|
||||
resolveRange() {
|
||||
const current = this.data.currentDateText
|
||||
if (this.data.viewMode === 'week') {
|
||||
return {
|
||||
start: dateUtil.formatDate(dateUtil.startOfWeek(current)),
|
||||
end: dateUtil.formatDate(dateUtil.endOfWeek(current))
|
||||
}
|
||||
}
|
||||
if (this.data.viewMode === 'month') {
|
||||
return {
|
||||
start: dateUtil.formatDate(dateUtil.startOfMonth(current)),
|
||||
end: dateUtil.formatDate(dateUtil.endOfMonth(current))
|
||||
}
|
||||
}
|
||||
return { start: current, end: current }
|
||||
},
|
||||
|
||||
applyCalendar(calendar) {
|
||||
const artists = calendar.artists || []
|
||||
this.setData({
|
||||
businessStartTime: (calendar.businessStartTime || '10:00').slice(0, 5),
|
||||
businessEndTime: (calendar.businessEndTime || '22:00').slice(0, 5),
|
||||
artists,
|
||||
appointments: calendar.appointments || [],
|
||||
daySummaries: calendar.daySummaries || []
|
||||
})
|
||||
this.prepareView()
|
||||
},
|
||||
|
||||
prepareView() {
|
||||
const current = this.data.currentDateText
|
||||
const range = this.resolveRange()
|
||||
const title = this.data.viewMode === 'month'
|
||||
? dateUtil.formatMonth(current)
|
||||
: this.data.viewMode === 'week'
|
||||
? `${range.start.replace(/-/g, '/')} - ${range.end.replace(/-/g, '/')}`
|
||||
: dateUtil.formatCnDate(current)
|
||||
this.setData({
|
||||
dateTitle: title,
|
||||
rangeText: this.data.viewMode === 'month' ? '月视图' : this.data.viewMode === 'week' ? '周视图' : '日视图',
|
||||
weekRange: `${range.start.replace(/-/g, '/')} - ${range.end.replace(/-/g, '/')}`,
|
||||
monthDays: this.buildMonthDays(),
|
||||
weekDays: this.buildWeekDays(),
|
||||
...this.buildDayView()
|
||||
})
|
||||
},
|
||||
|
||||
buildMonthDays() {
|
||||
const summaryMap = this.summaryMap()
|
||||
const artistTemplate = this.data.artists.map(artist => ({
|
||||
artistId: artist.id,
|
||||
artistName: artist.name,
|
||||
shortName: artist.shortName,
|
||||
color: artist.color,
|
||||
count: 0,
|
||||
status: 'free'
|
||||
}))
|
||||
return dateUtil.monthGrid(this.data.currentDateText).map(day => {
|
||||
const summary = summaryMap[day.date] || {}
|
||||
const artistCounts = this.normalizeArtistCounts(summary.artistCounts || artistTemplate)
|
||||
return {
|
||||
...day,
|
||||
totalCount: summary.totalCount || 0,
|
||||
dayStatus: summary.dayStatus || 'free',
|
||||
artistCounts,
|
||||
expandedBlocks: this.buildExpandedBlocks(artistCounts),
|
||||
rowBlocks: this.buildRowBlocks(artistCounts)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
buildWeekDays() {
|
||||
const start = dateUtil.startOfWeek(this.data.currentDateText)
|
||||
const summaryMap = this.summaryMap()
|
||||
return this.data.weekLabels.map((label, index) => {
|
||||
const target = dateUtil.addDays(start, index)
|
||||
const date = dateUtil.formatDate(target)
|
||||
const summary = summaryMap[date] || { artistCounts: [], totalCount: 0 }
|
||||
const artistCounts = this.normalizeArtistCounts(summary.artistCounts || [])
|
||||
return {
|
||||
date,
|
||||
weekName: `周${label}`,
|
||||
day: target.getDate(),
|
||||
totalCount: summary.totalCount || 0,
|
||||
artistCounts: artistCounts.map(count => ({
|
||||
...count,
|
||||
width: Math.max(12, Math.min(100, count.count * 22)),
|
||||
barWidth: Math.max(14, Math.min(100, count.count * 18))
|
||||
}))
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
buildDayView() {
|
||||
const startMinute = dateUtil.minutesOfDay(this.data.businessStartTime)
|
||||
const endMinute = dateUtil.minutesOfDay(this.data.businessEndTime)
|
||||
const timelineHeight = Math.max(560, endMinute - startMinute)
|
||||
const hours = []
|
||||
for (let cursor = startMinute; cursor <= endMinute; cursor += 60) {
|
||||
hours.push({
|
||||
value: cursor,
|
||||
label: dateUtil.timeFromMinutes(cursor),
|
||||
top: cursor - startMinute
|
||||
})
|
||||
}
|
||||
const filteredArtists = this.data.selectedArtistId
|
||||
? this.data.artists.filter(item => String(item.id) === String(this.data.selectedArtistId))
|
||||
: this.data.artists
|
||||
const dayAppointments = this.data.appointments.filter(item => item.date === this.data.currentDateText)
|
||||
const lanes = filteredArtists.map(artist => {
|
||||
const blocks = dayAppointments
|
||||
.filter(item => String(item.artistId) === String(artist.id))
|
||||
.map(item => {
|
||||
const itemStart = item.startMinute || dateUtil.minutesOfDay((item.startTime || '').slice(11, 16))
|
||||
return {
|
||||
...item,
|
||||
top: Math.max(0, itemStart - startMinute),
|
||||
height: Math.max(64, item.durationMinutes || 60),
|
||||
timeText: `${(item.startTime || '').slice(11, 16)}-${(item.endTime || '').slice(11, 16)}`
|
||||
}
|
||||
})
|
||||
return { ...artist, blocks }
|
||||
})
|
||||
const pendingCount = dayAppointments.filter(item => item.status === 0).length
|
||||
return {
|
||||
dayLanes: lanes,
|
||||
hours,
|
||||
timelineHeight,
|
||||
laneItemWidth: 248,
|
||||
laneWidth: Math.max(720, lanes.length * 248),
|
||||
dayTotal: dayAppointments.length,
|
||||
freeArtistCount: lanes.filter(item => item.blocks.length === 0).length,
|
||||
pendingCount
|
||||
}
|
||||
},
|
||||
|
||||
summaryMap() {
|
||||
return (this.data.daySummaries || []).reduce((map, item) => {
|
||||
map[item.date] = item
|
||||
return map
|
||||
}, {})
|
||||
},
|
||||
|
||||
normalizeArtistCounts(counts) {
|
||||
const colorMap = this.data.artists.reduce((map, artist) => {
|
||||
map[artist.id] = artist
|
||||
return map
|
||||
}, {})
|
||||
return (counts || []).map(count => {
|
||||
const artist = colorMap[count.artistId] || {}
|
||||
return {
|
||||
...count,
|
||||
color: count.color || artist.color || '#B8B0A6',
|
||||
shortName: count.shortName || artist.shortName || '?',
|
||||
count: Number(count.count || 0)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
buildExpandedBlocks(artistCounts) {
|
||||
return (artistCounts || []).reduce((blocks, count) => {
|
||||
for (let index = 0; index < Number(count.count || 0); index += 1) {
|
||||
blocks.push({
|
||||
key: `${count.artistId || count.shortName}-${index}`,
|
||||
artistId: count.artistId,
|
||||
color: count.color,
|
||||
shortName: count.shortName
|
||||
})
|
||||
}
|
||||
return blocks
|
||||
}, [])
|
||||
},
|
||||
|
||||
buildRowBlocks(artistCounts) {
|
||||
return (artistCounts || []).reduce((rows, count) => {
|
||||
for (let index = 0; index < Number(count.count || 0); index += 1) {
|
||||
rows.push({
|
||||
key: `${count.artistId || count.shortName}-row-${index}`,
|
||||
artistId: count.artistId,
|
||||
color: count.color,
|
||||
shortName: count.shortName,
|
||||
artistName: count.artistName || count.shortName
|
||||
})
|
||||
}
|
||||
return rows
|
||||
}, [])
|
||||
},
|
||||
|
||||
createAppointment() {
|
||||
wx.navigateTo({
|
||||
url: `/pages/appointment-form/index?date=${this.data.currentDateText}&artistId=${this.data.selectedArtistId || ''}`
|
||||
})
|
||||
},
|
||||
|
||||
openAppointment(event) {
|
||||
wx.navigateTo({
|
||||
url: `/pages/appointment-detail/index?id=${event.currentTarget.dataset.id}`
|
||||
})
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"navigationBarTitleText": "规划"
|
||||
}
|
||||
@@ -0,0 +1,143 @@
|
||||
<view class="page planning-page">
|
||||
<view class="card control-card">
|
||||
<view class="date-row">
|
||||
<view class="date-side">
|
||||
<button class="icon-btn small" bindtap="prevRange">‹</button>
|
||||
</view>
|
||||
<view class="date-center">
|
||||
<text class="date-main">{{dateTitle}}</text>
|
||||
<text class="date-sub">{{businessStartTime}}-{{businessEndTime}}</text>
|
||||
</view>
|
||||
<view class="date-side date-tools">
|
||||
<button class="today-btn" bindtap="goToday">今</button>
|
||||
<button class="icon-btn small" bindtap="nextRange">›</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="segmented">
|
||||
<view wx:for="{{viewModes}}" wx:key="value" class="segment {{viewMode === item.value ? 'active' : ''}}" data-mode="{{item.value}}" bindtap="switchView">{{item.label}}</view>
|
||||
</view>
|
||||
<scroll-view class="artist-filter" scroll-x enable-flex>
|
||||
<view class="artist-chip {{!selectedArtistId ? 'active' : ''}}" data-id="" bindtap="selectArtist">全部员工</view>
|
||||
<view wx:for="{{artists}}" wx:key="id" class="artist-chip {{selectedArtistId == item.id ? 'active' : ''}}" data-id="{{item.id}}" bindtap="selectArtist">
|
||||
<view class="chip-dot" style="background: {{item.color}};"></view>
|
||||
<text>{{item.name}}</text>
|
||||
<text class="chip-count">{{item.rangeCount || 0}}</text>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{viewMode === 'day'}}" class="section">
|
||||
<view class="day-summary">
|
||||
<view class="summary-item card">
|
||||
<text class="summary-value">{{dayTotal}}</text>
|
||||
<text class="summary-label">今日预约</text>
|
||||
</view>
|
||||
<view class="summary-item card">
|
||||
<text class="summary-value">{{freeArtistCount}}</text>
|
||||
<text class="summary-label">可插单员工</text>
|
||||
</view>
|
||||
<view class="summary-item card">
|
||||
<text class="summary-value">{{pendingCount}}</text>
|
||||
<text class="summary-label">待确认</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<scroll-view class="day-board card" scroll-y>
|
||||
<view class="timeline-wrap" style="height: {{timelineHeight}}rpx;">
|
||||
<view class="time-axis">
|
||||
<view wx:for="{{hours}}" wx:key="value" class="time-label" style="top: {{item.top}}rpx;">{{item.label}}</view>
|
||||
</view>
|
||||
<scroll-view class="lane-scroll" scroll-x enable-flex>
|
||||
<view class="lanes" style="height: {{timelineHeight}}rpx; width: {{laneWidth}}rpx;">
|
||||
<view wx:for="{{dayLanes}}" wx:key="artistId" class="artist-lane" style="height: {{timelineHeight}}rpx; width: {{laneItemWidth}}rpx;">
|
||||
<view class="lane-head">
|
||||
<view class="chip-dot" style="background: {{item.color}};"></view>
|
||||
<text>{{item.name}}</text>
|
||||
</view>
|
||||
<view wx:for="{{item.blocks}}" wx:for-item="block" wx:key="orderItemId" class="appointment-block {{block.status === 0 ? 'pending' : ''}}" style="top: {{block.top}}rpx; height: {{block.height}}rpx; border-left-color: {{item.color}};" data-id="{{block.orderItemId}}" bindtap="openAppointment">
|
||||
<text class="block-title">{{block.customerName}}</text>
|
||||
<text class="block-meta">{{block.timeText}} · {{block.productTitle}}</text>
|
||||
<text class="block-status">{{block.statusText}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.blocks.length === 0}}" class="lane-empty">全天可约</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{viewMode === 'week'}}" class="section">
|
||||
<scroll-view class="week-strip" scroll-x enable-flex>
|
||||
<view wx:for="{{weekDays}}" wx:key="date" class="week-day-card card {{item.date === currentDateText ? 'active' : ''}}" data-date="{{item.date}}" bindtap="selectDate">
|
||||
<text class="week-name">{{item.weekName}}</text>
|
||||
<text class="week-date">{{item.day}}</text>
|
||||
<text class="week-total">{{item.totalCount}}单</text>
|
||||
<view class="week-bars">
|
||||
<view wx:for="{{item.artistCounts}}" wx:for-item="count" wx:key="artistId" class="week-bar" style="background: {{count.color}}; width: {{count.width}}%;"></view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<view class="card week-grid">
|
||||
<view class="week-grid-head">
|
||||
<text>本周排班密度</text>
|
||||
<text class="muted">{{weekRange}}</text>
|
||||
</view>
|
||||
<view wx:for="{{weekDays}}" wx:key="date" class="week-line">
|
||||
<view class="week-line-date">{{item.weekName}} {{item.day}}</view>
|
||||
<view class="week-line-bars">
|
||||
<view wx:for="{{item.artistCounts}}" wx:for-item="count" wx:key="artistId" class="week-count-bar" style="background: {{count.color}}; width: {{count.barWidth}}%;">
|
||||
<text>{{count.shortName}}{{count.count}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view wx:if="{{viewMode === 'month'}}" class="section">
|
||||
<view class="month-toolbar">
|
||||
<text class="month-toolbar-title">月历显示</text>
|
||||
<view class="month-mode-switch">
|
||||
<view wx:for="{{monthDisplayModes}}" wx:key="value" class="month-mode {{monthDisplayMode === item.value ? 'active' : ''}}" data-mode="{{item.value}}" bindtap="switchMonthDisplay">{{item.label}}</view>
|
||||
</view>
|
||||
<view wx:if="{{monthDisplayMode === 'rows'}}" class="row-name-switch {{monthRowLabelVisible ? 'active' : ''}}" bindtap="toggleMonthRowLabel">
|
||||
<text>姓名</text>
|
||||
<view class="switch-track"><view class="switch-thumb"></view></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="month-card card">
|
||||
<view class="month-week-head">
|
||||
<text wx:for="{{weekLabels}}" wx:key="*this">{{item}}</text>
|
||||
</view>
|
||||
<view class="month-grid">
|
||||
<view wx:for="{{monthDays}}" wx:key="date" class="month-cell {{item.isCurrentMonth ? '' : 'out-month'}} {{item.date === currentDateText ? 'selected' : ''}}" data-date="{{item.date}}" bindtap="selectDate">
|
||||
<view class="month-cell-head">
|
||||
<text class="month-day">{{item.day}}</text>
|
||||
<text wx:if="{{item.dayStatus === 'full'}}" class="day-mark full">满</text>
|
||||
<text wx:elif="{{item.dayStatus === 'rest'}}" class="day-mark rest">休</text>
|
||||
</view>
|
||||
<view wx:if="{{monthDisplayMode === 'count'}}" class="month-bars">
|
||||
<view wx:for="{{item.artistCounts}}" wx:for-item="count" wx:key="artistId" wx:if="{{count.count > 0}}" class="month-artist-bar" style="background: {{count.color}};">
|
||||
<text>{{count.shortName}}{{count.count}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.totalCount === 0}}" class="month-empty">空</view>
|
||||
</view>
|
||||
<view wx:else class="month-blocks">
|
||||
<block wx:if="{{monthDisplayMode === 'blocks'}}">
|
||||
<view wx:for="{{item.expandedBlocks}}" wx:for-item="block" wx:key="key" class="month-order-block" style="background: {{block.color}};"></view>
|
||||
<view wx:if="{{item.totalCount === 0}}" class="month-empty">空</view>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<view wx:for="{{item.rowBlocks}}" wx:for-item="block" wx:key="key" class="month-row-block {{monthRowLabelVisible ? 'named' : ''}}" style="background: {{block.color}};">
|
||||
<text wx:if="{{monthRowLabelVisible}}">{{block.artistName}}</text>
|
||||
</view>
|
||||
<view wx:if="{{item.totalCount === 0}}" class="month-empty">空</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<button class="fab" bindtap="createAppointment">+</button>
|
||||
</view>
|
||||
@@ -0,0 +1,586 @@
|
||||
.planning-page {
|
||||
padding-top: 18rpx;
|
||||
}
|
||||
|
||||
.today-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 58rpx;
|
||||
min-width: 58rpx;
|
||||
max-width: 58rpx;
|
||||
height: 52rpx;
|
||||
min-height: 52rpx;
|
||||
padding: 0;
|
||||
border-radius: 999rpx;
|
||||
background: #e5eee9;
|
||||
color: #6f8f83;
|
||||
font-size: 24rpx;
|
||||
font-weight: 800;
|
||||
line-height: 52rpx;
|
||||
}
|
||||
|
||||
.control-card {
|
||||
padding: 18rpx;
|
||||
}
|
||||
|
||||
.date-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.date-side {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 128rpx;
|
||||
}
|
||||
|
||||
.date-tools {
|
||||
justify-content: flex-end;
|
||||
gap: 8rpx;
|
||||
}
|
||||
|
||||
.icon-btn.small {
|
||||
width: 52rpx;
|
||||
min-width: 52rpx;
|
||||
max-width: 52rpx;
|
||||
height: 52rpx;
|
||||
min-height: 52rpx;
|
||||
font-size: 34rpx;
|
||||
}
|
||||
|
||||
.date-center {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 4rpx;
|
||||
}
|
||||
|
||||
.date-main {
|
||||
color: #25211d;
|
||||
font-size: 32rpx;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.date-sub {
|
||||
color: #9a9288;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
.segmented {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 8rpx;
|
||||
margin-top: 18rpx;
|
||||
padding: 8rpx;
|
||||
border-radius: 12px;
|
||||
background: #f1ece4;
|
||||
}
|
||||
|
||||
.segment {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 58rpx;
|
||||
border-radius: 10px;
|
||||
color: #7d756c;
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.segment.active {
|
||||
background: #fffdf8;
|
||||
color: #2f2a25;
|
||||
box-shadow: 0 6rpx 14rpx rgba(58, 48, 34, 0.07);
|
||||
}
|
||||
|
||||
.artist-filter {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
margin-top: 16rpx;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.artist-chip {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
height: 52rpx;
|
||||
margin-right: 10rpx;
|
||||
padding: 0 16rpx;
|
||||
border-radius: 999rpx;
|
||||
background: #f4f0ea;
|
||||
color: #625b52;
|
||||
font-size: 24rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.artist-chip.active {
|
||||
background: #e5eee9;
|
||||
color: #4e7165;
|
||||
}
|
||||
|
||||
.chip-dot {
|
||||
width: 14rpx;
|
||||
height: 14rpx;
|
||||
margin-right: 8rpx;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.chip-count {
|
||||
margin-left: 8rpx;
|
||||
color: #9a9288;
|
||||
}
|
||||
|
||||
.day-summary {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 12rpx;
|
||||
}
|
||||
|
||||
.summary-item {
|
||||
padding: 16rpx;
|
||||
}
|
||||
|
||||
.summary-value {
|
||||
display: block;
|
||||
color: #26231f;
|
||||
font-size: 34rpx;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.summary-label {
|
||||
display: block;
|
||||
margin-top: 8rpx;
|
||||
color: #938c82;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
.day-board {
|
||||
height: 820rpx;
|
||||
margin-top: 18rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.timeline-wrap {
|
||||
position: relative;
|
||||
min-height: 720rpx;
|
||||
}
|
||||
|
||||
.time-axis {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 4;
|
||||
width: 92rpx;
|
||||
height: 100%;
|
||||
border-right: 1rpx solid #eee8df;
|
||||
background: #fffdf8;
|
||||
}
|
||||
|
||||
.time-label {
|
||||
position: absolute;
|
||||
right: 12rpx;
|
||||
color: #9a9288;
|
||||
font-size: 20rpx;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
.lane-scroll {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
left: 104rpx;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.lanes {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.artist-lane {
|
||||
position: relative;
|
||||
flex-shrink: 0;
|
||||
border-right: 1rpx solid #eee8df;
|
||||
background-image: linear-gradient(to bottom, rgba(214, 207, 197, 0.35) 1rpx, transparent 1rpx);
|
||||
background-size: 100% 60rpx;
|
||||
}
|
||||
|
||||
.lane-head {
|
||||
position: sticky;
|
||||
top: 0;
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 54rpx;
|
||||
padding: 0 14rpx;
|
||||
background: rgba(255, 253, 248, 0.92);
|
||||
color: #4d473f;
|
||||
font-size: 22rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.appointment-block {
|
||||
position: absolute;
|
||||
right: 12rpx;
|
||||
left: 12rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4rpx;
|
||||
overflow: hidden;
|
||||
padding: 12rpx 12rpx;
|
||||
border-left: 8rpx solid #7ba7c7;
|
||||
border-radius: 10px;
|
||||
background: #fff7ee;
|
||||
box-shadow: 0 8rpx 16rpx rgba(58, 48, 34, 0.08);
|
||||
}
|
||||
|
||||
.appointment-block.pending {
|
||||
background: #fff3f6;
|
||||
}
|
||||
|
||||
.block-title {
|
||||
color: #2c2823;
|
||||
font-size: 24rpx;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.block-meta,
|
||||
.block-status {
|
||||
color: #7e756b;
|
||||
font-size: 20rpx;
|
||||
line-height: 1.25;
|
||||
}
|
||||
|
||||
.lane-empty {
|
||||
position: absolute;
|
||||
top: 76rpx;
|
||||
right: 18rpx;
|
||||
left: 18rpx;
|
||||
padding: 16rpx 0;
|
||||
border: 1rpx dashed #d8d1c8;
|
||||
border-radius: 10px;
|
||||
color: #aaa198;
|
||||
text-align: center;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
.week-strip {
|
||||
width: 100%;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.week-day-card {
|
||||
display: inline-flex;
|
||||
flex-direction: column;
|
||||
width: 148rpx;
|
||||
min-height: 164rpx;
|
||||
margin-right: 12rpx;
|
||||
padding: 16rpx;
|
||||
}
|
||||
|
||||
.week-day-card.active {
|
||||
outline: 3rpx solid #8fb89a;
|
||||
}
|
||||
|
||||
.week-name,
|
||||
.week-total {
|
||||
color: #8f877e;
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
.week-date {
|
||||
margin: 8rpx 0;
|
||||
color: #211e1a;
|
||||
font-size: 38rpx;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.week-bars {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6rpx;
|
||||
margin-top: 12rpx;
|
||||
}
|
||||
|
||||
.week-bar {
|
||||
height: 8rpx;
|
||||
border-radius: 999rpx;
|
||||
}
|
||||
|
||||
.week-grid {
|
||||
margin-top: 18rpx;
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.week-grid-head,
|
||||
.week-line {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.week-grid-head {
|
||||
margin-bottom: 14rpx;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.week-line {
|
||||
min-height: 70rpx;
|
||||
border-top: 1rpx solid #eee8df;
|
||||
}
|
||||
|
||||
.week-line-date {
|
||||
width: 132rpx;
|
||||
color: #6f675f;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.week-line-bars {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6rpx;
|
||||
}
|
||||
|
||||
.week-count-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
min-width: 58rpx;
|
||||
height: 28rpx;
|
||||
padding-left: 10rpx;
|
||||
border-radius: 7rpx;
|
||||
color: #fff;
|
||||
font-size: 18rpx;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.month-card {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.month-toolbar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8rpx;
|
||||
margin-bottom: 14rpx;
|
||||
padding: 0 4rpx;
|
||||
}
|
||||
|
||||
.month-toolbar-title {
|
||||
color: #615a51;
|
||||
font-size: 24rpx;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.month-mode-switch {
|
||||
display: inline-flex;
|
||||
gap: 6rpx;
|
||||
padding: 6rpx;
|
||||
border-radius: 999rpx;
|
||||
background: #eee8df;
|
||||
}
|
||||
|
||||
.month-mode {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 68rpx;
|
||||
height: 44rpx;
|
||||
padding: 0 12rpx;
|
||||
border-radius: 999rpx;
|
||||
color: #766e65;
|
||||
font-size: 22rpx;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.month-mode.active {
|
||||
background: #fffdf8;
|
||||
color: #2f6f62;
|
||||
box-shadow: 0 4rpx 12rpx rgba(58, 48, 34, 0.07);
|
||||
}
|
||||
|
||||
.row-name-switch {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8rpx;
|
||||
height: 44rpx;
|
||||
padding: 0 10rpx;
|
||||
border-radius: 999rpx;
|
||||
background: #f0ece5;
|
||||
color: #766e65;
|
||||
font-size: 21rpx;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.row-name-switch.active {
|
||||
color: #2f6f62;
|
||||
background: #e5eee9;
|
||||
}
|
||||
|
||||
.switch-track {
|
||||
position: relative;
|
||||
width: 44rpx;
|
||||
height: 24rpx;
|
||||
border-radius: 999rpx;
|
||||
background: #d6d0c7;
|
||||
}
|
||||
|
||||
.switch-thumb {
|
||||
position: absolute;
|
||||
top: 3rpx;
|
||||
left: 3rpx;
|
||||
width: 18rpx;
|
||||
height: 18rpx;
|
||||
border-radius: 50%;
|
||||
background: #fffdf8;
|
||||
box-shadow: 0 2rpx 6rpx rgba(58, 48, 34, 0.16);
|
||||
}
|
||||
|
||||
.row-name-switch.active .switch-track {
|
||||
background: #6f8f83;
|
||||
}
|
||||
|
||||
.row-name-switch.active .switch-thumb {
|
||||
transform: translateX(20rpx);
|
||||
}
|
||||
|
||||
.month-week-head {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(7, 1fr);
|
||||
height: 58rpx;
|
||||
align-items: center;
|
||||
border-bottom: 1rpx solid #ebe5dc;
|
||||
color: #726b62;
|
||||
font-size: 24rpx;
|
||||
font-weight: 800;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.month-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(7, 1fr);
|
||||
}
|
||||
|
||||
.month-cell {
|
||||
min-height: 168rpx;
|
||||
padding: 8rpx 5rpx;
|
||||
border-right: 1rpx solid #eee8df;
|
||||
border-bottom: 1rpx solid #eee8df;
|
||||
background: #fffdf8;
|
||||
}
|
||||
|
||||
.month-cell:nth-child(7n) {
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
.month-cell.out-month {
|
||||
background: #f7f3ed;
|
||||
}
|
||||
|
||||
.month-cell.selected {
|
||||
background: #eef5f1;
|
||||
}
|
||||
|
||||
.month-cell-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
min-height: 32rpx;
|
||||
}
|
||||
|
||||
.month-day {
|
||||
color: #2c2824;
|
||||
font-size: 26rpx;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.out-month .month-day {
|
||||
color: #aba39a;
|
||||
}
|
||||
|
||||
.day-mark {
|
||||
font-size: 18rpx;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.day-mark.full {
|
||||
color: #d98d8d;
|
||||
}
|
||||
|
||||
.day-mark.rest {
|
||||
color: #8aaeca;
|
||||
}
|
||||
|
||||
.month-bars {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5rpx;
|
||||
margin-top: 7rpx;
|
||||
}
|
||||
|
||||
.month-artist-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 24rpx;
|
||||
min-width: 0;
|
||||
overflow: hidden;
|
||||
border-radius: 6rpx;
|
||||
color: #fff;
|
||||
font-size: 17rpx;
|
||||
font-weight: 800;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.month-blocks {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-content: flex-start;
|
||||
gap: 5rpx;
|
||||
margin-top: 8rpx;
|
||||
}
|
||||
|
||||
.month-order-block {
|
||||
width: 22rpx;
|
||||
height: 12rpx;
|
||||
border-radius: 999rpx;
|
||||
box-shadow: inset 0 0 0 1rpx rgba(255, 255, 255, 0.24);
|
||||
}
|
||||
|
||||
.month-row-block {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 12rpx;
|
||||
overflow: hidden;
|
||||
border-radius: 999rpx;
|
||||
color: #fff;
|
||||
font-size: 13rpx;
|
||||
font-weight: 900;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
text-shadow: 0 1rpx 3rpx rgba(37, 31, 24, 0.22);
|
||||
box-shadow: inset 0 0 0 1rpx rgba(255, 255, 255, 0.24);
|
||||
}
|
||||
|
||||
.month-row-block.named {
|
||||
height: 20rpx;
|
||||
}
|
||||
|
||||
.month-blocks .month-empty {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.month-empty {
|
||||
margin-top: 10rpx;
|
||||
color: #b5ada4;
|
||||
font-size: 20rpx;
|
||||
text-align: center;
|
||||
}
|
||||
Reference in New Issue
Block a user