From e0261744b3b855bdd56151c0c2ff0015a2c19199 Mon Sep 17 00:00:00 2001
From: 刘帅 <rr.iii@qq.com>
Date: 星期三, 09 九月 2026 17:14:29 +0800
Subject: [PATCH] 通话记录接口返回值调整

---
 management/src/pages/order/callRecords/index.jsx |  104 +++++++++++++++++++++++++++++++++++++++-------------
 1 files changed, 78 insertions(+), 26 deletions(-)

diff --git a/management/src/pages/order/callRecords/index.jsx b/management/src/pages/order/callRecords/index.jsx
index f2279fa..1c6a534 100644
--- a/management/src/pages/order/callRecords/index.jsx
+++ b/management/src/pages/order/callRecords/index.jsx
@@ -15,9 +15,25 @@
   { label: '外呼任务', value: 'callTask' },
 ];
 
-const callTypeLabels = Object.fromEntries(
-  callTypeOptions.map(({ label, value }) => [value, label]),
-);
+const callTypeLabels = {
+  callin: '呼入',
+  callout: '外呼',
+  twoWayCall: '双向呼叫',
+  autoCallout: '智能外呼',
+  callTask: '外呼任务',
+  INBOUND: '呼入',
+  OUTBOUND: '外呼',
+};
+
+const callStatusLabels = {
+  ANSWER: '已接通',
+  NO_ANSWER: '未接通',
+};
+
+const hangupPartyLabels = {
+  CUSTOMER: '客户',
+  ROBOT: '机器人',
+};
 
 const formatDateTime = (value) => {
   if (!value) return '';
@@ -69,14 +85,21 @@
       width: 140,
       render: (text) => maskPhoneNumber(text) || '-',
     },
-    { title: '外显号码', dataIndex: 'disNumber', width: 140, render: renderText },
+    { title: '外显号码', dataIndex: 'displayNumber', width: 140, render: renderText },
     { title: '服务号码', dataIndex: 'serviceNumber', width: 140, render: renderText },
     {
       title: '通话状态',
       dataIndex: 'status',
       width: 140,
       renderFormItem: () => <Input placeholder="如 ANSWER" />,
-      render: renderText,
+      hideInTable: true,
+    },
+    {
+      title: '通话状态',
+      dataIndex: 'callStatus',
+      width: 140,
+      hideInSearch: true,
+      render: (text) => callStatusLabels[text] || text || '-',
     },
     {
       title: '通话 ID',
@@ -87,20 +110,34 @@
       render: renderText,
     },
     {
-      title: '座席名称',
-      dataIndex: 'agentName',
+      title: '机器人名称',
+      dataIndex: 'voiceAgentName',
       width: 120,
       hideInSearch: true,
       render: renderText,
     },
     {
-      title: '座席工号',
+      title: '机器人 ID',
+      dataIndex: 'voiceAgentId',
+      width: 180,
+      hideInSearch: true,
+      ellipsis: true,
+      render: renderText,
+    },
+    {
+      title: '人工坐席号码',
       dataIndex: 'agentNumber',
       width: 120,
       hideInSearch: true,
       render: renderText,
     },
-    { title: '服务组', dataIndex: 'queueName', width: 140, hideInSearch: true, render: renderText },
+    {
+      title: '转接队列号码',
+      dataIndex: 'queueNumber',
+      width: 140,
+      hideInSearch: true,
+      render: renderText,
+    },
     {
       title: '开始时间',
       dataIndex: 'startTime',
@@ -118,28 +155,42 @@
     { title: '结束时间', dataIndex: 'endTime', width: 180, hideInSearch: true, render: renderText },
     {
       title: '通话时长(秒)',
-      dataIndex: 'callDuration',
+      dataIndex: 'durationSeconds',
       width: 130,
       hideInSearch: true,
       render: renderText,
     },
     {
-      title: '排队时长(秒)',
-      dataIndex: 'queueDuration',
+      title: '是否转人工',
+      dataIndex: 'transferredToAgent',
       width: 130,
+      hideInSearch: true,
+      render: (value) => (value ? <Tag color="green">是</Tag> : <Tag>否</Tag>),
+    },
+    {
+      title: '转人工类型',
+      dataIndex: 'transferType',
+      width: 130,
+      hideInSearch: true,
+      render: renderText,
+    },
+    {
+      title: '转人工时间',
+      dataIndex: 'transferTime',
+      width: 180,
       hideInSearch: true,
       render: renderText,
     },
     {
       title: '挂机方',
-      dataIndex: 'hangUpParty',
+      dataIndex: 'hangupParty',
       width: 110,
       hideInSearch: true,
-      render: renderText,
+      render: (text) => hangupPartyLabels[text] || text || '-',
     },
     {
       title: '失败原因',
-      dataIndex: 'failReasonMsg',
+      dataIndex: 'failureReason',
       width: 180,
       hideInSearch: true,
       ellipsis: true,
@@ -160,18 +211,19 @@
         ),
     },
     {
-      title: '留言录音',
-      dataIndex: 'leaveMsgUrl',
-      width: 120,
+      title: '任务 ID',
+      dataIndex: 'taskId',
+      width: 200,
       hideInSearch: true,
-      render: (url) =>
-        url ? (
-          <Typography.Link href={url} target="_blank">
-            播放录音
-          </Typography.Link>
-        ) : (
-          '-'
-        ),
+      ellipsis: true,
+      render: renderText,
+    },
+    {
+      title: '累计呼叫次数',
+      dataIndex: 'dialCount',
+      width: 130,
+      hideInSearch: true,
+      render: renderText,
     },
   ];
 

--
Gitblit v1.7.1