Commit d380a252 by 李伟康

feat(TemplateImport): 优化模板导入失败详情展示

为失败详情表格添加垂直滚动容器并设置最大高度为360px,避免页面溢出。为表头添加粘性定位与白色背景,滚动时固定表头。移除仅展示前3条失败记录的限制,支持查看全部失败项。
1 parent 7aee9ab3
Pipeline #356 for d380a252 failed in 0 seconds
...@@ -130,7 +130,9 @@ export function FailDetailCard({ checkResult, fileSize, onReUpload }: FailDetail ...@@ -130,7 +130,9 @@ export function FailDetailCard({ checkResult, fileSize, onReUpload }: FailDetail
<div <div
style={{ style={{
width: '100%', width: '100%',
maxHeight: 360,
overflowX: 'auto', overflowX: 'auto',
overflowY: 'auto',
marginBottom: 14, marginBottom: 14,
}} }}
> >
...@@ -149,7 +151,7 @@ export function FailDetailCard({ checkResult, fileSize, onReUpload }: FailDetail ...@@ -149,7 +151,7 @@ export function FailDetailCard({ checkResult, fileSize, onReUpload }: FailDetail
))} ))}
</colgroup> </colgroup>
<thead> <thead>
<tr> <tr style={{ position: 'sticky', top: 0, zIndex: 1 }}>
{FAIL_COL_LABELS.map((c) => ( {FAIL_COL_LABELS.map((c) => (
<th <th
key={c.key} key={c.key}
...@@ -161,6 +163,7 @@ export function FailDetailCard({ checkResult, fileSize, onReUpload }: FailDetail ...@@ -161,6 +163,7 @@ export function FailDetailCard({ checkResult, fileSize, onReUpload }: FailDetail
padding: '10px 8px', padding: '10px 8px',
borderBottom: '1px solid #F3F4F6', borderBottom: '1px solid #F3F4F6',
whiteSpace: 'nowrap', whiteSpace: 'nowrap',
background: '#fff',
}} }}
> >
{c.label} {c.label}
...@@ -170,7 +173,7 @@ export function FailDetailCard({ checkResult, fileSize, onReUpload }: FailDetail ...@@ -170,7 +173,7 @@ export function FailDetailCard({ checkResult, fileSize, onReUpload }: FailDetail
</thead> </thead>
<tbody> <tbody>
{hasFailures ? ( {hasFailures ? (
failures.slice(0, 3).map((f, i) => ( failures.map((f, i) => (
<tr key={`${f.rowIndex ?? i}-${f.levelCode ?? ''}-${f.productCategory ?? ''}`}> <tr key={`${f.rowIndex ?? i}-${f.levelCode ?? ''}-${f.productCategory ?? ''}`}>
{/* 行号(蓝 #2563EB) */} {/* 行号(蓝 #2563EB) */}
<td <td
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!