| | |
| | | <view class="detail-section"> |
| | | <view class="section-title">时间信息</view> |
| | | <view class="info-item"> |
| | | <view class="label">计划开始时间</view> |
| | | <view class="label">预约时间</view> |
| | | <view class="value">{{ displayPlannedStartTime }}</view> |
| | | </view> |
| | | <view class="info-item"> |
| | | <view class="info-item" v-if="taskDetail.plannedEndTime"> |
| | | <view class="label">计划结束时间</view> |
| | | <view class="value">{{ displayPlannedEndTime }}</view> |
| | | </view> |
| | |
| | | if (!this.taskDetail || !this.taskDetail.plannedStartTime) { |
| | | return '未设置' |
| | | } |
| | | return formatDateTime(this.taskDetail.plannedStartTime, 'YYYY-MM-DD HH:mm') |
| | | const formatted = formatDateTime(this.taskDetail.plannedStartTime, 'YYYY-MM-DD HH:mm') |
| | | // 如果年份是1900,表示无效日期,显示为未设置 |
| | | if (formatted && formatted.startsWith('1900')) { |
| | | return '未设置' |
| | | } |
| | | return formatted |
| | | }, |
| | | // 显示计划结束时间 |
| | | displayPlannedEndTime() { |
| | | if (!this.taskDetail || !this.taskDetail.plannedEndTime) { |
| | | return '未设置' |
| | | } |
| | | return formatDateTime(this.taskDetail.plannedEndTime, 'YYYY-MM-DD HH:mm') |
| | | const formatted = formatDateTime(this.taskDetail.plannedEndTime, 'YYYY-MM-DD HH:mm') |
| | | // 如果年份是1900,表示无效日期,显示为未设置 |
| | | if (formatted && formatted.startsWith('1900')) { |
| | | return '未设置' |
| | | } |
| | | return formatted |
| | | }, |
| | | // 显示实际开始时间 |
| | | displayActualStartTime() { |
| | | if (!this.taskDetail || !this.taskDetail.actualStartTime) { |
| | | return '未设置' |
| | | } |
| | | return formatDateTime(this.taskDetail.actualStartTime, 'YYYY-MM-DD HH:mm') |
| | | const formatted = formatDateTime(this.taskDetail.actualStartTime, 'YYYY-MM-DD HH:mm') |
| | | // 如果年份是1900,表示无效日期,显示为未设置 |
| | | if (formatted && formatted.startsWith('1900')) { |
| | | return '未设置' |
| | | } |
| | | return formatted |
| | | }, |
| | | // 显示实际结束时间 |
| | | displayActualEndTime() { |
| | | if (!this.taskDetail || !this.taskDetail.actualEndTime) { |
| | | return '未设置' |
| | | } |
| | | return formatDateTime(this.taskDetail.actualEndTime, 'YYYY-MM-DD HH:mm') |
| | | const formatted = formatDateTime(this.taskDetail.actualEndTime, 'YYYY-MM-DD HH:mm') |
| | | // 如果年份是1900,表示无效日期,显示为未设置 |
| | | if (formatted && formatted.startsWith('1900')) { |
| | | return '未设置' |
| | | } |
| | | return formatted |
| | | } |
| | | }, |
| | | onLoad(options) { |