Explorar el Código

reactor:甄别发起流程参数调整;

zhangchong hace 1 año
padre
commit
1c4c0884a7

+ 3 - 0
.env.development

@@ -28,3 +28,6 @@ VITE_AMAP_KEY=83f51df235e4008e4eaf515cff63785c
 # # 呼叫中心socket地址
 VITE_CALLCENTER_SOCKET_URL=ws://222.213.23.229:29003/ola_socket
 
+# # 智能客服socket地址
+VITE_VOICE_ASSISTANT_SOCKET_URL=ws://222.213.23.229:29003/ola_socket
+

+ 4 - 1
.env.production

@@ -26,4 +26,7 @@ VITE_AMAP_SECURITYJSCODE=dd12ddafb11921dbcdc5b9c4484bb4e2
 VITE_AMAP_KEY=83f51df235e4008e4eaf515cff63785c
 
 # # 呼叫中心socket地址
-VITE_CALLCENTER_SOCKET_URL=ws://222.213.23.229:29003/ola_socket
+VITE_CALLCENTER_SOCKET_URL=ws://222.213.23.229:29003/ola_socket
+
+# # 智能客服socket地址
+VITE_VOICE_ASSISTANT_SOCKET_URL=ws://222.213.23.229:29003/ola_socket

+ 1 - 1
src/components/ProcessAudit/index.vue

@@ -831,7 +831,7 @@ const onSubmit = (formEl: FormInstance | undefined) => {
 								typeDicName: state.discernForm.type.dicDataName,
 								content: state.discernForm.content,
 							},
-							workflow: { ...submitObj, files: discernAnnexListRef.value?.fileList },
+							workflow: { ...submitObj, files: discernAnnexListRef.value?.fileList, opinion: state.discernForm.content },
 						};
 						discernApply(requestDiscern)
 							.then(() => {

+ 0 - 31
src/router/index.ts

@@ -134,37 +134,6 @@ router.beforeEach(async (to, from, next) => {
 			NProgress.done();
 		}
 	}
-	// if (to.path === '/login' && !token) {
-	// 	next();
-	// 	NProgress.done();
-	// } else {
-	// 	if (!token) {
-	// 		next(`/login?redirect=${to.path}&params=${JSON.stringify(to.query ? to.query : to.params)}`);
-	// 		Session.clear();
-	// 		Local.clear();
-	// 		NProgress.done();
-	// 	} else if (token && to.path === '/login') {
-	// 		next('/home');
-	// 		NProgress.done();
-	// 	} else {
-	// 		const storesRoutesList = useRoutesList(pinia);
-	// 		const { routesList } = storeToRefs(storesRoutesList);
-	// 		if (routesList.value.length === 0) {
-	// 			if (isRequestRoutes) {
-	// 				// 后端控制路由:路由数据初始化,防止刷新时丢失
-	// 				await initBackEndControlRoutes();
-	// 				// 解决刷新时,一直跳 404 页面问题,关联问题 No match found for location with path 'xxx'
-	// 				next({ path: to.path, query: to.query });
-	// 			} else {
-	// 				// https://gitee.com/lyt-top/vue-next-admin/issues/I5F1HP
-	// 				await initFrontEndControlRoutes();
-	// 				next({ path: to.path, query: to.query });
-	// 			}
-	// 		} else {
-	// 			next();
-	// 		}
-	// 	}
-	// }
 });
 
 // 路由加载后

+ 4 - 4
src/router/route.ts

