<template#columns><a-table-columntitle="场馆"><template#cell="{ record }">{{record.venue?.name||record.venue_name||'未绑定'}}</template></a-table-column><a-table-column title="摄像头"><template #cell="{ record }">{{ record.name }}<div class="muted">{{ record.ip }} /通道{{record.channel}}</div></template></a-table-column><a-table-columntitle="状态"><template#cell="{record}"><a-tag:color="statusColor(record.health?.status)">{{statusLabel(record.health?.status)}}</a-tag></template></a-table-column><a-table-columntitle="最后推送":width="190"><template#cell="{record}">{{formatTime(record.health?.last_pdc_at_source||record.health?.last_pdc_at)}}</template></a-table-column><a-table-columntitle="网络连通性":width="140"><template#cell="{record}">{{record.health?.tcp_reachable===true?'网络正常':record.health?.tcp_reachable===false?'网络不可达':'未检测'}}</template></a-table-column><a-table-columntitle="操作"><template#cell="{record}"><a-space><a-buttonsize="small"@click="openEdit(record)">编辑</a-button><a-buttonsize="small"type="primary":loading="retrying[record.id]":disabled="retrying[record.id]"@click="retry(record)">{{retrying[record.id]?'重新连接中':'重新连接'}}</a-button><a-buttonsize="small"status="danger"@click="remove(record)">停用</a-button></a-space></template></a-table-column></template>
</a-table>
</a-tab-pane>
<a-tab-panekey="alerts"title="待处理告警"><a-table:data="alerts":pagination="false"><template#columns><a-table-columntitle="时间"><template#cell="{ record }">{{formatTime(record.first_occurred_at)}}</template></a-table-column><a-table-columntitle="场馆"><template#cell="{record}">{{record.venue?.name||'—'}}</template></a-table-column><a-table-columntitle="设备"><template#cell="{record}">{{record.camera?.name}}({{record.camera?.ip}})</template></a-table-column><a-table-columntitle="原因"data-index="reason"/><a-table-columntitle="操作"><template#cell="{record}"><a-buttonsize="small"@click="ack(record)">确认处理</a-button></template></a-table-column></template></a-table></a-tab-pane>
<a-tab-panekey="alerts"title="待处理告警"><a-table:data="alerts":pagination="false"><template#columns><a-table-columntitle="时间"><template#cell="{ record }">{{formatTime(record.first_occurred_at)}}</template></a-table-column><a-table-columntitle="场馆"><template#cell="{record}">{{record.venue?.name||'—'}}</template></a-table-column><a-table-columntitle="设备"><template#cell="{record}">{{record.camera?.name}}({{record.camera?.ip}})</template></a-table-column><a-table-columntitle="原因"data-index="reason"/><a-table-columntitle="操作"><template#cell="{record}"><a-buttonsize="small":loading="acknowledging[record.id]":disabled="acknowledging[record.id]"@click="ack(record)">确认处理</a-button></template></a-table-column></template></a-table></a-tab-pane>