refactor(phase-6): 拆分交付工作区与任务中心,五支队列 Tab 收敛到共享匹配表
- DeliveryVideoWorkspace 2690→2176 行,弹窗与结果面板下沉为 4 个子组件,类型抽到共享模块 - TaskCenterBoardPage 1017→834 行,任务表/变体表下沉,失败条与轮询入口留在页面 - 巡店删除/取款/查 ASIN/跟价/商品风险五支 Tab 共用 BrandShopMatchTable,纯逻辑收敛到 brand-shop-match-shared - admin manualChunks 增加 element-plus 分组(915KB 独立 chunk) - 源码钉按新落点更新:分页与表格断言读子组件,页面接线断言保留
This commit is contained in:
@@ -0,0 +1,158 @@
|
||||
<script setup lang="ts">
|
||||
import OldPagination from '@/components/OldPagination.vue'
|
||||
import { formatDateTime } from '@/utils/datetime'
|
||||
import type { TaskCenterVariantTaskRow } from '@/api/task-center'
|
||||
import {
|
||||
variantAccountText,
|
||||
variantStatusLabel,
|
||||
variantStatusType,
|
||||
} from './task-center-model'
|
||||
|
||||
defineProps<{
|
||||
rows: TaskCenterVariantTaskRow[]
|
||||
loading: boolean
|
||||
total: number
|
||||
page: number
|
||||
pageSize: number
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
page: [number]
|
||||
size: [number]
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="table-scroll">
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width: 150px">账号</th>
|
||||
<th style="width: 200px">任务号</th>
|
||||
<th style="width: 110px">状态</th>
|
||||
<th style="width: 165px">开始时间</th>
|
||||
<th style="width: 165px">更新时间</th>
|
||||
<th>结果信息</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<template v-if="rows.length">
|
||||
<tr v-for="row in rows" :key="row.taskId">
|
||||
<td>
|
||||
<span class="strong">{{ variantAccountText(row) }}</span>
|
||||
<span v-if="!row.username && row.uid" class="sub" :title="row.uid">{{ row.uid }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="mono">{{ row.taskId }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="st-pill" :class="`is-${variantStatusType(row.status)}`">
|
||||
{{ row.statusLabel || variantStatusLabel(row.status) }}
|
||||
</span>
|
||||
</td>
|
||||
<td>{{ formatDateTime(row.createTime) }}</td>
|
||||
<td>{{ formatDateTime(row.updateTime) }}</td>
|
||||
<td>
|
||||
<span class="res-mes" :title="row.resMes || ''">{{ row.resMes || '—' }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</template>
|
||||
<tr v-else-if="loading">
|
||||
<td colspan="6" class="empty-tip">加载中...</td>
|
||||
</tr>
|
||||
<tr v-else>
|
||||
<td colspan="6" class="empty-tip">暂无变体采集任务</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<OldPagination
|
||||
:total="total"
|
||||
:page="page"
|
||||
:page-size="pageSize"
|
||||
@change="emit('page', $event)"
|
||||
@size-change="emit('size', $event)"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.table-scroll {
|
||||
width: 100%;
|
||||
overflow-x: auto;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
font-size: 13px;
|
||||
}
|
||||
th {
|
||||
padding: 10px 12px;
|
||||
text-align: left;
|
||||
color: #5b6f83;
|
||||
font-weight: 650;
|
||||
font-size: 12.5px;
|
||||
border-bottom: 1px solid #dbe6f0;
|
||||
white-space: nowrap;
|
||||
}
|
||||
td {
|
||||
padding: 10px 12px;
|
||||
border-bottom: 1px solid #eaf1f7;
|
||||
vertical-align: top;
|
||||
}
|
||||
.strong {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
word-break: break-all;
|
||||
}
|
||||
.sub {
|
||||
display: block;
|
||||
color: #8598ab;
|
||||
font-size: 11.5px;
|
||||
word-break: break-all;
|
||||
}
|
||||
.mono {
|
||||
font-family: Consolas, 'Courier New', monospace;
|
||||
font-size: 12px;
|
||||
word-break: break-all;
|
||||
}
|
||||
.res-mes {
|
||||
display: block;
|
||||
word-break: break-all;
|
||||
}
|
||||
.st-pill {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
padding: 2px 10px;
|
||||
border-radius: 999px;
|
||||
font-size: 12px;
|
||||
line-height: 1.7;
|
||||
border: 1px solid transparent;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.st-pill.is-success {
|
||||
color: #3d7158;
|
||||
background: #e8f2eb;
|
||||
border-color: #bdd7c5;
|
||||
}
|
||||
.st-pill.is-failed {
|
||||
color: #91474f;
|
||||
background: #f8ebeb;
|
||||
border-color: #e4c2c5;
|
||||
}
|
||||
.st-pill.is-pending {
|
||||
color: #8a6d3b;
|
||||
background: #fbf4ea;
|
||||
border-color: #e7d3ae;
|
||||
}
|
||||
.st-pill.is-running {
|
||||
color: #37618f;
|
||||
background: #e8f1fb;
|
||||
border-color: #c3d8ef;
|
||||
}
|
||||
.empty-tip {
|
||||
padding: 30px 24px;
|
||||
text-align: center;
|
||||
color: #8293a5;
|
||||
font-size: 13.5px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user