@@ -1,4 +1,4 @@
-import {RouteRecordRaw} from 'vue-router';
+import { RouteRecordRaw } from 'vue-router';
 
 /**
  *  * 建议:路由 path 路径与文件夹名称相同,找文件可浏览器地址找,方便定位文件位置
@@ -60,7 +60,7 @@ export const dynamicRoutes: Array<RouteRecordRaw> = [
 					isIframe: false,
 					icon: 'iconfont icon-shouye',
 				},
-			}
+			},
 		],
 	},
 ];
@@ -80,7 +80,7 @@ export const notFoundAndNoPower = [
 		},
 	},
 	{
-		path:  "/:pathMatch(.*)",
+		path: '/:pathMatch(.*)',
 		name: 'notFound',
 		component: () => import('/@/views/error/404.vue'),
 		meta: {
@@ -120,5 +120,5 @@ export const staticRoutes: Array<RouteRecordRaw> = [
 		meta: {
 			title: '重置密码',
 		},
-	}
+	},
 ];

+ 0 - 968
src/utils/PhoneScript.ts

@@ -1,968 +0,0 @@
-import { ElMessage, ElNotification } from 'element-plus';
-import router from '/@/router';
-import { storeToRefs } from 'pinia';
-import { WebsocketInterface } from './websocket';
-import { useTelStatus,TelStates, RestStates } from '/@/stores/telStatus';
-import { useAppConfig } from '/@/stores/appConfig';
-import { telRestAdd, telRestProcess, telUnrestWex, restFlowDel } from '/@/api/public/wex';
-import mittBus from '/@/utils/mitt';
-const useTelStatusStore = useTelStatus();
-const { telStatusInfo } = storeToRefs(useTelStatusStore);
-const appConfigStore = useAppConfig();
-const { AppConfigInfo } = storeToRefs(appConfigStore);
-//定义当前登录的用户,在jquery的$(function(){})中对下面参数赋值, 全局变量,取值在PhoneScript.js中处理的,
-const SystemAttr = {
-	CurrentUser: { DepartmentID: '', GongHao: '', FenJi: '', AgentGroupName: ''},
-};
-// 小休原因
-let restReason: string = '';
-/**
- * @description 音频接口对象
- */
-export const VoiceInterfaceObject: any = {
-	// 设置全局变量
-	SetSendModel: function (params: any) {
-		SystemAttr.CurrentUser.DepartmentID = params.DepartmentID || ''; // 部门ID
-		SystemAttr.CurrentUser.GongHao = params.GongHao || ''; // 工号
-		SystemAttr.CurrentUser.FenJi = params.FenJi || ''; // 分机
-		SystemAttr.CurrentUser.AgentGroupName = params.AgentGroupName || ''; // 坐席组
-	},
-	/*
-	 * @@@@全局变量
-	 *
-	 * 当前实体对象
-	 * 下行JSON格式:{ "Action": "", "GongHao": "", "FenJi": "", "PlatFormCode": "", "Params": "" }
-	 * 上行JSON格式:{ "Action": "", "GongHao": "", "FenJi": "", "PlatFormCode": "", "Params": "", "Message": "" }
-	 */
-	GetSendModel: function (action: string, params?: string) {
-		let p_action = action || '';
-		let p_params = params || '';
-		return {
-			Action: p_action,
-			GongHao: SystemAttr.CurrentUser.GongHao,
-			FenJi: SystemAttr.CurrentUser.FenJi,
-			PlatFormCode: SystemAttr.CurrentUser.DepartmentID,
-			Params: p_params,
-		};
-	},
-	/*
-	 * @@@@事件触发
-	 *
-	 * 当前实体对象
-	 * 下行JSON格式:{ "Action": "", "GongHao": "", "FenJi": "", "PlatFormCode": "", "Params": "" }
-	 * 上行JSON格式:{ "Action": "", "GongHao": "", "FenJi": "", "PlatFormCode": "", "Params": "", "Message": "" }
-	 */
-	//弹屏 回调
-	Back_TelPhoneEvent: function (returnVal: { Message: string; Params: any }) {
-		let DialArray:EmptyArrayType = returnVal.Message.split(',');
-		let DialInfo: any = <EmptyObjectType>{};
-		DialInfo.fromTel = DialArray[0]; //来电号码
-		DialInfo.telGongHao = DialArray[1]; //来电工号
-		DialInfo.telArea = DialArray[3]; //来电区域
-		DialInfo.telGuid = DialArray[4]; //来电GUID
-		DialInfo.telIVR = DialArray[5]; //来电IVR名称
-		DialInfo.transfer = DialArray[6]; //转接来源 中继号码
-		DialInfo.telType = returnVal.Params; // 0来电 1外呼 2转接
-
-		console.info(returnVal.Message, DialInfo,DialArray, '来电弹单');
-
-		useTelStatusStore.setCallInfo({
-			telGongHao: DialInfo.telGongHao,
-			fromTel: DialInfo.fromTel,
-			telArea: DialInfo.telArea,
-			telGuid: DialInfo.telGuid,
-			telIVR: DialInfo.telIVR,
-			telType: DialInfo.telType,
-			transfer: DialInfo.transfer,
-		});
-		// 设置电话状态 振铃中
-		useTelStatusStore.setPhoneControlState(TelStates.ring);
-
-		if (DialInfo.telType === '0') {
-			// 来电才展示弹屏
-			// 跳转到录入工单页面
-			router.push({
-				name: 'orderAccept',
-				state: {
-					createBy: 'tel',
-					fromTel: DialInfo.fromTel,
-					telGuid: DialInfo.telGuid,
-					transfer: DialInfo.transfer,
-					telArea: DialInfo.telArea,
-				},
-				params:{
-					callId: DialInfo.telGuid,
-					tagsViewName:'工单受理',
-				}
-			})
-		}
-	},
-	//弹屏 回调
-	// Back_RegNumberState: function (returnVal: any) {
-	//     //Tel,GongHao,URL,Area,Guid,IVR,Remark
-	//     console.log(returnVal);
-	// },
-	//心跳 回调
-	Back_keeplive: function () {
-		// console.log(returnVal);
-	},
-	//登录
-	Login: function () {
-		const modelJson = this.GetSendModel('Login');
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//登录回调
-	Back_Login: function (returnVal: { Params: string }) {
-		if (returnVal.Params == '0') {
-			WebsocketInterface('KeepAlive');
-			// 设置分机号和坐席组
-			useTelStatusStore.setCallInfo({ telsNo: SystemAttr.CurrentUser.FenJi, groupName: SystemAttr.CurrentUser.AgentGroupName });
-			// 设置签入状态
-			useTelStatusStore.setDutyState(true);
-			// 设置电话状态
-			useTelStatusStore.setPhoneControlState(TelStates.dutyOn);
-			this.SetGroupRole(); // 设置组权限
-			this.SetRecordRole(); // 设置录音权限
-			this.SetCallRole(); // 设置呼叫权限
-			this.EndTalkingDeal(); // 结束通话处理
-			ElMessage.success('登录语音系统成功!');
-		} else {
-			ElMessage.error('登录语音系统失败!');
-		}
-	},
-	//设置用户权限
-	SetGroupRole: function () {
-		const modelJson = this.GetSendModel('SetGroupRole', SystemAttr.CurrentUser.AgentGroupName);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//设置用户权限 回调
-	Back_SetGroupRole: function (returnVal: { Params: string; Message: any }) {
-		if (returnVal.Params == '0') {
-			// ElMessage.success(returnVal.Message)
-		} else {
-			ElMessage.error(returnVal.Message);
-		}
-	},
-
-	// 设置录音权限
-	SetRecordRole: function () {
-		const modelJson = this.GetSendModel('SetRecRole', '0');
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	// 设置录音权限 回调
-	Back_SetRecRole: function (returnVal: { Params: string; Message: any }) {
-		if (returnVal.Params == '0') {
-			// ElMessage.success(returnVal.Message)
-		} else {
-			ElMessage.error(returnVal.Message);
-		}
-	},
-	// 设置呼叫权限
-	SetCallRole: function () {
-		const modelJson = this.GetSendModel('SetDialRole', '2');
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	// 设置呼叫权限 回调
-	Back_SetDialRole: function (returnVal: { Params: string; Message: any }) {
-		console.log('设置呼叫权限回调', returnVal);
-		if (returnVal.Params == '0') {
-			// ElMessage.success(returnVal.Message)
-		} else {
-			ElMessage.error(returnVal.Message);
-		}
-	},
-	//登出 当前座席
-	LogOut: function () {
-		const modelJson = this.GetSendModel('LogOut');
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		ElMessage.success('语音系统退出成功!');
-		// 关闭websocket
-		WebsocketInterface('Close');
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//强制登出
-	F_LogOut: function (gongHao: any) {
-		const modelJson = { Action: 'LogOut', GongHao: gongHao, FenJi: '', PlatFormCode: SystemAttr.CurrentUser.DepartmentID, Params: '' };
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//登出回调
-	Back_LogOut: function (returnVal: any) {
-		console.info(returnVal);
-	},
-	//退出事件
-	Back_NoLogin: function (returnVal: any) {
-		ElMessage.error(returnVal.Message);
-		console.info(returnVal.Message);
-	},
-	//示忙当前座席
-	SetBusy: function (reason: string) {
-		const modelJson = this.GetSendModel('SetBusy');
-		restReason = reason || '';
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//强制示忙座席
-	F_SetBusy: function (gongHao: any) {
-		const modelJson = { Action: 'SetBusy', GongHao: gongHao, FenJi: '', PlatFormCode: SystemAttr.CurrentUser.DepartmentID, Params: '' };
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//示忙回调
-	Back_SetBusy: function (returnVal: { Params: string; Message: any }) {
-		if (returnVal.Params == '0') {
-			if (AppConfigInfo.value.IsRestApproval) {
-				// 如果小休需要审核
-				telRestProcess()
-					.then((res: any) => {
-						console.log('小休申请成功', res);
-						// 设置电话状态小休中
-						useTelStatusStore.setPhoneControlState(TelStates.rest);
-						useTelStatusStore.setRest(RestStates.resting);
-						ElMessage.success('小休开始!');
-					})
-					.catch((err: any) => {
-						console.log('小休申请失败', err);
-						restFlowDel().then(() => {
-							// 删除小休流程
-						});
-						this.SetIdle(); // 调用失败示闲
-					});
-			} else {
-				// ElMessage.success('小休开始!');
-				// 设置电话状态小休中
-				useTelStatusStore.setPhoneControlState(TelStates.rest);
-				useTelStatusStore.setRest(RestStates.resting);
-				// 添加小休记录
-				telRestAdd({ reason: restReason })
-					.then((res: any) => {
-						console.log('小休记录添加成功 开始休息', res);
-						ElMessage.success('小休开始!');
-					})
-					.catch((err: any) => {
-						console.log('小休记录添加失败 开始休息', err);
-						this.SetIdle(); // 调用失败示闲
-					});
-			}
-		} else {
-			console.info(returnVal.Message);
-			ElMessage.error(returnVal.Message);
-		}
-	},
-	//示闲当前座席
-	SetIdle: function () {
-		const modelJson = this.GetSendModel('SetIdle');
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//强制示闲座席
-	F_SetIdle: function (gongHao: any) {
-		const modelJson = { Action: 'SetIdle', GongHao: gongHao, FenJi: '', PlatFormCode: SystemAttr.CurrentUser.DepartmentID, Params: '' };
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//示闲回调
-	Back_SetIdle: function (returnVal: { Params: string; Message: any }) {
-		if (returnVal.Params == '0') {
-			// 设置休息状态 设置未正常状态
-			useTelStatusStore.setRest(RestStates.unRest);
-			// 设置话机状态 结束休息改为签入状态
-			useTelStatusStore.setPhoneControlState(TelStates.dutyOn);
-			telUnrestWex()
-				.then((res: any) => {
-					console.log('小休记录修改成功 结束休息', res);
-					ElMessage.success('小休结束!');
-				})
-				.catch((err: any) => {
-					console.log('小休记录修改失败 结束休息', err);
-				});
-		} else {
-			console.info(returnVal.Message);
-			ElMessage.error(returnVal.Message);
-		}
-	},
-	//保持
-	KeepInTouch: function () {
-		const modelJson = this.GetSendModel('KeepInTouch');
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//保持回调
-	Back_KeepInTouch: function (returnVal: { Params: string; Message: any }) {
-		if (returnVal.Params == '0') {
-			// 设置电话状态
-			useTelStatusStore.setHold(true);
-			// 设置电话状态
-			useTelStatusStore.setPhoneControlState(TelStates.onHold);
-			ElMessage('开始保持');
-		} else {
-			console.info(returnVal.Message);
-			ElMessage.error(returnVal.Message);
-		}
-	},
-	//取消保持
-	KeepCancelInTouch: function () {
-		const modelJson = this.GetSendModel('KeepCancelInTouch');
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//取消保持回调
-	Back_KeepCancelInTouch: function (returnVal: { Params: string; Message: any }) {
-		if (returnVal.Params == '0') {
-			// 设置电话状态  取消单个保持为通话中
-			useTelStatusStore.setHold(false);
-			// 设置电话状态
-			useTelStatusStore.setPhoneControlState(TelStates.onCall);
-			ElMessage('取消保持');
-		} else {
-			console.info(returnVal.Message);
-			ElMessage.error(returnVal.Message);
-		}
-	},
-	//开启事后
-	TalkedDealBegin: function () {
-		const modelJson = this.GetSendModel('KeepCancelInTouch');
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//开启事后 回调
-	Back_TalkedDealBegin: function () {},
-	//结束事后
-	TalkedDealEnd: function () {},
-	//结束事后 回调
-	Back_TalkedDealEnd: function () {},
-	//语音呼叫
-	DialOut: function (phone: any) {
-		const modelJson = this.GetSendModel('DialOut', phone);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-			ElMessage.error(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	// 语音呼叫 回调
-	Back_DialOut: function (returnVal: any) {
-		if (returnVal.Params == '0') {
-			ElMessage.success(returnVal.Message);
-		} else {
-			ElMessage.error(returnVal.Message);
-		}
-	},
-	// 语音呼叫 回调
-	Back_dialOut: function (returnVal: any) {
-		console.log(returnVal);
-		if (returnVal.Params !== '0') {
-			ElMessage.error(returnVal.Message);
-		}
-	},
-	//视频呼叫
-	VideoCall: function (phone: any) {
-		const modelJson = this.GetSendModel('VideoCall', phone);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//挂断
-	HangUp: function (phone?: any) {
-		const modelJson = this.GetSendModel('HangUp', phone);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		} else {
-			// closeWrVideo('videortmp');
-		}
-	},
-	//挂断 回调
-	Back_HangUp: function (returnVal: { Params: string; Message: any }) {
-		if (returnVal.Params == '0') {
-			console.info(returnVal.Message);
-			// 设置电话状态
-			useTelStatusStore.setPhoneControlState(TelStates.dutyOn);
-			// 清空时间
-			mittBus.emit('endTalkTime');
-		} else {
-			console.info(returnVal.Message);
-			ElMessage.error(returnVal.Message);
-		}
-	},
-	//强拆 挂断
-	Rtmp: function (phone: any) {
-		const modelJson = this.GetSendModel('Rtmp', phone);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-
-	//自动外呼
-	StartAutoDial: function (phone: any) {
-		const modelJson = this.GetSendModel('StartAutoDial', phone);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-
-	//通知公告
-	Notice: function (tels: string, content: string) {
-		const param = tels + '|' + content;
-		const modelJson = this.GetSendModel('Notice', param);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-
-	//外呼回调
-	Back_Rtmp: function (returnVal: { Params: string; Rtsp: any; Message: any }) {
-		if (returnVal.Params == '0') {
-			console.log(returnVal);
-			/*const videoid = $('#videortmp').prop('id');
-			const suuid = parseInt(String(Math.random() * 100000)) + '' + new Date().getTime();
-			registerWrVideo(suuid, videoid, returnVal.Rtsp);*/
-			//registerWrVideo(returnVal.CallGuid,videoid,returnVal.Rtsp);
-		} else {
-			console.info(returnVal.Message);
-		}
-	},
-
-	//强拆 挂断
-	F_HangUp: function (gongHao: any) {
-		const modelJson = { Action: 'HangUp', GongHao: gongHao, FenJi: '', PlatFormCode: SystemAttr.CurrentUser.DepartmentID, Params: '' };
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-
-	//转接
-	TeleSwitch: function (gongHao: any) {
-		const modelJson = this.GetSendModel('TeleSwitch', gongHao);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//转接 回调
-	Back_TeleSwitch: function (returnVal: { Params: string; Message: any }) {
-		if (returnVal.Params == '0') {
-			console.info(returnVal.Message, '转接成功');
-			ElMessage.success(returnVal.Message);
-
-		} else {
-			console.info(returnVal.Message);
-			ElMessage.error(returnVal.Message);
-		}
-	},
-	// 转接挂机通知事件
-	Back_TransferTrunkTalkingEnd: function (returnVal: { Params: string; Message: any }) {
-		console.log(returnVal, '转接挂断事件');
-		// 重置通话信息
-		useTelStatusStore.resetCallInfo();
-		// 设置电话状态
-		useTelStatusStore.setPhoneControlState(TelStates.dutyOn);
-		mittBus.emit('endTalkTime');
-	},
-	// 转接开始通知事件
-	Back_BeginTransferTalking: function (returnVal: { Params: string; Message: any }) {
-		console.log(returnVal, '转接开始事件');
-		// 设置电话状态
-		useTelStatusStore.setCallInfo({
-			telArea: '', // 电话区号
-			telGuid: '', // 电话guid
-			telIVR: '', // 电话IVR
-			telType: '', //来电 外呼 转接
-			fromTel: '', // 来电号码
-		});
-		// 转接成功可以开启三方通话
-		useTelStatusStore.setPhoneControlState(TelStates.onTransferSuccess);
-
-		// mittBus.emit('endTalkTime');
-	},
-	//代接
-	InsteadOfTele: function (gonghao: any) {
-		const modelJson = this.GetSendModel('InsteadOfTele', gonghao);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//代接 回调
-	Back_InsteadOfTele: function (returnVal: { Params: string; Message: any }) {
-		if (returnVal.Params == '0') {
-			console.info(returnVal.Message);
-		} else {
-			console.info(returnVal.Message);
-		}
-	},
-	//强插
-	CancleChannel: function (gongHao: any) {
-		const modelJson = this.GetSendModel('CancleChannel', gongHao);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//强插 回调
-	Back_CancleChannel: function (returnVal: { Params: string; Message: any }) {
-		if (returnVal.Params == '0') {
-			console.info(returnVal.Message);
-		} else {
-			console.info(returnVal.Message);
-		}
-	},
-	//监听
-	LinkTele: function (gongHao: any) {
-		const modelJson = this.GetSendModel('LinkTele', gongHao);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//开启会议 音频
-	StartMeeting: function (meetId: string, tels: string) {
-		const param = meetId + '|' + tels;
-		const modelJson = this.GetSendModel('StartMeeting', param);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	// 开启会议 音频 回调
-	Back_StartMeeting: function (returnVal: any) {
-		console.log(returnVal, '开启会议 音频 回调');
-	},
-	//开启会议 视频
-	Back_OnMeeting: function (returnVal: any) {
-		console.log(returnVal, '开启会议 音频 回调1');
-	},
-	//视频会议
-	StartVideoMeeting: function (meetId: string, tels: string) {
-		const param = meetId + '|' + tels;
-		const modelJson = this.GetSendModel('StartVideoMeeting', param);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//开启会议 视频
-	StartMeetingVideo: function (meetId: string, urls: string) {
-		const param = meetId + '|' + urls;
-		const modelJson = this.GetSendModel('StartMeetingVideo', param);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//视频推送
-	GetMcuVideo: function (meetId: string, guid: string) {
-		const param = meetId + '|' + guid;
-		const modelJson = this.GetSendModel('GetMcuVideo', param);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//视频推送 回调
-	Back_GetMcuVideo: function (returnVal: { Params: string; Message: any }) {
-		if (returnVal.Params == '0') {
-			console.info(returnVal.Message);
-		} else {
-			console.info(returnVal.Message);
-		}
-	},
-	//禁言
-	ShutDownTalking: function (meetId: string, tel: string) {
-		const param = meetId + '|' + tel;
-		const modelJson = this.GetSendModel('ShutDownTalking', param);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//禁言 回调
-	Back_ShutDownTalking: function (returnVal: { Params: string; Message: any }) {
-		if (returnVal.Params == '0') {
-			console.info(returnVal.Message);
-		} else {
-			console.info(returnVal.Message);
-		}
-	},
-	//踢人
-	ConferGetOut: function (meetId: string, tel: string) {
-		const param = meetId + '|' + tel;
-		const modelJson = this.GetSendModel('ConferGetOut', param);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			console.info(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//踢人 回调
-	Back_ConferGetOut: function (returnVal: { Params: string; Message: any }) {
-		if (returnVal.Params == '0') {
-			console.info(returnVal.Message);
-		} else {
-			console.info(returnVal.Message);
-		}
-	},
-	//禁言所有
-	ShutDownAll: function (meetId: string) {
-		const param = meetId + '|' + SystemAttr.CurrentUser.GongHao;
-		const modelJson = this.GetSendModel('ShutDownAll', param);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			ElMessage(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	//踢人 回调
-	Back_ShutDownAll: function (returnVal: { Params: string; Message: any }) {
-		if (returnVal.Params == '0') {
-			console.info(returnVal.Message);
-		} else {
-			console.info(returnVal.Message);
-		}
-	},
-	//停止会议
-	StopMeeting: function (meetId: any) {
-		const modelJson = this.GetSendModel('StopMeeting', meetId);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		//if (returnVal != 1) {
-		//    console.info(WebsocketInterface("GetError", returnVal));
-		//}else{
-		//    closeWrVideo("video1");
-		//    closeWrVideo("video2");
-		//    closeWrVideo("video3");
-		//    closeWrVideo("video4");
-		//    closeWrVideo("video5");
-		//    closeWrVideo("video6");
-		//    closeWrVideo("video7");
-		//    closeWrVideo("video8");
-		//    closeWrVideo("video9");
-		//    $("video[name='meetvideo']").removeClass("play");
-		//}
-	},
-	// 停止会议 回调
-	Back_StopMeeting: function (returnVal: any) {
-		console.log(returnVal);
-	},
-	//会议结束 回调
-	Back_MeetingEnd: function (returnVal: any) {
-		ElMessage('会议结束');
-		console.log(returnVal);
-	},
-	//监听 回调
-	Back_LinkTele: function (returnVal: { Params: string; Message: any }) {
-		if (returnVal.Params == '0') {
-			console.info(returnVal.Message);
-		} else {
-			console.info(returnVal.Message);
-		}
-	},
-	//分机注册状态回调
-	Back_RegNumberState: function (returnVal: any) {
-
-	},
-	//通话挂机事件回调
-	Back_TalkingEnd: async function (returnVal: { Params: string; Message: any }) {
-		console.log()
-		if (AppConfigInfo.value.IsAutoTalkingDeal && telStatusInfo.value.telType === '0') {
-			// 事后处理(系统配置需要事后处理) 且是来电
-			this.BeginTalkingDeal();
-		}
-
-		console.info(returnVal.Message, '结束通话 挂机'); //解析Message参数	有电话号码|电话唯一ID|录音文件名称
-		// 重置通话信息
-		useTelStatusStore.resetCallInfo();
-		// 设置电话状态
-		useTelStatusStore.setPhoneControlState(TelStates.dutyOn);
-		mittBus.emit('endTalkTime');
-	},
-	// 开启事后处理
-	BeginTalkingDeal: function () {
-		const param: string = '';
-		const modelJson = this.GetSendModel('BeginTalkingDeal', param);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			ElMessage(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	// 开启事后处理 回调
-	Back_BeginTalkingDeal: async function (returnVal: any) {
-		try {
-			const time: number = AppConfigInfo.value.TalkingDealTime * 1000; // 事后处理时间
-			if (returnVal.Params == 0) {
-				ElNotification({
-					title: '自动开启事后处理成功',
-					message: `${returnVal.Message}${AppConfigInfo.value.TalkingDealTime}秒后自动结束事后处理,或者手动结束事后处理`,
-					type: 'success',
-					duration: time,
-				});
-				// 设置事后处理
-				useTelStatusStore.setTalkingDeal(true);
-				// 设置话机状态 设置为事后处理中
-				useTelStatusStore.setPhoneControlState(TelStates.onTalkingDeal);
-				setTimeout(() => {
-					this.EndTalkingDeal(); //自动结束事后,也可以手动调用该方法提前结束事后
-				}, 10000);
-			}
-		} catch {
-			console.log('事后处理失败');
-		}
-	},
-	// 结束事后处理
-	EndTalkingDeal: function () {
-		const param: string = '';
-		const modelJson = this.GetSendModel('EndTalkingDeal', param);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			ElMessage(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	// 结束事后处理 回调
-	Back_EndTalkingDeal: function (returnVal: { Params: string; Message: any }) {
-		if (returnVal.Params == '0') {
-			console.info(returnVal.Message);
-			ElMessage(returnVal.Message);
-			// 设置事后处理
-			useTelStatusStore.setTalkingDeal(false);
-			// 设置话机状态 取消事后处理修改为空闲状态
-			useTelStatusStore.setPhoneControlState(TelStates.dutyOn);
-		} else {
-			console.info(returnVal.Message);
-		}
-	},
-	//振铃结束
-	Back_UserRingEnd: function (returnVal: any) {
-		const DialArray = returnVal.Message.split('|');
-		const telNum = DialArray[0]; //来电号码
-		const telGuid = DialArray[1]; //来电GUID
-		const telVoiceName = DialArray[2]; // 录音文件名
-
-		console.log(telNum, telGuid, telVoiceName);
-		// 重置当前通话信息
-		useTelStatusStore.resetCallInfo();
-		// 设置电话状态
-		useTelStatusStore.setPhoneControlState(TelStates.dutyOn);
-		mittBus.emit('endTalkTime');
-	},
-	//开始通话事件
-	Back_BeginTalking: function (returnVal: { Params: string; Message: any }) {
-		console.info(returnVal.Message, '开始通话'); //解析Message参数	有电话号码|电话唯一ID|录音文件名称
-		mittBus.emit('startTalkTime', returnVal.Message);
-		// 设置电话状态 通话中
-		useTelStatusStore.setPhoneControlState(TelStates.onCall);
-	},
-	//获取视频流事件
-	Back_RtmpVideoMeeting: function (returnVal: { Params: string; Rtsp: any; Tel: any; CallGuid: any }) {
-		console.info('Back_RtmpVideoMeeting');
-		console.log(returnVal);
-		if (returnVal.Params == '1') {
-			return;
-		}
-		/*const vid = $("video[name='meetvideo']:not('.play')").eq(0);
-		const vedioId = vid.prop('id');
-		const _td = vid.closest('td');
-		//var vedioId=$("#video1").prop("id");
-		const uuid = parseInt(String(Math.random() * 100000)) + '' + new Date().getTime();
-		registerWrVideo(uuid, vedioId, returnVal.Rtsp);
-		//registerWrVideo(returnVal.CallGuid, vedioId, returnVal.Rtsp);
-		_td.find("input[name='meet_num']").val(returnVal.Tel);
-		_td.find("input[name='meet_guid']").val(returnVal.CallGuid);
-		vid.addClass('play');*/
-	},
-	Back_EndVideoTalking: function (returnVal: { Params: string; Tel: string }) {
-		console.log(returnVal);
-		if (returnVal.Params == '0') {
-			/*const _td = $("input[name='meet_num'][value='" + returnVal.Tel + "']").closest('td');
-			_td.find("input[name='meet_num']").val('');
-			_td.find("input[name='meet_guid']").val('');
-			_td.find('video').removeClass('play');
-			closeWrVideo(_td.find('video').attr('id'));*/
-		}
-	},
-	Back_StartVideoMeeting: function (returnVal: any) {
-		console.log(returnVal);
-	},
-
-	Back_CloseRtmp: function (returnVal: any) {
-		console.log(returnVal);
-	},
-
-	Back_VideoCall: function (returnVal: any) {
-		console.log(returnVal);
-	},
-
-	Back_BeginVideoTalking: function (returnVal: any) {
-		console.log(returnVal);
-	},
-	//排队信息推送
-	Back_TelQuene: function (returnVal: any) {
-		//  Params: "0" 表示正在排队 Params: "1" 表示排队结束
-		let telQueen = []; // 排队信息
-		telQueen.push(returnVal);
-		telQueen = telQueen.filter((item: any) => item.Params === '0');
-		console.log(telQueen, '21');
-		if (telQueen.length > 0) {
-			ElMessage({
-				message: `当前排队人数:${telQueen.length}`,
-				type: 'info',
-			});
-		}
-	},
-	// 获取座席状态
-	GetOnUserState: function () {
-		const param: string = '';
-		const modelJson = this.GetSendModel('GetOnUserState', param);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			ElMessage(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	// 获取座席状态 回调
-	Back_GetOnUserState: function (returnVal: any) {
-		const stateArray = returnVal.Message.split('|');
-		if(stateArray && stateArray.length){
-			stateArray.forEach((item: any) => {
-				if(item.includes(SystemAttr.CurrentUser.FenJi)){// 判断当前分机
-					const userArray = item.split(',');
-					if (userArray && userArray.length > 0) {
-						const telStateArray = userArray[1].split(':');
-						if (telStateArray && telStateArray.length == 2) {
-							const telState = telStateArray[1];// 获取或当前分机状态
-							const status = item.includes('Busy') ? '示忙' : '空闲';
-							console.log('当前坐席状态:',telState,'空闲状态:',status);
-							if(status === '示忙'){
-								// 设置电话状态小休中
-								useTelStatusStore.setPhoneControlState(TelStates.rest);
-								useTelStatusStore.setRest(RestStates.resting);
-							}else{
-								// 设置话机状态
-								switch (telState) {
-									case '空闲':
-										// 设置签入状态
-										useTelStatusStore.setDutyState(true);
-										// 设置电话状态
-										useTelStatusStore.setPhoneControlState(TelStates.dutyOn);
-										break;
-									case '等待对方响铃': // 呼出振铃
-										// 设置电话状态 振铃中
-										useTelStatusStore.setPhoneControlState(TelStates.ring);
-										break;
-									case '振铃中': // 呼入振铃
-										// 设置电话状态 振铃中
-										useTelStatusStore.setPhoneControlState(TelStates.ring);
-										break;
-									case '通话中':
-										// 开始计时
-										mittBus.emit('startTalkTime', returnVal.Message);
-										// 设置电话状态 通话中
-										useTelStatusStore.setPhoneControlState(TelStates.onCall);
-										break;
-									case "呼叫保持":
-									case "保持中":
-										// 开始计时
-										mittBus.emit('startTalkTime', returnVal.Message);
-										// 设置电话状态
-										useTelStatusStore.setHold(true);
-										// 设置电话状态
-										useTelStatusStore.setPhoneControlState(TelStates.onHold);
-										break;
-									case "转接坐席振铃":
-										// 设置电话状态 振铃中
-										useTelStatusStore.setPhoneControlState(TelStates.ring);
-										break;
-									case "转接坐席通话":// 可以开启三方会议
-										// 转接成功可以开启三方通话
-										useTelStatusStore.setPhoneControlState(TelStates.onTransferSuccess);
-										break;
-									case "被转坐席振铃":
-										// 设置电话状态 振铃中
-										useTelStatusStore.setPhoneControlState(TelStates.ring);
-										break;
-									case "被转接坐席通话":// 相当于振铃中
-										// 设置电话状态 振铃中
-										useTelStatusStore.setPhoneControlState(TelStates.ring);
-										break;
-									default:
-										// 设置签入状态
-										useTelStatusStore.setDutyState(true);
-										// 设置电话状态
-										useTelStatusStore.setPhoneControlState(TelStates.dutyOn);
-										break;
-								}
-							}
-						}
-					}
-				}
-			})
-		}
-	},
-	//  通话DTMF 在通话过程中,需要给运营商或者对方方式按键信息,可用该接口
-	Dtmf: function (param: string) {
-		const modelJson = this.GetSendModel('Dtmf', param);
-		const returnVal = WebsocketInterface('Send', JSON.stringify(modelJson));
-		if (returnVal != 1) {
-			ElMessage(WebsocketInterface('GetError', returnVal));
-		}
-	},
-	// 通话DTMF 回调
-	Back_Dtmf: function (returnVal: any) {
-		console.log(returnVal,'通话DTMF 回调');
-		// 设置三方会议状态
-		useTelStatusStore.setMetTing(true);
-		// 设置话机状态 设置为会议状态
-		useTelStatusStore.setPhoneControlState(TelStates.onConference);
-	},
-	TransferRingEnd: function (param: string) {
-
-	},
-	// 转接响铃挂机事件回调
-	Back_TransferRingEnd: function (returnVal: any) {
-		// 设置电话状态 振铃中
-		useTelStatusStore.setPhoneControlState(TelStates.ring);
-	},
-	// 转接挂机事件回调
-	Back_TransferBHangUp: function (returnVal: any) {
-
-	},
-	// 转接通话事件回调
-	Back_TransferTalking: function (returnVal: any) {
-		// 开始计时
-		mittBus.emit('startTalkTime', returnVal.Message);
-		// 设置电话状态 通话中
-		useTelStatusStore.setPhoneControlState(TelStates.onCall);
-	}
-};

+ 105 - 132
src/utils/websocket.ts

@@ -1,134 +1,107 @@
-/**
-* @description 威而信对接 Websocket对象接口
-* @description 是否有重新连接IsReConnect设置为true,reConnectTime为重连的间隔;是否有心跳IsKeepAlive设置true|false, KeepAliveTime为心跳间隔, KeepAliveData心跳包参数
-* @description 初始化:WebsocketInterface({"url":"",IsReConnect:true|false,reConnectTime:20,onOpen:function(e){},onMessage:function(e){},onError:function(e){},onClose:function(e){} });
-* @description 方法:返回0成功,返回-1失败
-* @description 发送:WebsocketInterface("Send","msg");
-* @description 关闭:WebsocketInterface("Close");
-* @description 重连:WebsocketInterface("ReConnect");
-* @description 心跳:WebsocketInterface("KeepAlive");
-* @description 错误:WebsocketInterface("GetError",code);
-*/
-export const WebsocketInterface = (function () {
-    let wsObject:any = null; //连接对象
-    let wsOptions :any= null; //当前socket的参数
-    let wsInterval:any = null; //当前心跳定时器
-    let wsTimeout:any = null; //当前重连定时器
+import { ElNotification as message } from 'element-plus';
+import { Session } from '/@/utils/storage';
 
-    //方法
-    const Methods:any = {
-        Send: function (param: any) {
-            function send() {
-                wsObject.send(param);
-            }
-            if (wsObject.readyState == 1) {
-                send();
-            }
-        },
-        Close: function () {
-            wsOptions.IsReConnect = false;
-            if (!!wsObject) {
-                wsObject.close();
-            }
-        },
-        ReConnect: function () {
-            const time = wsOptions.reConnectTime || 10; //默认为10秒
-            wsTimeout = setTimeout(function () {
-                WebsocketInterface(wsOptions);
-            }, time * 1000);
-        },
-        KeepAlive: function () {
-            const time = wsOptions.KeepAliveTime || 20; //默认为20秒
-            if (!!wsInterval) {
-                return;
-            }
-            if (wsOptions.IsKeepAlive && !!wsOptions.KeepAliveData) {
-                wsInterval = setInterval(function () {
-                    Methods["Send"](wsOptions.KeepAliveData);
-                }, time * 1000);
-            }
-        },
-        GetError: function (code: number) {
-            let msgStr;
-            switch (code) {
-                case -1:
-                    msgStr = "您的浏览器不支持WebSocket";
-                    break;
-                case 0:
-                    msgStr = "WebSocket连接尚未创建,请先签入";
-                    break;
-                case 1:
-                    msgStr = "WebSocket连接已经建立";
-                    break;
-                case 2:
-                    msgStr = "WebSocket连接正在关闭";
-                    break;
-                case 3:
-                    msgStr = "WebSocket连接已经关闭或不可用";
-                    break;
-                case 4:
-                    msgStr = "指定方法未定义";
-                    break;
-                case 5:
-                    msgStr = "初始化WebSocket未定义url";
-                    break;
-            }
-            return msgStr;
-        }
-    };
-    return function (options: any, param?: string) {
+const websocket: any = {
+	websocket: null,
+	connectURL: import.meta.env.VITE_VOICE_ASSISTANT_SOCKET_URL,
+	// 开启标识
+	socket_open: false,
+	// 心跳timer
+	hearBeat_timer: null,
+	// 心跳发送频率
+	hearBeat_interval: 2 * 1000,
+	// 是否自动重连
+	is_reconnect: true,
+	// 重连次数
+	reconnect_count: 3,
+	// 已发起重连次数
+	reconnect_current: 1,
+	// 重连timer
+	reconnect_timer: null,
+	// 重连频率
+	reconnect_interval: 5 * 1000,
+	init: (receiveMessage: Function | null) => {
+		if (!('WebSocket' in window)) {
+			message.warning('浏览器不支持WebSocket');
+			return null;
+		}
+		const token = Session.get('token');
+		if (!token) {
+			message.warning('websocket认证失败');
+			return null;
+		}
+		const wsUrl = `${import.meta.env.VITE_VOICE_ASSISTANT_SOCKET_URL}${token}/`;
+		websocket.websocket = new WebSocket(wsUrl);
+		websocket.websocket.onmessage = (e: any) => {
+			if (receiveMessage) {
+				receiveMessage(e);
+			}
+		};
+		websocket.websocket.onclose = (e: any) => {
+			websocket.socket_open = false;
+			// 需要重新连接
+			if (websocket.is_reconnect) {
+				websocket.reconnect_timer = setTimeout(() => {
+					// 超过重连次数
+					if (websocket.reconnect_current > websocket.reconnect_count) {
+						clearTimeout(websocket.reconnect_timer);
+						websocket.is_reconnect = false;
+						return;
+					}
+					// 记录重连次数
+					websocket.reconnect_current++;
+					websocket.reconnect();
+				}, websocket.reconnect_interval);
+			}
+		};
+		// 连接成功
+		websocket.websocket.onopen = function () {
+			websocket.socket_open = true;
+			websocket.is_reconnect = true;
+			// 开启心跳
+			websocket.heartbeat();
+		};
+		// 连接发生错误
+		websocket.websocket.onerror = function () {};
+	},
+	heartbeat: () => {
+		websocket.hearBeat_timer && clearInterval(websocket.hearBeat_timer);
 
-        if (options == "GetError") {
-            return Methods["GetError"](param);
-        }
-        if (!window.WebSocket) {
-            return -1;
-        }
-        if (typeof (options) == "string") {//方法
-            if (!wsObject) {
-                return 0;
-            }
-            if (!Methods[options]) {
-                return 4;
-            }
-            Methods[options](param);
-            return wsObject.readyState;
-        } else {//属性或事件
-            if (!wsObject && !options.url) {
-                return 5;
-            }
-            wsOptions = options;
-            wsObject = new WebSocket(options.url);
-            wsObject.onopen = function (e: any) {
-                if (!!options.onOpen) {
-                    options.onOpen(e);
-                }
-            }
-            wsObject.onmessage = function (e: any) {
-                if (!!wsTimeout) {
-                    clearTimeout(wsTimeout); //清空重连
-                    wsTimeout = null;
-                }
-                if (!!options.onMessage) {
-                    options.onMessage(e);
-                }
-            }
-            wsObject.onerror = function (e: any) {
-                if (!!options.onError) {
-                    options.onError(e);
-                }
-            }
-            wsObject.onclose = function (e: any) {
-                if (!!options.onClose) {
-                    options.onClose(e);
-                }
-                clearInterval(wsInterval); //清空心跳
-                wsInterval = null;
-                if (wsOptions.IsReConnect) {//是否重连,如果是手动断开,请调用WebsocketInterface("Close")
-                    Methods.ReConnect();
-                }
-            }
-        }
-        return wsObject.readyState;
-    }
-})();
+		websocket.hearBeat_timer = setInterval(() => {
+			let data = {
+				token: Session.get('token'),
+			};
+			websocket.send(data);
+		}, websocket.hearBeat_interval);
+	},
+	send: (data: { token: any }, callback = null) => {
+		// 开启状态直接发送
+		if (websocket.websocket.readyState === websocket.websocket.OPEN) {
+			websocket.websocket.send(JSON.stringify(data));
+			// @ts-ignore
+			callback && callback();
+		} else {
+			clearInterval(websocket.hearBeat_timer);
+			message({
+				type: 'warning',
+				message: 'socket链接已断开',
+				duration: 1000,
+			});
+		}
+	},
+	close: () => {
+		websocket.is_reconnect = false;
+		websocket.websocket.close();
+		websocket.websocket = null;
+	},
+	/**
+	 * 重新连接
+	 */
+	reconnect: () => {
+		if (websocket.websocket && !websocket.is_reconnect) {
+			websocket.close();
+		}
+		websocket.init(null);
+	},
+};
+export default websocket;

+ 0 - 6
src/views/business/delay/index.vue

@@ -30,12 +30,6 @@
 			</el-form>
 		</el-card>
 		<el-card shadow="never">
-			<!-- 功能按钮 -->
-			<div class="mb20">
-				<el-button type="primary" @click="onExport" v-auth="'business:delay:export'" :disabled="!multipleSelection.length">
-					<SvgIcon name="iconfont icon-daochu" class="mr5" />导出
-				</el-button>
-			</div>
 			<!-- 表格 -->
 			<el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
 				<el-table-column type="selection" width="55" />

+ 0 - 6
src/views/business/discern/apply/index.vue

@@ -21,12 +21,6 @@
 			</el-form>
 		</el-card>
 		<el-card shadow="never">
-			<!-- 功能按钮 -->
-			<div class="mb20">
-				<el-button type="primary" @click="onExport" v-auth="'business:screen:export'" :disabled="!multipleSelection.length">
-					<SvgIcon name="iconfont icon-daochu" class="mr5" />导出
-				</el-button>
-			</div>
 			<!-- 表格 -->
 			<el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
 				<el-table-column type="selection" width="55" />

+ 0 - 6
src/views/business/discern/index.vue

@@ -50,12 +50,6 @@
 			</el-form>
 		</el-card>
 		<el-card shadow="never">
-			<!-- 功能按钮 -->
-			<div class="mb20">
-				<el-button type="primary" @click="onExport" v-auth="'business:discern:export'" :disabled="!multipleSelection.length">
-					<SvgIcon name="iconfont icon-daochu" class="mr5" />导出
-				</el-button>
-			</div>
 			<!-- 表格 -->
 			<el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
 				<el-table-column type="selection" width="55" />

+ 0 - 3
src/views/business/order/index.vue

@@ -151,9 +151,6 @@
 			<!-- 功能按钮 -->
 			<div class="mb20">
 				<el-button type="primary" @click="onCreateRepeatEvent"> <SvgIcon name="ele-Plus" class="mr5" /> 创建重复性事件 </el-button>
-				<el-button type="primary" @click="onExport" v-auth="'business:order:export'" :disabled="!multipleSelection.length">
-					<SvgIcon name="iconfont icon-daochu" class="mr5" />导出
-				</el-button>
 				<el-button type="primary" @click="onObserve" v-auth="'business:order:observe'" :disabled="!multipleSelection.length">
 					<SvgIcon name="ele-View" class="mr5" />设置观察件
 				</el-button>

+ 0 - 6
src/views/business/return/index.vue

@@ -22,12 +22,6 @@
 					</el-col>
 				</el-row>
 			</el-form>
-			<!-- 功能按钮 -->
-			<div class="mb20">
-				<el-button type="primary" @click="onExport" v-auth="'business:supervise:export'" :disabled="!multipleSelection.length">
-					<SvgIcon name="iconfont icon-daochu" class="mr5" />导出
-				</el-button>
-			</div>
 			<!-- 表格 -->
 			<el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
 				<el-table-column type="selection" width="55" />

+ 0 - 6
src/views/business/secondVisit/index.vue

@@ -21,12 +21,6 @@
 			</el-form>
 		</el-card>
 		<el-card shadow="never">
-			<!-- 功能按钮 -->
-			<div class="mb20">
-				<el-button type="primary" @click="onExport" v-auth="'business:countersign:export'" :disabled="!multipleSelection.length">
-					<SvgIcon name="iconfont icon-daochu" class="mr5" />导出
-				</el-button>
-			</div>
 			<!-- 表格 -->
 			<el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
 				<el-table-column type="selection" width="55" />

+ 0 - 6
src/views/business/secondVisitAudit/index.vue

@@ -28,12 +28,6 @@
 			</el-form>
 		</el-card>
 		<el-card shadow="never">
-			<!-- 功能按钮 -->
-			<div class="mb20">
-				<el-button type="primary" @click="onExport" v-auth="'business:countersign:export'" :disabled="!multipleSelection.length">
-					<SvgIcon name="iconfont icon-daochu" class="mr5" />导出
-				</el-button>
-			</div>
 			<!-- 表格 -->
 			<el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
 				<el-table-column type="selection" width="55" />

+ 0 - 6
src/views/business/special/index.vue

@@ -21,12 +21,6 @@
 			</el-form>
 		</el-card>
 		<el-card shadow="never">
-			<!-- 功能按钮 -->
-			<div class="mb20">
-				<el-button type="primary" @click="onExport" v-auth="'business:countersign:export'" :disabled="!multipleSelection.length">
-					<SvgIcon name="iconfont icon-daochu" class="mr5" />导出
-				</el-button>
-			</div>
 			<!-- 表格 -->
 			<el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
 				<el-table-column type="selection" width="55" />

+ 0 - 6
src/views/business/specialAudit/index.vue

@@ -21,12 +21,6 @@
 			</el-form>
 		</el-card>
 		<el-card shadow="never">
-			<!-- 功能按钮 -->
-			<div class="mb20">
-				<el-button type="primary" @click="onExport" v-auth="'business:countersign:export'" :disabled="!multipleSelection.length">
-					<SvgIcon name="iconfont icon-daochu" class="mr5" />导出
-				</el-button>
-			</div>
 			<!-- 表格 -->
 			<el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
 				<el-table-column type="selection" width="55" />

+ 0 - 6
src/views/business/supervise/index.vue

@@ -28,12 +28,6 @@
 			</el-form>
 		</el-card>
 		<el-card shadow="never">
-			<!-- 功能按钮 -->
-			<div class="mb20">
-				<el-button type="primary" @click="onExport" v-auth="'business:supervise:export'" :disabled="!multipleSelection.length">
-					<SvgIcon name="iconfont icon-daochu" class="mr5" />导出
-				</el-button>
-			</div>
 			<!-- 表格 -->
 			<el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
 				<el-table-column type="selection" width="55" />

+ 7 - 10
src/views/home/component/Notice.vue

@@ -31,6 +31,7 @@ import { formatDate } from '/@/utils/formatTime';
 import { useRouter } from 'vue-router';
 import { KnowledgePaged } from '/@/api/knowledge';
 import { bulletinList } from '/@/api/auxiliary/notice';
+import { NavigationFailureType, isNavigationFailure } from 'vue-router';
 const state = reactive({
 	noticeList: [], // 通知公告
 	noticeLoading: false, // 公告
@@ -99,16 +100,12 @@ const more = (val: string) => {
 			router.push({ path: '/knowledge/index' });
 			break;
 		case '1':
-      try {
-        router.push({
-          name: 'auxiliaryNotice',
-          state: {
-            index: '1',
-          },
-        })
-      }catch (error) {
-        console.log(error,'21321')
-      }
+			router.push({
+				path: '/auxiliary/notice',
+				state: {
+					index: '1',
+				},
+			});
 			break;
 		default:
 			break;

+ 134 - 134
src/views/home/component/ToDo.vue

@@ -46,7 +46,7 @@
 				</el-table-column>
 				<el-table-column label="操作" width="100" fixed="right" align="center">
 					<template #default="{ row }">
-            <order-detail :order="row"/>
+						<order-detail :order="row" @updateList="handleChange('0')" />
 					</template>
 				</el-table-column>
 			</template>
@@ -92,153 +92,153 @@
 				<el-table-column label="操作" width="160" fixed="right" align="center">
 					<template #default="{ row }">
 						<el-button link type="primary" @click="onDelayDetail(row)" title="查看延期详情"> 延期详情 </el-button>
-            <order-detail :order="row.order"/>
+						<order-detail :order="row.order" @updateList="handleChange('1')" />
 					</template>
 				</el-table-column>
 			</template>
 			<!-- 甄别待办 -->
 			<template v-if="activeName === '2'">
-        <el-table-column prop="order.no" label="工单编码" show-overflow-tooltip width="150"></el-table-column>
-        <el-table-column width="100" label="省/市工单" prop="isProvince">
-          <template #default="{ row }">
-            <span>{{ row.order?.isProvince ? '省工单' : '市工单' }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="工单标题" show-overflow-tooltip width="300">
-          <template #default="{ row }">
-            <span class="color-primary">{{ row.order?.title }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column prop="statusText" label="甄别状态" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="currentStepName" label="当前节点" show-overflow-tooltip width="150"></el-table-column>
-        <el-table-column prop="order.sourceChannel" label="来源方式" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="order.acceptType" label="受理类型" show-overflow-tooltip width="120"></el-table-column>
-        <el-table-column prop="expiredTime" label="受理人" show-overflow-tooltip width="170">
-          <template #default="{ row }">
-							<span
-              >{{ row.order?.acceptorName }} <span v-if="row.order?.acceptorStaffNo">[{{ row.order?.acceptorStaffNo }}]</span>
-							</span>
-          </template>
-        </el-table-column>
-        <el-table-column prop="order.actualHandleOrgName" label="接办部门" show-overflow-tooltip width="150"></el-table-column>
-        <el-table-column prop="order.startTime" label="受理时间" show-overflow-tooltip width="170">
-          <template #default="{ row }">
-            <span>{{ formatDate(row.order?.startTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column prop="creationTime" label="甄别申请时间" show-overflow-tooltip width="170">
-          <template #default="{ row }">
-            <span>{{ formatDate(row.creationTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column prop="creatorName" label="甄别申请人" show-overflow-tooltip width="170"></el-table-column>
-        <el-table-column prop="creatorOrgName" label="甄别申请部门" show-overflow-tooltip width="200"></el-table-column>
-        <el-table-column prop="typeDicName" label="甄别申请类型" show-overflow-tooltip width="170"></el-table-column>
-        <el-table-column prop="content" label="甄别申请原因" show-overflow-tooltip width="200"></el-table-column>
+				<el-table-column prop="order.no" label="工单编码" show-overflow-tooltip width="150"></el-table-column>
+				<el-table-column width="100" label="省/市工单" prop="isProvince">
+					<template #default="{ row }">
+						<span>{{ row.order?.isProvince ? '省工单' : '市工单' }}</span>
+					</template>
+				</el-table-column>
+				<el-table-column label="工单标题" show-overflow-tooltip width="300">
+					<template #default="{ row }">
+						<span class="color-primary">{{ row.order?.title }}</span>
+					</template>
+				</el-table-column>
+				<el-table-column prop="statusText" label="甄别状态" show-overflow-tooltip></el-table-column>
+				<el-table-column prop="currentStepName" label="当前节点" show-overflow-tooltip width="150"></el-table-column>
+				<el-table-column prop="order.sourceChannel" label="来源方式" show-overflow-tooltip></el-table-column>
+				<el-table-column prop="order.acceptType" label="受理类型" show-overflow-tooltip width="120"></el-table-column>
+				<el-table-column prop="expiredTime" label="受理人" show-overflow-tooltip width="170">
+					<template #default="{ row }">
+						<span
+							>{{ row.order?.acceptorName }} <span v-if="row.order?.acceptorStaffNo">[{{ row.order?.acceptorStaffNo }}]</span>
+						</span>
+					</template>
+				</el-table-column>
+				<el-table-column prop="order.actualHandleOrgName" label="接办部门" show-overflow-tooltip width="150"></el-table-column>
+				<el-table-column prop="order.startTime" label="受理时间" show-overflow-tooltip width="170">
+					<template #default="{ row }">
+						<span>{{ formatDate(row.order?.startTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
+					</template>
+				</el-table-column>
+				<el-table-column prop="creationTime" label="甄别申请时间" show-overflow-tooltip width="170">
+					<template #default="{ row }">
+						<span>{{ formatDate(row.creationTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
+					</template>
+				</el-table-column>
+				<el-table-column prop="creatorName" label="甄别申请人" show-overflow-tooltip width="170"></el-table-column>
+				<el-table-column prop="creatorOrgName" label="甄别申请部门" show-overflow-tooltip width="200"></el-table-column>
+				<el-table-column prop="typeDicName" label="甄别申请类型" show-overflow-tooltip width="170"></el-table-column>
+				<el-table-column prop="content" label="甄别申请原因" show-overflow-tooltip width="200"></el-table-column>
 				<el-table-column label="操作" width="160" fixed="right" align="center">
 					<template #default="{ row }">
 						<el-button link type="primary" @click="onDiscernDetail(row)" title="查看甄别详情"> 甄别详情 </el-button>
-            <order-detail :order="row.order"/>
+						<order-detail :order="row.order" @updateList="handleChange('2')" />
 					</template>
 				</el-table-column>
 			</template>
 			<!-- 发布待办 -->
 			<template v-if="activeName === '3'">
-        <el-table-column prop="no" label="工单编码" show-overflow-tooltip width="150"></el-table-column>
-        <el-table-column width="100" label="省/市工单" prop="isProvince">
-          <template #default="{ row }">
-            <span>{{ row.isProvince ? '省工单' : '市工单' }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column prop="statusText" label="发布状态" show-overflow-tooltip></el-table-column>
-        <el-table-column label="工单标题" show-overflow-tooltip width="300">
-          <template #default="{ row }">
-            <span class="color-primary">{{ row.title }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column prop="sourceChannel" label="来源方式" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="expiredTime" label="受理人" show-overflow-tooltip width="170">
-          <template #default="{ row }">
+				<el-table-column prop="no" label="工单编码" show-overflow-tooltip width="150"></el-table-column>
+				<el-table-column width="100" label="省/市工单" prop="isProvince">
+					<template #default="{ row }">
+						<span>{{ row.isProvince ? '省工单' : '市工单' }}</span>
+					</template>
+				</el-table-column>
+				<el-table-column prop="statusText" label="发布状态" show-overflow-tooltip></el-table-column>
+				<el-table-column label="工单标题" show-overflow-tooltip width="300">
+					<template #default="{ row }">
+						<span class="color-primary">{{ row.title }}</span>
+					</template>
+				</el-table-column>
+				<el-table-column prop="sourceChannel" label="来源方式" show-overflow-tooltip></el-table-column>
+				<el-table-column prop="expiredTime" label="受理人" show-overflow-tooltip width="170">
+					<template #default="{ row }">
 						<span
-            >{{ row.acceptorName }} <span v-if="row.acceptorStaffNo">[{{ row.acceptorStaffNo }}]</span>
+							>{{ row.acceptorName }} <span v-if="row.acceptorStaffNo">[{{ row.acceptorStaffNo }}]</span>
 						</span>
-          </template>
-        </el-table-column>
-        <el-table-column prop="counterSignTypeText" label="中心会签" show-overflow-tooltip width="100"></el-table-column>
+					</template>
+				</el-table-column>
+				<el-table-column prop="counterSignTypeText" label="中心会签" show-overflow-tooltip width="100"></el-table-column>
 				<el-table-column prop="actualHandleOrgName" label="接办部门" show-overflow-tooltip width="120"></el-table-column>
-        <el-table-column prop="actualHandleTime" label="接办时间" show-overflow-tooltip width="170">
-          <template #default="{ row }">
-            <span>{{ formatDate(row.actualHandleTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column prop="startTime" label="受理时间" show-overflow-tooltip width="170">
-          <template #default="{ row }">
-            <span>{{ formatDate(row.startTime, '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.filedTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
-          </template>
-        </el-table-column>
+				<el-table-column prop="actualHandleTime" label="接办时间" show-overflow-tooltip width="170">
+					<template #default="{ row }">
+						<span>{{ formatDate(row.actualHandleTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
+					</template>
+				</el-table-column>
+				<el-table-column prop="startTime" label="受理时间" show-overflow-tooltip width="170">
+					<template #default="{ row }">
+						<span>{{ formatDate(row.startTime, '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.filedTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
+					</template>
+				</el-table-column>
 				<el-table-column label="操作" width="140" fixed="right" align="center">
 					<template #default="{ row }">
-            <el-button link type="primary" @click="onRelease(row)" title="发布工单"> 发布 </el-button>
-            <order-detail :order="row"/>
+						<el-button link type="primary" @click="onRelease(row)" title="发布工单"> 发布 </el-button>
+						<order-detail :order="row" @updateList="handleChange('3')" />
 					</template>
 				</el-table-column>
 			</template>
 			<!-- 回访待办 -->
 			<template v-if="activeName === '4'">
-        <el-table-column prop="order.no" label="工单编码" show-overflow-tooltip width="150"></el-table-column>
-        <el-table-column label="工单标题" show-overflow-tooltip width="300">
-          <template #default="{ row }">
-            <span class="color-primary">{{ row.order?.title }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column prop="order.sourceChannel" label="来源方式" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="visitStateText" label="回访状态" show-overflow-tooltip></el-table-column>
-        <el-table-column prop="order.acceptType" label="受理类型" show-overflow-tooltip width="120"></el-table-column>
-        <el-table-column prop="order.hotspotName" label="热点分类" show-overflow-tooltip width="200"></el-table-column>
-        <el-table-column prop="expiredTime" label="受理人" show-overflow-tooltip width="170">
-          <template #default="{ row }">
+				<el-table-column prop="order.no" label="工单编码" show-overflow-tooltip width="150"></el-table-column>
+				<el-table-column label="工单标题" show-overflow-tooltip width="300">
+					<template #default="{ row }">
+						<span class="color-primary">{{ row.order?.title }}</span>
+					</template>
+				</el-table-column>
+				<el-table-column prop="order.sourceChannel" label="来源方式" show-overflow-tooltip></el-table-column>
+				<el-table-column prop="visitStateText" label="回访状态" show-overflow-tooltip></el-table-column>
+				<el-table-column prop="order.acceptType" label="受理类型" show-overflow-tooltip width="120"></el-table-column>
+				<el-table-column prop="order.hotspotName" label="热点分类" show-overflow-tooltip width="200"></el-table-column>
+				<el-table-column prop="expiredTime" label="受理人" show-overflow-tooltip width="170">
+					<template #default="{ row }">
 						<span
-            >{{ row.order?.acceptorName }} <span v-if="row.order?.acceptorStaffNo">[{{ row.order?.acceptorStaffNo }}]</span>
+							>{{ row.order?.acceptorName }} <span v-if="row.order?.acceptorStaffNo">[{{ row.order?.acceptorStaffNo }}]</span>
 						</span>
-          </template>
-        </el-table-column>
-        <el-table-column prop="order.orgLevelOneName" label="一级部门" show-overflow-tooltip width="150"></el-table-column>
-        <el-table-column prop="order.actualHandleOrgName" label="接办部门" show-overflow-tooltip width="150"></el-table-column>
-        <el-table-column prop="order.startTime" label="受理时间" show-overflow-tooltip width="170">
-          <template #default="{ row }">
-            <span>{{ formatDate(row.order?.startTime, '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.order?.filedTime, '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.publishTime, '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.creationTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column prop="employeeName" label="回访人" show-overflow-tooltip width="150"></el-table-column>
-        <el-table-column label="是否接通" show-overflow-tooltip width="150">
-          <template #default="{ row }">
-            <span>{{ row.isPutThrough ? '未接通' : '已接通' }}</span>
-          </template>
-        </el-table-column>
+					</template>
+				</el-table-column>
+				<el-table-column prop="order.orgLevelOneName" label="一级部门" show-overflow-tooltip width="150"></el-table-column>
+				<el-table-column prop="order.actualHandleOrgName" label="接办部门" show-overflow-tooltip width="150"></el-table-column>
+				<el-table-column prop="order.startTime" label="受理时间" show-overflow-tooltip width="170">
+					<template #default="{ row }">
+						<span>{{ formatDate(row.order?.startTime, '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.order?.filedTime, '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.publishTime, '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.creationTime, 'YYYY-mm-dd HH:MM:SS') }}</span>
+					</template>
+				</el-table-column>
+				<el-table-column prop="employeeName" label="回访人" show-overflow-tooltip width="150"></el-table-column>
+				<el-table-column label="是否接通" show-overflow-tooltip width="150">
+					<template #default="{ row }">
+						<span>{{ row.isPutThrough ? '未接通' : '已接通' }}</span>
+					</template>
+				</el-table-column>
 				<el-table-column label="操作" width="140" fixed="right" align="center">
 					<template #default="{ row }">
 						<el-button link type="primary" @click="onManpower(row)" title="工单回访"> 回访 </el-button>
-            <order-detail :order="row.order"/>
+						<order-detail :order="row.order" @updateList="handleChange('4')" />
 					</template>
 				</el-table-column>
 			</template>
@@ -246,14 +246,14 @@
 				<Empty />
 			</template>
 		</el-table>
-    <!--  延期详情  -->
-    <delay-detail ref="delayDetailRef" @updateList="handleChange('1')" />
-    <!-- 甄别详情 -->
-    <discern-detail ref="discernDetailRef" @updateList="handleChange('2')"/>
-    <!-- 工单发布详情 -->
-    <order-publish ref="orderPublishRef" @updateList="handleChange('3')"/>
-    <!-- 回访 -->
-    <visit-detail ref="visitDetailRef"  @updateList="handleChange('4')"/>
+		<!--  延期详情  -->
+		<delay-detail ref="delayDetailRef" @updateList="handleChange('1')" />
+		<!-- 甄别详情 -->
+		<discern-detail ref="discernDetailRef" @updateList="handleChange('2')" />
+		<!-- 工单发布详情 -->
+		<order-publish ref="orderPublishRef" @updateList="handleChange('3')" />
+		<!-- 回访 -->
+		<visit-detail ref="visitDetailRef" @updateList="handleChange('4')" />
 	</el-card>
 </template>
 <script setup lang="ts">
@@ -265,7 +265,7 @@ import { delayList } from '/@/api/todo/delay';
 import { screenList } from '/@/api/business/discern';
 import { publishList } from '/@/api/todo/publish';
 import { visitList } from '/@/api/todo/visit';
-import {ElButton} from "element-plus";
+import { ElButton } from 'element-plus';
 
 const OrderDetail = defineAsyncComponent(() => import('/@/components/OrderDetail/index.vue')); // 工单详情
 const DelayDetail = defineAsyncComponent(() => import('/@/views/business/delay/components/Delay-detail.vue')); // 延期详情
@@ -306,22 +306,22 @@ const activeName = ref<string>('0'); // tab切换
 // 查看延期详情
 const delayDetailRef = ref<RefType>();
 const onDelayDetail = (row: any) => {
-  delayDetailRef.value.openDialog(row);
+	delayDetailRef.value.openDialog(row);
 };
 // 查看甄别详情
 const discernDetailRef = ref<RefType>();
 const onDiscernDetail = (row: any) => {
-  discernDetailRef.value.openDialog(row);
+	discernDetailRef.value.openDialog(row);
 };
 // 发布
 const orderPublishRef = ref<RefType>(); // 工单发布详情ref
 const onRelease = (row: any) => {
-  orderPublishRef.value.openDialog(row);
+	orderPublishRef.value.openDialog(row);
 };
 // 工单回访
 const visitDetailRef = ref<RefType>(); // 工单回访ref
 const onManpower = (row: any) => {
-  visitDetailRef.value.openDialog(row);
+	visitDetailRef.value.openDialog(row);
 };
 // tab切换
 const handleChange = async (tab: any) => {
@@ -329,7 +329,7 @@ const handleChange = async (tab: any) => {
 	switch (tab) {
 		case '0': // 工单待办
 			try {
-				const res: any = await orderListTodo({...state.queryParams,IsHandled:'false'});
+				const res: any = await orderListTodo({ ...state.queryParams, IsHandled: 'false' });
 				state.tableList = res.result?.items ?? [];
 				state.tableLoading = false;
 			} catch (error) {

+ 2 - 2
src/views/query/overdue/index.vue

@@ -22,11 +22,11 @@
 		</el-card>
 		<el-card shadow="never">
 			<!-- 功能按钮 -->
-			<div class="mb20">
+<!--			<div class="mb20">
 				<el-button type="primary" @click="onExport" v-auth="'business:overdue:export'" :disabled="!multipleSelection.length">
 					<SvgIcon name="iconfont icon-daochu" class="mr5" />导出
 				</el-button>
-			</div>
+			</div>-->
 			<!-- 表格 -->
 			<el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
 				<el-table-column type="selection" width="55" />

+ 0 - 6
src/views/query/overdueSoon/index.vue

@@ -21,12 +21,6 @@
 			</el-form>
 		</el-card>
 		<el-card shadow="never">
-			<!-- 功能按钮 -->
-			<div class="mb20">
-				<el-button type="primary" @click="onExport" v-auth="'business:overdueSoon:export'" :disabled="!multipleSelection.length">
-					<SvgIcon name="iconfont icon-daochu" class="mr5" />导出
-				</el-button>
-			</div>
 			<!-- 表格 -->
 			<el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
 				<el-table-column type="selection" width="55" />

+ 0 - 6
src/views/query/redo/index.vue

@@ -23,12 +23,6 @@
 			</el-form>
 		</el-card>
 		<el-card shadow="never">
-			<!-- 功能按钮 -->
-			<div class="mb20">
-				<el-button type="primary" @click="onExport" v-auth="'business:supervise:export'" :disabled="!multipleSelection.length">
-					<SvgIcon name="iconfont icon-daochu" class="mr5" />导出
-				</el-button>
-			</div>
 			<!-- 表格 -->
 			<el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
 				<el-table-column type="selection" width="55" />

+ 0 - 6
src/views/query/repeal/index.vue

@@ -20,12 +20,6 @@
 			</el-form>
 		</el-card>
 		<el-card shadow="never">
-			<!-- 功能按钮 -->
-			<div class="mb20">
-				<el-button type="primary" @click="onExport" v-auth="'business:repeal:export'" :disabled="!multipleSelection.length">
-					<SvgIcon name="iconfont icon-daochu" class="mr5" />导出
-				</el-button>
-			</div>
 			<!-- 表格 -->
 			<el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
 				<el-table-column type="selection" width="55" />

+ 0 - 6
src/views/query/urge/index.vue

@@ -21,12 +21,6 @@
 			</el-form>
 		</el-card>
 		<el-card shadow="never">
-			<!-- 功能按钮 -->
-			<div class="mb20">
-				<el-button type="primary" @click="onExport" v-auth="'business:supervise:export'" :disabled="!multipleSelection.length">
-					<SvgIcon name="iconfont icon-daochu" class="mr5" />导出
-				</el-button>
-			</div>
 			<!-- 表格 -->
 			<el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
 				<el-table-column type="selection" width="55" />

+ 0 - 2
src/views/system/config/dict/index.vue

@@ -63,8 +63,6 @@
 									<!-- <el-button type="primary" @click="onRowDel" v-waves v-auth="'100104'">
                                     <SvgIcon name="ele-Delete" class="mr5" />注销
                                 </el-button> -->
-									<!-- <el-button type="primary" v-waves @click="onExportTable">
-										<SvgIcon name="iconfont icon-daochu" class="mr5" />导出 </el-button> -->
                   </el-col>
                 </el-row>
 							<!-- 表格 -->

+ 0 - 6
src/views/todo/order/index.vue

@@ -30,12 +30,6 @@
 					</el-col>
 				</el-row>
 			</el-form>
-			<!-- 功能按钮 -->
-			<div class="mb20">
-				<el-button type="primary" @click="onExport" v-auth="'todo:order:export'" :disabled="!multipleSelection.length">
-					<SvgIcon name="iconfont icon-daochu" class="mr5" />导出
-				</el-button>
-			</div>
 			<!-- 表格 -->
 			<el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
 				<el-table-column type="selection" width="40" />

+ 10 - 13
src/views/todo/publish/index.vue

@@ -115,19 +115,16 @@ const state = reactive(<any>{
 });
 /** 获取列表 */
 const queryList = throttle(() => {
-	if (!auth('todo:publish:query')) ElMessage.error('抱歉,您没有权限查看工单发布列表!');
-	else {
-		state.loading = true;
-		publishList(state.queryParams)
-			.then((res: any) => {
-				state.tableData = res.result?.items ?? [];
-				state.total = res.result?.total ?? 0;
-				state.loading = false;
-			})
-			.catch((err: any) => {
-				state.loading = false;
-			});
-	}
+	state.loading = true;
+	publishList(state.queryParams)
+		.then((res: any) => {
+			state.tableData = res.result?.items ?? [];
+			state.total = res.result?.total ?? 0;
+			state.loading = false;
+		})
+		.catch((err: any) => {
+			state.loading = false;
+		});
 }, 300);
 const selectable = (row: any) => {
 	//设置省工单不可选(不可批量发布)

+ 1 - 3
src/views/todo/return/index.vue

@@ -118,9 +118,7 @@ const state = reactive(<any>{
 });
 /** 获取列表 */
 const queryList = throttle(() => {
-	if (!auth('todo:return:query')) ElMessage.error('抱歉,您没有权限查看退回待办!');
-	else {
-	}
+	
 }, 300);
 // 切换tab 查询列表
 const handleClick = () => {

+ 25 - 1
src/views/todo/seats/accept/Voice-assistant.vue

@@ -1,4 +1,28 @@
 <template>语音助手</template>
-<script setup lang="ts"></script>
+<script setup lang="ts">
+import { onBeforeMount } from 'vue';
+import websocket from '/@/utils/websocket';
+import { ElNotification } from 'element-plus';
+
+// 设置初始化,防止刷新时恢复默认
+onBeforeMount(() => {
+	//websocket 模块
+	websocket.init(wsReceive);
+});
+
+// ws接收消息
+const wsReceive = (message: any) => {
+	const data = JSON.parse(message.data);
+	if (data.contentType === 'SYSTEM') {
+		ElNotification({
+			title: '系统消息',
+			message: data.content,
+			type: 'success',
+			position: 'bottom-right',
+			duration: 5000,
+		});
+	}
+};
+</script>
 
 <style scoped lang="scss"></style>

+ 9 - 15
src/views/todo/seats/index.vue

@@ -33,9 +33,6 @@
 			<!-- 功能按钮 -->
 			<div class="mb20">
 				<el-button type="primary" @click="onAddOrder" v-auth="'todo:seats:add'"> <SvgIcon name="ele-Plus" class="mr5" />新建工单 </el-button>
-				<el-button type="primary" @click="onExport" v-auth="'todo:order:export'" :disabled="!multipleSelection.length">
-					<SvgIcon name="iconfont icon-daochu" class="mr5" />导出
-				</el-button>
 			</div>
 			<!-- 表格 -->
 			<el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
@@ -140,7 +137,7 @@
 				</template>
 				<el-table-column label="操作" width="140" fixed="right" align="center">
 					<template #default="{ row }">
-						<el-button link type="success" @click="onOrderEdit(row)" title="编辑工单" v-if="row.canEdit"> 修改 </el-button>
+						<el-button link type="success" @click="onOrderEdit(row)" title="编辑工单" v-if="row.canEdit" v-auth="'todo:seats:edit'"> 修改 </el-button>
 						<el-button link type="primary" @click="onSign(row)" title="签收工单" v-if="row.canSign" v-auth="'todo:seats:sign'"> 签收 </el-button>
 						<order-detail :order="row" @updateList="queryList" />
 					</template>
@@ -194,17 +191,14 @@ const router = useRouter(); // 路由
 // 获取查询条件基础信息
 /** 获取列表 */
 const queryList = throttle(async () => {
-	if (!auth('todo:seats:query')) ElMessage.error('抱歉,您没有权限查看工单待办!');
-	else {
-		try {
-			state.loading = true;
-			const res: any = await seatsListTodo(state.queryParams);
-			state.tableData = res.result?.items ?? [];
-			state.total = res.result?.total ?? 0;
-			state.loading = false;
-		} catch (e) {
-			state.loading = false;
-		}
+	try {
+		state.loading = true;
+		const res: any = await seatsListTodo(state.queryParams);
+		state.tableData = res.result?.items ?? [];
+		state.total = res.result?.total ?? 0;
+		state.loading = false;
+	} catch (e) {
+		state.loading = false;
 	}
 }, 300);
 /** 重置按钮操作 */

+ 0 - 6
src/views/todo/urge/index.vue

@@ -21,12 +21,6 @@
 			</el-form>
 		</el-card>
 		<el-card shadow="never">
-			<!-- 功能按钮 -->
-			<div class="mb20">
-				<el-button type="primary" @click="onExport" v-auth="'business:supervise:export'" :disabled="!multipleSelection.length">
-					<SvgIcon name="iconfont icon-daochu" class="mr5" />导出
-				</el-button>
-			</div>
 			<!-- 表格 -->
 			<el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">
 				<el-table-column type="selection" width="55" />

+ 0 - 3
src/views/todo/visit/index.vue

@@ -34,9 +34,6 @@
 				<el-button type="primary" @click="smartFollowUp" :disabled="!multipleSelection.length" v-auth="'todo:visit:smart'">
 					<SvgIcon name="iconfont icon-diannao1" class="mr5" />智能回访</el-button
 				>
-				<el-button type="primary" @click="onExport" :disabled="!multipleSelection.length" v-auth="'todo:visit:export'">
-					<SvgIcon name="iconfont icon-daochu" class="mr5" />导出</el-button
-				>
 			</div>
 			<!-- 表格 -->
 			<el-table :data="state.tableData" v-loading="state.loading" row-key="id" ref="multipleTableRef" @selection-change="handleSelectionChange">