From 97522c6f1b6a1c437ca6f25b0a2c3bb68809fb40 Mon Sep 17 00:00:00 2001
From: odjbin <1042039504@qq.com>
Date: Tue, 8 Oct 2024 22:46:23 +0800
Subject: [PATCH 01/11] =?UTF-8?q?fix=20:=20=E6=B5=8B=E8=AF=95=E5=AD=97?=
=?UTF-8?q?=E5=85=B8=E6=8E=A5=E5=8F=A3=E6=B2=A1=E5=8A=A0token?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/utils/request.js | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/utils/request.js b/src/utils/request.js
index c542906..d8d1de4 100644
--- a/src/utils/request.js
+++ b/src/utils/request.js
@@ -50,8 +50,9 @@ serveice.interceptors.response.use(response=>{
}).then(()=>{
removeToken()
window.location = '/login'
+ return Promise.reject('会话已过期,请重新登录')
})
- return Promise.reject('会话已过期,请重新登录')
+ break;
case 402:
break;
case 403:
From b1ee9508ae9d814f8535637aca110681081d089b Mon Sep 17 00:00:00 2001
From: odjbin <1042039504@qq.com>
Date: Tue, 8 Oct 2024 22:50:23 +0800
Subject: [PATCH 02/11] =?UTF-8?q?fix=20:=20=E6=B5=8B=E8=AF=95=E5=AD=97?=
=?UTF-8?q?=E5=85=B8=E6=8E=A5=E5=8F=A3=E6=B2=A1=E5=8A=A0token?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/home/index.vue | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 730561b..01b8371 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -74,13 +74,13 @@ const tableConfig = reactive({
label: '电话拨打状态',
align: 'center',
showOverflowTooltip: false,
- currentRender: ({ row, index }) => {
- if (row.callState !== null) {
- return ()
- } else {
- return '--'
- }
- }
+ // currentRender: ({ row, index }) => {
+ // if (row.callState !== null) {
+ // return ()
+ // } else {
+ // return '--'
+ // }
+ // }
},
{
prop: 'workOrderTime',
From d127df718d88c55bb343a073b529db52467fea2c Mon Sep 17 00:00:00 2001
From: odjbin <1042039504@qq.com>
Date: Tue, 8 Oct 2024 22:55:14 +0800
Subject: [PATCH 03/11] =?UTF-8?q?fix=20:=20=E6=B5=8B=E8=AF=95=E5=AD=97?=
=?UTF-8?q?=E5=85=B8=E6=8E=A5=E5=8F=A3=E6=B2=A1=E5=8A=A0token?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
nginx.conf | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/nginx.conf b/nginx.conf
index 7b3267f..d4fc69e 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -28,6 +28,7 @@ http {
server {
listen 80;
listen [::]:80;
+ server_name _;
location /api {
@@ -37,10 +38,6 @@ http {
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header Host $host;
rewrite "^/api/(.*)$" /$1 break;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection 'upgrade';
- client_max_body_size 30m;
}
location / {
From 768ae544d3007323db6d35a64d1b0e1a21241c06 Mon Sep 17 00:00:00 2001
From: odjbin <1042039504@qq.com>
Date: Tue, 8 Oct 2024 22:57:27 +0800
Subject: [PATCH 04/11] =?UTF-8?q?fix=20:=20=E6=B5=8B=E8=AF=95=E5=AD=97?=
=?UTF-8?q?=E5=85=B8=E6=8E=A5=E5=8F=A3=E6=B2=A1=E5=8A=A0token?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/utils/auth.js | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/utils/auth.js b/src/utils/auth.js
index 55243e8..f59a239 100644
--- a/src/utils/auth.js
+++ b/src/utils/auth.js
@@ -1,25 +1,25 @@
-import Cookies from "js-cookie";
+
export const getToken = () => {
- return Cookies.get('Authorization')
+ return localStorage.getItem('Authorization')
}
export const setToken = (token) => {
- return Cookies.set('Authorization', token)
+ return localStorage.setItem('Authorization', token)
}
export const removeToken = () => {
- return Cookies.remove('Authorization')
+ return localStorage.removeItem('Authorization')
}
export const getAuthInfo = () => {
- return Cookies.get('authinfo')
+ return localStorage.get('authinfo')
}
export const setAuthInfo = (info) => {
- return Cookies.set('authinfo', info)
+ return localStorage.set('authinfo', info)
}
export const removeAuthInfo = () => {
- return Cookies.remove('authinfo')
-}
\ No newline at end of file
+ return localStorage.remove('authinfo')
+}
From 0ddfde74a99fdd3124e4b66b2fedc8116828131c Mon Sep 17 00:00:00 2001
From: odjbin <1042039504@qq.com>
Date: Tue, 8 Oct 2024 23:00:50 +0800
Subject: [PATCH 05/11] =?UTF-8?q?fix=20:=20=E6=B5=8B=E8=AF=95=E5=AD=97?=
=?UTF-8?q?=E5=85=B8=E6=8E=A5=E5=8F=A3=E6=B2=A1=E5=8A=A0token?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/utils/auth.js | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/utils/auth.js b/src/utils/auth.js
index f59a239..de2700d 100644
--- a/src/utils/auth.js
+++ b/src/utils/auth.js
@@ -1,5 +1,3 @@
-
-
export const getToken = () => {
return localStorage.getItem('Authorization')
}
@@ -9,17 +7,18 @@ export const setToken = (token) => {
}
export const removeToken = () => {
- return localStorage.removeItem('Authorization')
+ console.info("🚀 ~method:removeToken -----",)
+ // return localStorage.removeItem('Authorization')
}
export const getAuthInfo = () => {
- return localStorage.get('authinfo')
+ return localStorage.getItem('authinfo')
}
export const setAuthInfo = (info) => {
- return localStorage.set('authinfo', info)
+ return localStorage.setItem('authinfo', info)
}
export const removeAuthInfo = () => {
- return localStorage.remove('authinfo')
+ return localStorage.removeItem('authinfo')
}
From 0aff2a5fabf38220771a1b98f7d5361528e5b74c Mon Sep 17 00:00:00 2001
From: odjbin <1042039504@qq.com>
Date: Tue, 8 Oct 2024 23:07:46 +0800
Subject: [PATCH 06/11] =?UTF-8?q?fix=20:=20=E6=B5=8B=E8=AF=95=E5=AD=97?=
=?UTF-8?q?=E5=85=B8=E6=8E=A5=E5=8F=A3=E6=B2=A1=E5=8A=A0token?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/utils/auth.js | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/utils/auth.js b/src/utils/auth.js
index de2700d..ccfc84c 100644
--- a/src/utils/auth.js
+++ b/src/utils/auth.js
@@ -8,6 +8,7 @@ export const setToken = (token) => {
export const removeToken = () => {
console.info("🚀 ~method:removeToken -----",)
+ debugger
// return localStorage.removeItem('Authorization')
}
From 88b1052f1424dec05ebc249d1a31a1cebf874fa5 Mon Sep 17 00:00:00 2001
From: odjbin <1042039504@qq.com>
Date: Tue, 8 Oct 2024 23:11:58 +0800
Subject: [PATCH 07/11] =?UTF-8?q?fix=20:=20=E6=B5=8B=E8=AF=95=E5=AD=97?=
=?UTF-8?q?=E5=85=B8=E6=8E=A5=E5=8F=A3=E6=B2=A1=E5=8A=A0token?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/liveCall/index.vue | 4 ++--
src/utils/auth.js | 16 ++++++++--------
src/views/home/index.vue | 14 +++++++-------
3 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/components/liveCall/index.vue b/src/components/liveCall/index.vue
index c1c64db..9bc7e06 100644
--- a/src/components/liveCall/index.vue
+++ b/src/components/liveCall/index.vue
@@ -64,9 +64,9 @@ const handleShowDeadLine=(recordObj,data)=>{
}
const initWebSocket = () => {
try {
- // const wsUrl=setWsUrl(`/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}`
+ // const wsUrl = `ws://112.19.165.99:20002/api/ws/text/${token}`
socket = new WebSocket(wsUrl)
// 2. ws.send()给服务器发送信息
//连接发生错误的回调方法
diff --git a/src/utils/auth.js b/src/utils/auth.js
index ccfc84c..a5e2d41 100644
--- a/src/utils/auth.js
+++ b/src/utils/auth.js
@@ -1,25 +1,25 @@
+import Cookies from "js-cookie";
+
export const getToken = () => {
- return localStorage.getItem('Authorization')
+ return Cookies.get('Authorization')
}
export const setToken = (token) => {
- return localStorage.setItem('Authorization', token)
+ return Cookies.set('Authorization', token)
}
export const removeToken = () => {
- console.info("🚀 ~method:removeToken -----",)
- debugger
- // return localStorage.removeItem('Authorization')
+ return Cookies.remove('Authorization')
}
export const getAuthInfo = () => {
- return localStorage.getItem('authinfo')
+ return Cookies.get('authinfo')
}
export const setAuthInfo = (info) => {
- return localStorage.setItem('authinfo', info)
+ return Cookies.set('authinfo', info)
}
export const removeAuthInfo = () => {
- return localStorage.removeItem('authinfo')
+ return Cookies.remove('authinfo')
}
diff --git a/src/views/home/index.vue b/src/views/home/index.vue
index 01b8371..730561b 100644
--- a/src/views/home/index.vue
+++ b/src/views/home/index.vue
@@ -74,13 +74,13 @@ const tableConfig = reactive({
label: '电话拨打状态',
align: 'center',
showOverflowTooltip: false,
- // currentRender: ({ row, index }) => {
- // if (row.callState !== null) {
- // return ()
- // } else {
- // return '--'
- // }
- // }
+ currentRender: ({ row, index }) => {
+ if (row.callState !== null) {
+ return ()
+ } else {
+ return '--'
+ }
+ }
},
{
prop: 'workOrderTime',
From 4c86af02dc3eb57edd46c195a936dbd24f5ce0ff Mon Sep 17 00:00:00 2001
From: odjbin <1042039504@qq.com>
Date: Tue, 8 Oct 2024 23:18:38 +0800
Subject: [PATCH 08/11] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8Dsocket?=
=?UTF-8?q?=E5=9C=B0=E5=9D=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/liveCall/index.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/liveCall/index.vue b/src/components/liveCall/index.vue
index 9bc7e06..1605ba6 100644
--- a/src/components/liveCall/index.vue
+++ b/src/components/liveCall/index.vue
@@ -48,7 +48,7 @@ const scrollToBottom = (scrollbarRef) => {
const setWsUrl = (url) => {
- return (window.location.protocol === 'http:' ? "ws://" : "wss://") + window.location.host + import.meta.env.VITE_BASE_WSURL + url;
+ return (window.location.protocol === 'http:' ? "ws://" : "wss://") + window.location.host + import.meta.env.VITE_BASE_URL + url;
}
const handleLogout = () => {
authStore.userLogout()
From 80272fe80bdd8ecebeec2e2684b0cc9fbba66975 Mon Sep 17 00:00:00 2001
From: odjbin <1042039504@qq.com>
Date: Tue, 8 Oct 2024 23:21:22 +0800
Subject: [PATCH 09/11] =?UTF-8?q?fix=20:=20=E4=BF=AE=E5=A4=8Dsocket?=
=?UTF-8?q?=E5=9C=B0=E5=9D=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
nginx.conf | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/nginx.conf b/nginx.conf
index d4fc69e..7b3267f 100644
--- a/nginx.conf
+++ b/nginx.conf
@@ -28,7 +28,6 @@ http {
server {
listen 80;
listen [::]:80;
- server_name _;
location /api {
@@ -38,6 +37,10 @@ http {
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header Host $host;
rewrite "^/api/(.*)$" /$1 break;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection 'upgrade';
+ client_max_body_size 30m;
}
location / {
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 10/11] =?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 11/11] =?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);
})