|
@@ -4,27 +4,20 @@
|
|
|
<el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent class="mt15" label-width="100px">
|
|
|
<el-row :gutter="10">
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="8">
|
|
|
- <el-form-item label="工号" prop="StaffNo">
|
|
|
- <el-input v-model="state.queryParams.StaffNo" placeholder="请输入工号" clearable @keyup.enter="queryList" />
|
|
|
+ <el-form-item label="主叫" 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="8" :xl="8">
|
|
|
+ <el-form-item label="被叫" 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="8" :xl="8">
|
|
|
- <el-form-item label="主叫" prop="CPN">
|
|
|
- <el-input v-model="state.queryParams.CPN" 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="8" :xl="8" v-show="!searchCol">
|
|
|
- <el-form-item label="被叫" prop="CDPN">
|
|
|
- <el-input v-model="state.queryParams.CDPN" 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="8" :xl="8" v-show="!searchCol">
|
|
|
<el-form-item label="电话方向" prop="Direction">
|
|
|
<el-select v-model="state.queryParams.Direction" placeholder="请选择电话方向" clearable class="w100">
|
|
|
- <el-option v-for="item in state.callDirectionOption" :value="item.key" :key="item.key" :label="item.value" />
|
|
|
+ <el-option v-for="item in state.callDirection" :value="item.key" :key="item.key" :label="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -33,7 +26,7 @@
|
|
|
<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="8" v-show="!searchCol">
|
|
|
<el-form-item label="通话结果" prop="OnState">
|
|
|
<el-select v-model="state.queryParams.OnState" placeholder="请选择通话结果" clearable class="w100">
|
|
|
- <el-option v-for="item in state.onStateOption" :value="item.key" :key="item.key" :label="item.value" />
|
|
|
+ <el-option v-for="item in state.onState" :value="item.key" :key="item.key" :label="item.value" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
@@ -56,54 +49,53 @@
|
|
|
<el-card shadow="never">
|
|
|
<!-- 表格 -->
|
|
|
<el-table :data="state.tableList" v-loading="state.loading">
|
|
|
- <el-table-column prop="staffNo" label="工号" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="cpn" label="主叫" show-overflow-tooltip width="120"></el-table-column>
|
|
|
+ <el-table-column prop="cpn" label="主叫" show-overflow-tooltip width="120"></el-table-column>
|
|
|
<el-table-column prop="cdpn" label="被叫" show-overflow-tooltip width="120"></el-table-column>
|
|
|
- <el-table-column prop="areaName" label="号码归属地" show-overflow-tooltip width="120"></el-table-column>
|
|
|
- <el-table-column prop="ringTimes" label="响铃次数" show-overflow-tooltip width="110"></el-table-column>
|
|
|
- <el-table-column prop="trunkLine" label="中继号" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="talkTime" label="通话时间(秒)" show-overflow-tooltip width="120"></el-table-column>
|
|
|
- <el-table-column prop="onStateText" label="通话结果" show-overflow-tooltip> </el-table-column>
|
|
|
- <el-table-column prop="directionText" label="电话方向" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column prop="endByText" label="挂机类型" show-overflow-tooltip width="120"></el-table-column>
|
|
|
- <el-table-column label="ivr开始时间" show-overflow-tooltip width="170">
|
|
|
- <template #default="{ row }">
|
|
|
- <span>{{ formatDate(row.inIvrTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="ivr结束时间" show-overflow-tooltip width="170">
|
|
|
- <template #default="{ row }">
|
|
|
- <span>{{ formatDate(row.inIvrTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="队列开始时间" show-overflow-tooltip width="170">
|
|
|
- <template #default="{ row }">
|
|
|
- <span>{{ formatDate(row.inQueueTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="队列结束时间" show-overflow-tooltip width="170">
|
|
|
- <template #default="{ row }">
|
|
|
- <span>{{ formatDate(row.outQueueTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="开始通话时间" show-overflow-tooltip width="170">
|
|
|
- <template #default="{ row }">
|
|
|
- <span>{{ formatDate(row.beginTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
|
|
|
- </template></el-table-column>
|
|
|
- <el-table-column label="应答时间" show-overflow-tooltip width="170">
|
|
|
- <template #default="{ row }">
|
|
|
- <span>{{ formatDate(row.answeredTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
- <el-table-column label="结束通话时间" show-overflow-tooltip width="170">
|
|
|
- <template #default="{ row }">
|
|
|
- <span>{{ formatDate(row.byeTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
|
|
|
- </template>
|
|
|
- </el-table-column>
|
|
|
+ <el-table-column prop="ringTimes" label="响铃次数" show-overflow-tooltip width="110"></el-table-column>
|
|
|
+ <el-table-column prop="gateway" label="中继号" show-overflow-tooltip width="120"></el-table-column>
|
|
|
+ <el-table-column prop="duration" label="通话时间(秒)" show-overflow-tooltip width="120"></el-table-column>
|
|
|
+ <el-table-column prop="onStateText" label="通话结果" show-overflow-tooltip> </el-table-column>
|
|
|
+ <el-table-column prop="callDirectionText" label="电话方向" show-overflow-tooltip></el-table-column>
|
|
|
+ <el-table-column prop="endByText" label="挂机类型" show-overflow-tooltip width="120"></el-table-column>
|
|
|
+ <el-table-column label="ivr开始时间" show-overflow-tooltip width="170">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <span>{{ formatDate(row.beginIvrTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="ivr结束时间" show-overflow-tooltip width="170">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <span>{{ formatDate(row.endIvrTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="队列开始时间" show-overflow-tooltip width="170">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <span>{{ formatDate(row.beginQueueTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="队列结束时间" show-overflow-tooltip width="170">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <span>{{ formatDate(row.endQueueTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="开始通话时间" show-overflow-tooltip width="170">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <span>{{ formatDate(row.createdTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
|
|
|
+ </template></el-table-column
|
|
|
+ >
|
|
|
+ <el-table-column label="应答时间" show-overflow-tooltip width="170">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <span>{{ formatDate(row.answeredTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
+ <el-table-column label="结束通话时间" show-overflow-tooltip width="170">
|
|
|
+ <template #default="{ row }">
|
|
|
+ <span>{{ formatDate(row.overTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column label="操作" width="160" fixed="right" align="center">
|
|
|
<template #default="{ row }">
|
|
|
- <el-button type="primary" @click="onPlaySoundRecording(row)" title="播放录音" link v-if="row.recordUrl">播放录音</el-button>
|
|
|
- <el-button link type="success" @click="onDownload(row)" title="下载录音" v-if="row.recordUrl"> 下载录音 </el-button>
|
|
|
+ <el-button type="primary" @click="onPlaySoundRecording(row)" title="播放录音" link v-if="row.recordingFileUrl">播放录音</el-button>
|
|
|
+ <el-button link type="success" @click="onDownload(row)" title="下载录音" v-if="row.recordingFileUrl"> 下载录音 </el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
<template #empty>
|
|
@@ -123,16 +115,16 @@
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts" setup name="callLog">
|
|
|
-import {defineAsyncComponent, onMounted, reactive, ref} from 'vue';
|
|
|
-import type {FormInstance} from 'element-plus';
|
|
|
-import {ElButton, ElMessage, ElMessageBox} from 'element-plus';
|
|
|
-import {auth} from '/@/utils/authFunction';
|
|
|
-import {downloadFile, throttle} from '/@/utils/tools';
|
|
|
-import {callBaseData, callLogPaged} from '/@/api/tels/callLog'
|
|
|
-import {formatDate} from "/@/utils/formatTime";
|
|
|
+import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
|
|
|
+import type { FormInstance } from 'element-plus';
|
|
|
+import { ElButton, ElMessage, ElMessageBox } from 'element-plus';
|
|
|
+import { auth } from '/@/utils/authFunction';
|
|
|
+import { downloadFile, throttle } from '/@/utils/tools';
|
|
|
+import { callBaseData, callLogPaged } from '/@/api/tels/callLog';
|
|
|
+import { formatDate } from '/@/utils/formatTime';
|
|
|
|
|
|
// 引入组件
|
|
|
-const PlayRecord = defineAsyncComponent(() => import('/@/views/tels/callLog/component/Play-record.vue')); // 播放录音
|
|
|
+const PlayRecord = defineAsyncComponent(() => import('/@/views/tels/callLog/component/Play-record.vue')); // 播放录音
|
|
|
|
|
|
// 定义变量内容
|
|
|
const state = reactive(<any>{
|
|
@@ -140,17 +132,17 @@ const state = reactive(<any>{
|
|
|
pageIndex: 1, // 当前页
|
|
|
pageSize: 10, // 每页条数
|
|
|
StaffNo: null, // 分机号
|
|
|
- CPN: null, // 中继号码
|
|
|
- CDPN: null, // 分机号
|
|
|
- Direction: null, // 呼叫类型
|
|
|
- OnState: null, // 结果
|
|
|
+ CPN: null, // 中继号码
|
|
|
+ CDPN: null, // 分机号
|
|
|
+ Direction: null, // 呼叫类型
|
|
|
+ OnState: null, // 结果
|
|
|
},
|
|
|
tableList: [], // 列表数据
|
|
|
loading: false, // 加载
|
|
|
total: 0, // 总条数
|
|
|
});
|
|
|
-const ruleFormRef = ref<FormInstance>(); // 表单ref
|
|
|
-const searchCol = ref(true); // 展开/收起
|
|
|
+const ruleFormRef = ref<FormInstance>(); // 表单ref
|
|
|
+const searchCol = ref(true); // 展开/收起
|
|
|
// 展开/收起
|
|
|
const closeSearch = () => {
|
|
|
searchCol.value = !searchCol.value;
|
|
@@ -193,19 +185,19 @@ const onDownload = (row: any) => {
|
|
|
autofocus: false,
|
|
|
})
|
|
|
.then(() => {
|
|
|
- downloadFile(row.recordUrl, row.recordName);
|
|
|
+ downloadFile(row.recordingFileUrl, row.recordingFileName);
|
|
|
// window.open(row.recordUrl);
|
|
|
})
|
|
|
.catch(() => {});
|
|
|
};
|
|
|
// 基础信息
|
|
|
-const getBaseData = async ()=>{
|
|
|
- const response = await callBaseData();
|
|
|
- state.callDirectionOption = response.result.callDirectionOption;
|
|
|
- state.onStateOption = response.result.onStateOption;
|
|
|
-}
|
|
|
+const getBaseData = async () => {
|
|
|
+ const response = await callBaseData();
|
|
|
+ state.callDirection = response.result.callDirection;
|
|
|
+ state.onState = response.result.onState;
|
|
|
+};
|
|
|
onMounted(() => {
|
|
|
- getBaseData();
|
|
|
+ getBaseData();
|
|
|
queryList();
|
|
|
});
|
|
|
</script>
|