增加导入附件的查看记录

This commit is contained in:
wuweihua
2026-10-15 15:02:23 +08:00
parent c704021f2f
commit 41ce05a08a
14 changed files with 585 additions and 13 deletions
@@ -35,6 +35,14 @@
<span class="err-text">{{ detail.errorMessage }}</span>
</el-descriptions-item>
</el-descriptions>
<div v-if="failRows.length" class="json-panel">
<div class="json-panel__head"><span>失败明细(共 {{ failRows.length }} 单)</span></div>
<el-table :data="failRows" border size="small" max-height="280" class="fail-table">
<el-table-column label="订单号" prop="orderId" min-width="160" show-overflow-tooltip />
<el-table-column label="转单号" prop="transferOrderId" min-width="140" show-overflow-tooltip />
<el-table-column label="错误信息" prop="errorMessage" min-width="220" show-overflow-tooltip />
</el-table>
</div>
<div class="json-panel">
<div class="json-panel__head"><span>请求报文</span></div>
<pre class="code-pre">{{ formatJson(detail.requestJson) }}</pre>
@@ -74,7 +82,7 @@ const searchColumns = [
]
const columns = [
{ label: '操作', prop: 'actionName', width: 120, slot: 'actionName' },
{ label: '操作', prop: 'actionName', width: 150, slot: 'actionName' },
{ label: '业务ID', prop: 'bizId', minWidth: 180, showOverflowTooltip: true },
{ label: '状态', prop: 'status', align: 'center', width: 90, slot: 'status' },
{ label: '写入时间', prop: 'updateTime', align: 'center', width: 170 },
@@ -93,12 +101,41 @@ function parseReq(row) {
function actionLabel(row) {
const action = parseReq(row).action
if (action === 'FILTER') return '筛选同步'
if (action === 'FILTER_DONE') return '筛选完成'
if (action === 'SELECTED') return '同步选中'
if (action === 'FILTER_DONE') {
return row.status === 'FAIL' ? '筛选完成(有失败)' : '筛选完成'
}
if (action === 'SELECTED') {
return row.status === 'FAIL' ? '同步选中(有失败)' : '同步选中'
}
if (action === 'ONE') return '单条同步'
if (action === 'ONE_FAIL') return '同步失败'
return action || '-'
}
const failRows = computed(() => {
if (!detail.value) return []
const resp = parseResp(detail.value)
if (Array.isArray(resp.failDetails) && resp.failDetails.length) {
return resp.failDetails
}
if (Array.isArray(resp.details) && resp.details.length) {
return resp.details.filter(d => {
const st = d && d.successStatus
return st && String(st).toUpperCase() !== 'SUCCESS'
})
}
return []
})
function parseResp(row) {
if (!row || !row.responseJson) return {}
try {
return typeof row.responseJson === 'object' ? row.responseJson : JSON.parse(row.responseJson)
} catch (e) {
return {}
}
}
function queryList(params) {
return listOrderSourceSyncLog(params)
}
@@ -143,6 +180,9 @@ defineExpose({ open })
margin-bottom: 6px;
font-weight: 600;
}
.fail-table {
margin-top: 6px;
}
.code-pre {
margin: 0;
padding: 10px 12px;