|
@@ -53,24 +53,24 @@
|
|
|
:data-wo-step="step.index"
|
|
:data-wo-step="step.index"
|
|
|
:data-wo-step-action="step.action"
|
|
:data-wo-step-action="step.action"
|
|
|
:data-wo-step-state="step.stateCode === null ? '' : step.stateCode"
|
|
:data-wo-step-state="step.stateCode === null ? '' : step.stateCode"
|
|
|
|
|
+ :data-wo-step-tone="stepTone(step)"
|
|
|
>
|
|
>
|
|
|
- <span class="wo-timeline__step-head">
|
|
|
|
|
- <span class="wo-timeline__time">{{ step.operatedAt || placeholder }}</span>
|
|
|
|
|
- <span class="wo-timeline__state">{{ step.stateName || placeholder }}</span>
|
|
|
|
|
- <!-- 回退的可见标记:颜色之外的第二种提示(灰度下也读得出) -->
|
|
|
|
|
|
|
+ <div class="wo-timeline__step-head">
|
|
|
|
|
+ <span class="wo-timeline__op">{{ step.operationName || step.stateName || placeholder }}</span>
|
|
|
|
|
+ <time class="wo-timeline__time">{{ step.operatedAt || placeholder }}</time>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="wo-timeline__step-meta">
|
|
|
|
|
+ <span v-if="step.stateName && step.stateName !== step.operationName" class="wo-timeline__state">{{ step.stateName }}</span>
|
|
|
<em v-if="step.isRollback" class="wo-timeline__rollback" data-wo-rollback>
|
|
<em v-if="step.isRollback" class="wo-timeline__rollback" data-wo-rollback>
|
|
|
{{ step.actionLabel }} · 自{{ step.fromStateName }}
|
|
{{ step.actionLabel }} · 自{{ step.fromStateName }}
|
|
|
</em>
|
|
</em>
|
|
|
- </span>
|
|
|
|
|
- <!-- 流水正文用 div:里面要放图片网格(block 内容),span 装不下。 -->
|
|
|
|
|
- <div class="wo-timeline__step-body">
|
|
|
|
|
- <span class="wo-timeline__op">{{ step.operationName || placeholder }}</span>
|
|
|
|
|
- <span v-if="step.operationDesc" class="wo-timeline__desc">{{ step.operationDesc }}</span>
|
|
|
|
|
|
|
+ <span v-else-if="step.actionLabel" class="wo-timeline__action">{{ step.actionLabel }}</span>
|
|
|
<span v-if="step.operatorName" class="wo-timeline__who">{{ step.operatorName }}</span>
|
|
<span v-if="step.operatorName" class="wo-timeline__who">{{ step.operatorName }}</span>
|
|
|
- <!-- 维修过程上传的图片(维护者 2026-11-23):缩略图,点开看大图(交共享图片组件)。 -->
|
|
|
|
|
- <div v-if="step.attachImages && step.attachImages.length" class="wo-timeline__shots" data-wo-step-images>
|
|
|
|
|
- <ImageGallery :items="shotItems(step)" />
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <p v-if="step.operationDesc" class="wo-timeline__desc">{{ step.operationDesc }}</p>
|
|
|
|
|
+ <!-- 维修过程上传的图片:缩略图,点开交共享图片组件看大图。 -->
|
|
|
|
|
+ <div v-if="step.attachImages && step.attachImages.length" class="wo-timeline__shots" data-wo-step-images>
|
|
|
|
|
+ <ImageGallery :items="shotItems(step)" />
|
|
|
</div>
|
|
</div>
|
|
|
</li>
|
|
</li>
|
|
|
</ol>
|
|
</ol>
|
|
@@ -86,7 +86,7 @@
|
|
|
<script setup>
|
|
<script setup>
|
|
|
import { computed } from 'vue'
|
|
import { computed } from 'vue'
|
|
|
import { DETAIL_PLACEHOLDER } from '../domain/detailFlow.js'
|
|
import { DETAIL_PLACEHOLDER } from '../domain/detailFlow.js'
|
|
|
-import { pathView } from '../domain/workOrderTimeline.js'
|
|
|
|
|
|
|
+import { pathView, TIMELINE_ACTION } from '../domain/workOrderTimeline.js'
|
|
|
import ImageGallery from './ImageGallery.vue'
|
|
import ImageGallery from './ImageGallery.vue'
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
const props = defineProps({
|
|
@@ -111,6 +111,19 @@ function shotItems(step) {
|
|
|
const placeholder = DETAIL_PLACEHOLDER
|
|
const placeholder = DETAIL_PLACEHOLDER
|
|
|
const nodes = computed(() => pathView(props.track))
|
|
const nodes = computed(() => pathView(props.track))
|
|
|
|
|
|
|
|
|
|
+/** 动作轨迹节点色:推进蓝、起点绿、回退/旁路黄、取消红;灰度下仍靠箭头/文字读方向。 */
|
|
|
|
|
+function stepTone(step) {
|
|
|
|
|
+ if (!step) return 'neutral'
|
|
|
|
|
+ switch (step.action) {
|
|
|
|
|
+ case TIMELINE_ACTION.START: return 'lv4'
|
|
|
|
|
+ case TIMELINE_ACTION.FORWARD: return 'lv3'
|
|
|
|
|
+ case TIMELINE_ACTION.ROLLBACK: return 'lv2'
|
|
|
|
|
+ case TIMELINE_ACTION.CANCEL: return 'lv1'
|
|
|
|
|
+ case TIMELINE_ACTION.BYPASS: return 'lv2'
|
|
|
|
|
+ default: return 'neutral'
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 进度节点语义色(维护者 2026-11-13:每一步用对应颜色语义)。
|
|
* 进度节点语义色(维护者 2026-11-13:每一步用对应颜色语义)。
|
|
|
* 已走过 reached → lv4 绿;当前 current → lv3 蓝;
|
|
* 已走过 reached → lv4 绿;当前 current → lv3 蓝;
|
|
@@ -205,48 +218,88 @@ function nodeTone(node) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.wo-timeline__steps {
|
|
.wo-timeline__steps {
|
|
|
|
|
+ position: relative;
|
|
|
display: grid;
|
|
display: grid;
|
|
|
- gap: calc(2 * var(--u, 1px));
|
|
|
|
|
|
|
+ gap: 0;
|
|
|
margin: 0;
|
|
margin: 0;
|
|
|
- padding: 0;
|
|
|
|
|
|
|
+ padding: calc(4 * var(--u, 1px)) 0 calc(2 * var(--u, 1px)) calc(2 * var(--u, 1px));
|
|
|
list-style: none;
|
|
list-style: none;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+/* 竖向时间轴:每个动作一颗语义色圆点,连线贯穿整条流;与预警处置记录同一视觉语言。 */
|
|
|
|
|
+.wo-timeline__steps::before {
|
|
|
|
|
+ content: '';
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: calc(4 * var(--u, 1px));
|
|
|
|
|
+ top: calc(8 * var(--u, 1px));
|
|
|
|
|
+ bottom: calc(8 * var(--u, 1px));
|
|
|
|
|
+ width: 1px;
|
|
|
|
|
+ background: linear-gradient(180deg, rgba(1, 171, 234, .55), rgba(1, 171, 234, .08));
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.wo-timeline__step {
|
|
.wo-timeline__step {
|
|
|
|
|
+ position: relative;
|
|
|
display: grid;
|
|
display: grid;
|
|
|
- gap: 1px;
|
|
|
|
|
- padding: 2px 0 2px calc(5 * var(--u, 1px));
|
|
|
|
|
- border-left: 2px solid rgba(1, 171, 234, 0.35);
|
|
|
|
|
|
|
+ gap: calc(2 * var(--u, 1px));
|
|
|
|
|
+ padding: calc(4 * var(--u, 1px)) 0 calc(7 * var(--u, 1px)) calc(15 * var(--u, 1px));
|
|
|
|
|
+ border-left: 0;
|
|
|
|
|
+ background: transparent;
|
|
|
|
|
+ color: var(--neutral, #5680b0);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/* 回退:左侧换成警示色 + 记录里带「回退」文字标记。 */
|
|
|
|
|
|
|
+.wo-timeline__step::before {
|
|
|
|
|
+ content: '';
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ left: 0;
|
|
|
|
|
+ top: calc(8 * var(--u, 1px));
|
|
|
|
|
+ width: calc(8 * var(--u, 1px));
|
|
|
|
|
+ height: calc(8 * var(--u, 1px));
|
|
|
|
|
+ border-radius: 50%;
|
|
|
|
|
+ background: currentcolor;
|
|
|
|
|
+ box-shadow: 0 0 0 calc(3 * var(--u, 1px)) color-mix(in srgb, currentcolor 18%, transparent);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.wo-timeline__step[data-wo-step-tone='lv1'] { color: var(--lv1, #ff3b52); }
|
|
|
|
|
+.wo-timeline__step[data-wo-step-tone='lv2'] { color: var(--lv2, #ffb020); }
|
|
|
|
|
+.wo-timeline__step[data-wo-step-tone='lv3'] { color: var(--lv3, #01abea); }
|
|
|
|
|
+.wo-timeline__step[data-wo-step-tone='lv4'] { color: var(--lv4, #27d17a); }
|
|
|
|
|
+.wo-timeline__step[data-wo-step-tone='neutral'] { color: var(--neutral, #5680b0); }
|
|
|
|
|
+
|
|
|
|
|
+/* 回退:底色与圆点同时变警示色,时刻能看出“往回走”。 */
|
|
|
.wo-timeline__step.is-rollback {
|
|
.wo-timeline__step.is-rollback {
|
|
|
- border-left-color: var(--lv2, #ffb020);
|
|
|
|
|
- background: linear-gradient(90deg, rgba(255, 176, 32, 0.12), transparent 70%);
|
|
|
|
|
|
|
+ background: linear-gradient(90deg, rgba(255, 176, 32, 0.13), transparent 72%);
|
|
|
|
|
+ border-radius: 0 6px 6px 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-.wo-timeline__step-head,
|
|
|
|
|
-.wo-timeline__step-body {
|
|
|
|
|
|
|
+.wo-timeline__step-head {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- flex-wrap: wrap;
|
|
|
|
|
|
|
+ align-items: baseline;
|
|
|
|
|
+ justify-content: space-between;
|
|
|
gap: var(--space-2, 8px);
|
|
gap: var(--space-2, 8px);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.wo-timeline__step-meta {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-wrap: wrap;
|
|
|
align-items: baseline;
|
|
align-items: baseline;
|
|
|
|
|
+ gap: calc(6 * var(--u, 1px));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-/* 维修过程图片(维护者 2026-11-23):独占一行;换行与间距由共享图片组件自己管。 */
|
|
|
|
|
|
|
+/* 维修过程图片:独占一行;换行与间距由共享图片组件自己管。 */
|
|
|
.wo-timeline__shots {
|
|
.wo-timeline__shots {
|
|
|
- flex-basis: 100%;
|
|
|
|
|
margin-top: calc(2 * var(--u, 1px));
|
|
margin-top: calc(2 * var(--u, 1px));
|
|
|
}
|
|
}
|
|
|
.wo-timeline__time,
|
|
.wo-timeline__time,
|
|
|
.wo-timeline__who,
|
|
.wo-timeline__who,
|
|
|
-.wo-timeline__desc {
|
|
|
|
|
|
|
+.wo-timeline__action {
|
|
|
color: var(--muted, #5680b0);
|
|
color: var(--muted, #5680b0);
|
|
|
font-size: var(--fs-caption, 10.5px);
|
|
font-size: var(--fs-caption, 10.5px);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.wo-timeline__time {
|
|
.wo-timeline__time {
|
|
|
|
|
+ flex: none;
|
|
|
font-family: var(--num, monospace);
|
|
font-family: var(--num, monospace);
|
|
|
|
|
+ white-space: nowrap;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.wo-timeline__state {
|
|
.wo-timeline__state {
|
|
@@ -255,6 +308,13 @@ function nodeTone(node) {
|
|
|
font-weight: 700;
|
|
font-weight: 700;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.wo-timeline__action {
|
|
|
|
|
+ padding: 0 calc(4 * var(--u, 1px));
|
|
|
|
|
+ border: 1px solid color-mix(in srgb, currentcolor 38%, transparent);
|
|
|
|
|
+ border-radius: 3px;
|
|
|
|
|
+ line-height: 1.5;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.wo-timeline__rollback {
|
|
.wo-timeline__rollback {
|
|
|
color: var(--lv2, #ffb020);
|
|
color: var(--lv2, #ffb020);
|
|
|
font-size: var(--fs-caption, 10.5px);
|
|
font-size: var(--fs-caption, 10.5px);
|
|
@@ -263,8 +323,20 @@ function nodeTone(node) {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.wo-timeline__op {
|
|
.wo-timeline__op {
|
|
|
|
|
+ min-width: 0;
|
|
|
|
|
+ color: var(--text-strong, #eaf6ff);
|
|
|
|
|
+ font-size: calc(11 * var(--u, 1px));
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ overflow-wrap: anywhere;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+.wo-timeline__desc {
|
|
|
|
|
+ display: block;
|
|
|
|
|
+ margin: 0;
|
|
|
color: var(--text-2, #88b7e8);
|
|
color: var(--text-2, #88b7e8);
|
|
|
font-size: var(--fs-caption, 10.5px);
|
|
font-size: var(--fs-caption, 10.5px);
|
|
|
|
|
+ line-height: 1.55;
|
|
|
|
|
+ overflow-wrap: anywhere;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.wo-timeline__empty {
|
|
.wo-timeline__empty {
|