feat(brandgating): 品牌Gating库恢复独立菜单
V164 建菜单、V166 回滚后,按 2026-10-25 决定用 V174 恢复独立菜单, 不再作为「店铺数据重复检查」的第三页签;后端权限键同步改为 admin_brand_gating。
This commit is contained in:
@@ -72,6 +72,10 @@ export const OPERATION_GUIDES: Record<string, OperationGuideData> = {
|
||||
text: '店铺数据任务按状态和时间筛选。批量操作前请核对已选任务。',
|
||||
steps: ['筛选任务', '检查状态', '执行批量操作'],
|
||||
},
|
||||
admin_brand_gating: {
|
||||
text: '维护不符合规则的品牌(品牌Gating / 类目Gating)。新增后可用下方筛选快速回查;云端 Gating 库与前端排查软件同步同一份数据,命中后会自动拦截。',
|
||||
steps: ['新增或批量导入', '筛选回查', '按需解除或删除'],
|
||||
},
|
||||
// admin_shop_data_duplicate_check(店铺撞款监控)为例外页:不展示全局提示条,不参与对齐。
|
||||
admin_image_video_tasks: {
|
||||
text: '可先使用筛选缩小任务范围,再查看任务状态、结果和权限范围。',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<script setup lang="ts">
|
||||
/**
|
||||
* 品牌Gating库管理面板:以第三个页签嵌在「店铺数据重复检查」页里。
|
||||
* 品牌Gating库管理页(独立菜单 admin_brand_gating,V174 恢复)。
|
||||
* 数据源 /api/admin/brand-gating(biz_brand_gating,全平台共享,不随公司 Tab 收窄)。
|
||||
*/
|
||||
import { computed, onMounted, reactive, ref } from 'vue'
|
||||
@@ -49,7 +49,6 @@ const addBusy = ref(false)
|
||||
const batchText = ref('')
|
||||
const importBusy = ref(false)
|
||||
const busyRowId = ref(0)
|
||||
const tipVisible = ref(true)
|
||||
|
||||
const countryOptions = GATING_COUNTRIES.filter((country) => country !== '全部')
|
||||
const typeOptions = GATING_TYPES
|
||||
@@ -219,15 +218,6 @@ onMounted(() => {
|
||||
|
||||
<template>
|
||||
<div class="gating-panel">
|
||||
<div v-if="tipVisible" class="g-tip">
|
||||
<span class="g-tip-title">当前页面操作提示</span>
|
||||
<span>
|
||||
维护不符合规则的品牌(品牌Gating / 类目Gating)。新增后可用下方筛选快速回查;云端 Gating 库与前端排查软件同步同一份数据,命中后会自动拦截。
|
||||
<b>Gating 库为全平台共享数据,不随上方公司页签切换。</b>
|
||||
</span>
|
||||
<button class="g-tip-x" type="button" @click="tipVisible = false">收起 ✕</button>
|
||||
</div>
|
||||
|
||||
<div v-if="statsError" class="g-stats-error">
|
||||
<span>统计加载失败:{{ statsError }}</span>
|
||||
<button type="button" @click="loadStats">重试</button>
|
||||
@@ -415,39 +405,6 @@ onMounted(() => {
|
||||
gap: 14px;
|
||||
}
|
||||
|
||||
.g-tip {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
gap: 10px;
|
||||
background: #f5f9ff;
|
||||
border: 1px solid #cfe0fb;
|
||||
border-left: 4px solid var(--g-primary);
|
||||
border-radius: 10px;
|
||||
padding: 10px 14px;
|
||||
font-size: 12px;
|
||||
color: #1e40af;
|
||||
line-height: 1.7;
|
||||
}
|
||||
.g-tip-title {
|
||||
flex: none;
|
||||
font-weight: 700;
|
||||
color: #1d4ed8;
|
||||
}
|
||||
.g-tip b {
|
||||
color: #1d4ed8;
|
||||
}
|
||||
.g-tip-x {
|
||||
flex: none;
|
||||
margin-left: auto;
|
||||
border: none;
|
||||
background: none;
|
||||
color: #6b9ef0;
|
||||
font-family: inherit;
|
||||
font-size: 12px;
|
||||
font-weight: 700;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.g-stats-error {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -13,9 +13,8 @@ import { aggregateDrawerRows, drawerSummaryOf, dupWithinGroup, indexShopGroups,
|
||||
import type { DuplicateConsole, LedgerRow } from './duplicate-console-model.ts'
|
||||
import { ASIN_COUNTRY_CODES, asinCountryLabel } from '../asin/asin-country.ts'
|
||||
import { orderedPair } from '@/utils/datetime'
|
||||
import BrandGatingPanel from './BrandGatingPanel.vue'
|
||||
|
||||
type Tab = 'dup' | 'ledger' | 'gating'
|
||||
type Tab = 'dup' | 'ledger'
|
||||
type Scope = 'global' | 'group'
|
||||
|
||||
const consoleData = ref<DuplicateConsole | null>(null)
|
||||
@@ -432,18 +431,18 @@ onMounted(() => {
|
||||
<div class="dup-head">
|
||||
<div>
|
||||
<h2>店铺数据撞款监控</h2>
|
||||
<p>按 ASIN×店铺×站点分析同一 ASIN 在多家自营店铺/分组内的重复上架;分组归属来自店铺管理,只读展示。品牌Gating库在同一页的第三个页签维护。</p>
|
||||
<p>按 ASIN×店铺×站点分析同一 ASIN 在多家自营店铺/分组内的重复上架;分组归属来自店铺管理,只读展示。</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="loadError && activeTab !== 'gating'" class="load-banner">
|
||||
<div v-if="loadError" class="load-banner">
|
||||
<span>{{ loadError }}</span>
|
||||
<button class="btn btn-ghost btn-sm" type="button" @click="loadConsole">重试</button>
|
||||
<button class="btn btn-ghost btn-sm" type="button" @click="loadError = ''">知道了</button>
|
||||
</div>
|
||||
|
||||
<!-- 筛选条件(撞款/台账专用,Gating 页签隐藏) -->
|
||||
<section v-if="activeTab !== 'gating'" class="card filter">
|
||||
<!-- 筛选条件(撞款/台账专用) -->
|
||||
<section class="card filter">
|
||||
<div class="filter-title">筛选条件</div>
|
||||
<div class="filter-row">
|
||||
<div class="f-group">
|
||||
@@ -493,9 +492,9 @@ onMounted(() => {
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<div v-loading="loading && activeTab !== 'gating'" class="dup-body-wrap">
|
||||
<div v-loading="loading" class="dup-body-wrap">
|
||||
<!-- KPI 统计 -->
|
||||
<section v-if="consoleData && activeTab !== 'gating'" class="kpis">
|
||||
<section v-if="consoleData" class="kpis">
|
||||
<div v-for="kpi in kpis" :key="kpi.label" class="kpi" :class="kpi.tone">
|
||||
<div class="k-label"><span class="k-dot"></span>{{ kpi.label }}</div>
|
||||
<div class="k-value">{{ kpi.value }}</div>
|
||||
@@ -504,7 +503,7 @@ onMounted(() => {
|
||||
</section>
|
||||
|
||||
<!-- 店铺上架分布 -->
|
||||
<section v-if="consoleData && activeTab !== 'gating'" class="card store-strip">
|
||||
<section v-if="consoleData" class="card store-strip">
|
||||
<div class="strip-head">
|
||||
<span class="strip-title">店铺上架分布</span>
|
||||
<span class="strip-note">各店铺在本批站点中的上架记录量(含重复扫描)</span>
|
||||
@@ -527,9 +526,8 @@ onMounted(() => {
|
||||
<div class="tabs">
|
||||
<button class="tab" :class="{ active: activeTab === 'dup' }" type="button" @click="switchTab('dup')">撞款监控 <span class="t-count">{{ totalDupCount }}</span></button>
|
||||
<button class="tab" :class="{ active: activeTab === 'ledger' }" type="button" @click="switchTab('ledger')">全部ASIN台账 <span class="t-count">{{ ledgerTotal }}</span></button>
|
||||
<button class="tab" :class="{ active: activeTab === 'gating' }" type="button" @click="switchTab('gating')">品牌Gating库</button>
|
||||
</div>
|
||||
<div v-if="activeTab !== 'gating'" class="actions">
|
||||
<div class="actions">
|
||||
<span v-if="overview" class="updated">数据更新时间 {{ overview.scannedAt || '—' }}</span>
|
||||
<button v-if="isSuper" class="btn btn-ghost btn-sm" type="button" @click="groupInfoVisible = true">
|
||||
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2" /><circle cx="9" cy="7" r="4" /><path d="M23 21v-2a4 4 0 0 0-3-3.87" /><path d="M16 3.13a4 4 0 0 1 0 7.75" /></svg>
|
||||
@@ -546,13 +544,8 @@ onMounted(() => {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ============ 品牌Gating库(全平台共享数据) ============ -->
|
||||
<template v-if="activeTab === 'gating'">
|
||||
<BrandGatingPanel />
|
||||
</template>
|
||||
|
||||
<!-- ============ 撞款监控 ============ -->
|
||||
<template v-else-if="consoleData && activeTab === 'dup'">
|
||||
<template v-if="consoleData && activeTab === 'dup'">
|
||||
<div v-if="isSuper" class="scope-bar">
|
||||
<div class="seg">
|
||||
<button class="seg-btn" :class="{ active: scope === 'global' }" type="button" @click="switchScope('global')">全店撞款</button>
|
||||
@@ -668,7 +661,7 @@ onMounted(() => {
|
||||
<OldPagination v-if="ledgerTotal" :total="ledgerTotal" :page="ledgerPage" :page-size="ledgerPageSize" @change="goPage" @size-change="changeLedgerSize" />
|
||||
</template>
|
||||
|
||||
<div v-if="!consoleData && activeTab !== 'gating' && !loadError" class="card empty-state">
|
||||
<div v-if="!consoleData && !loadError" class="card empty-state">
|
||||
<div class="e-title">暂无扫描结果</div>
|
||||
请点击右上角「重新分析」触发撞款扫描
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/** 品牌Gating库模型(任务:并入「店铺数据重复检查」页签):与 /api/admin/brand-gating 的 camel 契约对齐,纯逻辑。 */
|
||||
/** 品牌Gating库模型(独立菜单页):与 /api/admin/brand-gating 的 camel 契约对齐,纯逻辑。 */
|
||||
|
||||
export const GATING_COUNTRIES = ['全部', '英国', '德国', '法国', '西班牙', '意大利'] as const
|
||||
export const GATING_TYPES = ['品牌gating', '类目gating', '账户不符合'] as const
|
||||
|
||||
@@ -25,6 +25,7 @@ export const adminPages: AdminPageDef[] = [
|
||||
{ path: 'account/user-secret-usage', menuKey: 'admin_user_secret_usage', title: '密钥用量统计', companyScoped: true, load: () => import('@/pages/account/UserSecretUsagePage.vue') },
|
||||
{ path: 'account/companies', menuKey: 'admin_companies', title: '公司管理', superAdminOnly: true, load: () => import('@/pages/account/CompaniesPage.vue') },
|
||||
{ path: 'shop-center/duplicate-check', menuKey: 'admin_shop_data_duplicate_check', title: '店铺撞款监控', companyScoped: true, load: () => import('@/pages/tasks/DuplicateCheckPage.vue') },
|
||||
{ path: 'shop-center/brand-gating', menuKey: 'admin_brand_gating', title: '品牌Gating库', companyScoped: false, load: () => import('@/pages/tasks/BrandGatingPanel.vue') },
|
||||
{ path: 'shop-center/keys', menuKey: 'admin_shop_keys', title: '店铺密钥管理', companyScoped: true, load: () => import('@/pages/shop/ShopKeysPage.vue') },
|
||||
{ path: 'shop-center/shops', menuKey: 'admin_shop_manage', title: '店铺管理', companyScoped: true, load: () => import('@/pages/shop/ShopManagePage.vue') },
|
||||
{ path: 'records/history', menuKey: 'admin_history', title: '生成记录', companyScoped: true, load: () => import('@/pages/records/RecordsHistoryPage.vue') },
|
||||
|
||||
Reference in New Issue
Block a user