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:
@@ -180,37 +180,21 @@
|
||||
>
|
||||
<template #cards-extra>
|
||||
<div class="subsection-title">匹配结果</div>
|
||||
<div v-if="!matchedItems.length" class="match-empty">完成「匹配店铺」后,在此展示匹配结果,确认无误后再启动任务。</div>
|
||||
<el-table v-else :data="pagedMatchedItems" :row-key="rowKeyForMatch" :highlight-current-row="false"
|
||||
class="result-table match-table">
|
||||
<el-table-column prop="shopName" label="店铺名" min-width="100" />
|
||||
<el-table-column label="匹配" width="72" align="center">
|
||||
<template #default="{ row }">
|
||||
<span :class="row.matched ? 'ok' : 'fail'">{{ row.matched ? '是' : '否' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="shopId" label="店铺ID" min-width="120" show-overflow-tooltip />
|
||||
<el-table-column prop="platform" label="平台" width="88" show-overflow-tooltip />
|
||||
<el-table-column prop="companyName" label="公司" min-width="100" show-overflow-tooltip />
|
||||
<el-table-column label="状态" width="100" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ formatMatchStatus(row.matchStatus) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="说明" min-width="140" show-overflow-tooltip>
|
||||
<template #default="{ row }">{{ formatMatchRemark(row) }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" width="72" align="center">
|
||||
<template #default="{ row }">
|
||||
<button type="button" class="link-danger" @click="removeMatchedRow(row)">删除</button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
v-if="matchedTotal > matchedPageSize"
|
||||
class="matched-pagination"
|
||||
layout="total, prev, pager, next"
|
||||
<BrandShopMatchTable
|
||||
v-model:page="matchedPage"
|
||||
:items="pagedMatchedItems"
|
||||
:total="matchedTotal"
|
||||
:page-size="matchedPageSize"
|
||||
v-model:current-page="matchedPage"
|
||||
:row-key="rowKeyForMatch"
|
||||
:status-text="formatMatchStatus"
|
||||
:remark-text="formatMatchRemark"
|
||||
empty-text="完成「匹配店铺」后,在此展示匹配结果,确认无误后再启动任务。"
|
||||
:shop-name-min-width="100"
|
||||
shop-id-label="店铺ID"
|
||||
:company-min-width="100"
|
||||
:status-width="100"
|
||||
:remark-min-width="140"
|
||||
@remove="removeMatchedRow"
|
||||
/>
|
||||
</template>
|
||||
<template #item-actions="{ item }">
|
||||
@@ -245,6 +229,7 @@ import {
|
||||
import ModuleTemplateDownload from '@/shared/components/ModuleTemplateDownload.vue'
|
||||
import FileUploadZone from '@/shared/components/FileUploadZone.vue'
|
||||
import TaskCenterPanel from '@/shared/components/tasks/TaskCenterPanel.vue'
|
||||
import BrandShopMatchTable from './BrandShopMatchTable.vue'
|
||||
import type { TaskItemView, TaskStatCard } from '@/shared/components/tasks/types'
|
||||
import { getPywebviewApi, type PywebviewApi } from '@/shared/bridges/pywebview'
|
||||
import { useExcelFileUpload } from '@/shared/composables/useExcelFileUpload'
|
||||
@@ -940,7 +925,7 @@ async function runMatch() {
|
||||
}
|
||||
}
|
||||
|
||||
function formatMatchStatus(status: string | undefined) {
|
||||
function formatMatchStatus(status?: string | null) {
|
||||
const s = (status || '').trim()
|
||||
const map: Record<string, string> = { MATCHED: '已匹配', PENDING: '待匹配', CONFLICT: '需人工确认', INDEX_STALE: '匹配已过期' }
|
||||
return map[s] || (s ? s : '—')
|
||||
|
||||
Reference in New Issue
Block a user