|
@@ -1,71 +1,137 @@
|
|
|
<template>
|
|
|
<div class="tels-callLog-container layout-pd">
|
|
|
<el-card shadow="never">
|
|
|
- <el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent label-width="100px">
|
|
|
+ <el-tabs v-model="state.queryParams.type" class="demo-tabs" @tab-change="changeTba">
|
|
|
+ <el-tab-pane name="0" label="全部"></el-tab-pane>
|
|
|
+ <el-tab-pane name="1" label="呼入"></el-tab-pane>
|
|
|
+ <el-tab-pane name="2" label="呼出"></el-tab-pane>
|
|
|
+ <el-tab-pane name="3" label="未接"></el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ <el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent label-width="20px">
|
|
|
<el-row :gutter="10">
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
|
|
|
- <el-form-item label="通话时间段" prop="crTime">
|
|
|
- <el-date-picker
|
|
|
- v-model="state.queryParams.crTime"
|
|
|
- type="datetimerange"
|
|
|
- unlink-panels
|
|
|
- range-separator="至"
|
|
|
- start-placeholder="开始时间"
|
|
|
- end-placeholder="结束时间"
|
|
|
- :shortcuts="shortcuts"
|
|
|
- @change="queryList"
|
|
|
- value-format="YYYY-MM-DD[T]HH:mm:ss"
|
|
|
- />
|
|
|
+ <el-form-item prop="CPN">
|
|
|
+ <el-input v-model="state.queryParams.CPN" placeholder="主叫号码" clearable @keyup.enter="queryList" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
|
|
|
- <el-form-item label="主叫" prop="CPN">
|
|
|
- <el-input v-model="state.queryParams.CPN" placeholder="请输入主叫号码" clearable @keyup.enter="queryList" />
|
|
|
+ <el-form-item prop="CDPN">
|
|
|
+ <el-input v-model="state.queryParams.CDPN" placeholder="被叫号码" clearable @keyup.enter="queryList" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" v-show="['0', '1', '3'].includes(state.queryParams.type)">
|
|
|
+ <el-form-item prop="TelNo">
|
|
|
+ <el-input v-model="state.queryParams.TelNo" placeholder="响应分机" clearable @keyup.enter="queryList" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
|
|
|
- <el-form-item label="被叫" prop="CDPN">
|
|
|
- <el-input v-model="state.queryParams.CDPN" placeholder="请输入被叫号码" clearable @keyup.enter="queryList" />
|
|
|
+ <el-form-item prop="UserName">
|
|
|
+ <el-input v-model="state.queryParams.UserName" placeholder="话务员名称" clearable @keyup.enter="queryList" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<transition name="el-zoom-in-top">
|
|
|
- <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" v-show="!searchCol">
|
|
|
- <el-form-item label="电话方向" prop="Direction">
|
|
|
- <el-select v-model="state.queryParams.Direction" placeholder="请选择电话方向" clearable class="w100">
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" v-show="!searchCol && ['0', '3'].includes(state.queryParams.type)">
|
|
|
+ <el-form-item prop="CallDirection">
|
|
|
+ <el-select v-model="state.queryParams.CallDirection" placeholder="电话方向" clearable class="w100">
|
|
|
<el-option v-for="item in state.callDirection" :value="item.key" :key="item.key" :label="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</transition>
|
|
|
<transition name="el-zoom-in-top">
|
|
|
- <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" v-show="!searchCol">
|
|
|
- <el-form-item label="通话结果" prop="OnState">
|
|
|
- <el-select v-model="state.queryParams.OnState" placeholder="请选择通话结果" clearable class="w100">
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" v-show="!searchCol && ['0'].includes(state.queryParams.type)">
|
|
|
+ <el-form-item prop="OnState">
|
|
|
+ <el-select v-model="state.queryParams.OnState" placeholder="通话结果" clearable class="w100">
|
|
|
<el-option v-for="item in state.onState" :value="item.key" :key="item.key" :label="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</transition>
|
|
|
+ <transition name="el-zoom-in-top">
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" v-show="!searchCol && ['0', '1', '2'].includes(state.queryParams.type)">
|
|
|
+ <el-form-item prop="EndBy">
|
|
|
+ <el-select v-model="state.queryParams.EndBy" placeholder="挂机类型" clearable class="w100">
|
|
|
+ <el-option v-for="item in state.endByOptions" :value="item.key" :key="item.key" :label="item.value" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </transition>
|
|
|
+ <transition name="el-zoom-in-top">
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" v-show="!searchCol && ['0', '1', '3'].includes(state.queryParams.type)">
|
|
|
+ <el-form-item prop="ivrTime">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="state.queryParams.ivrTime"
|
|
|
+ type="datetimerange"
|
|
|
+ unlink-panels
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="ivr开始时间"
|
|
|
+ end-placeholder="ivr结束时间"
|
|
|
+ :shortcuts="shortcuts"
|
|
|
+ @change="timeStartChangeIvr"
|
|
|
+ value-format="YYYY-MM-DD[T]HH:mm:ss"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </transition>
|
|
|
+ <transition name="el-zoom-in-top">
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" v-show="!searchCol && ['0', '1', '3'].includes(state.queryParams.type)">
|
|
|
+ <el-form-item prop="callTime">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="state.queryParams.callTime"
|
|
|
+ type="datetimerange"
|
|
|
+ unlink-panels
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="队列开始时间"
|
|
|
+ end-placeholder="队列结束时间"
|
|
|
+ :shortcuts="shortcuts"
|
|
|
+ @change="timeStartChangeCall"
|
|
|
+ value-format="YYYY-MM-DD[T]HH:mm:ss"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </transition>
|
|
|
<transition name="el-zoom-in-top">
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" v-show="!searchCol">
|
|
|
- <el-form-item label="中继号" prop="Gateway">
|
|
|
- <el-input v-model="state.queryParams.Gateway" placeholder="请输入中继号" clearable @keyup.enter="queryList" />
|
|
|
+ <el-form-item prop="crTime">
|
|
|
+ <el-date-picker
|
|
|
+ v-model="state.queryParams.crTime"
|
|
|
+ type="datetimerange"
|
|
|
+ unlink-panels
|
|
|
+ range-separator="至"
|
|
|
+ start-placeholder="通话开始时间"
|
|
|
+ end-placeholder="通话结束时间"
|
|
|
+ :shortcuts="shortcuts"
|
|
|
+ @change="timeStartChange"
|
|
|
+ value-format="YYYY-MM-DD[T]HH:mm:ss"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </transition>
|
|
|
+ <transition name="el-zoom-in-top">
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" v-show="!searchCol && ['0', '1', '2'].includes(state.queryParams.type)">
|
|
|
+ <el-form-item prop="OrderNo">
|
|
|
+ <el-input v-model="state.queryParams.OrderNo" placeholder="工单编码" clearable @keyup.enter="queryList" />
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </transition>
|
|
|
+ <transition name="el-zoom-in-top">
|
|
|
+ <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" v-show="!searchCol && ['0', '1', '2'].includes(state.queryParams.type)">
|
|
|
+ <el-form-item prop="Title">
|
|
|
+ <el-input v-model="state.queryParams.Title" placeholder="工单标题" clearable @keyup.enter="queryList" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</transition>
|
|
|
- <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
|
|
|
- <div class="flex-end w100">
|
|
|
- <el-button type="primary" @click="queryList" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
|
|
|
- <el-button @click="resetQuery(ruleFormRef)" class="default-button" :loading="state.loading">
|
|
|
- <SvgIcon name="ele-Refresh" class="mr5" />重置
|
|
|
- </el-button>
|
|
|
- <el-button link type="primary" @click="closeSearch" :loading="state.loading">
|
|
|
- {{ searchCol ? '展开' : '收起' }}
|
|
|
- <SvgIcon :class="{ 'is-reverse': searchCol }" name="ele-ArrowUp" class="mr5 arrow" size="18px" />
|
|
|
- </el-button>
|
|
|
- </div>
|
|
|
- </el-col>
|
|
|
</el-row>
|
|
|
+ <div class="w100 ml20">
|
|
|
+ <el-button type="primary" @click="queryList" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
|
|
|
+ <el-button @click="resetQuery(ruleFormRef)" class="default-button" :loading="state.loading">
|
|
|
+ <SvgIcon name="ele-Refresh" class="mr5" />重置
|
|
|
+ </el-button>
|
|
|
+ <el-button link type="primary" @click="closeSearch" :loading="state.loading">
|
|
|
+ {{ searchCol ? '展开' : '收起' }}
|
|
|
+ <SvgIcon :class="{ 'is-reverse': searchCol }" name="ele-ArrowUp" class="mr5 arrow" size="18px" />
|
|
|
+ </el-button>
|
|
|
+ </div>
|
|
|
</el-form>
|
|
|
</el-card>
|
|
|
<el-card shadow="never">
|
|
@@ -78,12 +144,24 @@
|
|
|
:total="state.total"
|
|
|
v-model:page-index="state.queryParams.PageIndex"
|
|
|
v-model:page-size="state.queryParams.PageSize"
|
|
|
+ :key="Math.random()"
|
|
|
>
|
|
|
<!-- 表格操作 -->
|
|
|
<template #operation="{ row }">
|
|
|
- <el-button link type="primary" @click="onConnect(row)" title="关联业务" v-auth="'tels:callLog:connect'"> 关联业务 </el-button>
|
|
|
- <el-button type="primary" @click="onPlaySoundRecording(row)" title="播放录音" link v-if="row.recordingFileUrl">播放录音</el-button>
|
|
|
- <el-button link type="primary" @click="onDownload(row)" title="下载录音" v-if="row.recordingFileUrl"> 下载录音 </el-button>
|
|
|
+ <template v-if="['0', '1'].includes(state.queryParams.type)">
|
|
|
+ <el-button link type="primary" @click="onCreate(row)" title="创建失联工单" v-auth="'tels:callLog:connect'" v-if="!row.externalId">
|
|
|
+ 失联工单
|
|
|
+ </el-button>
|
|
|
+ <el-button link type="primary" @click="onConnect(row)" title="关联业务" v-auth="'tels:callLog:connect'" v-if="!row.externalId">
|
|
|
+ 关联业务
|
|
|
+ </el-button>
|
|
|
+ <el-button type="primary" @click="onPlaySoundRecording(row)" title="播放录音" link v-if="row.recordingFileUrl">播放录音</el-button>
|
|
|
+ <el-button link type="primary" @click="onDownload(row)" title="下载录音" v-if="row.recordingFileUrl"> 下载录音 </el-button>
|
|
|
+ </template>
|
|
|
+ <template v-else>
|
|
|
+ <el-button type="primary" @click="onPlaySoundRecording(row)" title="播放录音" link v-if="row.recordingFileUrl">播放录音</el-button>
|
|
|
+ <el-button link type="primary" @click="onDownload(row)" title="下载录音" v-if="row.recordingFileUrl"> 下载录音 </el-button>
|
|
|
+ </template>
|
|
|
</template>
|
|
|
</ProTable>
|
|
|
</el-card>
|
|
@@ -102,6 +180,8 @@ import { downloadFile, throttle } from '@/utils/tools';
|
|
|
import { callBaseData, callLogPaged } from '@/api/tels/callLog';
|
|
|
import { formatDate } from '@/utils/formatTime';
|
|
|
import { shortcuts } from '@/utils/constants';
|
|
|
+import other from '@/utils/other';
|
|
|
+import { useRouter } from 'vue-router';
|
|
|
|
|
|
// 引入组件
|
|
|
const PlayRecord = defineAsyncComponent(() => import('@/views/tels/callLog/component/Play-record.vue')); // 播放录音
|
|
@@ -164,16 +244,22 @@ const state = reactive({
|
|
|
queryParams: {
|
|
|
PageIndex: 1, // 当前页
|
|
|
PageSize: 10, // 每页条数
|
|
|
+ type: '0',
|
|
|
StaffNo: null, // 分机号
|
|
|
CPN: null, // 中继号码
|
|
|
CDPN: null, // 分机号
|
|
|
- Direction: null, // 呼叫类型
|
|
|
+ callDirection: null, // 呼叫类型
|
|
|
OnState: null, // 结果
|
|
|
crTime: [],
|
|
|
+ callTime: [],
|
|
|
+ ivrTime: [],
|
|
|
},
|
|
|
tableData: [], // 列表数据
|
|
|
loading: false, // 加载
|
|
|
total: 0, // 总条数
|
|
|
+ callDirection: [],
|
|
|
+ onState: [],
|
|
|
+ endByOptions: [],
|
|
|
});
|
|
|
const ruleFormRef = ref<FormInstance>(); // 表单ref
|
|
|
const searchCol = ref(true); // 展开/收起
|
|
@@ -181,22 +267,230 @@ const searchCol = ref(true); // 展开/收起
|
|
|
const closeSearch = () => {
|
|
|
searchCol.value = !searchCol.value;
|
|
|
};
|
|
|
+const handleTimeChange = (val: string[], startKey: string, endKey: string) => {
|
|
|
+ if (val) {
|
|
|
+ state.queryParams[startKey] = val[0];
|
|
|
+ state.queryParams[endKey] = val[1];
|
|
|
+ } else {
|
|
|
+ state.queryParams[startKey] = '';
|
|
|
+ state.queryParams[endKey] = '';
|
|
|
+ }
|
|
|
+ queryList();
|
|
|
+};
|
|
|
+// IVR时间段
|
|
|
+const timeStartChangeIvr = (val: string[]) => {
|
|
|
+ handleTimeChange(val, 'BeginIvrTime', 'EndIvrTime');
|
|
|
+};
|
|
|
+// 队列时间段
|
|
|
+const timeStartChangeCall = (val: string[]) => {
|
|
|
+ handleTimeChange(val, 'BeginQueueTime', 'EndQueueTime');
|
|
|
+};
|
|
|
+// 通话时间段
|
|
|
+const timeStartChange = (val: string[]) => {
|
|
|
+ handleTimeChange(val, 'AnsweredTime', 'OverTime');
|
|
|
+};
|
|
|
+// 全部表头
|
|
|
+const allColumns = [
|
|
|
+ { prop: 'cpn', label: '主叫号码', width: 120 },
|
|
|
+ { prop: 'cdpn', label: '被叫号码', width: 120 },
|
|
|
+ { prop: 'telNo', label: '响应分机', width: 120 },
|
|
|
+ { prop: 'userName', label: '话务员', width: 120 },
|
|
|
+ { prop: 'duration', label: '通话时间(秒)', width: 120 },
|
|
|
+ { prop: 'onStateText', label: '通话结果' },
|
|
|
+ { prop: 'callDirectionText', label: '电话方向' },
|
|
|
+ { prop: 'endByText', label: '挂机类型', width: 120 },
|
|
|
+ {
|
|
|
+ prop: 'beginIvrTime',
|
|
|
+ label: 'ivr开始时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => <span>{formatDate(scope.row.beginIvrTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'endIvrTime',
|
|
|
+ label: 'ivr结束时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => <span>{formatDate(scope.row.endIvrTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'beginQueueTime',
|
|
|
+ label: '队列开始时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => <span>{formatDate(scope.row.beginQueueTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'endQueueTime',
|
|
|
+ label: '队列结束时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => {
|
|
|
+ return <span>{formatDate(scope.row.endQueueTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'createdTime',
|
|
|
+ label: '开始通话时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => <span>{formatDate(scope.row.createdTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'answeredTime',
|
|
|
+ label: '应答时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => <span>{formatDate(scope.row.answeredTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
|
|
|
+ },
|
|
|
+ { prop: 'overTime', label: '结束通话时间', width: 170, render: (scope) => <span>{formatDate(scope.row.overTime, 'YYYY-mm-dd HH:MM:SS')}</span> },
|
|
|
+ { prop: 'order.no', label: '工单编码', width: 150 },
|
|
|
+ { prop: 'order.title', label: '工单标题', width: 300 },
|
|
|
+ { prop: 'operation', label: '操作', fixed: 'right', width: 310, align: 'center' },
|
|
|
+];
|
|
|
+// 呼入表头
|
|
|
+const inColumns = [
|
|
|
+ { prop: 'cpn', label: '主叫号码', width: 120 },
|
|
|
+ { prop: 'cdpn', label: '被叫号码', width: 120 },
|
|
|
+ { prop: 'telNo', label: '响应分机', width: 120 },
|
|
|
+ { prop: 'userName', label: '话务员', width: 120 },
|
|
|
+ { prop: 'duration', label: '通话时间(秒)', width: 120 },
|
|
|
+ { prop: 'endByText', label: '挂机类型', width: 120 },
|
|
|
+ {
|
|
|
+ prop: 'beginIvrTime',
|
|
|
+ label: 'ivr开始时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => <span>{formatDate(scope.row.beginIvrTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'endIvrTime',
|
|
|
+ label: 'ivr结束时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => <span>{formatDate(scope.row.endIvrTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'beginQueueTime',
|
|
|
+ label: '队列开始时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => <span>{formatDate(scope.row.beginQueueTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'endQueueTime',
|
|
|
+ label: '队列结束时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => {
|
|
|
+ return <span>{formatDate(scope.row.endQueueTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'createdTime',
|
|
|
+ label: '开始通话时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => <span>{formatDate(scope.row.createdTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'answeredTime',
|
|
|
+ label: '应答时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => <span>{formatDate(scope.row.answeredTime, ' YYYY-mm-dd HH:MM:SS')}</span>,
|
|
|
+ },
|
|
|
+ { prop: 'overTime', label: '结束通话时间', width: 170, render: (scope) => <span>{formatDate(scope.row.overTime, 'YYYY-mm-dd HH:MM:SS')}</span> },
|
|
|
+ { prop: 'order.no', label: '工单编码', width: 150 },
|
|
|
+ { prop: 'order.title', label: '工单标题', width: 300 },
|
|
|
+ { prop: 'operation', label: '操作', fixed: 'right', width: 310, align: 'center' },
|
|
|
+];
|
|
|
+// 呼出表头
|
|
|
+const outColumns = [
|
|
|
+ { prop: 'cpn', label: '主叫号码', width: 120 },
|
|
|
+ { prop: 'cdpn', label: '被叫号码', width: 120 },
|
|
|
+ { prop: 'telNo', label: '响应分机' },
|
|
|
+ { prop: 'userName', label: '话务员' },
|
|
|
+ { prop: 'duration', label: '通话时间(秒)', width: 120 },
|
|
|
+ { prop: 'endByText', label: '挂机类型', width: 120 },
|
|
|
+ {
|
|
|
+ prop: 'createdTime',
|
|
|
+ label: '开始通话时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => <span>{formatDate(scope.row.createdTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'answeredTime',
|
|
|
+ label: '应答时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => <span>{formatDate(scope.row.answeredTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
|
|
|
+ },
|
|
|
+ { prop: 'overTime', label: '结束通话时间', width: 170, render: (scope) => <span>{formatDate(scope.row.overTime, 'YYYY-mm-dd HH:MM:SS')}</span> },
|
|
|
+ { prop: 'operation', label: '操作', fixed: 'right', width: 180, align: 'center' },
|
|
|
+];
|
|
|
+// 未接表头
|
|
|
+const noColumns = [
|
|
|
+ { prop: 'cpn', label: '主叫号码', width: 120 },
|
|
|
+ { prop: 'cdpn', label: '被叫号码', width: 120 },
|
|
|
+ { prop: 'telNo', label: '响应分机' },
|
|
|
+ { prop: 'userName', label: '话务员' },
|
|
|
+ { prop: 'callDirectionText', label: '电话方向' },
|
|
|
+ {
|
|
|
+ prop: 'beginIvrTime',
|
|
|
+ label: 'ivr开始时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => <span>{formatDate(scope.row.beginIvrTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'endIvrTime',
|
|
|
+ label: 'ivr结束时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => <span>{formatDate(scope.row.endIvrTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'beginQueueTime',
|
|
|
+ label: '队列开始时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => <span>{formatDate(scope.row.beginQueueTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'endQueueTime',
|
|
|
+ label: '队列结束时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => {
|
|
|
+ return <span>{formatDate(scope.row.endQueueTime, 'YYYY-mm-dd HH:MM:SS')}</span>;
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'createdTime',
|
|
|
+ label: '开始通话时间',
|
|
|
+ width: 170,
|
|
|
+ render: (scope) => <span>{formatDate(scope.row.createdTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
|
|
|
+ },
|
|
|
+ { prop: 'overTime', label: '结束通话时间', width: 170, render: (scope) => <span>{formatDate(scope.row.overTime, 'YYYY-mm-dd HH:MM:SS')}</span> },
|
|
|
+];
|
|
|
+const changeTba = () => {
|
|
|
+ ruleFormRef.value.resetFields();
|
|
|
+ queryList();
|
|
|
+};
|
|
|
/** 通话记录列表 */
|
|
|
const queryList = throttle(async () => {
|
|
|
state.loading = true;
|
|
|
try {
|
|
|
- const request = {
|
|
|
- PageIndex: state.queryParams.PageIndex,
|
|
|
- PageSize: state.queryParams.PageSize,
|
|
|
- CPN: state.queryParams.CPN,
|
|
|
- CDPN: state.queryParams.CDPN,
|
|
|
- Direction: state.queryParams.Direction,
|
|
|
- OnState: state.queryParams.OnState,
|
|
|
- StaffNo: state.queryParams.StaffNo,
|
|
|
- StartTime: state.queryParams.crTime[0],
|
|
|
- EndTime: state.queryParams.crTime[1],
|
|
|
- Gateway: state.queryParams.Gateway,
|
|
|
- };
|
|
|
+ let request = other.deepClone(state.queryParams);
|
|
|
+ Reflect.deleteProperty(request, 'crTime'); // 删除无用的参数
|
|
|
+ Reflect.deleteProperty(request, 'callTime'); // 删除无用的参数
|
|
|
+ Reflect.deleteProperty(request, 'ivrTime'); // 删除无用的参数
|
|
|
+ Reflect.deleteProperty(request, 'type'); // 删除无用的参数
|
|
|
+
|
|
|
+ switch (state.queryParams.type) {
|
|
|
+ case '0':
|
|
|
+ columns.value = allColumns;
|
|
|
+ break;
|
|
|
+ case '1':
|
|
|
+ columns.value = inColumns;
|
|
|
+ request.CallDirection = 0;
|
|
|
+ break;
|
|
|
+ case '2':
|
|
|
+ columns.value = outColumns;
|
|
|
+ request.CallDirection = 1;
|
|
|
+ break;
|
|
|
+ case '3':
|
|
|
+ columns.value = noColumns;
|
|
|
+ request.OnState = 2;
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ columns.value = allColumns;
|
|
|
+ break;
|
|
|
+ }
|
|
|
const response = await callLogPaged(request);
|
|
|
state.tableData = response.result?.items ?? [];
|
|
|
state.total = response.result?.total ?? 0;
|
|
@@ -238,11 +532,30 @@ const connectBusinessRef = ref<RefType>();
|
|
|
const onConnect = (row: any) => {
|
|
|
connectBusinessRef.value.openDialog(row);
|
|
|
};
|
|
|
+// 失联工单
|
|
|
+const router = useRouter();
|
|
|
+const onCreate = (row: any) => {
|
|
|
+ router.push({
|
|
|
+ name: 'orderAccept',
|
|
|
+ state: {
|
|
|
+ createBy: 'tel',
|
|
|
+ fromTel: row.cpn,
|
|
|
+ telGuid: row.callAccept,
|
|
|
+ transfer: row.gateway,
|
|
|
+ telArea: '',
|
|
|
+ },
|
|
|
+ params: {
|
|
|
+ callId: row.callAccept,
|
|
|
+ tagsViewName: '创建失联工单',
|
|
|
+ },
|
|
|
+ });
|
|
|
+};
|
|
|
// 基础信息
|
|
|
const getBaseData = async () => {
|
|
|
const response = await callBaseData();
|
|
|
state.callDirection = response.result.callDirection;
|
|
|
state.onState = response.result.onState;
|
|
|
+ state.endByOptions = response.result.endBy;
|
|
|
};
|
|
|
onMounted(() => {
|
|
|
getBaseData();
|