feat(phase2-fe): 二期可视化(分账/追责/确权/授权/回传)

- GovernancePanel: 监管片库详情新增'权益与治理'标签(分账/追责取证/确权举证/授权管理)
- 分账面板: 播放聚合统计+CP60/平台34/服务费6分账展示
- 追责面板: 全链路存证Timeline+审播一致/篡改定位结果
- 确权面板: 证据链+谁先锁定谁有权声明
- 授权面板: 登记授权范围(地域/平台/期限)+核验
- 运营商台: 回传播放(含购买)按钮喂分账数据
- 前端build通过, HMR生效
This commit is contained in:
selfrelease
2026-06-14 17:31:49 +08:00
parent 57ea9f122d
commit 73e22f79d2
3 changed files with 173 additions and 1 deletions
+18 -1
View File
@@ -5,6 +5,7 @@ import {
} from 'antd'
import { ReloadOutlined, SendOutlined, StopOutlined } from '@ant-design/icons'
import { call, api } from './api.js'
import GovernancePanel from './GovernancePanel.jsx'
const { Text } = Typography
@@ -189,6 +190,16 @@ function OperatorDesk({ tick, onChanged }) {
else message.warning('注入校验:' + (res.data.message || '哈希不匹配被拒'))
}
async function reportPlay(r) {
// 演示:回传 1 次播放 + 1 次购买(15元)
const res = await api.playback(r.operator_id || 'CT-SX-IPTV', [
{ ma_code: r.ma_code, event_type: 'play' },
{ ma_code: r.ma_code, event_type: 'purchase', revenue_cent: 1500 },
])
if (res.ok) message.success(`已回传播放数据(接收 ${res.data.data.accepted} 条),可在监管片库查看分账`)
else message.error(res.data.message)
}
const cols = [
{ title: 'MA 码', dataIndex: 'ma_code', render: (v) => <Text code>{v}</Text> },
{ title: '作品', dataIndex: 'title' },
@@ -196,6 +207,7 @@ function OperatorDesk({ tick, onChanged }) {
<Space>
<Button size="small" type="primary" onClick={() => inject(r, false)}>CDN 注入正确</Button>
<Button size="small" danger onClick={() => inject(r, true)}>模拟篡改注入</Button>
<Button size="small" onClick={() => reportPlay(r)}>回传播放(含购买)</Button>
</Space>
) },
]
@@ -366,9 +378,11 @@ function LibraryDesk({ tick, onChanged }) {
pagination={{ pageSize: 8 }}
locale={{ emptyText: <Empty image={Empty.PRESENTED_IMAGE_SIMPLE} description="片库暂无内容" /> }} />
<Modal open={!!detail} onCancel={() => setDetail(null)} footer={null} width={760}
<Modal open={!!detail} onCancel={() => setDetail(null)} footer={null} width={820}
title={detail ? `片库详情 · ${detail.content.title}` : ''}>
{detail && (
<Tabs size="small" items={[
{ key: 'overview', label: '概览', children: (
<>
<Descriptions bordered size="small" column={1} style={{ marginBottom: 12 }}>
<Descriptions.Item label="MA 码">{detail.content.ma_code}</Descriptions.Item>
@@ -405,6 +419,9 @@ function LibraryDesk({ tick, onChanged }) {
]} />
</Card>
</>
) },
{ key: 'gov', label: '权益与治理', children: <GovernancePanel maCode={detail.content.ma_code} /> },
]} />
)}
</Modal>
</Card>