refactor(前端): 前后台界面小字全面精简——删技术ID括号/页头操作提示条/机制解释句(2026-11-28 客户口径「这些小字都不需要多余,还有shopId啥的…除了必须要的比如任务ID密钥,其他精简一些」)

用户端 frontend-vue:
- jd-publish-shop.ts:shopLabel 只出店名(缺名兜底「店铺 N」),跨店/多店琥珀文案压成一两句,判据逻辑零改动
- JdPublishTab:删工具头/分类解释/品牌句后半,默认店铺/选品/collect-hint/中断回执/加价规则各压一句
- JdCollectTab:删工具头 desc、分类机制句、断点游标行,「页面筛选未生效兜底翻页中」从任务卡撤下
- jd-on-shelf 空态一句、JdConsolePage hero-sub 整段删(含过时的「正在建设中」)
- 品牌 10 个 tab:输入/筛选/加载长句压一句或删,任务卡删「结果ID/店铺ID/平台」技术行(店名已显形)
- 保留:错误出口、额度「当前在架X/Y」、GROUPS_EMPTY 空态动作句、检测按钮与店铺显形

后管 admin-frontend-vue:
- 每页顶部「当前页面操作提示」条整条下线(删 OperationGuide.vue+operation-guides.ts)
- 撞款/任务中心/关键词用量/密钥用量/客户端包/教程/软件版本/数字人/菜单/店铺密钥/登录页逐页删说明小字(保留:踢线警示、「留空=永不过期」、「不要带v前缀」、「仅支持.zip」、草稿需手动发布、已授权人数、安全提示)
- 编辑/建号弹窗 label 括号收短;代理弹窗/设备日志(删 pywebview/kk-browser 进程名)/密钥 pill title/授权弹窗 dim/品牌门控空态收短

测试同步(16 支改反钉或同步断言,全部当场绿):
- align-operation-guide 整份重写为反钉(组件与文案表不得回流)
- source-pin 台账 task-center-board 条目手工点名 7/3/5→24/14/28:旧值是切分器把正则字面量内裸引号当字符串开关吞掉 18 支用例的误量(stripNonCode 不识别 regex literal),本次改写恰好移除该文件最后两处带引号正则后测出真值;真实用例数反而 25→24(删 1 支 guide 用例),非真实增长

