|
@@ -1,629 +0,0 @@
|
|
|
-<template>
|
|
|
- <scale-screen
|
|
|
- width="1920"
|
|
|
- height="1080"
|
|
|
- :delay="500"
|
|
|
- :fullScreen="true"
|
|
|
- :boxStyle="{
|
|
|
- overflow: themeConfig.isScale ? 'hidden' : 'auto',
|
|
|
- }"
|
|
|
- :autoScale="themeConfig.isScale"
|
|
|
- >
|
|
|
- <div class="content_wrap">
|
|
|
- <Headers :data="seatsList" />
|
|
|
- <Container :data="seatsList" />
|
|
|
- </div>
|
|
|
- </scale-screen>
|
|
|
-</template>
|
|
|
-<script setup lang="ts" name="seats">
|
|
|
-import { defineAsyncComponent, onMounted, ref } from "vue";
|
|
|
-import { storeToRefs } from "pinia";
|
|
|
-import { useThemeConfig } from "@/stores/themeConfig";
|
|
|
-import { useTimeoutFn, useWebSocket } from "@vueuse/core";
|
|
|
-import { useGlobalState } from "@/utils/callCenter";
|
|
|
-import { getNowDateTime } from "@/utils/constants";
|
|
|
-import { ElMessage } from "element-plus";
|
|
|
-import mittBus from "@/utils/mitt";
|
|
|
-
|
|
|
-const ScaleScreen = defineAsyncComponent(
|
|
|
- () => import("@/components/Scale-screen/index.vue")
|
|
|
-);
|
|
|
-const Headers = defineAsyncComponent(
|
|
|
- () => import("@/views/seatMonitor/header.vue")
|
|
|
-);
|
|
|
-const Container = defineAsyncComponent(
|
|
|
- () => import("@/views/seatMonitor/container.vue")
|
|
|
-);
|
|
|
-
|
|
|
-const m_strUserNo = ref(""); // 分机号码
|
|
|
-const m_strUserName = ref(""); // 用户名称
|
|
|
-const m_strJobNum = ref("1"); // 坐席工号
|
|
|
-const m_strSkillId = ref("1"); // 技能组
|
|
|
-const m_strLevel = ref("1"); // 优先级别
|
|
|
-const m_strGroup = ref("1"); // 分组ID
|
|
|
-const m_strCompanyId = ref(""); // 企业编码
|
|
|
-const m_bLogin = ref(false); // 登录状态
|
|
|
-const m_bTelBusy = ref(false); // 是否示忙中
|
|
|
-const m_strIsMonitor = ref("1"); // 是否监控分机 1-是监控分机
|
|
|
-const callId = ref(""); // 通话ID
|
|
|
-const m_IsCallOut = ref(false); // 是否呼出
|
|
|
-const m_IsCallIn = ref(false); // 是否是呼入
|
|
|
-const m_strOpenFlag = ref("2"); // 来电弹屏方式 1-接通弹屏;2-振铃弹屏
|
|
|
-const m_CallOutOpen = ref(false); // 呼出是否弹屏(用于未接统计“回拨”业务处理)
|
|
|
-const m_bIsOpen = ref(false); // 是否已经弹屏
|
|
|
-const m_bCallConnect = ref(false); // 是否在通话状态
|
|
|
-const m_IsConsult = ref(false); // 是否咨询
|
|
|
-const m_strConsultType = ref("-1"); // 咨询类型
|
|
|
-const m_IsHangup = ref(false); // 是否挂机
|
|
|
-const m_IsHold = ref(false); // 是否保持
|
|
|
-const m_IsTalkingDeal = ref(false); // 是否通话整理
|
|
|
-const m_IsMonListen = ref("0"); // 监控状态 0-未监听;1-监控成功;2-监控失败;
|
|
|
-const m_strTelState = ref("0"); // 当前状态
|
|
|
-
|
|
|
-const globalState = useGlobalState(); // 全局变量
|
|
|
-const userAlreadyLogin = ref(false);
|
|
|
-// 发送消息
|
|
|
-const e_TelSendMsg = (strObj: Object) => {
|
|
|
- // 客户端当前时间
|
|
|
- const strMsg = JSON.stringify(strObj);
|
|
|
- console.log(`${getNowDateTime()} 发送消息:`, strMsg, wsRef.value.status);
|
|
|
- if (wsRef.value.ws?.readyState === 1) {
|
|
|
- // 已经链接并且可以通讯,则发放文本消息
|
|
|
- wsRef.value.send(strMsg);
|
|
|
- } else {
|
|
|
- ElMessage.error("请先签入");
|
|
|
- }
|
|
|
-};
|
|
|
-// ws实例对象
|
|
|
-const wsRef = ref();
|
|
|
-const storesThemeConfig = useThemeConfig();
|
|
|
-const { themeConfig } = storeToRefs(storesThemeConfig);
|
|
|
-const initWs = () => {
|
|
|
- // themeConfig.value.callCenterSocketUrl
|
|
|
- wsRef.value = useWebSocket("ws://123.56.10.71:7681", {
|
|
|
- heartbeat: {
|
|
|
- message: JSON.stringify({
|
|
|
- Action: "ReqHealthCheck",
|
|
|
- Param: { Extension: m_strUserNo.value },
|
|
|
- }),
|
|
|
- interval: 5000,
|
|
|
- pongTimeout: 5000,
|
|
|
- },
|
|
|
- autoReconnect: {
|
|
|
- delay: 2000,
|
|
|
- }, // 自动重连
|
|
|
- immediate: true, // 是否立即链接
|
|
|
- onMessage: e_TelMsgReceive, // 消息接收
|
|
|
- onError: e_websocketError, // 错误
|
|
|
- onDisconnected: e_websocketClose, // 断开
|
|
|
- onConnected: e_websocketOpen, // 链接成功
|
|
|
- });
|
|
|
- // wsRef.value.open();
|
|
|
-};
|
|
|
-// 消息接收
|
|
|
-const e_TelMsgReceive = (ws: any, restMsg: any) => {
|
|
|
- console.log(`${getNowDateTime()} 接收消息:${restMsg.data}`);
|
|
|
- if (restMsg.data) {
|
|
|
- const data = eval("(" + restMsg.data + ")");
|
|
|
- if (data) {
|
|
|
- // 方法
|
|
|
- const strAction = data.Action;
|
|
|
- switch (strAction) {
|
|
|
- // 登录返回值
|
|
|
- case "ResAgentLogin":
|
|
|
- retSignIn(data);
|
|
|
- break;
|
|
|
- // 示闲
|
|
|
- case "ResAgentIdle":
|
|
|
- break;
|
|
|
- // 示忙
|
|
|
- case "ResAgentBusy":
|
|
|
- break;
|
|
|
- // 外呼状态
|
|
|
- case "ResMakeCall":
|
|
|
- break;
|
|
|
- // 保持
|
|
|
- case "ResHoldCall":
|
|
|
- break;
|
|
|
- // 取消保持
|
|
|
- case "ResRetrieve":
|
|
|
- break;
|
|
|
- // 咨询内线
|
|
|
- case "ResConsultInline":
|
|
|
- break;
|
|
|
- // 咨询外线
|
|
|
- case "ResConsultOutline":
|
|
|
- break;
|
|
|
- // 咨询群组
|
|
|
- case "ResConsultSkillGroup":
|
|
|
- break;
|
|
|
- // 咨询转移
|
|
|
- case "ResTransfer":
|
|
|
- break;
|
|
|
- // 三方会议
|
|
|
- case "ResConference":
|
|
|
- break;
|
|
|
- // 三方会议
|
|
|
- case "ResMonConf":
|
|
|
- break;
|
|
|
- // 坐席实时状态
|
|
|
- case "ResAgentMinitor":
|
|
|
- ResAgentMonitor(data);
|
|
|
- break;
|
|
|
- // 监听
|
|
|
- case "ResMonListen":
|
|
|
- retResMonListen(data);
|
|
|
- break;
|
|
|
- // 取消监听返回
|
|
|
- case "ResStopListen":
|
|
|
- retResStopListen(data);
|
|
|
- break;
|
|
|
- }
|
|
|
- // 事件
|
|
|
- const strEvent = data.Event;
|
|
|
- switch (strEvent) {
|
|
|
- // 签出事件
|
|
|
- case "EvtLogout":
|
|
|
- retSignOut();
|
|
|
- break;
|
|
|
- // 呼入振铃事件
|
|
|
- case "EvtCallAlerting":
|
|
|
- break;
|
|
|
- // 应答事件
|
|
|
- case "EvtCallAnswer":
|
|
|
- break;
|
|
|
- // 挂机事件
|
|
|
- case "EvtHangup":
|
|
|
- break;
|
|
|
- // 状态
|
|
|
- case "EvtSeatState":
|
|
|
- evtSeatState(data);
|
|
|
- break;
|
|
|
- // 队列等待
|
|
|
- case "EvtAcdInfo":
|
|
|
- break;
|
|
|
- // 语音识别结果通知事件
|
|
|
- case "EvtRecognize":
|
|
|
- break;
|
|
|
-
|
|
|
- // 转三方接通状态
|
|
|
- case "EvtDispatchState":
|
|
|
- break;
|
|
|
-
|
|
|
- // 签出事件
|
|
|
- case "ResStopMonitor":
|
|
|
- retSignOut();
|
|
|
- break;
|
|
|
-
|
|
|
- case "ResError": // 异常
|
|
|
- // 异常处理
|
|
|
- retResError(data);
|
|
|
- break;
|
|
|
- // 呼出接通事件
|
|
|
- case "EvtOutCalling":
|
|
|
- break;
|
|
|
- // 签出事件
|
|
|
- case "EvtQuit":
|
|
|
- retSignOut();
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
-};
|
|
|
-const evtSeatState = (data: any) => {
|
|
|
- if (m_strIsMonitor.value == "1") {
|
|
|
- // 推送分机信息
|
|
|
- const pushExt = data.Param.Extension || "";
|
|
|
- if (pushExt !== m_strUserNo.value) {
|
|
|
- // 如果分机实时推送的分机信息和当前登录分机不一致,则表明当前登录分机为监控分机,开启了状态监控功能
|
|
|
- // 1.不属于当前分机的状态,则不改变当前分机电话条状态
|
|
|
- // 2.调整其他分机大屏监控状态
|
|
|
- const pushState = GetTelState(data.Param.State);
|
|
|
- if (pushState) {
|
|
|
- // 修改后台数据
|
|
|
- console.log(pushExt, pushState);
|
|
|
- // SetMonitorState(pushExt, pushState);
|
|
|
- }
|
|
|
- mittBus.emit("monitorInfoTel", data.Param);
|
|
|
- return;
|
|
|
- }
|
|
|
- }
|
|
|
- if (m_IsHold.value) {
|
|
|
- // 正在保持通话状态下
|
|
|
- return;
|
|
|
- }
|
|
|
- // 状态 0:闲 1:忙 2:会议 3:登出 4:呼入 5:呼出 6:咨询 7:其他 8:通话
|
|
|
- const strState = data.Param.State;
|
|
|
- switch (strState) {
|
|
|
- // 空闲
|
|
|
- case "0":
|
|
|
- m_bIsOpen.value = false;
|
|
|
- m_IsHangup.value = false;
|
|
|
- m_strTelState.value = "200";
|
|
|
- m_bTelBusy.value = false;
|
|
|
- e_TopStateChange(m_strTelState.value);
|
|
|
- m_IsTalkingDeal.value = false;
|
|
|
- break;
|
|
|
- // 示忙
|
|
|
- case "1":
|
|
|
- m_strTelState.value = "201";
|
|
|
- m_bTelBusy.value = true;
|
|
|
- e_TopStateChange(m_strTelState.value);
|
|
|
- break;
|
|
|
- case "2":
|
|
|
- break;
|
|
|
- // 登出
|
|
|
- case "3":
|
|
|
- // 附加签出方法(用户分机分离调用业务系统签出)
|
|
|
- m_strTelState.value = "0";
|
|
|
- e_TopStateChange(m_strTelState.value);
|
|
|
- break;
|
|
|
- // 通话振铃
|
|
|
- case "4":
|
|
|
- if (!m_IsHangup.value) {
|
|
|
- if (m_IsCallOut.value) {
|
|
|
- // 呼出振铃
|
|
|
- m_strTelState.value = "302";
|
|
|
- } else {
|
|
|
- // 呼入振铃
|
|
|
- m_strTelState.value = "300";
|
|
|
- }
|
|
|
- e_TopStateChange(m_strTelState.value);
|
|
|
- }
|
|
|
- break;
|
|
|
- // 通话振铃
|
|
|
- case "5":
|
|
|
- if (!m_IsHangup.value) {
|
|
|
- m_strTelState.value = "302";
|
|
|
- e_TopStateChange(m_strTelState.value);
|
|
|
- }
|
|
|
- break;
|
|
|
- // 咨询
|
|
|
- case "6":
|
|
|
- break;
|
|
|
- // 其他
|
|
|
- case "7":
|
|
|
- break;
|
|
|
- // 接通
|
|
|
- case "8":
|
|
|
- if (!m_IsHangup.value) {
|
|
|
- if (m_IsCallOut.value) {
|
|
|
- // 呼出接通
|
|
|
- m_strTelState.value = "303";
|
|
|
- } else {
|
|
|
- // 呼入接通
|
|
|
- m_strTelState.value = "301";
|
|
|
- // 是否是保持通话
|
|
|
- }
|
|
|
- e_TopStateChange(m_strTelState.value);
|
|
|
- }
|
|
|
- break;
|
|
|
- case "9": // 工单整理
|
|
|
- m_strTelState.value = "900";
|
|
|
- e_TopStateChange(m_strTelState.value);
|
|
|
- m_IsTalkingDeal.value = true;
|
|
|
- break;
|
|
|
- }
|
|
|
-};
|
|
|
-// 获取分机状态
|
|
|
-const GetTelState = (strState: any) => {
|
|
|
- let strResult = "";
|
|
|
- switch (strState) {
|
|
|
- // 空闲
|
|
|
- case "0":
|
|
|
- strResult = "200";
|
|
|
- break;
|
|
|
- // 示忙
|
|
|
- case "1":
|
|
|
- strResult = "201";
|
|
|
- break;
|
|
|
- case "2":
|
|
|
- break;
|
|
|
- // 登出
|
|
|
- case "3":
|
|
|
- strResult = "0";
|
|
|
- break;
|
|
|
- // 通话振铃
|
|
|
- case "4":
|
|
|
- strResult = "302"; // 默认呼入振铃
|
|
|
- break;
|
|
|
- // 通话振铃
|
|
|
- case "5":
|
|
|
- strResult = "302"; // 默认呼出振铃
|
|
|
- break;
|
|
|
- // 咨询
|
|
|
- case "6":
|
|
|
- break;
|
|
|
- // 其他
|
|
|
- case "7":
|
|
|
- break;
|
|
|
- // 接通
|
|
|
- case "8":
|
|
|
- strResult = "301";
|
|
|
- break;
|
|
|
- case "9": // 工单整理
|
|
|
- strResult = "900";
|
|
|
- break;
|
|
|
- }
|
|
|
- return strResult;
|
|
|
-};
|
|
|
-// 不登录开启坐席监控
|
|
|
-const sendMonitor = () => {
|
|
|
- const sendObj = {
|
|
|
- Action: "ReqStateMonitor",
|
|
|
- Param: {
|
|
|
- MonitorId: new Date().getTime(),
|
|
|
- },
|
|
|
- };
|
|
|
- // 发送请求
|
|
|
- e_TelSendMsg(sendObj);
|
|
|
- console.log(`${getNowDateTime()} 呼叫中心开启监控消息`);
|
|
|
-};
|
|
|
-// ws链接开启成功
|
|
|
-const e_websocketOpen = () => {
|
|
|
- /* if (userAlreadyLogin.value) {
|
|
|
- // 检查到用户已经登录需要先签出 再签入
|
|
|
- sendSignOut();
|
|
|
- useTimeoutFn(() => {
|
|
|
- sendSignIn();
|
|
|
- }, 500);
|
|
|
-
|
|
|
- // {"Action" : "ReqStateMonitor", "Param": { "MonitorId":""}}
|
|
|
- } else {
|
|
|
- if (m_strUserNo.value && m_strSkillId.value) sendSignIn();
|
|
|
- }*/
|
|
|
- sendMonitor(); // 开启监控
|
|
|
-};
|
|
|
-// 链接关闭
|
|
|
-const e_websocketClose = () => {
|
|
|
- globalState.callCenterIsSignIn = false; // 签出状态
|
|
|
- console.log(`${getNowDateTime()} 呼叫中心链接关闭`);
|
|
|
-};
|
|
|
-// 链接错误
|
|
|
-const e_websocketError = () => {
|
|
|
- globalState.callCenterWs = null;
|
|
|
- globalState.callCenterIsSignIn = false; // 签出状态
|
|
|
- console.log(`${getNowDateTime()} 呼叫中心链接错误`);
|
|
|
-};
|
|
|
-/*
|
|
|
-* 登录
|
|
|
-* ReqAgentLogin - 登录方法名
|
|
|
-* JobNum - 工号
|
|
|
-* Name - 姓名
|
|
|
-* Extension - 分机号
|
|
|
-* SkillId - 技能组
|
|
|
-* Level - 为要设置的级别,分为9个级别,从高到低分别为0-8;同一技能组中级别越高的坐席优先被分配
|
|
|
-* Role - 角色,保留,不做设置
|
|
|
-* GroupName - 技能组名称
|
|
|
-* OrgId - 组织ID
|
|
|
-* 返回内容:
|
|
|
-{“Action”:”ResAgentLogin”,”Param”:{“Result”:}}
|
|
|
-Result: 3:分机错误 7:已登录 0:登录成功
|
|
|
- */
|
|
|
-const sendSignIn = () => {
|
|
|
- globalState.callCenterWs = wsRef.value;
|
|
|
- const sendObj = {
|
|
|
- Action: "ReqAgentLogin",
|
|
|
- Param: {
|
|
|
- JobNum: m_strJobNum.value,
|
|
|
- Name: m_strUserName.value,
|
|
|
- Extension: m_strUserNo.value,
|
|
|
- SkillId: m_strSkillId.value,
|
|
|
- Level: m_strLevel.value,
|
|
|
- Role: "",
|
|
|
- GroupName: m_strGroup.value,
|
|
|
- OrgId: m_strCompanyId.value,
|
|
|
- },
|
|
|
- };
|
|
|
- // 发送请求
|
|
|
- e_TelSendMsg(sendObj);
|
|
|
- console.log(`${getNowDateTime()} 呼叫中心发起签入`);
|
|
|
-};
|
|
|
-// 签入消息回调
|
|
|
-const retSignIn = (data: any) => {
|
|
|
- if (data.Param.Result === "0") {
|
|
|
- // 登录成功
|
|
|
- m_bLogin.value = true;
|
|
|
- m_strTelState.value = "100";
|
|
|
-
|
|
|
- e_TopStateChange(m_strTelState.value);
|
|
|
- // 登录成功
|
|
|
- globalState.callCenterIsSignIn = true; // 签入状态
|
|
|
- if (m_strIsMonitor.value === "1") {
|
|
|
- // 监控初始化状态
|
|
|
- ReqAgentMonitor();
|
|
|
- }
|
|
|
- console.log(`${getNowDateTime()} 呼叫中心签入成功回调`);
|
|
|
- } else if (data.Param.Result === "3") {
|
|
|
- // 分机错误
|
|
|
- ElMessage.error("分机错误");
|
|
|
- userAlreadyLogin.value = false; // 将登录状态重置
|
|
|
- wsRef.value.close();
|
|
|
- // 分机错误
|
|
|
- } else if (data.Param.Result === "7") {
|
|
|
- // 已经处于登录状态
|
|
|
- // 先签出再签入
|
|
|
- /* sendSignOut();
|
|
|
- userAlreadyLogin.value = false; // 将登录状态重置*/
|
|
|
- wsRef.value.close();
|
|
|
- ElMessage.error("当前分机已经签入");
|
|
|
- }
|
|
|
-};
|
|
|
-/**
|
|
|
- * 状态初始化请求 监听
|
|
|
- * */
|
|
|
-const ReqAgentMonitor = () => {
|
|
|
- // 开始坐席状态监控
|
|
|
- // SkillId 技能组为0则监控所有分机
|
|
|
- const msgObj = {
|
|
|
- Action: "ReqAgentMonitor",
|
|
|
- Param: {
|
|
|
- Extension: m_strUserNo.value,
|
|
|
- CompanyId: m_strCompanyId.value,
|
|
|
- SkillId: "0",
|
|
|
- },
|
|
|
- };
|
|
|
- // 发送请求
|
|
|
- e_TelSendMsg(msgObj);
|
|
|
-};
|
|
|
-/**
|
|
|
- * {“Action”:”ResAgentMonitor”,”Param”:[{“Extension”:,”JobNumber”:,”SkillId”:,”Name”:,”Caller”:,”Called”:,”State”}]}
|
|
|
- * State:0:闲 1:忙 2:会议 3:登出 4:呼入 5:呼出 6:咨询 7:其他 8:通话 9:工单整理
|
|
|
- * 监控状态初始化返回状态
|
|
|
- * @param {any} data
|
|
|
- */
|
|
|
-const seatsList = ref<any[]>([]);
|
|
|
-const ResAgentMonitor = (data: any) => {
|
|
|
- if (null != data && null != data.Param && data.Param.length > 0) {
|
|
|
- // 监控分机集合
|
|
|
- const strMonitorInfo = JSON.stringify(data.Param);
|
|
|
- console.log(
|
|
|
- `${getNowDateTime()} 监控分机集合:`,
|
|
|
- strMonitorInfo,
|
|
|
- data.Param
|
|
|
- );
|
|
|
- mittBus.emit("monitorInfo", data.Param);
|
|
|
- seatsList.value = data.Param;
|
|
|
- }
|
|
|
-};
|
|
|
-/*
|
|
|
- * 签出
|
|
|
- * ReqAgentLogout - 签出方法名称
|
|
|
- * Extension - 分机号码
|
|
|
- */
|
|
|
-const sendSignOut = () => {
|
|
|
- const objMsg = {
|
|
|
- Action: "ReqAgentLogout",
|
|
|
- Param: {
|
|
|
- Extension: m_strUserNo.value,
|
|
|
- },
|
|
|
- };
|
|
|
- // 发送请求
|
|
|
- e_TelSendMsg(objMsg);
|
|
|
-};
|
|
|
-/*
|
|
|
- * 签出事件
|
|
|
- */
|
|
|
-const retSignOut = () => {
|
|
|
- // 登出成功
|
|
|
- m_strTelState.value = "0";
|
|
|
- m_bLogin.value = false;
|
|
|
- globalState.callCenterIsSignIn = false; // 签出状态
|
|
|
- globalState.callCenterWs = null;
|
|
|
- wsRef.value.close();
|
|
|
- // 如果用户没有登录 关闭ws
|
|
|
- if (!userAlreadyLogin.value) {
|
|
|
- wsRef.value.close();
|
|
|
- }
|
|
|
- console.log(`${getNowDateTime()} 呼叫中心签出回调`);
|
|
|
-};
|
|
|
-/**
|
|
|
- * 异常处理
|
|
|
- * @param {any} data
|
|
|
- */
|
|
|
-const retResError = (data: any) => {
|
|
|
- if (data.Param.Result == "99") {
|
|
|
- // 掉线
|
|
|
- m_strTelState.value = "0";
|
|
|
- e_TopStateChange(m_strTelState.value);
|
|
|
- globalState.callCenterWs = null;
|
|
|
- ElMessage.error("连接已断开");
|
|
|
- // 自动签入
|
|
|
- }
|
|
|
-};
|
|
|
-// 改变状态方法
|
|
|
-const e_TopStateChange = (state: string) => {
|
|
|
- console.log(`${getNowDateTime()}:状态改变:`, state);
|
|
|
- switch (state) {
|
|
|
- case "0": // 签出
|
|
|
- break;
|
|
|
- case "100": // 登录成功
|
|
|
- break;
|
|
|
- case "200": // 空闲
|
|
|
- break;
|
|
|
- case "201": // 示忙
|
|
|
- break;
|
|
|
- case "300": //呼入振铃
|
|
|
- break;
|
|
|
- case "301": // 呼入通话
|
|
|
- break;
|
|
|
- case "302": // 呼出振铃
|
|
|
- break;
|
|
|
- case "303": // 呼出通话
|
|
|
- break;
|
|
|
- case "310": // 通话保持
|
|
|
- break;
|
|
|
- case "320": // 三方会议
|
|
|
- break;
|
|
|
- case "330": // 转接
|
|
|
- break;
|
|
|
- case "331": // 转接
|
|
|
- break;
|
|
|
- case "900": // 整理
|
|
|
- break;
|
|
|
- }
|
|
|
- // console.log(state);
|
|
|
-};
|
|
|
-/*
|
|
|
- * 监听
|
|
|
- */
|
|
|
-const reqMonListen = (strTargetNum: string) => {
|
|
|
- const objMsg = {
|
|
|
- Action: "ReqMonListen",
|
|
|
- Param: {
|
|
|
- Extension: m_strUserNo.value,
|
|
|
- TargetExtension: strTargetNum,
|
|
|
- },
|
|
|
- };
|
|
|
- // 发送请求
|
|
|
- e_TelSendMsg(objMsg);
|
|
|
-};
|
|
|
-/*
|
|
|
- * 监听返回
|
|
|
- */
|
|
|
-const retResMonListen = (data: any) => {
|
|
|
- if (data.Param.Result == "0") {
|
|
|
- m_IsMonListen.value = "1";
|
|
|
- // 成功
|
|
|
- } else {
|
|
|
- m_IsMonListen.value = "2";
|
|
|
- }
|
|
|
-};
|
|
|
-/*
|
|
|
- * 取消监听
|
|
|
- */
|
|
|
-const reqStopListen = (strTargetNum: string) => {
|
|
|
- const objMsg = {
|
|
|
- Action: "ReqStopListen",
|
|
|
- Param: {
|
|
|
- Extension: m_strUserNo.value,
|
|
|
- TargetExtension: strTargetNum,
|
|
|
- },
|
|
|
- };
|
|
|
- // 发送请求
|
|
|
- e_TelSendMsg(objMsg);
|
|
|
-};
|
|
|
-/*
|
|
|
- * 取消监听返回
|
|
|
- */
|
|
|
-const retResStopListen = (data: any) => {
|
|
|
- if (data.Param.Result == "0") {
|
|
|
- m_IsMonListen.value = "1";
|
|
|
- // 成功
|
|
|
- } else {
|
|
|
- m_IsMonListen.value = "2";
|
|
|
- }
|
|
|
-};
|
|
|
-onMounted(async () => {
|
|
|
- initWs();
|
|
|
-});
|
|
|
-</script>
|
|
|
-<style lang="scss" scoped>
|
|
|
-.content_wrap {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- box-sizing: border-box;
|
|
|
- background-image: url("@/assets/img/seats/bg.png");
|
|
|
- background-size: 100% 100%;
|
|
|
-}
|
|
|
-</style>
|