修复(履约绑定): 禁止预检同对抢跑并补齐角色绑定与日志表格展示

This commit is contained in:
yml
2026-11-26 14:28:28 +08:00
parent 554d399358
commit ed91fb7549
5 changed files with 303 additions and 20 deletions
@@ -1401,6 +1401,7 @@ export default function PlatformFulfillmentPage() {
render: (_, task) => {
const customerRole = task.customerProfile?.roleName?.trim() || '';
const scannedRole = task.bindTask?.roleName?.trim() || '';
const scannedChannel = [task.bindTask?.areaName, task.bindTask?.platName].filter(Boolean).join(' / ');
return (
<Space direction="vertical" size={2}>
<Tag color={bindingStatusColor(task.bindingStatus)}>
@@ -1416,9 +1417,10 @@ export default function PlatformFulfillmentPage() {
type={scannedRole ? undefined : 'secondary'}
style={{ fontSize: 12 }}
ellipsis
title={scannedRole || '未识别'}
title={scannedRole ? (scannedChannel ? `${scannedRole} (${scannedChannel})` : scannedRole) : '未识别'}
>
扫码绑定角色:{scannedRole || '未识别'}
{scannedRole && scannedChannel ? ` · ${scannedChannel}` : ''}
</Text>
{task.bindingStatus === 'bound' ? (
<Text type="secondary" style={{ fontSize: 12 }}>
@@ -2191,7 +2193,7 @@ export default function PlatformFulfillmentPage() {
rowKey="id"
pagination={false}
dataSource={detail.bindingLogs}
scroll={{ x: 980, y: 260 }}
scroll={{ x: 1180, y: 260 }}
columns={[
{
title: '时间',
@@ -2200,18 +2202,29 @@ export default function PlatformFulfillmentPage() {
render: (value: string) => formatTime(value),
},
{ title: '阶段', dataIndex: 'stage', width: 170 },
{ title: '通道', dataIndex: 'actAlias', width: 140 },
{ title: '角色', dataIndex: 'roleName', width: 120 },
{ title: '通道', dataIndex: 'actAlias', width: 135 },
{ title: '角色', dataIndex: 'roleName', width: 120, render: (v: string) => v || '-' },
{
title: 'bindAct',
dataIndex: 'bindAct',
width: 76,
render: (value: boolean) => (value ? '1' : '0'),
title: '区服平台',
key: 'channel',
width: 145,
render: (_: unknown, row: PlatformFulfillmentBindingLog) =>
[row.areaName, row.platName].filter(Boolean).join(' / ') || '-',
},
{
title: '标志 (act/role/needAct/needRole)',
key: 'flags',
width: 185,
render: (_: unknown, row: PlatformFulfillmentBindingLog) => (
<Text code style={{ fontSize: 12 }}>
{`${row.bindAct ? 1 : 0}/${row.bindRole ? 1 : 0}/${row.needBindAct ? 1 : 0}/${row.needBindRole ? 1 : 0}`}
</Text>
),
},
{
title: '换绑等待',
dataIndex: 'changeRoleWaitTime',
width: 96,
width: 90,
render: (value: number | null) => value ?? '-',
},
{
@@ -1837,18 +1837,22 @@ export default function DouyuTasksPage({ handbook }: { handbook: HandbookKind })
const pendingBinding = !isEsportsHandbook && queryTask?.binding?.status === 'pending'
? queryTask.binding
: null;
const pendingRoleName = scopeState === 'bound'
? ''
: (isEsportsHandbook
? resultText(queryResult, 'pending_role_name')
: pendingBinding?.pending_role_name || '');
const pendingChannel = scopeState === 'bound'
? ''
: (isEsportsHandbook
const rawPendingRoleName = isEsportsHandbook
? (scopeState === 'bound' ? '' : resultText(queryResult, 'pending_role_name'))
: (pendingBinding?.pending_role_name || '');
const pendingRoleName = (
rawPendingRoleName
&& (scopeState !== 'bound' || rawPendingRoleName.toLowerCase() !== roleName.toLowerCase())
)
? rawPendingRoleName
: '';
const pendingChannel = pendingRoleName
? (isEsportsHandbook
? [resultText(queryResult, 'pending_area_name'), resultText(queryResult, 'pending_plat_name')]
.filter(Boolean)
.join(' / ')
: pendingBinding?.pending_channel || '');
: pendingBinding?.pending_channel || '')
: '';
if (!roleName && !pendingRoleName) {
return (