防呆重构: 废除swiper→任务列表+锁定工作区 + remark醒目显示 + 树视图减少缩进+分支闭环标记
This commit is contained in:
@ -22,8 +22,12 @@
|
||||
<text class="remark-text">{{ task.remark || task.description }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 状态标签 -->
|
||||
<text :class="['badge', statusColor(task.status)]">{{ statusLabel(task.status) }}</text>
|
||||
<!-- 状态标签 + 分支闭环标记 -->
|
||||
<view style="display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex-shrink:0;margin-left:8px;">
|
||||
<text :class="['badge', statusColor(task.status)]">{{ statusLabel(task.status) }}</text>
|
||||
<text v-if="task.status === 'COMPLETED' && (!task.child_tasks || !task.child_tasks.length)" class="end-marker">🏁 已终止</text>
|
||||
<text v-if="task.status === 'ARCHIVED'" class="end-marker end-warehouse">📦 已入库</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- 第二层:递归子任务树 -->
|
||||
@ -154,7 +158,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.tnode { position: relative; padding-left: 24px; margin-bottom: 4px; }
|
||||
.tnode { position: relative; padding-left: 12px; margin-bottom: 6px; }
|
||||
.tree-line-vertical { position: absolute; left: 8px; top: 28px; bottom: 0; width: 2px; background: #e5e7eb; }
|
||||
|
||||
.tnode-card {
|
||||
@ -211,9 +215,11 @@ export default {
|
||||
|
||||
.badge {
|
||||
font-size: 10px; padding: 2px 8px; border-radius: 20px; font-weight: 600;
|
||||
white-space: nowrap; flex-shrink: 0; margin-left: 8px;
|
||||
white-space: nowrap; flex-shrink: 0;
|
||||
background: #f3f4f6; color: #6b7280;
|
||||
}
|
||||
.end-marker { font-size: 9px; padding: 1px 6px; border-radius: 8px; font-weight: 600; white-space: nowrap; background: #dcfce7; color: #16a34a; }
|
||||
.end-warehouse { background: #ede9fe; color: #7c3aed; }
|
||||
.s-yellow .badge { background: #fef3c7; color: #b45309; }
|
||||
.s-blue .badge { background: #dbeafe; color: #1d4ed8; }
|
||||
.s-green .badge { background: #dcfce7; color: #15803d; }
|
||||
|
||||
Reference in New Issue
Block a user