[], 'actual' => [], 'skipped' => []]; foreach ((array)($nodes ?? []) as $n) { $sg = (string)($n['stage'] ?? (($n['category'] ?? 'plan') === 'reality' ? 'actual' : 'plan')); if (!isset($bysStage[$sg])) { $sg = 'plan'; } $bysStage[$sg][] = $n; } // 每条行程带上它的修正历史(模板里画"原计划 → 实际"的对比) foreach ($bysStage as $sg => &$lst) { foreach ($lst as &$nd) { $nd['revisions'] = \App\Trip::revisions((int)$nd['id']); } unset($nd); } unset($lst); $memberIds = array_map('intval', array_column((array)($t['attendees'] ?? []), 'id')); ?>
📍 = e((string)$t['location']) ?>
= nl2br(e((string)$t['summary'])) ?>
= nl2br(e((string)$t['note'])) ?>
= e($stageMeta[$sg][1]) ?>
= $sg === 'plan' ? '还没有排计划。' : ($sg === 'actual' ? '还没有走过的行程。' : '没有未成行的计划。') ?>
= nl2br(e((string)$n['detail'])) ?>
| # | 时间 | 地点 | 说明 |
|---|---|---|---|
| = (int)$rv['seq'] === 1 ? '原计划' : '第 ' . ((int)$rv['seq'] - 1) . ' 次修正' ?> | = e(\App\Trip::formatSpan($rv['starts_at'] ?? null, $rv['ends_at'] ?? null)) ?> | = e((string)($rv['place'] ?? '')) ?> | = e((string)($rv['detail'] ?? '')) ?> |
记录**实际**执行情况。这仍与上面那条计划是同一条记录, 原来的计划数据会保留在「修正记录」里,方便日后对比。 点完这里行程仍是计划;确认无误后再点「标记为实际」。