- App/ChatView 接入 ElConfigProvider 多语言(zh-CN/zh-TW/en),AdminLayout 间距壳层统一持有 - OrderProfile 全家 22 文件迁移:页头/按钮/徽标/自绘弹窗/表单控件统一 element-trial 范式 - schema/审计中心/字段资产/身份规则/库存源/连接器/调拨类型页面同步迁移,新增 __tests__ 回归 - 迁移遵循「业务脚本零改动」:事件内联适配保持原 handler 契约,焦点陷阱与关闭语义不变 - i18n admin/common 四语言补充组件文案,架构文档记录迁移范式
1344 lines
39 KiB
Vue
1344 lines
39 KiB
Vue
<!--
|
||
features/admin/modules/shipping-process-gates/ShippingProcessGateDiagnosticsPage.vue
|
||
用途:管理员 Process Gate Execution 诊断——列表、Gate 轨道与 Attempt 明细。
|
||
依赖:element-plus(筛选/表格/标签/折叠/空态/骨架屏,沿用管理端 element-trial 主题)、
|
||
@element-plus/icons-vue、process-gates.api、Vue Router、Vue I18n
|
||
(admin + workspace.processGate 动作文案)。
|
||
逻辑:只读诊断;多维度筛选(status/gate/reason/party/q/时间);小屏卡片列表 + 详情下置;
|
||
lg+ 主从布局(左侧 ~38% Execution 紧凑列表 + 分页,右侧 sticky 详情:Gate/findings/attempts);
|
||
状态/动作展示业务标签并附技术码;Gate 诊断结构化卡片(findings/blocking/effective_result),
|
||
severity 徽标与 effective_result 摘要迁移 el-tag,Gate 轨道迁移 el-table,
|
||
原生 details 迁移 el-collapse;Attempt 展示 snapshot_diff 摘要并可跳转 AdminShippingAudit;
|
||
业务脚本(筛选/详情/Attempts 加载)零改动。
|
||
-->
|
||
<script setup lang="ts">
|
||
import { computed, onMounted, ref } from 'vue';
|
||
import { useRouter } from 'vue-router';
|
||
import { useI18n } from 'vue-i18n';
|
||
import {
|
||
ElAlert,
|
||
ElButton,
|
||
ElCollapse,
|
||
ElCollapseItem,
|
||
ElDatePicker,
|
||
ElDescriptions,
|
||
ElDescriptionsItem,
|
||
ElEmpty,
|
||
ElInput,
|
||
ElOption,
|
||
ElSelect,
|
||
ElSkeleton,
|
||
ElTable,
|
||
ElTableColumn,
|
||
ElTag,
|
||
} from 'element-plus';
|
||
import { Refresh, Search } from '@element-plus/icons-vue';
|
||
import 'element-plus/dist/index.css';
|
||
import 'element-plus/theme-chalk/dark/css-vars.css';
|
||
import '@/features/admin/styles/element-trial.css';
|
||
import {
|
||
getAdminProcessExecution,
|
||
listAdminProcessExecutions,
|
||
listAdminProcessGateAttempts,
|
||
type AdminProcessExecutionDetail,
|
||
type AdminProcessExecutionListFilters,
|
||
type AdminProcessExecutionSummary,
|
||
type AdminProcessGateAttemptsPayload,
|
||
} from '@/features/shipping-process-gates/api/process-gates.api';
|
||
|
||
const { t, te } = useI18n();
|
||
const router = useRouter();
|
||
const loading = ref(false);
|
||
const detailLoading = ref(false);
|
||
const attemptsLoading = ref(false);
|
||
const error = ref('');
|
||
const page = ref(1);
|
||
const pageSize = 25;
|
||
const total = ref(0);
|
||
const filters = ref<AdminProcessExecutionListFilters>({
|
||
status: '',
|
||
gate_code: '',
|
||
blocking_reason_code: '',
|
||
responsible_party: '',
|
||
q: '',
|
||
updated_from: '',
|
||
updated_to: '',
|
||
});
|
||
const rows = ref<AdminProcessExecutionSummary[]>([]);
|
||
const detail = ref<AdminProcessExecutionDetail | null>(null);
|
||
const selectedGateCode = ref('');
|
||
const attemptsPayload = ref<AdminProcessGateAttemptsPayload | null>(null);
|
||
|
||
const EXECUTION_STATUS_OPTIONS = [
|
||
'active',
|
||
'blocked',
|
||
'waiting_external',
|
||
'completed',
|
||
'failed',
|
||
'cancelled',
|
||
] as const;
|
||
|
||
type GateFinding = {
|
||
severity?: string;
|
||
field_code?: string;
|
||
field?: string;
|
||
responsible_party?: string;
|
||
party?: string;
|
||
reason_code?: string;
|
||
reason?: string;
|
||
code?: string;
|
||
finding_code?: string;
|
||
message?: string;
|
||
details?: Record<string, unknown>;
|
||
};
|
||
|
||
type SnapshotKeyDiff = {
|
||
added?: string[];
|
||
removed?: string[];
|
||
changed?: string[];
|
||
};
|
||
|
||
type SnapshotDiffPayload = {
|
||
previous_attempt_no?: number;
|
||
input?: SnapshotKeyDiff;
|
||
output?: SnapshotKeyDiff;
|
||
input_hash_changed?: boolean;
|
||
output_hash_changed?: boolean;
|
||
};
|
||
|
||
const EMPTY_FILTERS: AdminProcessExecutionListFilters = {
|
||
status: '',
|
||
gate_code: '',
|
||
blocking_reason_code: '',
|
||
responsible_party: '',
|
||
q: '',
|
||
updated_from: '',
|
||
updated_to: '',
|
||
};
|
||
|
||
const formatTime = (value?: string | null) => (value ? new Date(value).toLocaleString() : '—');
|
||
|
||
/**
|
||
* 将 datetime-local 值规范为 ISO 字符串供 API 查询。
|
||
*/
|
||
function normalizeDateTimeFilter(value?: string): string {
|
||
const raw = String(value || '').trim();
|
||
if (!raw) return '';
|
||
const date = new Date(raw);
|
||
if (Number.isNaN(date.getTime())) return raw;
|
||
return date.toISOString();
|
||
}
|
||
|
||
/**
|
||
* Execution / Gate 状态业务标签;无翻译时回落原始码。
|
||
*/
|
||
function statusLabel(code?: string | null): string {
|
||
const key = String(code || '').trim();
|
||
if (!key) return '—';
|
||
const i18nKey = `admin.shippingProcessGates.statusLabels.${key}`;
|
||
return te(i18nKey) ? t(i18nKey) : key;
|
||
}
|
||
|
||
/**
|
||
* 主动作业务标签(复用 workspace 动作文案)+ 技术码,便于运维对照。
|
||
*/
|
||
function actionLabel(code?: string | null): string {
|
||
const key = String(code || '').trim();
|
||
if (!key) return '—';
|
||
const i18nKey = `workspace.shippingNotice.processGate.actionCodes.${key}`;
|
||
const label = te(i18nKey) ? t(i18nKey) : key;
|
||
return label === key ? key : `${label} (${key})`;
|
||
}
|
||
|
||
/**
|
||
* 组装当前列表筛选 payload,剔除空值并规范化时间。
|
||
*/
|
||
function buildListFilters(): AdminProcessExecutionListFilters {
|
||
const payload: AdminProcessExecutionListFilters = {};
|
||
(Object.entries(filters.value) as Array<[keyof AdminProcessExecutionListFilters, string | undefined]>).forEach(
|
||
([key, value]) => {
|
||
const text = String(value || '').trim();
|
||
if (!text) return;
|
||
if (key === 'updated_from' || key === 'updated_to') {
|
||
payload[key] = normalizeDateTimeFilter(text);
|
||
return;
|
||
}
|
||
payload[key] = text;
|
||
},
|
||
);
|
||
return payload;
|
||
}
|
||
|
||
/** 兼容后端 items / attempts 双字段。 */
|
||
const attemptRows = computed(() => {
|
||
const payload = attemptsPayload.value;
|
||
if (!payload) return [];
|
||
const list = payload.items || payload.attempts || [];
|
||
return Array.isArray(list) ? list : [];
|
||
});
|
||
|
||
/** 详情中的完整 Gate 列表(含 findings)。 */
|
||
const diagnosticGates = computed(() => {
|
||
const gates = detail.value?.gates;
|
||
return Array.isArray(gates) ? gates : [];
|
||
});
|
||
|
||
const selectedGateDetail = computed(() => {
|
||
if (!selectedGateCode.value) return null;
|
||
return diagnosticGates.value.find((gate) => String(gate.gate_code) === selectedGateCode.value) || null;
|
||
});
|
||
|
||
const selectedGateFindings = computed(() => normalizeFindings(selectedGateDetail.value?.findings));
|
||
|
||
const selectedBlockingReasonRows = computed(() => blockingReasonRows(selectedGateDetail.value?.blocking_reason));
|
||
|
||
const selectedEffectiveResultSummary = computed(() => effectiveResultSummary(selectedGateDetail.value?.effective_result));
|
||
|
||
const selectedEffectiveResultRemainder = computed(() => (
|
||
effectiveResultRemainder(selectedGateDetail.value?.effective_result, selectedEffectiveResultSummary.value)
|
||
));
|
||
|
||
/**
|
||
* 将任意 JSON 安全格式化为可展示文本。
|
||
*/
|
||
function formatJson(value: unknown): string {
|
||
if (value == null) return '—';
|
||
try {
|
||
return JSON.stringify(value, null, 2);
|
||
} catch {
|
||
return String(value);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* 将单元格值转为短文本。
|
||
*/
|
||
function formatCellValue(value: unknown): string {
|
||
if (value == null) return '—';
|
||
if (typeof value === 'string') return value;
|
||
if (typeof value === 'number' || typeof value === 'boolean') return String(value);
|
||
try {
|
||
return JSON.stringify(value);
|
||
} catch {
|
||
return String(value);
|
||
}
|
||
}
|
||
|
||
/**
|
||
* 规范化 Gate findings 数组。
|
||
*/
|
||
function normalizeFindings(raw: unknown): GateFinding[] {
|
||
if (!Array.isArray(raw)) return [];
|
||
return raw.filter((item): item is GateFinding => Boolean(item) && typeof item === 'object');
|
||
}
|
||
|
||
/**
|
||
* 提取 Finding 展示字段。
|
||
*/
|
||
function findingField(finding: GateFinding): string {
|
||
return String(finding.field_code || finding.field || '').trim() || '—';
|
||
}
|
||
|
||
function findingParty(finding: GateFinding): string {
|
||
return String(finding.responsible_party || finding.party || '').trim() || '—';
|
||
}
|
||
|
||
function findingReason(finding: GateFinding): string {
|
||
return String(finding.reason_code || finding.reason || finding.code || finding.finding_code || '').trim() || '—';
|
||
}
|
||
|
||
function findingMessage(finding: GateFinding): string {
|
||
if (finding.message) return String(finding.message);
|
||
const details = finding.details;
|
||
if (details && typeof details === 'object' && details.message != null) {
|
||
return String(details.message);
|
||
}
|
||
return '—';
|
||
}
|
||
|
||
/**
|
||
* 将 blocking_reason 对象转为 key-value 行。
|
||
*/
|
||
function blockingReasonRows(raw: unknown): Array<{ key: string; value: string }> {
|
||
if (!raw || typeof raw !== 'object' || Array.isArray(raw)) return [];
|
||
return Object.entries(raw as Record<string, unknown>).map(([key, value]) => ({
|
||
key,
|
||
value: formatCellValue(value),
|
||
}));
|
||
}
|
||
|
||
/**
|
||
* 从 effective_result 提取摘要 chips(优先常见键 + findings 计数)。
|
||
*/
|
||
function effectiveResultSummary(raw: unknown): Array<{ key: string; value: string }> {
|
||
if (!raw || typeof raw !== 'object' || Array.isArray(raw)) return [];
|
||
const obj = raw as Record<string, unknown>;
|
||
const chips: Array<{ key: string; value: string }> = [];
|
||
const priorityKeys = ['passed', 'status', 'case', 'outcome', 'summary'];
|
||
for (const key of priorityKeys) {
|
||
if (Object.prototype.hasOwnProperty.call(obj, key) && obj[key] != null) {
|
||
chips.push({ key, value: formatCellValue(obj[key]) });
|
||
}
|
||
}
|
||
if (Array.isArray(obj.findings)) {
|
||
chips.push({ key: 'findings', value: String(obj.findings.length) });
|
||
}
|
||
return chips;
|
||
}
|
||
|
||
/**
|
||
* 返回 effective_result 中未出现在摘要 chips 内的剩余 JSON。
|
||
*/
|
||
function effectiveResultRemainder(
|
||
raw: unknown,
|
||
summary: Array<{ key: string; value: string }>,
|
||
): Record<string, unknown> | null {
|
||
if (!raw || typeof raw !== 'object' || Array.isArray(raw)) return null;
|
||
const obj = { ...(raw as Record<string, unknown>) };
|
||
const consumed = new Set(summary.map((item) => item.key));
|
||
for (const key of consumed) {
|
||
delete obj[key];
|
||
}
|
||
return Object.keys(obj).length ? obj : null;
|
||
}
|
||
|
||
/**
|
||
* 格式化 Attempt snapshot_diff 单段(input/output)摘要。
|
||
*/
|
||
function formatSnapshotDiffSection(scope: 'input' | 'output', diff: SnapshotDiffPayload | null | undefined): string | null {
|
||
const section = diff?.[scope];
|
||
if (!section) return null;
|
||
const added = section.added?.length ?? 0;
|
||
const removed = section.removed?.length ?? 0;
|
||
const changed = section.changed?.length ?? 0;
|
||
if (!added && !removed && !changed) return null;
|
||
const scopeLabel = scope === 'input' ? 'input' : 'output';
|
||
return t('admin.shippingProcessGates.attemptDiff', {
|
||
scope: scopeLabel,
|
||
added,
|
||
removed,
|
||
changed,
|
||
});
|
||
}
|
||
|
||
/**
|
||
* 合并 Attempt snapshot_diff 的 input/output 摘要行。
|
||
*/
|
||
function formatAttemptDiffSummary(raw: unknown): string[] {
|
||
if (!raw || typeof raw !== 'object') return [];
|
||
const diff = raw as SnapshotDiffPayload;
|
||
const lines: string[] = [];
|
||
const inputLine = formatSnapshotDiffSection('input', diff);
|
||
const outputLine = formatSnapshotDiffSection('output', diff);
|
||
if (inputLine) lines.push(inputLine);
|
||
if (outputLine) lines.push(outputLine);
|
||
return lines;
|
||
}
|
||
|
||
/**
|
||
* 跳转 Admin 审计中心,预填 Execution 与 process_gate_ 事件前缀。
|
||
*/
|
||
function openAuditForExecution(executionNo: string) {
|
||
void router.push({
|
||
name: 'AdminShippingAudit',
|
||
query: {
|
||
q: executionNo,
|
||
event_type: 'process_gate_',
|
||
},
|
||
});
|
||
}
|
||
|
||
/**
|
||
* 加载 Execution 列表。
|
||
*/
|
||
async function load() {
|
||
loading.value = true;
|
||
error.value = '';
|
||
try {
|
||
const response = await listAdminProcessExecutions(page.value, pageSize, buildListFilters());
|
||
rows.value = response.items;
|
||
total.value = response.total;
|
||
} catch {
|
||
error.value = t('admin.shippingProcessGates.loadFailed');
|
||
} finally {
|
||
loading.value = false;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* 应用筛选并重置到第一页。
|
||
*/
|
||
function applyFilters() {
|
||
page.value = 1;
|
||
void load();
|
||
}
|
||
|
||
/**
|
||
* 清空筛选并刷新列表。
|
||
*/
|
||
function resetFilters() {
|
||
filters.value = { ...EMPTY_FILTERS };
|
||
page.value = 1;
|
||
void load();
|
||
}
|
||
|
||
/**
|
||
* 打开 Execution 诊断详情。
|
||
*/
|
||
async function openDetail(executionNo: string) {
|
||
detailLoading.value = true;
|
||
selectedGateCode.value = '';
|
||
attemptsPayload.value = null;
|
||
try {
|
||
detail.value = await getAdminProcessExecution(executionNo);
|
||
const current = detail.value.current_gate?.gate_code
|
||
|| detail.value.current_blocking_gate?.gate_code;
|
||
if (current) await loadAttempts(String(current));
|
||
} catch {
|
||
error.value = t('admin.shippingProcessGates.detailFailed');
|
||
detail.value = null;
|
||
} finally {
|
||
detailLoading.value = false;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* 加载指定 Gate 的 Attempt 列表。
|
||
*/
|
||
async function loadAttempts(gateCode: string) {
|
||
if (!detail.value?.execution_no) return;
|
||
selectedGateCode.value = gateCode;
|
||
attemptsLoading.value = true;
|
||
try {
|
||
attemptsPayload.value = await listAdminProcessGateAttempts(detail.value.execution_no, gateCode);
|
||
} catch {
|
||
attemptsPayload.value = null;
|
||
error.value = t('admin.shippingProcessGates.attemptsFailed');
|
||
} finally {
|
||
attemptsLoading.value = false;
|
||
}
|
||
}
|
||
|
||
/**
|
||
* 判断 Execution 是否为当前详情选中项,供 lg+ 主从列表行高亮。
|
||
*/
|
||
function isExecutionSelected(executionNo: string): boolean {
|
||
return Boolean(detail.value?.execution_no && detail.value.execution_no === executionNo);
|
||
}
|
||
|
||
/**
|
||
* 关闭详情面板。
|
||
*/
|
||
function closeDetail() {
|
||
detail.value = null;
|
||
selectedGateCode.value = '';
|
||
attemptsPayload.value = null;
|
||
}
|
||
|
||
onMounted(() => {
|
||
void load();
|
||
});
|
||
</script>
|
||
|
||
<template>
|
||
<div class="process-gates-page">
|
||
<header>
|
||
<h1>{{ t('admin.shippingProcessGates.title') }}</h1>
|
||
<!-- 段落行宽限制(原 max-w-3xl)保留,页面根限宽/内边距由壳层持有 -->
|
||
<p class="page-desc">{{ t('admin.shippingProcessGates.subtitle') }}</p>
|
||
</header>
|
||
|
||
<section class="filters-panel">
|
||
<div class="filters-grid">
|
||
<label class="filter-field">
|
||
<span>{{ t('admin.shippingProcessGates.status') }}</span>
|
||
<el-select v-model="filters.status">
|
||
<el-option :label="t('admin.shippingProcessGates.allStatuses')" value="" />
|
||
<el-option
|
||
v-for="code in EXECUTION_STATUS_OPTIONS"
|
||
:key="code"
|
||
:value="code"
|
||
:label="statusLabel(code)"
|
||
/>
|
||
</el-select>
|
||
</label>
|
||
<label class="filter-field">
|
||
<span>{{ t('admin.shippingProcessGates.filterGate') }}</span>
|
||
<el-input
|
||
v-model="filters.gate_code"
|
||
class="mono-input"
|
||
:placeholder="t('admin.shippingProcessGates.gateCode')"
|
||
/>
|
||
</label>
|
||
<label class="filter-field">
|
||
<span>{{ t('admin.shippingProcessGates.filterReason') }}</span>
|
||
<el-input
|
||
v-model="filters.blocking_reason_code"
|
||
class="mono-input"
|
||
:placeholder="t('admin.shippingProcessGates.blockingReasonCode')"
|
||
/>
|
||
</label>
|
||
<label class="filter-field">
|
||
<span>{{ t('admin.shippingProcessGates.filterParty') }}</span>
|
||
<el-input
|
||
v-model="filters.responsible_party"
|
||
:placeholder="t('admin.shippingProcessGates.responsibleParty')"
|
||
/>
|
||
</label>
|
||
<label class="filter-field filter-field--wide">
|
||
<span>{{ t('admin.shippingProcessGates.filterSearch') }}</span>
|
||
<el-input
|
||
v-model="filters.q"
|
||
:prefix-icon="Search"
|
||
clearable
|
||
:placeholder="t('admin.shippingProcessGates.executionNo')"
|
||
@keyup.enter="applyFilters"
|
||
@clear="applyFilters"
|
||
/>
|
||
</label>
|
||
<label class="filter-field">
|
||
<span>{{ t('admin.shippingProcessGates.filterFrom') }}</span>
|
||
<!-- value-format 保持字符串契约,normalizeDateTimeFilter 逻辑不变 -->
|
||
<el-date-picker v-model="filters.updated_from" type="datetime" value-format="YYYY-MM-DDTHH:mm" />
|
||
</label>
|
||
<label class="filter-field">
|
||
<span>{{ t('admin.shippingProcessGates.filterTo') }}</span>
|
||
<el-date-picker v-model="filters.updated_to" type="datetime" value-format="YYYY-MM-DDTHH:mm" />
|
||
</label>
|
||
</div>
|
||
<div class="filters-actions">
|
||
<el-button @click="applyFilters">
|
||
{{ t('admin.shippingProcessGates.applyFilters') }}
|
||
</el-button>
|
||
<el-button @click="resetFilters">
|
||
{{ t('admin.shippingProcessGates.resetFilters') }}
|
||
</el-button>
|
||
<el-button :icon="Refresh" :loading="loading" @click="load">
|
||
{{ t('admin.shippingProcessGates.refresh') }}
|
||
</el-button>
|
||
<span class="filters-total">{{ t('admin.shippingProcessGates.total', { count: total }) }}</span>
|
||
</div>
|
||
</section>
|
||
|
||
<el-alert v-if="error" type="error" :closable="false" :title="error" />
|
||
|
||
<!-- 小屏:卡片列表,避免列标题逐字换行 -->
|
||
<div class="execution-cards" data-testid="shipping-process-gate-cards">
|
||
<el-skeleton v-if="loading" :rows="4" animated />
|
||
<el-empty
|
||
v-else-if="!rows.length"
|
||
:description="t('admin.shippingProcessGates.empty')"
|
||
:image-size="60"
|
||
/>
|
||
<template v-else>
|
||
<article
|
||
v-for="row in rows"
|
||
:key="row.execution_no"
|
||
class="execution-card"
|
||
>
|
||
<div class="mono-line">{{ row.execution_no }}</div>
|
||
<dl class="execution-card-meta">
|
||
<div>
|
||
<dt>{{ t('admin.shippingProcessGates.status') }}</dt>
|
||
<dd>
|
||
{{ statusLabel(row.status) }}
|
||
<span class="mono-code">{{ row.status }}</span>
|
||
</dd>
|
||
</div>
|
||
<div>
|
||
<dt>{{ t('admin.shippingProcessGates.currentGate') }}</dt>
|
||
<dd class="mono-line">{{ row.current_gate_code || '—' }}</dd>
|
||
</div>
|
||
<div class="span-2">
|
||
<dt>{{ t('admin.shippingProcessGates.nextAction') }}</dt>
|
||
<dd>{{ actionLabel(row.primary_next_action_code) }}</dd>
|
||
</div>
|
||
<div>
|
||
<dt>{{ t('admin.shippingProcessGates.updatedAt') }}</dt>
|
||
<dd>{{ formatTime(row.updated_at) }}</dd>
|
||
</div>
|
||
</dl>
|
||
<el-button link type="primary" size="small" @click="openDetail(row.execution_no)">
|
||
{{ t('admin.shippingProcessGates.viewDetail') }}
|
||
</el-button>
|
||
</article>
|
||
</template>
|
||
</div>
|
||
|
||
<!-- lg+ 主从:左列表+分页,右 sticky 详情;小屏在网格外卡片列表,网格内仅分页+详情 -->
|
||
<div class="master-detail">
|
||
<div class="master-column">
|
||
<!-- lg+:紧凑 Execution 行列表 -->
|
||
<div class="execution-list" data-testid="shipping-process-gate-list">
|
||
<el-skeleton v-if="loading" :rows="4" animated />
|
||
<el-empty
|
||
v-else-if="!rows.length"
|
||
:description="t('admin.shippingProcessGates.empty')"
|
||
:image-size="60"
|
||
/>
|
||
<template v-else>
|
||
<button
|
||
v-for="row in rows"
|
||
:key="row.execution_no"
|
||
type="button"
|
||
class="execution-item"
|
||
:class="{ 'execution-item--selected': isExecutionSelected(row.execution_no) }"
|
||
@click="openDetail(row.execution_no)"
|
||
>
|
||
<div class="mono-line">{{ row.execution_no }}</div>
|
||
<div class="execution-item-line">
|
||
<span>{{ statusLabel(row.status) }}</span>
|
||
<span class="mono-code">{{ row.status }}</span>
|
||
</div>
|
||
<div class="mono-code truncate-line">{{ row.current_gate_code || '—' }}</div>
|
||
<div class="muted-line truncate-line">{{ actionLabel(row.primary_next_action_code) }}</div>
|
||
<div class="muted-line">{{ formatTime(row.updated_at) }}</div>
|
||
</button>
|
||
</template>
|
||
</div>
|
||
|
||
<div class="pagination-row">
|
||
<el-button size="small" :disabled="page <= 1 || loading" @click="page -= 1; load()">
|
||
{{ t('admin.shippingProcessGates.previous') }}
|
||
</el-button>
|
||
<span class="pagination-page">{{ page }}</span>
|
||
<el-button size="small" :disabled="page * pageSize >= total || loading" @click="page += 1; load()">
|
||
{{ t('admin.shippingProcessGates.next') }}
|
||
</el-button>
|
||
</div>
|
||
</div>
|
||
|
||
<aside
|
||
v-if="detail"
|
||
class="detail-panel"
|
||
data-testid="shipping-process-gate-detail"
|
||
>
|
||
<div class="detail-header">
|
||
<h2>{{ t('admin.shippingProcessGates.detailTitle') }}</h2>
|
||
<el-button link size="small" @click="closeDetail">{{ t('admin.close') }}</el-button>
|
||
</div>
|
||
<el-skeleton v-if="detailLoading" :rows="6" animated />
|
||
<div v-else class="detail-content">
|
||
<el-descriptions :column="2" size="small">
|
||
<el-descriptions-item :label="t('admin.shippingProcessGates.executionNo')">
|
||
<span class="mono-line">{{ detail.execution_no }}</span>
|
||
</el-descriptions-item>
|
||
<el-descriptions-item :label="t('admin.shippingProcessGates.status')">
|
||
{{ statusLabel(detail.status) }}
|
||
<span class="mono-code">{{ detail.status }}</span>
|
||
</el-descriptions-item>
|
||
<el-descriptions-item :label="t('admin.shippingProcessGates.taskNo')">
|
||
<span class="mono-line">{{ detail.task_no || '—' }}</span>
|
||
</el-descriptions-item>
|
||
<el-descriptions-item :label="t('admin.shippingProcessGates.caseNo')">
|
||
<span class="mono-line">{{ detail.review_case_no || detail.case_no || '—' }}</span>
|
||
</el-descriptions-item>
|
||
</el-descriptions>
|
||
|
||
<h3 class="section-heading">{{ t('admin.shippingProcessGates.gates') }}</h3>
|
||
|
||
<!-- 小屏 Gate 卡片 -->
|
||
<div class="gate-cards">
|
||
<article
|
||
v-for="gate in diagnosticGates"
|
||
:key="String(gate.gate_code)"
|
||
class="gate-card"
|
||
:class="{ 'gate-card--selected': selectedGateCode === gate.gate_code }"
|
||
>
|
||
<div class="gate-card-title">#{{ gate.sequence_no }} · {{ gate.gate_code }}</div>
|
||
<div class="muted-line">
|
||
{{ statusLabel(String(gate.status)) }}
|
||
<span class="mono-code">{{ gate.status }}</span>
|
||
</div>
|
||
<div class="mono-code">{{ gate.blocking_reason_code || '—' }}</div>
|
||
<el-button link type="primary" size="small" @click="loadAttempts(String(gate.gate_code))">
|
||
{{ t('admin.shippingProcessGates.viewAttempts') }}
|
||
</el-button>
|
||
</article>
|
||
</div>
|
||
<!-- lg+ Gate 表格 -->
|
||
<div class="gate-table-wrap">
|
||
<el-table
|
||
:data="diagnosticGates as Array<{ gate_code: unknown }>"
|
||
row-key="gate_code"
|
||
size="small"
|
||
:row-class-name="(data: { row: { gate_code: unknown } }) => (selectedGateCode === String(data.row.gate_code) ? 'gate-selected' : '')"
|
||
>
|
||
<el-table-column label="#" prop="sequence_no" width="56" />
|
||
<el-table-column :label="t('admin.shippingProcessGates.gateCode')" min-width="160">
|
||
<template #default="{ row }">
|
||
<span class="mono-code">{{ row.gate_code }}</span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column :label="t('admin.shippingProcessGates.gateStatus')" min-width="140">
|
||
<template #default="{ row }">
|
||
<div>{{ statusLabel(String(row.status)) }}</div>
|
||
<div class="mono-code">{{ row.status }}</div>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column :label="t('admin.shippingProcessGates.blockingReason')" min-width="160">
|
||
<template #default="{ row }">
|
||
<span class="mono-code">{{ row.blocking_reason_code || '—' }}</span>
|
||
</template>
|
||
</el-table-column>
|
||
<el-table-column :label="t('admin.shippingProcessGates.actions')" width="110">
|
||
<template #default="{ row }">
|
||
<el-button link type="primary" size="small" @click="loadAttempts(String(row.gate_code))">
|
||
{{ t('admin.shippingProcessGates.viewAttempts') }}
|
||
</el-button>
|
||
</template>
|
||
</el-table-column>
|
||
</el-table>
|
||
</div>
|
||
|
||
<section v-if="selectedGateDetail" class="gate-diagnostics">
|
||
<h4>{{ t('admin.shippingProcessGates.gateDiagnostics') }}</h4>
|
||
<p class="muted-line">
|
||
{{ t('admin.shippingProcessGates.nextAction') }}:
|
||
<span>{{ actionLabel(String(selectedGateDetail.next_action_code || '')) }}</span>
|
||
</p>
|
||
|
||
<div class="diag-block">
|
||
<div class="diag-label">{{ t('admin.shippingProcessGates.findingsStructured') }}</div>
|
||
<p v-if="!selectedGateFindings.length" class="muted-line">
|
||
{{ t('admin.shippingProcessGates.noFindings') }}
|
||
</p>
|
||
<div v-else class="finding-list">
|
||
<article
|
||
v-for="(finding, index) in selectedGateFindings"
|
||
:key="`${finding.finding_code || finding.reason_code || index}`"
|
||
class="finding-card"
|
||
>
|
||
<el-tag
|
||
size="small"
|
||
:type="finding.severity === 'blocking' ? 'danger' : 'info'"
|
||
class="severity-tag"
|
||
>
|
||
{{ t('admin.shippingProcessGates.severity') }}: {{ finding.severity || '—' }}
|
||
</el-tag>
|
||
<el-descriptions :column="2" size="small">
|
||
<el-descriptions-item :label="t('admin.shippingProcessGates.field')">
|
||
<span class="mono-line">{{ findingField(finding) }}</span>
|
||
</el-descriptions-item>
|
||
<el-descriptions-item :label="t('admin.shippingProcessGates.party')">
|
||
{{ findingParty(finding) }}
|
||
</el-descriptions-item>
|
||
<el-descriptions-item :label="t('admin.shippingProcessGates.reason')">
|
||
<span class="mono-line">{{ findingReason(finding) }}</span>
|
||
</el-descriptions-item>
|
||
<el-descriptions-item :label="t('admin.shippingProcessGates.message')" :span="2">
|
||
{{ findingMessage(finding) }}
|
||
</el-descriptions-item>
|
||
</el-descriptions>
|
||
</article>
|
||
</div>
|
||
</div>
|
||
|
||
<div class="diag-block">
|
||
<div class="diag-label">{{ t('admin.shippingProcessGates.blockingReasonDetail') }}</div>
|
||
<p v-if="!selectedBlockingReasonRows.length" class="muted-line">—</p>
|
||
<el-descriptions v-else :column="2" size="small" class="blocking-desc">
|
||
<el-descriptions-item
|
||
v-for="row in selectedBlockingReasonRows"
|
||
:key="row.key"
|
||
:label="row.key"
|
||
>
|
||
{{ row.value }}
|
||
</el-descriptions-item>
|
||
</el-descriptions>
|
||
</div>
|
||
|
||
<div class="diag-block">
|
||
<div class="diag-label">{{ t('admin.shippingProcessGates.effectiveResult') }}</div>
|
||
<p
|
||
v-if="!selectedEffectiveResultSummary.length && !selectedEffectiveResultRemainder"
|
||
class="muted-line"
|
||
>—</p>
|
||
<div v-else class="diag-stack">
|
||
<div v-if="selectedEffectiveResultSummary.length" class="chip-row">
|
||
<el-tag
|
||
v-for="chip in selectedEffectiveResultSummary"
|
||
:key="chip.key"
|
||
size="small"
|
||
class="chip-mono"
|
||
>
|
||
{{ chip.key }}: {{ chip.value }}
|
||
</el-tag>
|
||
</div>
|
||
<el-collapse v-if="selectedEffectiveResultRemainder" class="snap-collapse">
|
||
<el-collapse-item
|
||
:title="Object.keys(selectedEffectiveResultRemainder).join(', ')"
|
||
name="remainder"
|
||
>
|
||
<pre class="code-block">{{ formatJson(selectedEffectiveResultRemainder) }}</pre>
|
||
</el-collapse-item>
|
||
</el-collapse>
|
||
</div>
|
||
</div>
|
||
</section>
|
||
|
||
<div class="attempts-head">
|
||
<h3 class="section-heading">
|
||
{{ t('admin.shippingProcessGates.attempts') }}
|
||
<span v-if="selectedGateCode" class="mono-code">({{ selectedGateCode }})</span>
|
||
</h3>
|
||
<el-button
|
||
link
|
||
type="primary"
|
||
size="small"
|
||
@click="openAuditForExecution(detail.execution_no)"
|
||
>
|
||
{{ t('admin.shippingProcessGates.openAudit') }}
|
||
</el-button>
|
||
</div>
|
||
<p class="muted-line">{{ t('admin.shippingProcessGates.auditLink') }}</p>
|
||
<el-skeleton v-if="attemptsLoading" :rows="3" animated />
|
||
<div v-else-if="attemptRows.length" class="attempt-list">
|
||
<article
|
||
v-for="attempt in attemptRows"
|
||
:key="String(attempt.id || attempt.attempt_no)"
|
||
class="attempt-card"
|
||
>
|
||
<div class="attempt-title">
|
||
#{{ attempt.attempt_no }} · {{ statusLabel(String(attempt.status)) }}
|
||
<span class="mono-code">({{ attempt.status }})</span>
|
||
</div>
|
||
<div v-if="attempt.error_code" class="attempt-error">
|
||
{{ attempt.error_code }}: {{ attempt.error_summary }}
|
||
</div>
|
||
<div class="muted-line">
|
||
{{ formatTime(attempt.started_at as string) }} → {{ formatTime(attempt.finished_at as string) }}
|
||
</div>
|
||
<div class="muted-line">
|
||
hash:
|
||
in={{ attempt.input_snapshot_hash || '—' }}
|
||
/ out={{ attempt.output_snapshot_hash || '—' }}
|
||
</div>
|
||
<ul
|
||
v-if="formatAttemptDiffSummary(attempt.snapshot_diff).length"
|
||
class="diff-lines"
|
||
>
|
||
<li
|
||
v-for="(line, lineIndex) in formatAttemptDiffSummary(attempt.snapshot_diff)"
|
||
:key="lineIndex"
|
||
>
|
||
{{ line }}
|
||
</li>
|
||
</ul>
|
||
<el-collapse v-if="attempt.input_snapshot || attempt.output_snapshot" class="snap-collapse">
|
||
<el-collapse-item :title="t('admin.shippingProcessGates.viewSnapshots')" name="snapshots">
|
||
<div class="snapshot-grid">
|
||
<pre class="code-block">{{ formatJson(attempt.input_snapshot) }}</pre>
|
||
<pre class="code-block">{{ formatJson(attempt.output_snapshot) }}</pre>
|
||
</div>
|
||
</el-collapse-item>
|
||
</el-collapse>
|
||
</article>
|
||
</div>
|
||
<p v-else class="muted-line">{{ t('admin.shippingProcessGates.noAttempts') }}</p>
|
||
</div>
|
||
</aside>
|
||
</div>
|
||
</div>
|
||
</template>
|
||
|
||
<style scoped>
|
||
/* 全宽布局:水平内边距由 AdminLayout 壳层统一持有,页面只保留内部块间距 */
|
||
.process-gates-page {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 24px;
|
||
}
|
||
|
||
header h1 {
|
||
margin: 0;
|
||
color: var(--el-text-color-primary);
|
||
font-size: 20px;
|
||
}
|
||
|
||
.page-desc {
|
||
margin: 4px 0 0;
|
||
max-width: 48rem;
|
||
color: var(--el-text-color-secondary);
|
||
font-size: 13px;
|
||
}
|
||
|
||
/* 筛选面板:sm 2 列 / lg 3 列 / xl 4 列(原 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4) */
|
||
.filters-panel {
|
||
display: grid;
|
||
gap: 12px;
|
||
border: 1px solid var(--el-border-color-light);
|
||
border-radius: 12px;
|
||
background: var(--el-bg-color);
|
||
padding: 16px;
|
||
}
|
||
|
||
.filters-grid {
|
||
display: grid;
|
||
gap: 12px;
|
||
}
|
||
|
||
.filter-field {
|
||
display: flex;
|
||
min-width: 0;
|
||
flex-direction: column;
|
||
gap: 4px;
|
||
color: var(--el-text-color-secondary);
|
||
font-size: 12px;
|
||
}
|
||
|
||
.filter-field :deep(.el-select),
|
||
.filter-field :deep(.el-date-editor.el-input) {
|
||
width: 100%;
|
||
}
|
||
|
||
/* 技术码输入保持等宽字体(原 font-mono) */
|
||
.mono-input :deep(.el-input__inner) {
|
||
font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
|
||
}
|
||
|
||
.filters-actions {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
align-items: center;
|
||
gap: 8px;
|
||
}
|
||
|
||
.filters-actions .el-button + .el-button {
|
||
margin-left: 0;
|
||
}
|
||
|
||
.filters-total {
|
||
color: var(--el-text-color-secondary);
|
||
font-size: 12px;
|
||
}
|
||
|
||
@media (min-width: 640px) {
|
||
.filters-grid {
|
||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||
}
|
||
|
||
.filter-field--wide {
|
||
grid-column: span 2;
|
||
}
|
||
}
|
||
|
||
@media (min-width: 1024px) {
|
||
.filters-grid {
|
||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||
}
|
||
|
||
.filter-field--wide {
|
||
grid-column: auto;
|
||
}
|
||
}
|
||
|
||
@media (min-width: 1280px) {
|
||
.filters-grid {
|
||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||
}
|
||
}
|
||
|
||
/* 小屏 Execution 卡片(lg 隐藏) */
|
||
.execution-cards {
|
||
display: grid;
|
||
gap: 12px;
|
||
}
|
||
|
||
@media (min-width: 1024px) {
|
||
.execution-cards {
|
||
display: none;
|
||
}
|
||
}
|
||
|
||
.execution-card {
|
||
display: grid;
|
||
gap: 8px;
|
||
border: 1px solid var(--el-border-color-light);
|
||
border-radius: 12px;
|
||
background: var(--el-bg-color);
|
||
padding: 12px 16px;
|
||
color: var(--el-text-color-regular);
|
||
font-size: 13px;
|
||
}
|
||
|
||
.execution-card-meta {
|
||
display: grid;
|
||
gap: 6px;
|
||
margin: 0;
|
||
font-size: 12px;
|
||
}
|
||
|
||
.execution-card-meta dt {
|
||
color: var(--el-text-color-secondary);
|
||
}
|
||
|
||
.execution-card-meta dd {
|
||
margin: 0;
|
||
}
|
||
|
||
.execution-card-meta .span-2 {
|
||
grid-column: 1 / -1;
|
||
}
|
||
|
||
@media (min-width: 640px) {
|
||
.execution-card-meta {
|
||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||
}
|
||
}
|
||
|
||
/* lg+ 主从布局(原 lg:grid-cols-[minmax(280px,38%)_minmax(0,1fr)]) */
|
||
.master-detail {
|
||
display: grid;
|
||
gap: 16px;
|
||
align-items: start;
|
||
grid-template-columns: minmax(0, 1fr);
|
||
}
|
||
|
||
@media (min-width: 1024px) {
|
||
.master-detail {
|
||
grid-template-columns: minmax(280px, 38%) minmax(0, 1fr);
|
||
}
|
||
}
|
||
|
||
.master-column {
|
||
display: grid;
|
||
gap: 12px;
|
||
}
|
||
|
||
/* lg+ 紧凑 Execution 列表(小屏隐藏) */
|
||
.execution-list {
|
||
display: none;
|
||
}
|
||
|
||
@media (min-width: 1024px) {
|
||
.execution-list {
|
||
display: grid;
|
||
gap: 6px;
|
||
}
|
||
}
|
||
|
||
.execution-item {
|
||
display: grid;
|
||
gap: 4px;
|
||
width: 100%;
|
||
border: 1px solid var(--el-border-color-light);
|
||
border-radius: 8px;
|
||
background: var(--el-bg-color);
|
||
padding: 10px 12px;
|
||
color: var(--el-text-color-regular);
|
||
font-size: 13px;
|
||
text-align: left;
|
||
cursor: pointer;
|
||
transition: background-color 0.15s ease;
|
||
}
|
||
|
||
.execution-item:hover {
|
||
background: var(--el-fill-color-light);
|
||
}
|
||
|
||
.execution-item--selected {
|
||
border-color: var(--el-color-primary);
|
||
background: var(--el-color-primary-light-9);
|
||
box-shadow: inset 3px 0 var(--el-color-primary);
|
||
}
|
||
|
||
.execution-item-line {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
align-items: baseline;
|
||
gap: 4px 8px;
|
||
font-size: 12px;
|
||
}
|
||
|
||
.pagination-row {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 12px;
|
||
}
|
||
|
||
.pagination-page {
|
||
color: var(--el-text-color-primary);
|
||
font-size: 13px;
|
||
}
|
||
|
||
/* 右侧详情:lg+ sticky */
|
||
.detail-panel {
|
||
display: grid;
|
||
gap: 14px;
|
||
border: 1px solid var(--el-border-color-light);
|
||
border-radius: 12px;
|
||
background: var(--el-bg-color);
|
||
padding: 16px;
|
||
}
|
||
|
||
@media (min-width: 1024px) {
|
||
.detail-panel {
|
||
position: sticky;
|
||
top: 96px;
|
||
max-height: calc(100vh - 128px);
|
||
overflow-y: auto;
|
||
overscroll-behavior: contain;
|
||
}
|
||
}
|
||
|
||
.detail-header {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: 8px;
|
||
}
|
||
|
||
.detail-header h2 {
|
||
margin: 0;
|
||
color: var(--el-text-color-primary);
|
||
font-size: 17px;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.detail-content {
|
||
display: grid;
|
||
gap: 14px;
|
||
color: var(--el-text-color-regular);
|
||
font-size: 13px;
|
||
}
|
||
|
||
.section-heading {
|
||
margin: 0;
|
||
color: var(--el-text-color-primary);
|
||
font-size: 14px;
|
||
font-weight: 600;
|
||
}
|
||
|
||
/* Gate 卡片(lg 隐藏) */
|
||
.gate-cards {
|
||
display: grid;
|
||
gap: 8px;
|
||
}
|
||
|
||
@media (min-width: 1024px) {
|
||
.gate-cards {
|
||
display: none;
|
||
}
|
||
}
|
||
|
||
.gate-card {
|
||
display: grid;
|
||
gap: 4px;
|
||
border: 1px solid var(--el-border-color-lighter);
|
||
border-radius: 8px;
|
||
padding: 8px 12px;
|
||
font-size: 12px;
|
||
}
|
||
|
||
.gate-card--selected {
|
||
background: var(--el-color-warning-light-9);
|
||
}
|
||
|
||
.gate-card-title {
|
||
color: var(--el-text-color-primary);
|
||
font-size: 12px;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.gate-card .el-button {
|
||
justify-self: start;
|
||
}
|
||
|
||
/* Gate 表格(仅 lg+ 展示) */
|
||
.gate-table-wrap {
|
||
display: none;
|
||
overflow: hidden;
|
||
border: 1px solid var(--el-border-color-lighter);
|
||
border-radius: 8px;
|
||
}
|
||
|
||
@media (min-width: 1024px) {
|
||
.gate-table-wrap {
|
||
display: block;
|
||
}
|
||
}
|
||
|
||
.gate-table-wrap :deep(.el-table tr.gate-selected > td.el-table__cell) {
|
||
background: var(--el-color-warning-light-9);
|
||
}
|
||
|
||
/* Gate 诊断结构化区块 */
|
||
.gate-diagnostics {
|
||
display: grid;
|
||
gap: 12px;
|
||
border: 1px solid var(--el-border-color-lighter);
|
||
border-radius: 8px;
|
||
padding: 12px;
|
||
}
|
||
|
||
.gate-diagnostics h4 {
|
||
margin: 0;
|
||
color: var(--el-text-color-primary);
|
||
font-size: 13px;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.diag-block {
|
||
display: grid;
|
||
gap: 8px;
|
||
}
|
||
|
||
.diag-label {
|
||
color: var(--el-text-color-secondary);
|
||
font-size: 12px;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.diag-stack {
|
||
display: grid;
|
||
gap: 8px;
|
||
}
|
||
|
||
.finding-list {
|
||
display: grid;
|
||
gap: 8px;
|
||
}
|
||
|
||
.finding-card {
|
||
display: grid;
|
||
gap: 8px;
|
||
border: 1px solid var(--el-border-color-lighter);
|
||
border-radius: 8px;
|
||
background: var(--el-fill-color-lighter);
|
||
padding: 8px 12px;
|
||
}
|
||
|
||
.severity-tag,
|
||
.chip-mono {
|
||
font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
|
||
}
|
||
|
||
.chip-row {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 8px;
|
||
}
|
||
|
||
/* Attempts 明细 */
|
||
.attempts-head {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: 8px;
|
||
}
|
||
|
||
.attempts-head .section-heading {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
align-items: baseline;
|
||
gap: 6px;
|
||
}
|
||
|
||
.attempt-list {
|
||
display: grid;
|
||
gap: 8px;
|
||
}
|
||
|
||
.attempt-card {
|
||
display: grid;
|
||
gap: 4px;
|
||
border: 1px solid var(--el-border-color-lighter);
|
||
border-radius: 8px;
|
||
padding: 8px 12px;
|
||
font-size: 12px;
|
||
}
|
||
|
||
.attempt-title {
|
||
color: var(--el-text-color-primary);
|
||
font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
|
||
font-size: 12px;
|
||
}
|
||
|
||
.attempt-error {
|
||
color: var(--el-color-danger);
|
||
}
|
||
|
||
.diff-lines {
|
||
display: grid;
|
||
gap: 2px;
|
||
margin: 0;
|
||
padding: 0;
|
||
list-style: none;
|
||
color: var(--el-text-color-secondary);
|
||
}
|
||
|
||
/* 原生 details 迁移 el-collapse:透明化折叠头尾 */
|
||
.snap-collapse {
|
||
border-top: 1px dashed var(--el-border-color-lighter);
|
||
}
|
||
|
||
.snap-collapse :deep(.el-collapse-item__header) {
|
||
height: 32px;
|
||
color: var(--el-color-primary);
|
||
font-size: 12px;
|
||
background: transparent;
|
||
}
|
||
|
||
.snap-collapse :deep(.el-collapse-item__wrap) {
|
||
border-bottom: none;
|
||
background: transparent;
|
||
}
|
||
|
||
.snap-collapse :deep(.el-collapse-item__content) {
|
||
padding-bottom: 8px;
|
||
}
|
||
|
||
.snapshot-grid {
|
||
display: grid;
|
||
gap: 8px;
|
||
}
|
||
|
||
@media (min-width: 768px) {
|
||
.snapshot-grid {
|
||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||
}
|
||
}
|
||
|
||
.code-block {
|
||
margin: 0;
|
||
max-height: 12rem;
|
||
overflow: auto;
|
||
border-radius: 6px;
|
||
background: var(--el-fill-color-light);
|
||
padding: 8px;
|
||
color: var(--el-text-color-regular);
|
||
font-size: 12px;
|
||
line-height: 1.5;
|
||
white-space: pre-wrap;
|
||
word-break: break-word;
|
||
}
|
||
|
||
.mono-line {
|
||
color: var(--el-text-color-regular);
|
||
font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
|
||
font-size: 12px;
|
||
word-break: break-all;
|
||
}
|
||
|
||
.mono-code {
|
||
color: var(--el-text-color-secondary);
|
||
font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
|
||
font-size: 12px;
|
||
word-break: break-all;
|
||
}
|
||
|
||
.muted-line {
|
||
margin: 0;
|
||
color: var(--el-text-color-secondary);
|
||
font-size: 12px;
|
||
}
|
||
|
||
.truncate-line {
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
</style>
|