feat(admin): 店铺数据记录卡片改一行4个;卡片任务号改为任务id(file_task.id,与桌面端推送/心跳/回传同一id)——taskId优先,taskNo/resultId兜底;删除确认同步;更新对齐测试
This commit is contained in:
@@ -34,7 +34,7 @@ const totalShops = ref(0)
|
||||
const page = ref(1)
|
||||
// 店铺级一次全载(>200 家店铺时后端按页截断,可上调或恢复底部店铺级分页)。
|
||||
const pageSize = ref(200)
|
||||
// 卡片宫格分页:一行 3 个、一页 10 张卡片(在店铺分页的结果文件内翻页)。
|
||||
// 卡片宫格分页:一行 4 个、一页 10 张卡片(在店铺分页的结果文件内翻页)。
|
||||
const cardPage = ref(1)
|
||||
const cardPageSize = ref(10)
|
||||
const cardJump = ref('')
|
||||
@@ -217,14 +217,14 @@ async function downloadBatch() {
|
||||
|
||||
async function removeRowByRow(row: ShopDataResultRow) {
|
||||
// 对齐旧版:原生 confirm。
|
||||
if (!window.confirm(`确认删除店铺“${row.shopName}”的任务 ${row.taskNo || row.resultId} 及结果文件?`)) return
|
||||
if (!window.confirm(`确认删除店铺“${row.shopName}”的任务 ${row.taskId || row.taskNo || row.resultId} 及结果文件?`)) return
|
||||
deletingKey.value = row.resultId
|
||||
try {
|
||||
await deleteShopDataResultHistory(row.resultId)
|
||||
ElMessage.success('删除成功')
|
||||
await load()
|
||||
} catch (error) {
|
||||
ElMessage.error(error instanceof Error ? error.message : `正在删除任务 ${row.taskNo || row.resultId}...`)
|
||||
ElMessage.error(error instanceof Error ? error.message : `正在删除任务 ${row.taskId || row.taskNo || row.resultId}...`)
|
||||
} finally {
|
||||
deletingKey.value = ''
|
||||
}
|
||||
@@ -335,7 +335,7 @@ onMounted(load)
|
||||
</header>
|
||||
<div class="sd-card-select-row">
|
||||
<input type="checkbox" :checked="rowSelected(row)" :disabled="!isUsableShopDataResult(row)" @change="toggleRow(row)" />
|
||||
<span class="shop-card-task-no">任务 {{ row.taskNo || row.resultId }}</span>
|
||||
<span class="shop-card-task-no">任务 {{ row.taskId || row.taskNo || row.resultId }}</span>
|
||||
<span class="st-pill" :class="`is-${statusType(row.status)}`">{{ statusLabel(row.status) }}</span>
|
||||
</div>
|
||||
<div class="sd-card-row" v-if="row.groupName">
|
||||
@@ -604,7 +604,7 @@ h3 {
|
||||
}
|
||||
.shop-card-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
gap: 14px;
|
||||
}
|
||||
.sd-card {
|
||||
@@ -734,6 +734,11 @@ h3 {
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
@media (max-width: 1400px) {
|
||||
.shop-card-grid {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
}
|
||||
@media (max-width: 1100px) {
|
||||
.shop-card-grid {
|
||||
grid-template-columns: repeat(2, 1fr);
|
||||
|
||||
Reference in New Issue
Block a user