chore: 泳道→分支 统一命名
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
<text class="ss-title">{{ lanes[currentLane].label }}</text>
|
||||
<text class="ss-step-hint">
|
||||
步骤 {{ lanes[currentLane]._cardIdx + 1 }}/{{ lanes[currentLane].cards.length }}
|
||||
<text v-if="lanes.length > 1"> · ← 左右滑切换泳道 →</text>
|
||||
<text v-if="lanes.length > 1"> · ← 左右滑切换分支 →</text>
|
||||
</text>
|
||||
</view>
|
||||
<view class="ss-topbar-right">
|
||||
@ -15,11 +15,11 @@
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 🚀 水平滑动:切换泳道(主分支 / 分支1 / 分支2 ...) -->
|
||||
<!-- 🚀 水平滑动:切换分支(主分支 / 分支1 / 分支2 ...) -->
|
||||
<swiper class="ss-swiper-h" :current="currentLane" @change="onLaneSwipe"
|
||||
:style="{ height: swiperHeight + 'px' }" duration="250">
|
||||
<swiper-item v-for="(lane, li) in lanes" :key="lane._key">
|
||||
<!-- 🚀 垂直滑动:当前泳道的时间线 -->
|
||||
<!-- 🚀 垂直滑动:当前分支的时间线 -->
|
||||
<swiper class="ss-swiper-v" :current="lane._cardIdx" @change="onCardSwipe($event, li)"
|
||||
duration="200" vertical :style="{ height: swiperHeight + 'px' }">
|
||||
<swiper-item v-for="(card, ci) in lane.cards" :key="card._key">
|
||||
@ -73,7 +73,7 @@
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
|
||||
<!-- 底部:泳道标签条 + 步骤进度 -->
|
||||
<!-- 底部:分支标签条 + 步骤进度 -->
|
||||
<view class="ss-footer">
|
||||
<view class="ss-lane-tabs">
|
||||
<view v-for="(lane, i) in lanes" :key="'lt'+i"
|
||||
@ -134,7 +134,7 @@ export default {
|
||||
const result = [];
|
||||
if (!this.product || !this.product.task_tree) return result;
|
||||
|
||||
// 泳道0:主分支
|
||||
// 分支0:主分支
|
||||
const mainLane = { _key: 'main', label: '主分支', cards: [], _cardIdx: 0 };
|
||||
|
||||
const sortTasks = (tasks) => {
|
||||
@ -157,12 +157,12 @@ export default {
|
||||
|
||||
if (isMain) {
|
||||
lane.cards.push({ ...t, _key: t.id + '_' + lane._key, _isMain: lane._key === 'main' });
|
||||
// 递归:本泳道下一步 = TRANSFER 子节点
|
||||
// 递归:本分支下一步 = TRANSFER 子节点
|
||||
if (t.child_tasks && t.child_tasks.length) {
|
||||
const nextMain = t.child_tasks.filter(c =>
|
||||
c.task_type === 'TRANSFER' || c.task_type === 'RECOVERY' || !c.task_type);
|
||||
followMain(nextMain, lane);
|
||||
// SPAWN 子节点 → 新泳道
|
||||
// SPAWN 子节点 → 新分支
|
||||
const spawns = t.child_tasks.filter(c => c.task_type === 'SPAWN');
|
||||
for (const sc of spawns) {
|
||||
const blabel = this.branchLabelMap[sc.id] || '分支';
|
||||
|
||||
Reference in New Issue
Block a user