feat: 审核体系全面改造 — 多维度评分 + 卖点优先级 + AI 语义匹配 + 品牌方 AI 状态通知

后端:
- 审核结果拆分为 4 个独立维度 (法规合规/平台规则/品牌安全/Brief匹配度)
- 卖点优先级从 required:bool 改为三级 (core/recommended/reference)
- AI 语义匹配卖点覆盖 + AI 整体 Brief 匹配度分析
- BriefMatchDetail 评分详情 (覆盖率+亮点+问题点)
- min_selling_points 代理商可配置最少卖点数 + Alembic 迁移
- AI 语境复核过滤误报
- Brief AI 解析 + 规则 AI 解析
- AI 未配置/异常时通知品牌方
- 种子数据更新 (新格式审核结果+brief_match_detail)

前端:
- 三端审核页面展示四维度评分卡片
- 卖点编辑改为三级优先级选择器
- BriefMatchDetail 展示 (覆盖率进度条+亮点+问题)
- min_selling_points 配置 UI
- AI 配置页未配置时静默处理
- 文件预览/下载/签名 URL 优化

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Your Name
2026-02-11 19:11:54 +08:00
co-authored by Claude Opus 4.6
parent 0c59797d5b
commit 0ef7650c09
43 changed files with 3909 additions and 1316 deletions
+52 -20
View File
@@ -16,6 +16,7 @@ import {
} from 'lucide-react'
import { Button } from './Button'
import { Modal } from './Modal'
import { api } from '@/lib/api'
// 文件信息类型
export interface FileInfo {
@@ -98,20 +99,29 @@ export function FileInfoCard({
}) {
const category = getFileCategory(file)
const handleDownload = () => {
const handleDownload = async () => {
if (onDownload) {
onDownload()
} else {
// 默认下载行为
const link = document.createElement('a')
link.href = file.fileUrl
link.download = file.fileName
link.click()
try {
await api.downloadFile(file.fileUrl, file.fileName)
} catch {
// 回退到直接链接下载
const link = document.createElement('a')
link.href = file.fileUrl
link.download = file.fileName
link.click()
}
}
}
const handleOpenInNewTab = () => {
window.open(file.fileUrl, '_blank')
const handleOpenInNewTab = async () => {
try {
const blobUrl = await api.getPreviewUrl(file.fileUrl)
window.open(blobUrl, '_blank')
} catch {
window.open(file.fileUrl, '_blank')
}
}
return (
@@ -300,15 +310,26 @@ export function DocumentPlaceholder({
线
</p>
<div className="flex gap-2 justify-center">
<Button variant="secondary" onClick={() => window.open(file.fileUrl, '_blank')}>
<Button variant="secondary" onClick={async () => {
try {
const blobUrl = await api.getPreviewUrl(file.fileUrl)
window.open(blobUrl, '_blank')
} catch {
window.open(file.fileUrl, '_blank')
}
}}>
<ExternalLink size={16} />
</Button>
<Button onClick={() => {
const link = document.createElement('a')
link.href = file.fileUrl
link.download = file.fileName
link.click()
<Button onClick={async () => {
try {
await api.downloadFile(file.fileUrl, file.fileName)
} catch {
const link = document.createElement('a')
link.href = file.fileUrl
link.download = file.fileName
link.click()
}
}}>
<Download size={16} />
@@ -380,15 +401,26 @@ export function FilePreviewModal({
)}
</div>
<div className="flex gap-2">
<Button variant="secondary" onClick={() => window.open(file.fileUrl, '_blank')}>
<Button variant="secondary" onClick={async () => {
try {
const blobUrl = await api.getPreviewUrl(file.fileUrl)
window.open(blobUrl, '_blank')
} catch {
window.open(file.fileUrl, '_blank')
}
}}>
<ExternalLink size={16} />
</Button>
<Button onClick={() => {
const link = document.createElement('a')
link.href = file.fileUrl
link.download = file.fileName
link.click()
<Button onClick={async () => {
try {
await api.downloadFile(file.fileUrl, file.fileName)
} catch {
const link = document.createElement('a')
link.href = file.fileUrl
link.download = file.fileName
link.click()
}
}}>
<Download size={16} />