|
|
@@ -267,6 +267,9 @@
|
|
|
<template #action="{ record }">
|
|
|
<a-tag>{{ actionLabel(record.action) }}</a-tag>
|
|
|
</template>
|
|
|
+ <template #source="{ record }">
|
|
|
+ {{ sourceLabel(record.source) }}
|
|
|
+ </template>
|
|
|
<template #operator_user="{ record }">
|
|
|
<a-space>
|
|
|
<a-avatar :size="26">
|
|
|
@@ -450,7 +453,7 @@ const bindAuditColumns = [
|
|
|
{ title: '乐跑账号', slotName: 'lepao_user', width: 180 },
|
|
|
{ title: '所属用户', slotName: 'owner_user', width: 180 },
|
|
|
{ title: '动作', slotName: 'action', width: 120 },
|
|
|
- { title: '来源', dataIndex: 'source', width: 140 },
|
|
|
+ { title: '来源', slotName: 'source', width: 140 },
|
|
|
{ title: '操作者', slotName: 'operator_user', width: 180 },
|
|
|
{ title: '详情', slotName: 'detail_json', width: 220, ellipsis: true, tooltip: true },
|
|
|
{ title: '时间', slotName: 'created_at', width: 180 }
|
|
|
@@ -690,10 +693,39 @@ const actionLabel = (action) => {
|
|
|
return map[action] || action
|
|
|
}
|
|
|
|
|
|
+const sourceLabel = (source) => {
|
|
|
+ const map = {
|
|
|
+ user_api: '用户接口',
|
|
|
+ admin_api: '管理员接口',
|
|
|
+ service_api: '客服接口',
|
|
|
+ mcp_qq: '机器人MCP',
|
|
|
+ mcp_work_order: '工单MCP'
|
|
|
+ }
|
|
|
+ return map[source] || source
|
|
|
+}
|
|
|
+
|
|
|
const formatDetail = (detail) => {
|
|
|
if (!detail) return '-'
|
|
|
if (typeof detail === 'string') return detail
|
|
|
- return Object.keys(detail).map(key => `${key}:${detail[key]}`).join(' ; ')
|
|
|
+ const keyMap = {
|
|
|
+ via: '触发方式',
|
|
|
+ sender: '发送者',
|
|
|
+ old_owner_uuid: '原所属用户UUID',
|
|
|
+ new_owner_uuid: '新所属用户UUID'
|
|
|
+ }
|
|
|
+ const valueMap = {
|
|
|
+ AddAccount: '用户新增账号',
|
|
|
+ DeleteAccount: '账号解绑接口',
|
|
|
+ 'AddAccount:auto_unbind_rebind': '新增账号自动解绑并重绑'
|
|
|
+ }
|
|
|
+ return Object.keys(detail)
|
|
|
+ .map((key) => {
|
|
|
+ const label = keyMap[key] || key
|
|
|
+ const rawValue = detail[key]
|
|
|
+ const value = (typeof rawValue === 'string' && valueMap[rawValue]) ? valueMap[rawValue] : rawValue
|
|
|
+ return `${label}:${value}`
|
|
|
+ })
|
|
|
+ .join(';')
|
|
|
}
|
|
|
|
|
|
const openBindAudit = async (record) => {
|