From 02b1cc03f706da9d732fde391949b807cf44e16b Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Sun, 13 Oct 2024 15:20:06 +0800 Subject: [PATCH 1/2] =?UTF-8?q?feat=20:=20=E8=AF=AD=E9=9F=B3=E8=AF=9D?= =?UTF-8?q?=E6=9C=AF=E9=85=8D=E7=BD=AE=E6=B7=BB=E5=8A=A0=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../voice-management/verbal-trick/index.vue | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/views/voice-management/verbal-trick/index.vue b/src/views/voice-management/verbal-trick/index.vue index 3fa7e40..a94aa1c 100644 --- a/src/views/voice-management/verbal-trick/index.vue +++ b/src/views/voice-management/verbal-trick/index.vue @@ -87,6 +87,30 @@ const verbalTrickTableConfig = reactive({ label: '内容', align: 'center' }, + { + prop: 'calloff', + label: '是否挂断电话', + align: 'center', + currentRender: ({ row, index }) => { + if (row.calloff !== null) { + return () + } else { + return '--' + } + } + }, + { + prop: 'type', + label: '上下文类型', + align: 'center', + currentRender: ({ row, index }) => { + if (row.type !== null) { + return () + } else { + return '--' + } + } + }, { prop: 'createTime', label: '创建时间', From 4a6ce6109101d7d2c0575c7821b754c54bd2acd9 Mon Sep 17 00:00:00 2001 From: odjbin <1042039504@qq.com> Date: Sun, 13 Oct 2024 15:57:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?feat=20:=20=E8=8E=B7=E5=8F=96=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E5=8F=B0=E5=BD=93=E5=89=8D=E7=BA=BF=E8=B7=AF=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/workbench/index.js | 11 +++++-- src/components/liveCall/LiveCallItemHome.vue | 6 ++-- src/components/liveCall/index.vue | 33 ++++++++++++++------ 3 files changed, 35 insertions(+), 15 deletions(-) diff --git a/src/api/workbench/index.js b/src/api/workbench/index.js index ceedeca..9784551 100644 --- a/src/api/workbench/index.js +++ b/src/api/workbench/index.js @@ -1,11 +1,16 @@ import request from '@/utils/request.js' -import { method } from 'lodash' //获取历史通话文本记录 - export const getHistoryCallContent=(params)=>{ return request({ url:`/text/history/list/${params}`, method:'get' }) -} \ No newline at end of file +} +//获取工作台当前线路记录 +export const getCurrentContent=(line)=>{ + return request({ + url:`/text/records/${line}`, + method:'get' + }) +} diff --git a/src/components/liveCall/LiveCallItemHome.vue b/src/components/liveCall/LiveCallItemHome.vue index b6ee640..3ac1f11 100644 --- a/src/components/liveCall/LiveCallItemHome.vue +++ b/src/components/liveCall/LiveCallItemHome.vue @@ -6,12 +6,14 @@ 电话号码:{{ recordObj.phone ||'--'}}
工单名称:{{ recordObj.orderName||'--' }}
- -
{{ lineName }}
+
{{ recordObj.type=='1'?'线路一':recordObj.type=='2'?'线路二':'' }}
+
{{ lineName }}
+
+ {{item.lineMsg}}
{{ item.conversationTimestamp || '6月5日 12:05' }}
diff --git a/src/components/liveCall/index.vue b/src/components/liveCall/index.vue index 1605ba6..3d3a8b5 100644 --- a/src/components/liveCall/index.vue +++ b/src/components/liveCall/index.vue @@ -10,6 +10,7 @@ import {useAuthStore} from '@/stores/userstore.js' import {getToken} from '@/utils/auth' import {usePermisstionStroe} from '@/stores/permisstion' +import {getCurrentContent} from "@/api/workbench"; const permisstionStore = usePermisstionStroe() const authStore = useAuthStore() @@ -37,6 +38,24 @@ let token = getToken(); let send = { type: "ping", }; +// if(localStorage.getItem('recordLeftObj')){ +// recordLeftObj.value=JSON.parse(localStorage.getItem('recordLeftObj')) +// } +// if(localStorage.getItem('recordRightObj')){ +// recordRightObj.value=JSON.parse(localStorage.getItem('recordRightObj')) +// } +const getCurrentMsg=(line)=>{ + getCurrentContent(line).then(res=>{ + // console.info("🚀 ~method:res -----", res) + if(line==1){ + recordLeftObj.value.content=res.data + }else if(line==2){ + recordRightObj.value.content=res.data + } + }) +} +getCurrentMsg(1) +getCurrentMsg(2) //滚动面板自动滑动到底部 const scrollToBottom = (scrollbarRef) => { if (scrollbarRef) { @@ -64,8 +83,8 @@ const handleShowDeadLine=(recordObj,data)=>{ } const initWebSocket = () => { try { - const wsUrl=setWsUrl(`/ws/text/${token}`) - // const wsUrl = `ws://frp.feashow.cn:31800/ws/text/${token}` + // const wsUrl=setWsUrl(`/ws/text/${token}`) + const wsUrl = `ws://frp.feashow.cn:31800/ws/text/${token}` // const wsUrl = `ws://112.19.165.99:20002/api/ws/text/${token}` socket = new WebSocket(wsUrl) // 2. ws.send()给服务器发送信息 @@ -104,16 +123,13 @@ const initWebSocket = () => { console.info("🚀 ~method:flag -----", flag) if(flag){ recordLeftObj.value.content.push({ - // callIdNumber: "17282197782048", - // conversationId:0, - // conversationTimestamp: "", - // createTime: "2024-10-08", isLine:true, lineMsg: "一轮通话结束~~", speaker: data.content.speaker }) } recordLeftObj.value.content.push(data.content) + localStorage.setItem('recordLeftObj',JSON.stringify(recordLeftObj.value)) // console.info("🚀 ~method:onmessage -----", recordLeftObj.value) nextTick(() => { scrollToBottom(recordLeftRef.value) @@ -127,10 +143,6 @@ const initWebSocket = () => { console.info("🚀 ~method:flag -----", flag) if(flag){ recordRightObj.value.content.push({ - // callIdNumber: "17282197782048", - // conversationId:0, - // conversationTimestamp: "", - // createTime: "2024-10-08", isLine:true, lineMsg: "一轮通话结束~~", speaker: data.content.speaker @@ -138,6 +150,7 @@ const initWebSocket = () => { } recordRightObj.value.content.push(data.content) // console.info("🚀 ~method:onmessage -----", recordRightObj.value) + localStorage.setItem('recordRightObj',JSON.stringify(recordRightObj.value)) nextTick(() => { scrollToBottom(recordRightRef.value); })