| | |
| | | { 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 ''; |
| | |
| | | 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', |
| | |
| | | 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', |
| | |
| | | { 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, |
| | |
| | | ), |
| | | }, |
| | | { |
| | | 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, |
| | | }, |
| | | ]; |
| | | |