|
@@ -54,31 +54,82 @@ import { throttle } from '@/utils/tools';
|
|
|
import { callAgent } from '@/api/statistics/call';
|
|
|
import { shortcuts } from '@/utils/constants';
|
|
|
import dayjs from 'dayjs';
|
|
|
+import { formatDuration } from '@/utils/formatTime';
|
|
|
|
|
|
const proTableRef = ref<RefType>(); // 表格ref
|
|
|
// 表格配置项
|
|
|
const columns = ref<any[]>([
|
|
|
{ type: 'index', fixed: 'left', width: 55, label: '序号', align: 'center' },
|
|
|
- { prop: 'name', label: '坐席工号', align: 'center' },
|
|
|
- { prop: 'inTotal', label: '呼入总量', align: 'center', sortable: 'custom' },
|
|
|
- { prop: 'inAnswered', label: '接通总量', align: 'center', sortable: 'custom' },
|
|
|
- { prop: 'inHangupImmediate', label: '呼入秒挂', align: 'center', sortable: 'custom' },
|
|
|
- { prop: 'inHanguped', label: '呼入超时未接', align: 'center', sortable: 'custom' },
|
|
|
+ {
|
|
|
+ prop: 'name',
|
|
|
+ label: '坐席工号',
|
|
|
+ align: 'center',
|
|
|
+ minWidth: 120,
|
|
|
+ render: (scope) => (
|
|
|
+ <span>
|
|
|
+ {scope.row.name} {scope.row.staffNo ? <span>({scope.row.telNo})</span> : ''}{' '}
|
|
|
+ </span>
|
|
|
+ ),
|
|
|
+ },
|
|
|
+ { prop: 'inTotal', label: '呼入总量', align: 'center', sortable: 'custom', minWidth: 120 },
|
|
|
+ { prop: 'inAnswered', label: '接通总量', align: 'center', sortable: 'custom', minWidth: 120 },
|
|
|
+ { prop: 'inHangupImmediate', label: '呼入秒挂', align: 'center', sortable: 'custom', minWidth: 120 },
|
|
|
+ { prop: 'inHanguped', label: '呼入超时未接', align: 'center', sortable: 'custom', minWidth: 140 },
|
|
|
{
|
|
|
prop: 'inAnsweredRate',
|
|
|
label: '接通率',
|
|
|
align: 'center',
|
|
|
sortable: 'custom',
|
|
|
- render: (scope) => <span>{scope.row.inAnsweredRate}%</span>
|
|
|
+ render: (scope) => <span>{scope.row.inAnsweredRate}%</span>,
|
|
|
+ minWidth: 120,
|
|
|
+ },
|
|
|
+ { prop: 'outDurationAvg', label: '呼入平均时长', align: 'center', sortable: 'custom', minWidth: 140 },
|
|
|
+ { prop: 'inAvailableAnswer', label: '有效接通量', align: 'center', sortable: 'custom', minWidth: 120 },
|
|
|
+ { prop: 'inHangupImmediateWhenAnswered', label: '接通秒挂', align: 'center', sortable: 'custom', minWidth: 120 },
|
|
|
+ {
|
|
|
+ prop: 'inAnsweredRate',
|
|
|
+ label: '有效接通率',
|
|
|
+ align: 'center',
|
|
|
+ sortable: 'custom',
|
|
|
+ render: (scope) => <span>{scope.row.inAnsweredRate}%</span>,
|
|
|
+ minWidth: 120,
|
|
|
+ },
|
|
|
+ { prop: 'outTotal', label: '呼出总量', align: 'center', sortable: 'custom', minWidth: 120 },
|
|
|
+ { prop: 'outAnswered', label: '呼出接通量', align: 'center', sortable: 'custom', minWidth: 120 },
|
|
|
+ {
|
|
|
+ prop: 'outAnsweredRate',
|
|
|
+ label: '呼出接通率',
|
|
|
+ align: 'center',
|
|
|
+ sortable: 'custom',
|
|
|
+ render: (scope) => <span>{scope.row.outAnsweredRate}%</span>,
|
|
|
+ minWidth: 120,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'outDurationAvg',
|
|
|
+ label: '呼出平均时长',
|
|
|
+ align: 'center',
|
|
|
+ sortable: 'custom',
|
|
|
+ minWidth: 140,
|
|
|
+ render: (scope) => <span>{formatDuration(scope.row.outDurationAvg)}</span>,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'loginDuration',
|
|
|
+ label: '登录时长',
|
|
|
+ align: 'center',
|
|
|
+ sortable: 'custom',
|
|
|
+ minWidth: 120,
|
|
|
+ render: (scope) => <span>{formatDuration(scope.row.loginDuration)}</span>,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'restDuration',
|
|
|
+ label: '小休+摘机时长',
|
|
|
+ align: 'center',
|
|
|
+ sortable: 'custom',
|
|
|
+ minWidth: 150,
|
|
|
+ render: (scope) => <span>{formatDuration(scope.row.restDuration)}</span>,
|
|
|
},
|
|
|
- { prop: 'outDurationAvg', label: '呼入平均时长', align: 'center', sortable: 'custom' },
|
|
|
- { prop: 'inAvailableAnswer', label: '有效接通率', align: 'center', sortable: 'custom',render: (scope) => <span>{scope.row.inAvailableAnswer}%</span> },
|
|
|
- { prop: 'inHangupImmediateWhenAnswered', label: '接通秒挂', align: 'center', sortable: 'custom' },
|
|
|
- { prop: 'inAnsweredRate', label: '有效接通率', align: 'center', sortable: 'custom',render: (scope) => <span>{scope.row.inAnsweredRate}%</span> },
|
|
|
- { prop: 'outTotal', label: '呼出总量', align: 'center', sortable: 'custom' },
|
|
|
- { prop: 'outAnswered', label: '呼出接通量', align: 'center', sortable: 'custom' },
|
|
|
- { prop: 'outAnsweredRate', label: '呼出接通率', align: 'center', sortable: 'custom',render: (scope) => <span>{scope.row.outAnsweredRate}%</span> },
|
|
|
- { prop: 'outDurationAvg', label: '呼出平均时长', align: 'center', sortable: 'custom' },
|
|
|
+ { prop: 'outDurationAvg', label: '摘机次数', align: 'center', sortable: 'custom', minWidth: 120 },
|
|
|
+ { prop: 'workRate', label: '工作效率', align: 'center', minWidth: 120, render: (scope) => <span>{scope.row.workRate}%</span> },
|
|
|
]);
|
|
|
// 定义变量内容
|
|
|
const ruleFormRef = ref<RefType>(); // 表单ref
|
|
@@ -159,6 +210,28 @@ const getSummaries = (param: any) => {
|
|
|
}
|
|
|
});
|
|
|
return sums;
|
|
|
+ /*const { columns } = param;
|
|
|
+ const sums: string[] = [];
|
|
|
+ columns.forEach((column: { property: string }, index: number) => {
|
|
|
+ switch (column.property) {
|
|
|
+ case 'name':
|
|
|
+ sums[index] = state.totalCount?.name;
|
|
|
+ break;
|
|
|
+ case 'num':
|
|
|
+ sums[index] = state.totalCount?.num;
|
|
|
+ break;
|
|
|
+ case 'chainNum':
|
|
|
+ sums[index] = state.totalCount?.chainNum;
|
|
|
+ break;
|
|
|
+ case 'chainRate':
|
|
|
+ sums[index] = state.totalCount?.chainRate;
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ sums[index] = '';
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return sums;*/
|
|
|
};
|
|
|
onMounted(() => {
|
|
|
queryList();
|