门禁:后管 node --test 1965/1965+vitest 253/253+vue-tsc rc=0;用户端 node 1150/mount 149/vue-tsc rc=0;ops 快检 --fast overall=pass(后端9.5/后管8.8/客户端9.8/用户端9.6)。本窗不发版;app_client/jar/后端零改动。
This commit is contained in:
2026-11-28 01:14:51 +08:00
parent 35e4645358
commit 10dec12ec0
67 changed files with 159 additions and 698 deletions
@@ -18,7 +18,6 @@ import {
import GlobalErrorContainer from '@/layout/GlobalErrorContainer.vue'
import NotificationBell from '@/components/NotificationBell.vue'
import ExpiryNotice from '@/components/ExpiryNotice.vue'
import OperationGuide from '@/layout/OperationGuide.vue'
import CompanyTabs from '@/layout/CompanyTabs.vue'
import { crumbsForActiveRoute, resolveDocumentTitle, updateDocumentTitle } from '@/layout/title-breadcrumb'
import { showAdminFeedback } from '@/components/admin-feedback-ui'
@@ -205,7 +204,6 @@ async function signOut() {
<el-breadcrumb-item v-for="crumb in breadcrumbs" :key="crumb.key">{{ crumb.name }}</el-breadcrumb-item>
</el-breadcrumb>
<CompanyTabs />
<OperationGuide />
<GlobalErrorContainer />
<el-alert v-if="session.error" :title="session.error" type="error" show-icon :closable="false" />
<el-empty
@@ -1,7 +1,6 @@
<script setup lang="ts">
/** 页面上方的公司 tab(spec §4、§9.3):只有超管看得到,而且只画在**注册表里真的按公司取数的那些页**上——
* 选中哪家由哪一枚 tab 带 is-active 表达,这里不再挂第二处"这家是谁"的文案(§12 第 5 条把页头提示条算未批的界面暴露),
* 提示条只讲这一页怎么办,不讲 tab(2026-10-14 公司观感那句已从引导文案撤掉,见 operation-guides 文件头)。 */
* 选中哪家由哪一枚 tab 带 is-active 表达,这里不再挂第二处"这家是谁"的文案(§12 第 5 条把页头提示条算未批的界面暴露)。 */
import { computed, watch } from 'vue'
import { useRoute } from 'vue-router'
import { COMPANY_STATUS_ACTIVE } from '@/api/companies-dto'
@@ -1,85 +0,0 @@
<script setup lang="ts">
/** 当前页面操作提示条:对齐旧版 admin-interactions.js 的 adminOperationGuide。每页文案逐条登记在
* OPERATION_GUIDES 里,条数**不在这里数**(写死一个页数就会过期:公司 tab 那批把 group-manage 从
* 通用 fallback 改成自带文案时,上一版注释里的数字就已经是错的了)——分母由 align-operation-guide
* 那组用例按路由注册表钉着。
* 挂在 AdminLayout 内容区顶部,随 route.meta.menuKey 切换文案;折叠态存 localStorage。 */
import { computed, ref, watch } from 'vue'
import { useRoute } from 'vue-router'
import { OPERATION_GUIDE_STORAGE_KEY, operationGuideFor } from '@/layout/operation-guides'
const route = useRoute()
const guide = computed(() => operationGuideFor(route.meta.menuKey))
function readCollapsed(): boolean {
try {
return localStorage.getItem(OPERATION_GUIDE_STORAGE_KEY) === '1'
} catch {
return false
}
}
function persistCollapsed(value: boolean) {
try {
localStorage.setItem(OPERATION_GUIDE_STORAGE_KEY, value ? '1' : '0')
} catch {
// 忽略隐私模式写入失败
}
}
const collapsed = ref(readCollapsed())
function toggle() {
collapsed.value = !collapsed.value
persistCollapsed(collapsed.value)
}
watch(collapsed, (v) => persistCollapsed(v))
</script>
<template>
<aside v-if="guide" class="operation-guide" :class="{ 'is-collapsed': collapsed }" aria-label="当前页面操作提示">
<div class="og-head">
<span class="og-title">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><circle cx="12" cy="12" r="9"></circle><path d="M12 11v5"></path><path d="M12 8h.01"></path></svg>
当前页面操作提示
</span>
<button type="button" class="og-toggle" :aria-expanded="!collapsed" @click="toggle">
{{ collapsed ? '展开提示' : '收起提示' }}
</button>
</div>
<div v-show="!collapsed" class="og-body">
<p class="og-text">{{ guide.text }}</p>
<ol v-if="guide.steps.length" class="og-steps">
<li v-for="step in guide.steps" :key="step">{{ step }}</li>
</ol>
</div>
</aside>
</template>
<style scoped>
.operation-guide {
display: flex; flex-direction: column;
margin: 0 0 18px; padding: 12px 16px;
border: 1px solid #cddbe6; border-radius: 12px;
background: linear-gradient(180deg, #fbfdfe, #f4f8fc);
box-shadow: 0 10px 26px -24px rgba(39, 67, 94, 0.3);
color: var(--admin-text);
}
.operation-guide.is-collapsed { padding: 8px 16px; }
.og-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.og-title {
display: inline-flex; align-items: center; gap: 7px;
font-size: 13px; font-weight: 650; color: var(--admin-primary-strong);
}
.og-title svg { width: 15px; height: 15px; }
.og-toggle {
padding: 0; border: 0; background: none; cursor: pointer;
font: inherit; font-size: 12px; color: #6b8096;
}
.og-toggle:hover { color: var(--admin-primary-strong); }
.og-body { margin-top: 8px; padding-left: 22px; }
.og-text { margin: 0; color: #40586e; font-size: 13px; line-height: 1.7; }
.og-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.og-steps li {
padding: 2px 10px; border-radius: 999px;
background: #e9f1f8; border: 1px solid #d3e0ea;
color: #2f4a63; font-size: 12px; line-height: 1.7;
}
</style>
@@ -1,139 +0,0 @@
/**
* 每菜单页的操作提示(guides)文案,对齐旧版 backend/static/admin-interactions.js 的 guides 表原文
* (duplicate-check 为例外页不展示)。key = 路由 meta.menuKey。
* 2026-10-14 控制方定案:提示条按 menuKey 取、不分支角色,谁能进这一页谁就看得到,
* 于是"超级管理员可用上方公司 tab 切换公司""本页全平台共享,不按公司区分"这类只描述超管观感的句子
* 会摊到普通账号脸上 —— 整批撤掉,文案回到旧版原文。tab 本身与它的接线没动。
* 反向守门:tests/align-operation-guide.test.ts 钉这几句不得回流。
*/
export interface OperationGuideData {
text: string
steps: string[]
}
export const OPERATION_GUIDE_FALLBACK: OperationGuideData = {
text: '先使用筛选定位记录,再进行新增、编辑、导出等操作。涉及删除的数据会要求二次确认。',
steps: ['选择筛选条件', '处理记录', '核对反馈'],
}
/** 折叠状态 localStorage key(沿用旧版 shufuAdminGuideCollapsed 语义)。 */
export const OPERATION_GUIDE_STORAGE_KEY = 'shufuAdminGuideCollapsed'
export const OPERATION_GUIDES: Record<string, OperationGuideData> = {
admin_users: {
text: '先用筛选定位账号,再编辑角色和菜单权限;删除账号会要求二次确认。',
steps: ['筛选账号', '编辑权限', '确认保存'],
},
admin_columns: {
text: '菜单会影响后台和软件端的可见范围。先填写名称并选择对应页面,再设置上级菜单;顺序直接拖动列表左侧手柄调整。',
steps: ['新增或调整菜单', '设置层级', '拖动排序'],
},
admin_group_manage: {
text: '数据权限分组决定"哪些账号能看到哪些店铺",分组按负责人和归属账号聚拢。',
steps: ['选择分组', '维护负责人与归属账号', '核对店铺可见范围'],
},
admin_user_secrets: {
text: '用户密钥按账号绑定,列表只展示脱敏值。可对单条立即检测连通性;清空后该用户需要重新配置密钥。',
steps: ['筛选用户或状态', '立即检测连通性', '必要时清空'],
},
admin_companies: {
text: '公司决定账号归属:新建普通账号/管理员自动落在操作者自己所在的公司,页面上不出现公司选项——要给别的公司建号,请用那个公司自己的管理员登录。唯一例外是「公司超级管理员」:由站点超管开设、需在建号弹窗中显式选择所属公司。公司只做启用/停用,不提供删除。',
steps: ['查看公司列表', '新建公司', '改名或启停'],
},
admin_dedupe_total_data: {
text: '支持按关键词、用户、分组和国家筛选;导入前先确认所选分组,导出会按日期范围生成文件。',
steps: ['选择分组', '筛选或导入', '核对并导出'],
},
admin_invalid_asin_data: {
text: '维护不符合规则的 ASIN 或品牌。添加后可使用上方筛选快速回查。',
steps: ['填写 ASIN/品牌', '选择分组', '保存并回查'],
},
admin_query_asin: {
text: '查询 ASIN 以店铺为单位维护。列表里点击 ASIN 即可复制,点右侧「配置」可一次维护该店铺所有站点的 ASIN。',
steps: ['筛选店铺', '打开配置抽屉', '保存或导出'],
},
admin_product_categories: {
text: '类目树支持展开查看层级。搜索、编辑和删除都在同一列表中完成。',
steps: ['搜索类目', '展开层级', '新增或编辑'],
},
admin_skip_price_asin: {
text: '最低价 ASIN 以店铺为单位维护。列表里点击 ASIN 即可复制,点右侧「配置」可一次维护该店铺所有站点的 ASIN 与最低价。',
steps: ['筛选店铺', '打开配置抽屉', '保存或批量导入'],
},
admin_shop_keys: {
text: '紫鸟令牌属于敏感配置。白名单状态可悬停查看检测详情,编辑前请先核对账号名称。',
steps: ['新增或筛选密钥', '查看白名单状态', '编辑或删除'],
},
admin_shop_manage: {
text: '店铺信息按分组管理。长商城名会自动缩略,悬停即可查看完整内容。',
steps: ['选择分组', '维护店铺信息', '筛选核对结果'],
},
admin_shop_data_crawl_tasks: {
text: '店铺数据任务按状态和时间筛选。批量操作前请核对已选任务。',
steps: ['筛选任务', '检查状态', '执行批量操作'],
},
admin_brand_gating: {
text: '维护不符合规则的品牌(品牌Gating / 类目Gating)。新增后可用下方筛选快速回查;云端 Gating 库与前端排查软件同步同一份数据,命中后会自动拦截。',
steps: ['新增或批量导入', '筛选回查', '按需解除或删除'],
},
admin_keyword_usage: {
text: '本页记录所有关键词操作,只读、不可删除、永久留痕可追溯;与桌面端互通:桌面复制、添加、删除关键词会自动写入本页,两端同源。',
steps: ['选择公司与筛选条件', '切换使用/删除记录', '核对操作人与时间'],
},
// admin_shop_data_duplicate_check(店铺撞款监控)为例外页:不展示全局提示条,不参与对齐。
admin_image_video_tasks: {
text: '可先使用筛选缩小任务范围,再查看任务状态、结果和权限范围。',
steps: ['设置筛选', '查看任务结果', '按需处理任务'],
},
admin_history: {
text: '生成记录可按用户和时间范围回溯,用于核对结果文件和执行时间。',
steps: ['设置时间范围', '筛选记录', '查看结果预览'],
},
admin_version: {
text: '上传版本后请核对版本号和下载链接,再通知用户更新。',
steps: ['上传压缩包', '检查版本记录', '维护历史版本'],
},
admin_tutorial: {
text: '上传新的教程压缩包后即刻生效:工具台首页「立即下载教程」以下载最新上传的包为准。确认旧包不再需要后再删除。',
steps: ['上传教程压缩包', '到工具台核对下载', '清理历史包'],
},
admin_workbench_client_package: {
text: '上传新的工作台客户端 ZIP 包后即刻生效;服务端会复算 sha256 供客户端校验。确认旧包不再需要后再删除。',
steps: ['填写版本号并上传 ZIP', '核对版本与 sha256', '清理历史包'],
},
digital_human_version: {
text: '数字人版本需先上传草稿,再发布并标记最新版本。',
steps: ['上传草稿', '确认更新日志', '发布或设为最新'],
},
admin_device_logs: {
text: '桌面客户端与麦象采集机上报的日志按来源、日期和关键字筛选;可查看日志尾部、下载完整文件或删除云端记录,云端日志按保留期自动清理。',
steps: ['选择来源与日期', '查看或下载日志', '必要时删除'],
},
admin_user_secret_usage: {
text: '按日期范围统计各用户的密钥调用次数(货源查询与外观专利按 LLM 请求次数、代理按提取次数),用于评估用户资源损耗。',
steps: ['选择日期范围', '筛选用户或分组', '核对各模块次数'],
},
admin_task_center: {
text: '按账号、业务、状态、店铺和创建时间筛出客户端任务,点任务查看明细与分组结果;顶部汇总卡给当前在跑与疑似卡住的总量。',
steps: ['按条件筛任务', '查看任务明细', '核对汇总卡'],
},
admin_appearance_patent_clean_items: {
text: '本页只读:出表成功后「结论=无侵权」的明细自动同步到这里,按分公司隔离分页展示;支持任务号/ASIN/国家/同步日期筛选,下载原表请到任务中心取结果文件。',
steps: ['筛选记录', '核对结论明细', '到任务中心下载原表'],
},
admin_jd_database: {
// 2026-11-17 分类管理子菜单并入本页(用户口径「京东分类管理并到京东数据库分类编辑里」,
// 原 admin_jd_category_manage 条目随之摘除):分类建/改名/删在工具栏「分类管理」。
text: '本页只读:客户端采集的京东店铺商品自动同步到这里(同店铺同商品只保留最新一次),按分公司隔离分页展示;点行查看全部属性与图片;分类的新建/改名/删除在工具栏「分类管理」,给商品归类先勾选再「批量编辑分类」。',
steps: ['筛选商品记录', '查看属性与图片明细', '用「分类管理」维护分类并批量归类'],
},
}
/** 全部有独立/兜底提示的后台业务菜单 key。 */
export const OPERATION_GUIDE_MENU_KEYS = Object.keys(OPERATION_GUIDES)
/** 返回指定菜单 key 的提示数据;menuKey 不在已知集合时返回 null(登录/404 等页面不展示)。 */
export function operationGuideFor(menuKey: unknown): OperationGuideData | null {
if (typeof menuKey !== 'string' || !menuKey) return null
return OPERATION_GUIDES[menuKey] ?? null
}
@@ -166,7 +166,7 @@ async function create(): Promise<void> {
/>
</el-select>
</el-form-item>
<el-form-item v-if="expiryEditable" label="到期时间(留空 = 永不过期;到期后该账号及其名下账号将停用)">
<el-form-item v-if="expiryEditable" label="到期时间(留空 = 永不过期)">
<el-date-picker
v-model="form.expiresAt"
type="datetime"
@@ -176,7 +176,7 @@ async function create(): Promise<void> {
style="width: 240px"
/>
</el-form-item>
<el-form-item label="菜单权限(勾选上级菜单会继承全部子菜单)">
<el-form-item label="菜单权限">
<div class="auth-tree-box">
<!-- 授权树按账号平台收(2026-11-17 用户口径):京东 tab 只给京东侧菜单。
平台不再手选(跟随当前 tab),树收窄的判定出口不变。 -->
@@ -137,7 +137,7 @@ async function save(): Promise<void> {
<el-form-item label="用户名">
<el-input :model-value="form.username" readonly />
</el-form-item>
<el-form-item label="新密码(不修改可留空)" :error="errors.password">
<el-form-item label="新密码" :error="errors.password">
<el-input
v-model="form.password"
type="password"
@@ -156,7 +156,7 @@ async function save(): Promise<void> {
<el-form-item v-if="targetIsCompanySuperAdmin" label="角色">
<el-input model-value="公司超级管理员" readonly />
</el-form-item>
<el-form-item v-if="expiryEditable" label="到期时间(清空 = 永不过期;到期后该账号及其名下账号将停用)">
<el-form-item v-if="expiryEditable" label="到期时间(清空 = 永不过期)">
<el-date-picker
v-model="form.expiresAt"
type="datetime"
@@ -178,7 +178,7 @@ async function save(): Promise<void> {
<el-form-item v-if="props.user && props.user.creatorUsername" label="所属管理员">
<el-input :model-value="props.user.creatorUsername" readonly />
</el-form-item>
<el-form-item label="菜单权限(勾选上级菜单会继承全部子菜单)">
<el-form-item label="菜单权限">
<div class="auth-tree-box">
<!-- 授权树按账号平台收(2026-11-17 用户口径):京东档账号不再整树混发亚马逊菜单。
平台不再手选(跟随当前平台 tab,编辑取行值),树收窄的判定出口不变。 -->
@@ -264,7 +264,6 @@ onMounted(loadMenus)
<h3>菜单列表</h3>
<button class="btn" type="button" @click="openCreate">新增菜单</button>
</div>
<p class="columns-drag-tip">拖动每行左侧的手柄可调整同级菜单的显示顺序,松开后自动保存。</p>
<div class="form-row menus-filter-row">
<div class="form-group" style="min-width: 200px">
@@ -423,11 +422,6 @@ h3 {
justify-content: space-between;
gap: 12px;
}
.columns-drag-tip {
margin: 10px 0 16px;
font-size: 13px;
color: #5b6f83;
}
.menus-filter-row {
margin: 0 0 16px;
}
@@ -79,10 +79,7 @@ async function save() {
<div v-if="modelValue" class="modal-mask" @click.self="close">
<div class="modal" role="dialog" aria-modal="true" aria-labelledby="proxy-entry-title">
<h3 id="proxy-entry-title">{{ locked ? '改代理' : '代填代理' }}</h3>
<p class="modal-note">
为「{{ username || '该用户' }}」写入代理。出于凭据保护,后台不再下发已存的提取链接原文,
这里每次都重新填写;保存后界面只显示脱敏后的地址(不含 key/pwd)。
</p>
<p class="modal-note">为「{{ username || '该用户' }}」写入代理;出于凭据保护每次需重新填写,保存后只显示脱敏地址。</p>
<div class="form-group">
<label>代理供应商</label>
@@ -126,7 +126,6 @@ onMounted(load)
<section class="panel-box">
<div class="usage-head">
<h3>密钥用量统计</h3>
<span class="usage-note">口径:真实对外请求次数(LLM 每次请求、代理每次成功提取)</span>
</div>
<div class="summary-row">
@@ -256,10 +255,6 @@ h3 {
gap: 12px;
margin-bottom: 16px;
}
.usage-note {
color: #7d8fa2;
font-size: 12px;
}
.summary-row {
display: flex;
flex-wrap: wrap;
@@ -358,7 +358,7 @@ onMounted(load)
<input v-model="keyword" type="text" placeholder="模糊搜索用户名" @keyup.enter="search" />
</div>
<div class="form-group" style="min-width: 170px">
<label>状态(三项都通过才算通过)</label>
<label>状态</label>
<!-- 2026-11-17 用户口径「和亚马逊不统一」:原生 select 的弹层是浏览器直角原生物
⇒ 换 el-select(admin-filter 同壳 42px/9px 圆角,弹层是 EP 圆角面板)。
「全部状态」仍是 STATUS_OPTIONS 里的空串档(下游 checkStatus 照旧传 ''→undefined);
@@ -386,7 +386,7 @@ onMounted(load)
class="btn btn-ghost"
type="button"
:disabled="balanceLoading || !rows.length"
:title="balanceNotice || '余额是实时查上游、不落库;这两列没取到时显示 —,不是 0'"
:title="balanceNotice || '余额是实时查上游、不落库'"
@click="loadBalances"
>
{{ balanceLoading ? '余额查询中…' : '刷新余额' }}
@@ -437,7 +437,7 @@ onMounted(load)
<div class="module-cell">
<span v-if="row.similarAsin?.exists" class="mono-mask" :title="moduleTooltip(row.similarAsin)">{{ row.similarAsin.masked }}</span>
<span v-else class="empty-value">未配置</span>
<span v-if="row.similarAsin?.exists" class="wh-pill is-source" title="该用户这把密钥所属渠道">
<span v-if="row.similarAsin?.exists" class="wh-pill is-source">
{{ llmSourceLabel(row.similarAsin.channel) }}
</span>
<span class="wh-pill" :class="moduleStatusBand(row.similarAsin).tone" :title="moduleTooltip(row.similarAsin)">
@@ -449,7 +449,7 @@ onMounted(load)
<div class="module-cell">
<span v-if="row.appearancePatent?.exists" class="mono-mask" :title="moduleTooltip(row.appearancePatent)">{{ row.appearancePatent.masked }}</span>
<span v-else class="empty-value">未配置</span>
<span v-if="row.appearancePatent?.exists" class="wh-pill is-source" title="该用户这把密钥所属渠道">
<span v-if="row.appearancePatent?.exists" class="wh-pill is-source">
{{ llmSourceLabel(row.appearancePatent.channel) }}
</span>
<span class="wh-pill" :class="moduleStatusBand(row.appearancePatent).tone" :title="moduleTooltip(row.appearancePatent)">
@@ -472,7 +472,7 @@ onMounted(load)
<span v-if="row.proxy?.exists" class="mono-mask" :title="moduleTooltip(row.proxy)">{{ proxyDisplayText(row.proxy) }}</span>
<span v-else class="empty-value">未配置</span>
<span class="module-cell-pills">
<span v-if="row.proxy?.exists" class="wh-pill is-source" title="该用户代理所属供应商">
<span v-if="row.proxy?.exists" class="wh-pill is-source">
{{ proxySourceLabel(row.proxy.channel) }}
</span>
<span class="wh-pill" :class="moduleStatusBand(row.proxy).tone" :title="moduleTooltip(row.proxy)">
@@ -481,7 +481,7 @@ onMounted(load)
<span
v-if="row.proxy?.locked"
class="wh-pill is-locked"
title="已由管理员代填并锁定:客户端不可修改或清空"
title="已由管理员代填并锁定"
>
已锁定
</span>
@@ -240,11 +240,9 @@ onMounted(() => {
<h3>用户列表</h3>
<button class="btn" type="button" @click="openCreate">新建用户</button>
</div>
<p class="users-desc">当前没有开放注册入口,仅管理员可在此创建用户。层级关系:超级管理员 -&gt; 管理员 -&gt; 普通账号。</p>
<div class="form-row users-filter-row">
<div class="form-group" style="min-width: 180px">
<label>用户名(模糊搜索)</label>
<label>用户名</label>
<input v-model="filters.keyword" type="text" placeholder="输入用户名关键字" @keyup.enter="search" />
</div>
<div v-if="isSuperAdmin" class="form-group" style="min-width: 160px">
@@ -72,10 +72,7 @@ async function submit(): Promise<void> {
<h3>批量编辑分类<span v-if="ownerGroupName" class="modal-sub">· {{ ownerGroupName }}</span></h3>
<button class="modal-close" type="button" aria-label="关闭" @click="emit('close')">×</button>
</div>
<p class="modal-tip">
已勾选 {{ selectedIds.length }} 个商品(翻页累计)。选目标分类后确认;
归类只记在分类归属上,不影响采集对价格/库存的更新。
</p>
<p class="modal-tip">已勾选 {{ selectedIds.length }} 个商品(翻页累计)。</p>
<p v-if="errorText" class="group-error">{{ errorText }}</p>
<div v-if="!categories.length" class="batch-empty">本组暂无分类,先用工具栏「分类管理」新建一个</div>
@@ -299,7 +299,7 @@ function cancelShopRename(): void {
<!-- 树外兜底:授权树里搜不到的历史末级名(别店未上报 / 京麦改过类目体系)。
不藏——藏了这些商品就点不到;也不冒充树内节点,单列一组说清来路。 -->
<template v-if="catalog.orphans.length">
<p class="jd-side-group-head">平台树外(历史类目)</p>
<p class="jd-side-group-head">平台树外</p>
<div
v-for="row in catalog.orphans"
:key="`orphan:${row.name}`"
@@ -317,7 +317,7 @@ function cancelShopRename(): void {
</div>
</template>
<p v-if="!visibleCatalogRows.length && !catalog.orphans.length" class="jd-side-empty">
还没有采集到类目数据(先采集一次店铺即有)
还没有采集到类目数据
</p>
</div>
</div>
@@ -575,7 +575,7 @@ function cancelShopRename(): void {
color: #409eff;
}
/* 「平台树外(历史类目)」分组头:单列一条,不冒充树内节点。 */
/* 「平台树外」分组头:单列一条,不冒充树内节点。 */
.jd-side-group-head {
margin: 8px 0 2px;
padding: 0 8px;
@@ -852,11 +852,9 @@ onMounted(async () => {
</div>
</div>
<!-- 商品行写只对超管级(平台超管+公司超管)开放(2026-11-23 客户口径),管理人员与
普通账号看到只读提示;分类写由当前分组 editable 决定(2026-11-23 起 admin 对
全部可见 jd 分组可写),分类维护入口=侧栏「分类管理」(只读可看,写控件按
editable 分档)。 -->
<span v-if="!canWriteProducts" class="jd-readonly-tip">只读:编辑/删除需超级管理员或公司超级管理员;分类在左侧「分类管理」查看与维护</span>
<!-- 商品行写只对超管级(平台超管+公司超管)开放(2026-11-23 客户口径),写控件按
权限直接隐藏(2026-11-28 精简口径:常驻只读 tip 删);分类写由当前分组 editable
决定,分类维护入口=侧栏「分类管理」。 -->
</section>
<div class="jd-body">
@@ -185,7 +185,7 @@ function dash(value: string | number | null | undefined): string {
</section>
<section v-if="attrGroups.length" class="detail-block">
<h4>属性与设置(按京麦 Tab 分组)</h4>
<h4>属性与设置</h4>
<div v-for="group in attrGroups" :key="group.groupName" class="attr-group">
<h5>{{ group.groupName }}</h5>
<table>
@@ -232,7 +232,7 @@ function dash(value: string | number | null | undefined): string {
</table>
</div>
</template>
<p v-else class="drawer-tip">暂无 SKU 矩阵(V198 之前采集的旧行需重新采集)</p>
<p v-else class="drawer-tip">暂无 SKU 矩阵</p>
</section>
<section class="detail-block">
@@ -229,7 +229,7 @@ function dash(value: string | number | null | undefined): string {
<input v-model="form.categoryPath" type="text" />
</div>
<div class="edit-item">
<label>货号(系统生成=行号,可改)</label>
<label>货号</label>
<input v-model="form.itemNum" type="text" />
</div>
<div class="edit-item">
@@ -249,18 +249,18 @@ function dash(value: string | number | null | undefined): string {
<input v-model="form.stockTotal" type="text" inputmode="numeric" />
</div>
<div class="edit-item">
<label>商品编码(只读)</label>
<label>商品编码</label>
<input type="text" :value="dash(item?.productCode)" readonly class="readonly" />
</div>
<div class="edit-item">
<label>信息分(只读)</label>
<label>信息分</label>
<input type="text" :value="dash(item?.healthScore)" readonly class="readonly" />
</div>
</div>
</section>
<section v-if="draftAttrGroups.length" class="detail-block">
<h4>属性与设置(键值可改,行可删)</h4>
<h4>属性与设置</h4>
<div v-for="group in draftAttrGroups" :key="group.groupName" class="attr-group">
<h5>{{ group.groupName }}</h5>
<table>
@@ -280,7 +280,7 @@ function dash(value: string | number | null | undefined): string {
<p v-else class="drawer-tip">暂无属性</p>
<section class="detail-block">
<h4>SKU 矩阵(京东价 / 库存可改)</h4>
<h4>SKU 矩阵</h4>
<template v-if="draftSkus.length">
<div class="sku-table-wrap">
<table class="sku-table">
@@ -311,7 +311,7 @@ function dash(value: string | number | null | undefined): string {
</table>
</div>
</template>
<p v-else class="drawer-tip">暂无 SKU 矩阵(V198 之前采集的旧行需重新采集)</p>
<p v-else class="drawer-tip">暂无 SKU 矩阵</p>
</section>
<JdProductImageManager
@@ -324,7 +324,7 @@ function dash(value: string | number | null | undefined): string {
/>
<div v-if="saveError" class="drawer-failure">{{ saveError }}</div>
<p class="save-hint">保存后该商品转为人工维护,后续采集不再覆盖它的数据(含本单重爬);删除的图片文件一并从存储桶清理(共用的保留);替换 / 新增图片立即生效并同样置锁。</p>
<p class="save-hint">保存后转为人工维护,采集不再覆盖。</p>
</template>
</div>
@@ -146,7 +146,7 @@ const markedCount = computed(() => deleteImageIds.value.size)
>{{ uploadingImageId === image.id ? '上传中...' : '替换' }}</button>
</div>
</div>
<p v-else class="drawer-tip">暂无图片(可点右上「+ 新增主图」上传本地图)</p>
<p v-else class="drawer-tip">暂无图片</p>
<p v-if="uploadError" class="drawer-failure">{{ uploadError }}</p>
<p v-if="markedCount" class="delete-count">已标记删除 {{ markedCount }} 张,保存后剩余 {{ images.length - markedCount }} 张</p>
</section>
@@ -106,10 +106,7 @@ async function submit(): Promise<void> {
<h3>添加店铺<span v-if="categoryName" class="modal-sub">· {{ categoryName }}</span></h3>
<button class="modal-close" type="button" aria-label="关闭" @click="emit('close')">×</button>
</div>
<p class="modal-tip">
从已采集商品的店铺里勾选,或手动输入名单里还没有的店铺名;
一次最多添加 {{ MAX_ADD_SHOPS }} 个,已有的会自动跳过。
</p>
<p class="modal-tip">一次最多添加 {{ MAX_ADD_SHOPS }} 个,已有的会自动跳过。</p>
<p v-if="errorText" class="group-error">{{ errorText }}</p>
<!-- 候选搜索:关键词包含匹配(服务端 DISTINCT+like),Enter 或按钮触发。 -->
@@ -126,7 +123,7 @@ async function submit(): Promise<void> {
<ul class="shop-candidate-list">
<li v-if="searching" class="shop-list-tip">搜索中...</li>
<li v-else-if="!candidates.length && searched" class="shop-list-tip">没有可添加的候选店铺(已采商品的店铺都在名单里了,试试手动输入)</li>
<li v-else-if="!candidates.length && searched" class="shop-list-tip">没有可添加的候选店铺</li>
<li
v-for="name in candidates"
:key="name"
@@ -104,21 +104,6 @@ onMounted(() => {
<div class="auth-visual-copy">
<span class="auth-kicker">数富AI · 运营工作台</span>
<h2 class="auth-visual-title">让每一次运营动作,都有清晰的工作流。</h2>
<p class="auth-visual-description">统一管理数据、店铺、任务与版本,让团队在一个可靠的运营工作台中快速协作。</p>
<ul class="auth-feature-list" aria-label="工作台能力">
<li class="auth-feature-item">
<span class="auth-feature-icon" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 3 4 7v5c0 4.5 3.4 7.7 8 9 4.6-1.3 8-4.5 8-9V7l-8-4Z"></path><path d="m8.5 12 2.2 2.2 4.8-5"></path></svg></span>
<span>权限隔离,操作边界清晰可控</span>
</li>
<li class="auth-feature-item">
<span class="auth-feature-icon" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M12 8v4l3 2"></path><circle cx="12" cy="12" r="9"></circle><path d="M3 4v5h5"></path><path d="M3.5 9A9 9 0 0 1 19 5.5"></path></svg></span>
<span>任务状态,进度反馈及时透明</span>
</li>
<li class="auth-feature-item">
<span class="auth-feature-icon" aria-hidden="true"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19V5"></path><path d="M4 19h16"></path><path d="m7 15 3-4 3 2 4-6"></path><path d="M17 7h3v3"></path></svg></span>
<span>数据工具,支撑日常电商运营</span>
</li>
</ul>
</div>
</div>
<div class="auth-visual-footer">
@@ -132,7 +117,6 @@ onMounted(() => {
<header class="login-card-header">
<p class="login-card-eyebrow">欢迎回来</p>
<h1 class="login-title" id="loginTitle">登录工作台</h1>
<p class="login-subtitle">使用管理员账号进入数富AI运营后台。</p>
</header>
<form novalidate @submit.prevent="submit">
<p v-if="kickedNotice" class="kicked-msg" role="alert">该账号已在其他设备登录,本设备已下线。如非本人操作,请及时修改密码。</p>
@@ -165,7 +149,6 @@ onMounted(() => {
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12 3 4 7v5c0 4.5 3.4 7.7 8 9 4.6-1.3 8-4.5 8-9V7l-8-4Z"></path><path d="m8.5 12 2.2 2.2 4.8-5"></path></svg>
<span>请勿在公共设备保存账号凭据。登录状态由本地安全会话管理。</span>
</p>
<footer class="login-card-footer">数富AI · 电商运营管理工作台</footer>
</section>
</main>
</div>
@@ -242,15 +225,6 @@ button, input { font: inherit; }
max-width: 560px; margin: 18px 0;
font-size: clamp(30px, 4vw, 52px); font-weight: 700; letter-spacing: -1.8px; line-height: 1.12;
}
.auth-visual-description { max-width: 470px; margin: 0; color: #60748a; font-size: 16px; line-height: 1.75; }
.auth-feature-list { display: grid; gap: 12px; margin: 34px 0 0; padding: 0; list-style: none; }
.auth-feature-item { display: flex; align-items: center; gap: 12px; color: #465d73; }
.auth-feature-icon {
display: inline-flex; align-items: center; justify-content: center;
flex: 0 0 30px; width: 30px; height: 30px;
border: 1px solid #c2d3e3; border-radius: 9px; background: #edf5fb; color: #2f5d8b;
}
.auth-feature-icon svg { width: 16px; height: 16px; }
.auth-visual-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #778b9f; font-size: 12px; }
.auth-system-status { display: inline-flex; align-items: center; gap: 7px; color: #3d7158; }
.auth-system-status::before {
@@ -274,7 +248,6 @@ button, input { font: inherit; }
.login-card-header { margin-bottom: 30px; }
.login-card-eyebrow { margin: 0 0 8px; color: #71859a; font-size: 15px; font-weight: 700; letter-spacing: 1.2px; }
.login-title { margin: 0; font-size: 30px; font-weight: 700; letter-spacing: -0.8px; line-height: 1.2; }
.login-subtitle { margin: 10px 0 0; color: #5b6f83; line-height: 1.65; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: #5b6f83; font-size: 13px; font-weight: 600; }
@@ -345,7 +318,6 @@ button, input { font: inherit; }
.login-security-note { display: flex; align-items: flex-start; gap: 9px; margin: 22px 0 0; color: #71859a; font-size: 12px; line-height: 1.55; }
.login-security-note svg { flex: 0 0 auto; width: 16px; height: 16px; margin-top: 1px; color: #4e806d; }
.login-card-footer { margin-top: 34px; padding-top: 18px; border-top: 1px solid #dce5ee; color: #778b9f; font-size: 12px; text-align: center; }
@media (max-width: 900px) {
.auth-page { display: block; }
@@ -410,7 +410,7 @@ onMounted(() => {
</tr>
<tr v-else>
<td colspan="9" class="empty-tip">
{{ sourceFilter || uidFilter ? '暂无匹配日志' : '暂无日志上报(客户端/采集机上报后自动出现在这里)' }}
{{ sourceFilter || uidFilter ? '暂无匹配日志' : '暂无日志上报' }}
</td>
</tr>
</tbody>
@@ -443,7 +443,7 @@ onMounted(() => {
<el-dialog v-model="configVisible" title="采集配置" width="720px">
<div class="config-block">
<h4>全局默认模式</h4>
<p class="config-desc">对未单独配置的终端生效。全量=上传日志目录内全部文件;精选=排除低价值大日志(客户端排除 pywebview;麦象排除 kk-browser / 控制台 / 测试日志)。终端在下一次上报周期(约 1 分钟内)跟随新配置。</p>
<p class="config-desc">对未单独配置的终端生效。全量=上传日志目录内全部文件;精选=排除低价值大日志。终端在下一次上报周期(约 1 分钟内)跟随新配置。</p>
<div class="mode-switch">
<button
v-for="option in MODE_OPTIONS"
@@ -305,7 +305,7 @@ onMounted(load)
</section>
<el-dialog v-model="uploadVisible" title="上传数字人版本" width="560px">
<p class="upload-desc">上传数字人程序 ZIP 包,系统会自动计算 MD5 并存储到 OSS。上传后状态为草稿,需要手动发布。</p>
<p class="upload-desc">上传后状态为草稿,需要手动发布。</p>
<el-form label-width="110px">
<el-form-item label="版本号" required>
<el-input v-model="form.version" placeholder="如 1.0.2" />
@@ -215,7 +215,6 @@ onMounted(load)
</section>
<el-dialog v-model="uploadVisible" title="上传新版本" width="520px">
<p class="upload-desc">上传软件 ZIP 包,系统会自动计算 MD5 并存储到 OSS。</p>
<el-form label-width="110px">
<el-form-item label="版本号" required>
<el-input v-model="newVersion" placeholder="例如:1.0.0" />
@@ -398,12 +397,6 @@ h3 {
color: #8293a5;
font-size: 13.5px;
}
.upload-desc {
margin: 0 0 12px;
color: #5b6f83;
font-size: 12.5px;
line-height: 1.6;
}
.zip-hint {
margin: 4px 0 0;
color: #5b6f83;
@@ -281,11 +281,9 @@ onMounted(load)
</section>
<el-dialog v-model="uploadVisible" title="上传教程包" width="520px">
<p class="upload-desc">上传教程 ZIP 包后,工具台首页「立即下载教程」将以下载该包为准(以最新上传的为主)。</p>
<el-form label-width="110px">
<el-form-item label="版本号">
<el-input v-model="newVersion" placeholder="例如:v2026.09 或留空" maxlength="64" />
<p class="zip-hint">仅作展示与排序用,可留空;不影响工具台按最新上传下载</p>
</el-form-item>
<el-form-item label="ZIP 压缩包" required>
<el-upload :auto-upload="false" :limit="1" accept=".zip" :on-change="(file: any) => onFileChange(file.raw)" :on-remove="() => (pickedFile = null)">
@@ -520,12 +518,6 @@ h3 {
color: #8293a5;
font-size: 13.5px;
}
.upload-desc {
margin: 0 0 12px;
color: #5b6f83;
font-size: 12.5px;
line-height: 1.6;
}
.zip-hint {
margin: 4px 0 0;
color: #5b6f83;
@@ -176,7 +176,6 @@ onMounted(load)
<button class="btn" type="button" @click="openUpload">上传客户端包</button>
</div>
</div>
<p class="page-hint">最新上传的一条即当前生效版本。</p>
<LoadFailureBar v-if="loadFailure" :message="loadFailure" @retry="load" />
<div class="table-scroll workbench-table-scroll">
@@ -238,11 +237,10 @@ onMounted(load)
</section>
<el-dialog v-model="uploadVisible" title="上传客户端包" width="540px">
<p class="upload-desc">上传数富AI工作台客户端 ZIP 包后,客户端会从公开版本接口自动检测到新版本并升级;服务端会复算 sha256 供客户端校验。</p>
<el-form label-width="110px">
<el-form-item label="版本号" required>
<el-input v-model="newVersion" :placeholder="`例如:1.0.113(纯数字 x.y.z,最长 ${WORKBENCH_CLIENT_VERSION_MAX_LENGTH} 字符)`" :maxlength="WORKBENCH_CLIENT_VERSION_MAX_LENGTH" />
<p class="zip-hint">客户端按版本号判断是否需要升级,必填;不要带 v 前缀</p>
<p class="zip-hint">必填;不要带 v 前缀</p>
</el-form-item>
<el-form-item label="ZIP 压缩包" required>
<el-upload :auto-upload="false" :limit="1" accept=".zip" :on-change="(file: any) => onFileChange(file.raw)" :on-remove="() => (pickedFile = null)">
@@ -318,19 +316,6 @@ h3 {
border-color: #5f85ad;
box-shadow: 0 0 0 3px rgba(95, 133, 173, 0.16);
}
.page-hint {
margin: -6px 0 14px;
color: #5b6f83;
font-size: 12.5px;
}
.page-hint code {
padding: 1px 6px;
border-radius: 5px;
background: #edf4fa;
color: #2f5d8b;
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
font-size: 12px;
}
.btn {
display: inline-flex;
align-items: center;
@@ -459,12 +444,6 @@ h3 {
color: #8293a5;
font-size: 13.5px;
}
.upload-desc {
margin: 0 0 12px;
color: #5b6f83;
font-size: 12.5px;
line-height: 1.6;
}
.zip-hint {
margin: 4px 0 0;
color: #5b6f83;
@@ -263,7 +263,7 @@ onMounted(load)
<th style="width: 140px">紫鸟账号名称</th>
<th style="width: 160px">紫鸟令牌</th>
<th style="width: 90px">代理</th>
<th style="width: 110px">白名单状态 <span class="table-help" aria-hidden="true">?</span></th>
<th style="width: 110px">白名单状态</th>
<th style="width: 160px">创建时间</th>
<th style="width: 160px">修改时间</th>
<th style="width: 245px">操作</th>
@@ -348,7 +348,7 @@ onMounted(load)
placeholder="留空直连;形如 http://host:port 或 http://user:pass@host:port"
/>
<div class="form-hint">
仅当该账号的服务器出口 IP 不在紫鸟白名单时填写:代理 IP 需已由紫鸟公司加白,留空则直连。
仅当出口 IP 不在紫鸟白名单时填写;代理 IP 需已加白。
</div>
</el-form-item>
</el-form>
@@ -527,19 +527,6 @@ h3 {
.shop-key-table-scroll tbody tr:last-child td {
border-bottom: 0;
}
.table-help {
display: inline-flex;
align-items: center;
justify-content: center;
width: 14px;
height: 14px;
margin-left: 3px;
border-radius: 50%;
background: #c7d7e5;
color: #fff;
font-size: 10px;
line-height: 1;
}
.mono-mask {
font-family: Consolas, "Cascadia Mono", monospace;
font-size: 12.5px;
@@ -324,10 +324,10 @@ onUnmounted(() => {
<div class="tc-head">
<div class="tabs">
<button class="tab" :class="{ active: activeTab === 'tasks' }" type="button" @click="switchTab('tasks')">
客户端任务 <span class="t-count" title="当前在跑任务数,与上方「进行中任务」同源">{{ runningBadge ?? '—' }}</span>
客户端任务 <span class="t-count">{{ runningBadge ?? '—' }}</span>
</button>
<button class="tab" :class="{ active: activeTab === 'variant' }" type="button" @click="switchTab('variant')">
变体采集 <span class="t-count" title="麦象变体采集任务条数(全部状态),「—」= 还没查到">{{ variantTotal ?? '—' }}</span>
变体采集 <span class="t-count">{{ variantTotal ?? '—' }}</span>
</button>
</div>
<div class="tc-head-tools">
@@ -340,22 +340,18 @@ onUnmounted(() => {
<div class="tc-card">
<span class="tc-card-label">总店铺</span>
<span class="tc-card-value">{{ overview?.shopTotal ?? '—' }}</span>
<span class="tc-card-note">店铺库内可见店铺</span>
</div>
<div class="tc-card">
<span class="tc-card-label">在跑店铺</span>
<span class="tc-card-value is-ok">{{ overview?.shopRunning ?? '—' }}</span>
<span class="tc-card-note">有进行中任务的店铺</span>
</div>
<div class="tc-card">
<span class="tc-card-label">进行中任务</span>
<span class="tc-card-value">{{ overview?.runningTasks ?? '—' }}</span>
<span class="tc-card-note">含品牌检测</span>
</div>
<div class="tc-card">
<span class="tc-card-label">今日完成</span>
<span class="tc-card-value">{{ overview?.todayFinishedTasks ?? '—' }}</span>
<span class="tc-card-note">终态且完成于今日</span>
</div>
<div class="tc-card">
<span class="tc-card-label">疑似卡住</span>
@@ -372,7 +368,6 @@ onUnmounted(() => {
<section class="panel-box">
<div class="box-head">
<h3>任务筛选</h3>
<span class="box-note">默认列出执行中的任务(待执行/已排期并入执行中口径),条数与上方「进行中任务」同源;看历史请换状态或选创建时间</span>
</div>
<div class="form-row">
<div class="form-group" style="min-width: 160px">
@@ -406,7 +401,6 @@ onUnmounted(() => {
>
<el-option v-for="shop in shopOptions" :key="shop" :label="shop" :value="shop" />
</el-select>
<span class="filter-tip">精确匹配店铺名</span>
</div>
<div class="form-group" style="min-width: 190px">
<label>创建时间(起)</label>
@@ -444,7 +438,6 @@ onUnmounted(() => {
<section class="panel-box">
<div class="box-head">
<h3>变体采集(麦象批量任务)</h3>
<span class="box-note">数据来自麦象平台,范围限本组账号,默认全部状态(待执行/处理中/成功/失败)</span>
</div>
<div class="form-row">
<div class="form-group" style="min-width: 150px">
@@ -660,22 +653,9 @@ h3 {
gap: 12px;
margin-bottom: 14px;
}
.box-note {
color: #8598ab;
font-size: 12.5px;
}
.shop-filter {
position: relative;
}
/* 提示行必须退出列流:.form-row 是 align-items: flex-end,组内多一行会把「店铺」label 顶得比别的筛选项高。 */
.filter-tip {
position: absolute;
left: 0;
top: calc(100% + 4px);
white-space: nowrap;
color: #93a4b5;
font-size: 11.5px;
}
.form-row {
display: flex;
flex-wrap: wrap;
@@ -409,7 +409,7 @@ onMounted(() => {
</tr>
</tbody>
</table>
<div v-else-if="!pageLoading && loaded" class="g-empty">暂无数据,请先在上方新增或使用前端排查软件同步</div>
<div v-else-if="!pageLoading && loaded" class="g-empty">暂无数据,可在上方新增或同步</div>
</div>
<OldPagination
@@ -427,7 +427,6 @@ onMounted(() => {
<div class="dup-head">
<div>
<h2>店铺数据撞款监控</h2>
<p>按 ASIN×店铺×站点分析同一 ASIN 在多家自营店铺/分组内的重复上架;分组归属来自店铺管理,只读展示。</p>
</div>
</div>
@@ -504,7 +503,6 @@ onMounted(() => {
<section v-if="consoleData" class="card store-strip">
<div class="strip-head">
<span class="strip-title">店铺上架分布</span>
<span class="strip-note">各店铺在本批站点中的上架记录量(含重复扫描)</span>
</div>
<div class="strip-bars">
<div v-for="bar in pagedDistBars" :key="bar.name" class="s-bar">
@@ -603,7 +601,7 @@ onMounted(() => {
</div>
<OldPagination :total="totalDupCount" :page="matrixPage" :page-size="matrixPageSize" @change="goMatrixPage" @size-change="changeMatrixSize" />
<div class="section-title" style="margin-top:24px">撞款详情 <span class="hint">同一 ASIN 在多家店铺的上架时间明细</span></div>
<div class="section-title" style="margin-top:24px">撞款详情</div>
<div v-if="dupItems.length" class="dup-grid">
<div v-for="item in dupItems" :key="item.asin" class="dup-card">
<div class="dup-head">
@@ -719,7 +717,6 @@ onMounted(() => {
</button>
</div>
<div class="drawer-body">
<p class="note">分组归属来自「店铺管理」的真实店铺分组,仅用于本页分组撞款范围切换;本页不做分组编辑。如需调整店铺所属分组,请到店铺管理维护(会影响对应负责人的数据查看范围)。</p>
<table class="d-table">
<thead><tr><th>分组</th><th>店铺数</th><th>成员店铺</th><th>组内撞款</th></tr></thead>
<tbody>
@@ -414,7 +414,7 @@ onMounted(load)
</el-drawer>
<el-dialog v-model="permissionVisible" title="视频任务记录权限配置" width="620px">
<p class="dim">勾选允许查看视频任务记录的用户(仅数据范围)。当前已授权 {{ permissionGrantedCount }} 人。</p>
<p class="dim">当前已授权 {{ permissionGrantedCount }} 人。</p>
<el-table :data="pagedPermissionItems" border size="small" max-height="420">
<el-table-column prop="id" label="ID" min-width="80" />
<el-table-column prop="username" label="用户名" min-width="180" />
@@ -228,7 +228,6 @@ onMounted(() => {
<section v-show="activeTab === 'usage'" class="kw-panel">
<div class="kw-panel-head">
使用记录
<span class="kw-sub">复制关键词 + 添加关键词,按时间倒序;绿色为本人的记录</span>
</div>
<div class="kw-panel-body">
<div class="kw-table-wrap" v-loading="usageLoading">
@@ -275,7 +274,6 @@ onMounted(() => {
<section v-show="activeTab === 'deletes'" class="kw-panel">
<div class="kw-panel-head">
删除记录
<span class="kw-sub">只读、不可删除、永久留痕可追溯;红色为本人的记录</span>
</div>
<div class="kw-panel-body">
<div class="kw-table-wrap" v-loading="deleteLoading">
@@ -378,12 +376,6 @@ onMounted(() => {
margin-right: 8px;
vertical-align: 1px;
}
.kw-sub {
margin-left: 8px;
font-size: 11.5px;
font-weight: 400;
color: #98a1b1;
}
.kw-panel-body {
padding: 14px 15px;
}
@@ -467,7 +467,7 @@ onMounted(load)
</section>
<el-dialog v-model="permissionVisible" title="店铺数据记录数据范围授权" width="620px">
<p class="dim">勾选允许查看/操作店铺数据记录的用户(仅数据范围)。当前已授权 {{ grantedCount }} 人。</p>
<p class="dim">当前已授权 {{ grantedCount }} 人。</p>
<el-table :data="pagedPermissionItems" border size="small" max-height="420">
<el-table-column prop="id" label="ID" min-width="80" />
<el-table-column prop="username" label="用户名" min-width="180" />
@@ -62,7 +62,7 @@ test('align_digital_human_page_wiring', () => {
assert.match(page, /page-nums/, '数字页码分页(像素复刻旧版)')
assert.match(page, /设为最新/, '按钮名对齐“设为最新”')
assert.match(page, /上传新版本/, '页头上传按钮名对齐')
assert.match(page, /上传数字人程序 ZIP 包,系统会自动计算 MD5 并存储到 OSS。上传后状态为草稿,需要手动发布/, '上传弹窗描述对齐')
assert.match(page, /上传后状态为草稿,需要手动发布/, '上传弹窗描述保留草稿态提示')
assert.match(page, /正在上传/, '上传进度文案')
assert.match(page, /digitalHumanDeleteConfirmText/, '删除确认文案走对齐模型')
assert.match(page, /fetchDigitalHumanDownloadUrl/, 'RELEASED 下载按钮点击取链接')
@@ -79,7 +79,7 @@ test('align_menu_list_loads_all_types_no_filter', () => {
test('align_menu_page_drag_and_type_wiring', () => {
const page = readSource('src/pages/account/MenusPage.vue')
assert.match(page, /拖动每行左侧的手柄可调整同级菜单的显示顺序,松开后自动保存/, '顶部拖拽提示文案对齐')
assert.doesNotMatch(page, /拖动每行左侧的手柄/, '顶部拖拽提示已按精简口径删除(2026-11-28)')
assert.match(page, /draggable/, '行手柄可拖拽')
assert.match(page, /menuSiblingGroupKey/, '拖拽分组按类型+父级')
assert.match(page, /MENU_TYPE_OPTIONS|菜单类型/, '新建/编辑弹窗含菜单类型下拉')
@@ -1,119 +1,35 @@
import test from 'node:test'
import assert from 'node:assert/strict'
import { existsSync } from 'node:fs'
import { join } from 'node:path'
import { readSource } from './helpers.ts'
import { adminPages } from '../src/router/routes.ts'
import {
OPERATION_GUIDES,
OPERATION_GUIDE_FALLBACK,
OPERATION_GUIDE_STORAGE_KEY,
operationGuideFor,
} from '../src/layout/operation-guides.ts'
/** 对齐旧版 admin-interactions.js guides 表:每业务菜单页顶部展示可折叠「当前页面操作提示」,文案沿用旧版原文;店铺撞款监控(例外)不展示。 */
/** 2026-11-28 精简口径(客户「删除多余小字,整体整洁美观」):每页顶部的「当前页面操作提示」条
* (OperationGuide.vue + operation-guides.ts 文案表)整体下线。本文件整组反向钉:组件、文案表、
* 壳层挂载点、旧文案任何一处都不许回流。 */
const EXCEPTED_KEY = 'admin_shop_data_duplicate_check'
const ROOT = process.cwd()
test('align_guide_users_matches_reference_text', () => {
const g = operationGuideFor('admin_users')
assert.ok(g)
assert.match(g.text, /^先用筛选定位账号,再编辑角色和菜单权限;删除账号会要求二次确认。/)
assert.deepEqual(g.steps, ['筛选账号', '编辑权限', '确认保存'])
})
test('align_guide_history_and_version_reference_text', () => {
assert.match(operationGuideFor('admin_history')!.text, /生成记录可按用户和时间范围回溯/)
assert.deepEqual(operationGuideFor('admin_version')!.steps, ['上传压缩包', '检查版本记录', '维护历史版本'])
})
test('align_guide_group_manage_own_text', () => {
const g = operationGuideFor('admin_group_manage')
assert.ok(g)
assert.notEqual(g, OPERATION_GUIDE_FALLBACK)
assert.deepEqual(g.steps, ['选择分组', '维护负责人与归属账号', '核对店铺可见范围'])
})
test('align_guide_duplicate_check_not_present', () => {
// 例外页:不展示提示条(不参与本轮对齐)。
assert.equal(operationGuideFor(EXCEPTED_KEY), null)
assert.equal(EXCEPTED_KEY in OPERATION_GUIDES, false)
})
test('align_guide_unknown_key_null', () => {
assert.equal(operationGuideFor(undefined), null)
assert.equal(operationGuideFor(null), null)
assert.equal(operationGuideFor('not-a-menu'), null)
assert.equal(operationGuideFor(''), null)
})
test('align_guide_every_router_page_has_guide_except_duplicate_check', () => {
// 路由注册表里的业务页除例外页外都应有独立/兜底提示。
const without = adminPages.filter((p) => p.menuKey !== EXCEPTED_KEY)
assert.ok(without.length >= 15, '业务页至少 15')
for (const page of without) {
assert.ok(operationGuideFor(page.menuKey), `缺少 guide: ${page.menuKey}`)
test('operation_guide_component_and_copy_table_are_removed', () => {
for (const rel of ['src/layout/OperationGuide.vue', 'src/layout/operation-guides.ts']) {
assert.equal(existsSync(join(ROOT, rel)), false, `${rel} 已随提示条一起删除,不得回填`)
}
})
test('align_guide_storage_key_matches_legacy', () => {
assert.equal(OPERATION_GUIDE_STORAGE_KEY, 'shufuAdminGuideCollapsed')
})
test('align_guide_component_in_layout_headline', () => {
test('operation_guide_not_referenced_in_layout_or_router', () => {
const layout = readSource('src/layout/AdminLayout.vue')
// 钉**模板挂载点**而不是 import 行(2026-10-05 修复轮 1):
// 只写 /OperationGuide/ 时,删掉模板里的 <OperationGuide /> 、留着那行 import 还是绿
// ——与 company-tab-wiring.test.ts 那条同形状,只覆盖一处等于没覆盖。
assert.match(layout, /<OperationGuide \/>/, '壳层模板必须挂着 <OperationGuide />')
const comp = readSource('src/layout/OperationGuide.vue')
assert.match(comp, /当前页面操作提示/, '标题对齐旧版 adminOperationGuide 语义')
assert.match(comp, /收起提示/, '折叠按钮文案')
assert.match(comp, /展开提示/, '展开按钮文案')
assert.match(comp, /operationGuideFor\(route\.meta\.menuKey\)/, '按菜单 key 查文案')
assert.match(comp, /OPERATION_GUIDE_STORAGE_KEY/, '折叠态读写同一 localStorage key')
// 钉**模板挂载点 + import 行**两处(与 company-tab-wiring 同形状):漏一处就是半截拆除。
assert.ok(!layout.includes('OperationGuide'), 'AdminLayout 不得再引用 OperationGuide(挂载点与 import 都算)')
assert.ok(!layout.includes('当前页面操作提示'), '提示条标题不得回流壳层')
const router = readSource('src/router/routes.ts')
assert.ok(!router.includes('operation-guide'), '路由层不得给提示条留注册口')
})
test('align_guide_fallback_shape', () => {
assert.equal(OPERATION_GUIDE_FALLBACK.steps.length, 3)
assert.ok(OPERATION_GUIDE_FALLBACK.text.length > 10)
})
/**
* 2026-10-14 控制方把公司 tab 那几句观感说明撤了:提示条按 menuKey 取、不分支角色,
* 谁能进这一页谁就看得到。「超级管理员可用上方 tab 切换」「本页全平台共享」这类只对超管成立的话
* 会摊到普通账号脸上,所以整批撤掉。这支用例是反向钉:**不允许回流**。
*
* 两把尺子:① ASCII 的 `tab`,②那四句原文(从已提交的那一版操作提示表里拿回来的,不是抄写)。
* ②单独不可信——中文串在工具链里被插进一个字就会永远匹配不上,而负向断言照样绿;
* 所以下面先钉死「这四句都含 ASCII 的 tab」,让①成为即使②坏了也还有牙的那一把。
*/
test('company_tab_copy_is_pulled_from_every_guide_and_must_not_come_back', () => {
const REMOVED = [
'\u8d85\u7ea7\u7ba1\u7406\u5458\u53ef\u7528\u9875\u9762\u4e0a\u65b9\u7684\u516c\u53f8 tab \u5207\u6362\u516c\u53f8\uff0c\u5207\u6362\u540e\u884c\u6570\u4f1a\u53d8\u5316\u2014\u2014\u884c\u6570\u53d8\u5c11\u4e0d\u662f\u6570\u636e\u4e22\u4e86\u3002',
'\u672c\u9875\u5168\u5e73\u53f0\u5171\u4eab\uff0c\u4e0d\u6309\u516c\u53f8\u533a\u5206\uff1a\u8d85\u7ea7\u7ba1\u7406\u5458\u5207\u6362\u4e0a\u65b9\u516c\u53f8 tab \u65f6\u5b83\u4e0d\u4f1a\u53d8\uff0c\u8fd9\u4e0d\u662f\u7b5b\u9009\u574f\u4e86\u3002',
'\u5e97\u94fa\u5f52\u54ea\u5bb6\u516c\u53f8\u7531\u300c\u8d1f\u8d23\u4eba\u300d\u51b3\u5b9a\uff0c\u4e0d\u7531\u516c\u53f8 tab \u51b3\u5b9a\uff1a\u8d1f\u8d23\u4eba\u9009\u81ea\u5df1\uff0c\u5e97\u94fa\u5c31\u843d\u5728\u4f60\u81ea\u5df1\u90a3\u5bb6\u3002',
'\u8d85\u7ea7\u7ba1\u7406\u5458\u5207\u6362\u4e0a\u65b9\u516c\u53f8 tab \u540e\uff0c\u5217\u8868\u53ea\u4fdd\u7559\u5f53\u524d\u516c\u53f8\u8d26\u53f7\u76f8\u5173\u7684\u5206\u7ec4\u3002',
]
const keys = Object.keys(OPERATION_GUIDES)
assert.ok(keys.length >= 20, `分母只有 ${keys.length} 页,不像整张注册表`)
// 禁句自检:四条互不相同、都够长、且都含 ASCII 锚 tab —— 少一条下面那把 ASCII 尺子就盖不住。
assert.equal(new Set(REMOVED).size, 4, '禁句清单塌了')
for (const s of REMOVED) {
assert.ok(s.length > 20, `禁句短得可疑:${s}`)
assert.ok(s.includes('tab'), `禁句不含 ASCII 锚 tab,反向断言会失明:${s}`)
}
for (const key of keys) {
const text = operationGuideFor(key)!.text
assert.equal(text.includes('tab'), false, `${key} 的文案又出现了 tab`)
for (const s of REMOVED) {
assert.equal(text.includes(s), false, `${key} 又带回了撤掉的那句:${s}`)
}
}
// fallback 会被所有没有独立文案的页共用,那四句同样不许进它。
assert.equal(OPERATION_GUIDE_FALLBACK.text.includes('tab'), false, 'tab 那句不许进 fallback')
// 撤的是文案,不是功能:tab 条还在,而且仍然只由 tab 自己表达"当前哪家"。
/** 历史反钉沿用:公司 tab 的观感说明句(「超级管理员可用上方 tab 切换」等)仍不许回流 CompanyTabs。 */
test('company_tab_copy_must_not_come_back', () => {
const tabs = readSource('src/layout/CompanyTabs.vue')
assert.ok(tabs.length > 0, '取样集非空自检:CompanyTabs.vue 读到了')
assert.equal(tabs.includes('company-tab-hint'), false, '不许有页头"当前公司"提示条')
assert.equal(tabs.includes('company-tab-hint'), false, '不许有页头「当前公司」提示条')
assert.equal(tabs.includes('当前公司'), false, '当前公司只由 is-active 的 tab 表达')
assert.ok(tabs.includes('useCompanyTabStore'), '公司 tab 本身没被一起撤掉')
})
@@ -13,7 +13,7 @@ test('align_software_version_page_wiring', () => {
assert.match(page, /发布成功/, '成功提示留驻弹窗')
assert.match(page, /uploadMsg/, '成功/失败文案在弹窗内展示')
// 上传弹窗文案(对齐 admin.html:6094-6110)。
assert.match(page, /上传软件 ZIP 包,系统会自动计算 MD5 并存储到 OSS。/, '弹窗描述对齐')
assert.doesNotMatch(page, /自动计算 MD5/, '弹窗机制描述已按精简口径删除(2026-11-28)')
assert.match(page, /上传软件版本/, '上传按钮名对齐')
assert.match(page, /上传新版本/, '弹窗标题对齐')
// 空态(对齐 admin.js:6296 暂无版本记录)。
@@ -2,7 +2,6 @@ import test from 'node:test'
import assert from 'node:assert/strict'
import { readSource } from './helpers.ts'
import { adminPages } from '../src/router/routes.ts'
import { OPERATION_GUIDES } from '../src/layout/operation-guides.ts'
/** 工作台客户端包管理页:独立渠道、上传直传、服务端 sha256。 */
@@ -54,9 +53,3 @@ test('align_workbench_client_model_parsers', () => {
assert.match(model, /isValidWorkbenchClientVersion/, '版本号必填校验')
assert.match(model, /\^\\d\+\\\.\\d\+\\\.\\d\+\$/, '版本号仅接受纯数字 x.y.z')
})
test('align_workbench_client_guide_registered', () => {
const guide = OPERATION_GUIDES.admin_workbench_client_package
assert.ok(guide, '每个菜单页都必须有操作提示')
assert.match(guide.text, /sha256/, '提示说明服务端会复算摘要')
})
@@ -1298,9 +1298,9 @@
"reads": 1
},
"task-center-board.test.ts": {
"cases": 7,
"pins": 3,
"reads": 5
"cases": 24,
"pins": 14,
"reads": 28
},
"timer-cleanup-pairing.test.ts": {
"cases": 5,
@@ -900,9 +900,8 @@ test('挂载与单一尺子:tab 条挂在壳层、公司名读 companyName、
const layout = readSource('src/layout/AdminLayout.vue')
assert.ok(layout.includes(`import CompanyTabs from '@/layout/CompanyTabs.vue'`), '壳层没 import CompanyTabs')
assert.ok(layout.includes('<CompanyTabs />'), '壳层没挂 <CompanyTabs />')
// 钉**模板里的挂载点**而不是 import 行:只写 layout.includes('OperationGuide') 时,删掉 <OperationGuide />
// 而留着那行 import 照样绿——一条"声称保护而不保护"的断言比没有更危险(后续评审会拿它当已核事实)。
assert.ok(layout.includes('<OperationGuide />'), '挂 tab 时不许把 OperationGuide 摘掉(align_guide_component_in_layout_headline 钉着)')
// 2026-11-28 精简口径:操作提示条整体下线(align-operation-guide 反向钉),壳层不得再挂。
assert.ok(!layout.includes('OperationGuide'), '操作提示条已删,壳层不得再引用 OperationGuide')
const tabs = readSource('src/layout/CompanyTabs.vue')
assert.ok(tabs.length > 0, '取样集非空自检:CompanyTabs.vue 读到了')
@@ -9,7 +9,6 @@ import {
toCreateUserRequest,
validateCreateUserForm,
} from '../src/pages/account/user-create-model.ts'
import { OPERATION_GUIDES } from '../src/layout/operation-guides.ts'
/**
* 建号公司口径(2026-10-05 修订):admin/normal 建号仍不让用户挑公司——请求体不带
@@ -152,18 +151,6 @@ test('弹窗与后端同口径:角色候选来自纯函数,且后端真的
'admins 候选要带 company_id 过滤,且只在传了 company_id 时生效')
})
test('「公司管理」引导文案说的是自动继承,并写清公司超管这一例外', () => {
const guide = OPERATION_GUIDES.admin_companies.text
assert.match(guide, /操作者自己所在的公司/, '要写清归属的真实口径:落在操作者本公司')
assert.match(guide, /请用那个公司自己的管理员登录|用该公司自己的管理员登录/,
'要给别家建号只能换账号登录——不写这句,超管会以为自己建的号能归到别家')
assert.match(guide, /公司超级管理员/,
'2026-10-05 起开设公司超管是唯一要在建号时选公司的例外,文案要说清,别让人以为下拉没了是坏了')
for (const stale of ['建号时选哪家公司', '停用后不能再用于新建账号']) {
assert.equal(guide.includes(stale), false, `文案仍含已失效的说法:${stale}`)
}
})
/** 从 Java 源码里按大括号配平切出一个方法体(只看 resolveTargetCompanyId,别把邻居方法的 throw 算进来)。 */
function javaMethod(source: string, signature: string): string {
const start = source.indexOf(signature)
@@ -25,7 +25,6 @@ import type { AdminMenuNode } from '@/types/admin'
// AdminLayout 的顶栏/告警子组件各带定时器或远端拉取,与本契约无关,替身化。
vi.mock('@/components/NotificationBell.vue', () => ({ default: { template: '<div class="bell-stub" />' } }))
vi.mock('@/components/ExpiryNotice.vue', () => ({ default: { template: '<div class="expiry-stub" />' } }))
vi.mock('@/layout/OperationGuide.vue', () => ({ default: { template: '<div class="guide-stub" />' } }))
vi.mock('@/layout/CompanyTabs.vue', () => ({ default: { template: '<div class="company-tabs-stub" />' } }))
vi.mock('@/layout/GlobalErrorContainer.vue', () => ({ default: { template: '<div class="error-stub" />' } }))
@@ -1229,8 +1229,8 @@ describe('京东数据库写权限分档(商品行写=仅超管档;分组
expect(wrapper.find('.jd-toolbar').exists()).toBe(false, '工具栏(全选/归类/删除)整块不渲染')
expect(wrapper.find('.jd-delete-btn').exists()).toBe(false, '删除商品按钮不渲染')
expect(wrapper.find('[aria-label="当前分组"]').exists()).toBe(false, '普通员工不出分组下拉')
expect(wrapper.text()).toContain('只读:编辑/删除需超级管理员或公司超级管理员', '只读提示必须看得见并区分两类写权限')
expect(wrapper.text()).toContain('分类在左侧「分类管理」查看与维护', '提示把分类维护入口指向侧栏「分类管理」')
// 2026-11-28 精简口径:常驻只读 tip 删(写控件已按权限隐藏),改反向钉不得回流。
expect(wrapper.text()).not.toContain('只读:编辑/删除需超级管理员或公司超级管理员')
// 读面不受影响:筛选、侧栏分类行、点卡片开只读详情都还在。
expect(wrapper.findAll('.jd-card')).toHaveLength(1)
@@ -1281,7 +1281,8 @@ describe('京东数据库写权限分档(商品行写=仅超管档;分组
expect(wrapper.find('.jd-delete-btn').exists()).toBe(false, '删除商品(商品行写)对管理人员收回——「弄反了」不得回潜')
expect(toolbarBtn(wrapper, '归入分类').exists()).toBe(true, '分类写入口对可写组渲染')
expect(toolbarBtn(wrapper, '取消归属').exists()).toBe(true)
expect(wrapper.text()).toContain('只读:编辑/删除需超级管理员或公司超级管理员', '管理人员看到商品行写只读提示')
expect(wrapper.text()).not.toContain('只读:编辑/删除需超级管理员或公司超级管理员',
'2026-11-28 精简口径:只读 tip 已删,管理人员侧同样不得回流')
// 分组筛选随分类可写放开:单组也出下拉(2026-11-23 用户口径,多组切换见后续用例)。
expect(wrapper.find('[aria-label="当前分组"]').exists()).toBe(true, '管理人员出分组下拉(单组也出下拉)')
+1 -1
View File
@@ -10,7 +10,7 @@ test('test_task_250_users_list_normal_primary_path', () => {
const page = readSource('src/pages/account/UsersPage.vue')
assert.match(page, /roleLabel/, '角色列需走中文 roleLabel 映射')
assert.match(page, /所属管理员/, '需展示“所属管理员”列/筛选项')
assert.match(page, /无开放注册|开放注册入口/, '页头应有“无开放注册入口”说明')
assert.doesNotMatch(page, /开放注册/, '页头说明已按精简口径删除(2026-11-28)')
})
test('test_task_250_users_list_normal_variant_input', () => {
+1 -1
View File
@@ -44,7 +44,7 @@ test('test_task_265_permission_normal_primary_path', () => {
assert.match(page, /权限配置/, '权限入口')
assert.match(page, /fetchImageVideoPermissionUsers/, '权限用户加载')
assert.match(page, /saveImageVideoPermissions/, '权限保存')
assert.match(page, /数据范围/, '权限弹窗语义')
assert.doesNotMatch(page, /数据范围/, '权限弹窗说明已按精简口径删除(2026-11-28)')
})
test('test_task_265_permission_boundary_limit_or_missing_field', () => {
@@ -2,7 +2,6 @@ import test from 'node:test'
import assert from 'node:assert/strict'
import { readSource } from './helpers.ts'
import { adminPages, validateAdminPages } from '../src/router/routes.ts'
import { operationGuideFor } from '../src/layout/operation-guides.ts'
import {
ACTIVE_TASK_STATUS,
MODULE_OPTIONS,
@@ -25,7 +24,7 @@ import {
variantStatusLabel,
} from '../src/pages/task-center/task-center-model.ts'
// 客户端任务管理看板(后台):路由注册 / guides 对齐 / 接口层 / 纯逻辑映射。
// 客户端任务管理看板(后台):路由注册 / 接口层 / 纯逻辑映射。
const PAGE = 'src/pages/task-center/TaskCenterBoardPage.vue'
const TASK_TABLE = 'src/pages/task-center/TaskCenterTaskTable.vue'
@@ -41,13 +40,6 @@ test('task_center_route_registered_with_menu_key', () => {
assert.deepEqual(validateAdminPages(adminPages), [])
})
test('task_center_guide_present_for_menu_key', () => {
const guide = operationGuideFor('admin_task_center')
assert.ok(guide, '菜单 key 有独立 guide(align-operation-guide 强制)')
assert.ok(guide.text.length > 10)
assert.equal(guide.steps.length, 3)
})
test('task_center_api_has_five_endpoints', () => {
const api = readSource(API)
for (const path of [
@@ -145,8 +137,8 @@ test('task_center_variant_status_options_are_the_four_states', () => {
const page = readSource(PAGE)
assert.equal(/只看在跑/.test(page), false, '面板说明不再写只看在跑')
assert.match(page, /title="麦象变体采集任务条数(全部状态)/, '徽章 tooltip 换成全部状态口径')
assert.match(page, /默认全部状态(待执行\/处理中\/成功\/失败)/, '面板说明写明四态')
assert.doesNotMatch(page, /麦象变体采集任务条数/, '徽章 tooltip 已按精简口径删除(2026-11-28)')
assert.doesNotMatch(page, /默认全部状态/, '面板说明已删,四态只留在下拉选项里(2026-11-28)')
})
test('task_center_device_display_falls_back_to_truncated_id', () => {
@@ -336,7 +328,7 @@ test('task_center_task_list_columns_are_trimmed_to_the_data_that_exists', () =>
assert.equal(/colspan="9"/.test(table), false, '加国家列后空态不该还写 9 列')
assert.match(style, /\.shop-filter\s*\{[^}]*position: relative/, '店铺组是提示的定位父元素')
assert.match(style, /\.filter-tip\s*\{[^}]*position: absolute/, '提示绝对定位,不再撑高该组把 label 顶上去')
assert.equal(/filter-tip/.test(page + style), false, '筛选提示整条删除(含样式,2026-11-28)')
assert.match(style, /\.form-row\s*\{[^}]*align-items: flex-end[^}]*margin-bottom: 22px/, '底部留白容纳提示行')
assert.match(
page,