|
@@ -1,11 +1,10 @@
|
|
<script setup>
|
|
<script setup>
|
|
-import { useRouter } from 'vue-router'
|
|
|
|
import { workbenchApi } from '@/api/voice/workbench';
|
|
import { workbenchApi } from '@/api/voice/workbench';
|
|
import SearchItemWrapper from '@/components/SearchItemWrapper';
|
|
import SearchItemWrapper from '@/components/SearchItemWrapper';
|
|
import AudioPlayer from '@/components/AudioPlayer';
|
|
import AudioPlayer from '@/components/AudioPlayer';
|
|
import useTableHeight from '@/composables/useTableHeight';
|
|
import useTableHeight from '@/composables/useTableHeight';
|
|
|
|
+import CallView from '@/components/CallView';
|
|
|
|
|
|
-const router = useRouter();
|
|
|
|
const { proxy } = getCurrentInstance();
|
|
const { proxy } = getCurrentInstance();
|
|
const { tableContainer, tableMaxHeight } = useTableHeight();
|
|
const { tableContainer, tableMaxHeight } = useTableHeight();
|
|
|
|
|
|
@@ -14,6 +13,10 @@ const loading = ref(false);
|
|
const tableData = ref([]);
|
|
const tableData = ref([]);
|
|
const total = ref(0);
|
|
const total = ref(0);
|
|
const agentList = ref([]);
|
|
const agentList = ref([]);
|
|
|
|
+const drawer = ref(false);
|
|
|
|
+const callDetails = ref({});
|
|
|
|
+
|
|
|
|
+const isTransitionVoiceStatus = ref(false);
|
|
|
|
|
|
const queryParams = ref({
|
|
const queryParams = ref({
|
|
pageNum: 1,
|
|
pageNum: 1,
|
|
@@ -38,11 +41,15 @@ const handleCleanOptions = () => {
|
|
getList();
|
|
getList();
|
|
}
|
|
}
|
|
|
|
|
|
-const jumpDetails = ({ id }) => {
|
|
|
|
- router.push({
|
|
|
|
- path: '/voice/call/details',
|
|
|
|
- query: { id }
|
|
|
|
- })
|
|
|
|
|
|
+// 语音转化完成
|
|
|
|
+const handleVoiceParsed = (item) => {
|
|
|
|
+ const { parsedVoiceContent } = item;
|
|
|
|
+ callDetails.value.parsedVoiceContent = parsedVoiceContent;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+const jumpDetails = (item) => {
|
|
|
|
+ callDetails.value = item;
|
|
|
|
+ drawer.value = true;
|
|
}
|
|
}
|
|
|
|
|
|
// 音频加载完成
|
|
// 音频加载完成
|
|
@@ -54,11 +61,22 @@ const onAudioLoadDone = ({ durationTime, id }) => {
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+const handleClose = (done) => {
|
|
|
|
+ if ( !isTransitionVoiceStatus.value ) {
|
|
|
|
+ done();
|
|
|
|
+ } else {
|
|
|
|
+ proxy.$modal.msgWarning("当前语音正在转换中,请稍后");
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
// 批量下载
|
|
// 批量下载
|
|
const handleBatchDownload = () => {
|
|
const handleBatchDownload = () => {
|
|
const [timeBegin, timeEnd] = dataPickerValue.value;
|
|
const [timeBegin, timeEnd] = dataPickerValue.value;
|
|
|
|
+ if ( !timeBegin ) {
|
|
|
|
+ return proxy.$modal.msgError("请选择通话发起时间");
|
|
|
|
+ }
|
|
proxy.getDownload("/business/record/downloadBatchByCondition", {
|
|
proxy.getDownload("/business/record/downloadBatchByCondition", {
|
|
- ...queryParams.value, timeBegin, timeEnd
|
|
|
|
|
|
+ ...queryParams.value, timeBeginReq: timeBegin, timeEndReq: timeEnd
|
|
}, `${new Date().getTime()}.zip`);
|
|
}, `${new Date().getTime()}.zip`);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -72,7 +90,7 @@ const getList = () => {
|
|
|
|
|
|
loading.value = true;
|
|
loading.value = true;
|
|
|
|
|
|
- workbenchApi.getCallRecordList({...queryParams.value, timeBegin, timeEnd}).then(({ rows, total:t }) => {
|
|
|
|
|
|
+ workbenchApi.getCallRecordList({...queryParams.value, timeBeginReq:timeBegin, timeEndReq: timeEnd}).then(({ rows, total:t }) => {
|
|
const typeEnum = { 0: '白名单', 1: 'AI客服', 2: '传统服务' };
|
|
const typeEnum = { 0: '白名单', 1: 'AI客服', 2: '传统服务' };
|
|
const statusEnum = { 0: '未接听', 1: '已接通' };
|
|
const statusEnum = { 0: '未接听', 1: '已接通' };
|
|
const serviceCategoryEnum = { 0: '人工坐席', 1: '机器人坐席', 2: '机器人转人工' };
|
|
const serviceCategoryEnum = { 0: '人工坐席', 1: '机器人坐席', 2: '机器人转人工' };
|
|
@@ -108,7 +126,7 @@ onMounted(() => {
|
|
</SearchItemWrapper>
|
|
</SearchItemWrapper>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="6">
|
|
<el-col :span="6">
|
|
- <SearchItemWrapper label="客服">
|
|
|
|
|
|
+ <SearchItemWrapper label="客服名称">
|
|
<el-select v-model="queryParams.userId" placeholder="请选择" size="large" :empty-values="[null, undefined]">
|
|
<el-select v-model="queryParams.userId" placeholder="请选择" size="large" :empty-values="[null, undefined]">
|
|
<el-option label="全部" value="" />
|
|
<el-option label="全部" value="" />
|
|
<el-option v-for="item in agentList" :key="item.id" :label="item.name" :value="item.id" />
|
|
<el-option v-for="item in agentList" :key="item.id" :label="item.name" :value="item.id" />
|
|
@@ -173,6 +191,7 @@ onMounted(() => {
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+ <el-table-column prop="sessionId" label="通话ID" align="center" width="150" />
|
|
<el-table-column prop="timeBegin" label="通话发起时间" align="center" width="180" />
|
|
<el-table-column prop="timeBegin" label="通话发起时间" align="center" width="180" />
|
|
<el-table-column prop="timeEnd" label="通话结束时间" align="center" width="180" />
|
|
<el-table-column prop="timeEnd" label="通话结束时间" align="center" width="180" />
|
|
<el-table-column prop="times" label="通话时长" align="center" />
|
|
<el-table-column prop="times" label="通话时长" align="center" />
|
|
@@ -184,7 +203,7 @@ onMounted(() => {
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="serviceCategoryText" label="服务类型" align="center" width="120"/>
|
|
<el-table-column prop="serviceCategoryText" label="服务类型" align="center" width="120"/>
|
|
- <el-table-column prop="userName" label="客服" align="center" />
|
|
|
|
|
|
+ <el-table-column prop="userName" label="客服名称" align="center" />
|
|
<el-table-column prop="handle" label="操作" align="center" fixed="right" width="150">
|
|
<el-table-column prop="handle" label="操作" align="center" fixed="right" width="150">
|
|
<template #default="scope">
|
|
<template #default="scope">
|
|
<div class="flex justify-center space-x-[20px]">
|
|
<div class="flex justify-center space-x-[20px]">
|
|
@@ -197,8 +216,20 @@ onMounted(() => {
|
|
<pagination v-show="total >= 0" :total="total" v-model:page="queryParams.pageNum"
|
|
<pagination v-show="total >= 0" :total="total" v-model:page="queryParams.pageNum"
|
|
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
v-model:limit="queryParams.pageSize" @pagination="getList" />
|
|
</div>
|
|
</div>
|
|
-
|
|
|
|
</div>
|
|
</div>
|
|
|
|
+
|
|
|
|
+ <el-drawer
|
|
|
|
+ v-model="drawer"
|
|
|
|
+ title="通话详情"
|
|
|
|
+ direction="rtl"
|
|
|
|
+ :before-close="handleClose"
|
|
|
|
+ class="voice-drawer"
|
|
|
|
+ size="800"
|
|
|
|
+ >
|
|
|
|
+ <div>
|
|
|
|
+ <CallView :data="callDetails" noInit @on-end="handleVoiceParsed" v-model="isTransitionVoiceStatus"></CallView>
|
|
|
|
+ </div>
|
|
|
|
+ </el-drawer>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -225,3 +256,13 @@ onMounted(() => {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|
|
|
|
+
|
|
|
|
+<style lang="scss">
|
|
|
|
+.voice-drawer {
|
|
|
|
+ .el-drawer__header {
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
+ color: #333;
|
|
|
|
+ font-weight: bold;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</style>
|