WXL (wul)
9 小时以前 1feb410410781eb56159c8fdd856e68d2c23e0a4
1
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6b0da98a"],{"401b":function(t,e,n){},"40d6":function(t,e,n){"use strict";n.d(e,"dc",(function(){return r})),n.d(e,"ec",(function(){return o})),n.d(e,"i",(function(){return s})),n.d(e,"V",(function(){return i})),n.d(e,"Vb",(function(){return u})),n.d(e,"kc",(function(){return c})),n.d(e,"Nb",(function(){return m})),n.d(e,"Ub",(function(){return d})),n.d(e,"D",(function(){return l})),n.d(e,"gb",(function(){return f})),n.d(e,"oc",(function(){return h})),n.d(e,"fb",(function(){return p})),n.d(e,"E",(function(){return b})),n.d(e,"rb",(function(){return g})),n.d(e,"cc",(function(){return v})),n.d(e,"zc",(function(){return O})),n.d(e,"ic",(function(){return j})),n.d(e,"hb",(function(){return k})),n.d(e,"K",(function(){return S})),n.d(e,"hc",(function(){return w})),n.d(e,"L",(function(){return y})),n.d(e,"u",(function(){return L})),n.d(e,"S",(function(){return W})),n.d(e,"Mb",(function(){return _})),n.d(e,"xb",(function(){return D})),n.d(e,"O",(function(){return T})),n.d(e,"G",(function(){return P})),n.d(e,"gc",(function(){return I})),n.d(e,"Eb",(function(){return M})),n.d(e,"q",(function(){return C})),n.d(e,"lb",(function(){return A})),n.d(e,"N",(function(){return x})),n.d(e,"wb",(function(){return N})),n.d(e,"o",(function(){return q})),n.d(e,"U",(function(){return B})),n.d(e,"Ib",(function(){return R})),n.d(e,"Rb",(function(){return $})),n.d(e,"X",(function(){return U})),n.d(e,"Qb",(function(){return H})),n.d(e,"v",(function(){return Q})),n.d(e,"nb",(function(){return z})),n.d(e,"w",(function(){return J})),n.d(e,"W",(function(){return E})),n.d(e,"Pb",(function(){return F})),n.d(e,"Sb",(function(){return V})),n.d(e,"Y",(function(){return Y})),n.d(e,"x",(function(){return G})),n.d(e,"ob",(function(){return K})),n.d(e,"Zb",(function(){return X})),n.d(e,"db",(function(){return Z})),n.d(e,"Yb",(function(){return tt})),n.d(e,"J",(function(){return et})),n.d(e,"A",(function(){return nt})),n.d(e,"y",(function(){return at})),n.d(e,"pb",(function(){return rt})),n.d(e,"Z",(function(){return ot})),n.d(e,"Tb",(function(){return st})),n.d(e,"Bb",(function(){return it})),n.d(e,"wc",(function(){return ut})),n.d(e,"Ab",(function(){return ct})),n.d(e,"Q",(function(){return mt})),n.d(e,"H",(function(){return dt})),n.d(e,"s",(function(){return lt})),n.d(e,"mb",(function(){return ft})),n.d(e,"P",(function(){return ht})),n.d(e,"zb",(function(){return pt})),n.d(e,"j",(function(){return bt})),n.d(e,"l",(function(){return gt})),n.d(e,"T",(function(){return vt})),n.d(e,"Gb",(function(){return Ot})),n.d(e,"ib",(function(){return jt})),n.d(e,"kb",(function(){return kt})),n.d(e,"tc",(function(){return St})),n.d(e,"jb",(function(){return wt})),n.d(e,"sc",(function(){return yt})),n.d(e,"vc",(function(){return Lt})),n.d(e,"yc",(function(){return Wt})),n.d(e,"uc",(function(){return _t})),n.d(e,"xc",(function(){return Dt})),n.d(e,"rc",(function(){return Tt})),n.d(e,"qc",(function(){return Pt})),n.d(e,"Xb",(function(){return It})),n.d(e,"cb",(function(){return Mt})),n.d(e,"I",(function(){return Ct})),n.d(e,"z",(function(){return At})),n.d(e,"qb",(function(){return xt})),n.d(e,"bb",(function(){return Nt})),n.d(e,"Wb",(function(){return qt})),n.d(e,"mc",(function(){return Bt})),n.d(e,"ab",(function(){return Rt})),n.d(e,"Jb",(function(){return $t})),n.d(e,"Kb",(function(){return Ut})),n.d(e,"d",(function(){return Ht})),n.d(e,"e",(function(){return Qt})),n.d(e,"R",(function(){return zt})),n.d(e,"Hb",(function(){return Jt})),n.d(e,"Fb",(function(){return Et})),n.d(e,"Lb",(function(){return Ft})),n.d(e,"jc",(function(){return Vt})),n.d(e,"F",(function(){return Yt})),n.d(e,"n",(function(){return Gt})),n.d(e,"m",(function(){return Kt})),n.d(e,"vb",(function(){return Xt})),n.d(e,"fc",(function(){return Zt})),n.d(e,"a",(function(){return te})),n.d(e,"sb",(function(){return ee})),n.d(e,"k",(function(){return ne})),n.d(e,"bc",(function(){return ae})),n.d(e,"yb",(function(){return re})),n.d(e,"r",(function(){return oe})),n.d(e,"C",(function(){return se})),n.d(e,"t",(function(){return ie})),n.d(e,"M",(function(){return ue})),n.d(e,"g",(function(){return ce})),n.d(e,"f",(function(){return me})),n.d(e,"h",(function(){return de})),n.d(e,"ub",(function(){return le})),n.d(e,"Ob",(function(){return fe})),n.d(e,"Db",(function(){return he})),n.d(e,"tb",(function(){return pe})),n.d(e,"ac",(function(){return be})),n.d(e,"pc",(function(){return ge})),n.d(e,"lc",(function(){return ve})),n.d(e,"B",(function(){return Oe})),n.d(e,"Ac",(function(){return je})),n.d(e,"eb",(function(){return ke})),n.d(e,"Cb",(function(){return Se})),n.d(e,"nc",(function(){return we})),n.d(e,"p",(function(){return ye})),n.d(e,"b",(function(){return Le})),n.d(e,"c",(function(){return We}));var a=n("b775");function r(t){return Object(a["a"])({url:"/smartor/target/targetInfo",method:"post",data:t})}function o(t){return Object(a["a"])({url:"/smartor/target/saveOrupdateIvrLibaTarget",method:"post",data:t})}function s(t){return Object(a["a"])({url:"/smartor/serviceSubtaskDetail/countPatByTarget/"+t,method:"get"})}function i(t){return Object(a["a"])({url:"/smartor/target/remove/"+t,method:"get"})}function u(t){return Object(a["a"])({url:"/smartor/icd10/list",method:"post",data:t})}function c(t){return Object(a["a"])({url:"/smartor/icd10/getInfo/"+t,method:"get"})}function m(t){return Object(a["a"])({url:"/smartor/baseopera/list",method:"post",data:t})}function d(t){return Object(a["a"])({url:"/smartor/outicd10/list",method:"post",data:t})}function l(t){return Object(a["a"])({url:"/smartor/outicd10/add",method:"post",data:t})}function f(t){return Object(a["a"])({url:"/smartor/outicd10/remove/"+t,method:"get"})}function h(t){return Object(a["a"])({url:"/smartor/assort/selectIvrLibaTargetAssortList",method:"post",data:t})}function p(t){return Object(a["a"])({url:"/smartor/assort/remove/"+t,method:"get"})}function b(t){return Object(a["a"])({url:"/smartor/assort/addtree",method:"post",data:t})}function g(t){return Object(a["a"])({url:"/smartor/assort/edit",method:"post",data:t})}function v(t){return Object(a["a"])({url:"/smartor/target/list",method:"post",data:t})}function O(t){return Object(a["a"])({url:"/smartor/target/targetQuesMate",method:"post",data:t})}function j(t){return Object(a["a"])({url:"/smartor/script/list",method:"post",data:t})}function k(t){return Object(a["a"])({url:"/smartor/script/remove/"+t,method:"get"})}function S(t){return Object(a["a"])({url:"/smartor/script/saveOrUpdateScript",method:"post",data:t})}function w(t){return Object(a["a"])({url:"/smartor/script/selectInfoByCondition",method:"post",data:t})}function y(t){return Object(a["a"])({url:"/smartor/scriptassort/edit",method:"post",data:t})}function L(t){return Object(a["a"])({url:"/smartor/scriptassort/addtree",method:"post",data:t})}function W(t){return Object(a["a"])({url:"/smartor/scriptassort/remove/"+t,method:"get"})}function _(t){return Object(a["a"])({url:"/smartor/scriptassort/selectIvrLibaScriptAssortList",method:"post",data:t})}function D(t){return Object(a["a"])({url:"/smartor/template/list",method:"post",data:t})}function T(t){return Object(a["a"])({url:"/smartor/template/remove/"+t,method:"get"})}function P(t){return Object(a["a"])({url:"/smartor/template/saveOrUpdateScript",method:"post",data:t})}function I(t){return Object(a["a"])({url:"/smartor/template/selectInfoByCondition",method:"post",data:t})}function M(t){return Object(a["a"])({url:"/smartor/ivrTaskTemplate/getTemplateInfoByID/"+t,method:"get"})}function C(t){return Object(a["a"])({url:"/smartor/templateassort/addtree",method:"post",data:t})}function A(t){return Object(a["a"])({url:"/smartor/templateassort/edit",method:"post",data:t})}function x(t){return Object(a["a"])({url:"/smartor/templateassort/remove/"+t,method:"get"})}function N(t){return Object(a["a"])({url:"/smartor/templateassort/selectIvrLibaTemplateAssortList",method:"post",data:t})}function q(t){return Object(a["a"])({url:"/smartor/ivrTaskTemplate/saveOrUpdateTempScript",method:"post",data:t})}function B(t){return Object(a["a"])({url:"/smartor/ivrTaskTemplate/remove/"+t,method:"get"})}function R(t){return Object(a["a"])({url:"/smartor/ivrTaskTemplate/getInfo/"+t,method:"get"})}function $(t){return Object(a["a"])({url:"/smartor/extemplate/list",method:"post",data:t})}function U(t){return Object(a["a"])({url:"/smartor/extemplate/remove/"+t,method:"get"})}function H(t){return Object(a["a"])({url:"/smartor/extemplate/"+t,method:"get"})}function Q(t){return Object(a["a"])({url:"/smartor/extemplate/add",method:"post",data:t})}function z(t){return Object(a["a"])({url:"/smartor/extemplate/edit",method:"post",data:t})}function J(t){return Object(a["a"])({url:"/smartor/category/add",method:"post",data:t})}function E(t){return Object(a["a"])({url:"/smartor/category/remove/"+t,method:"get"})}function F(t){return Object(a["a"])({url:"/smartor/category/list",method:"post",data:t})}function V(t){return Object(a["a"])({url:"/smartor/extemplatescript/list",method:"post",data:t})}function Y(t){return Object(a["a"])({url:"/smartor/extemplatescript/remove/"+t,method:"get"})}function G(t){return Object(a["a"])({url:"/smartor/extemplatescript/add",method:"post",data:t})}function K(t){return Object(a["a"])({url:"/smartor/extemplatescript/edit",method:"post",data:t})}function X(t){return Object(a["a"])({url:"/smartor/library/list",method:"post",data:t})}function Z(t){return Object(a["a"])({url:"/smartor/library/remove/"+t,method:"get"})}function tt(t){return Object(a["a"])({url:"/smartor/library/selectInfoByCondition",method:"post",data:t})}function et(t){return Object(a["a"])({url:"/smartor/library/saveOrUpdateHeLibrary",method:"post",data:t})}function nt(t){return Object(a["a"])({url:"/common/htmlContent",method:"post",data:t})}function at(t){return Object(a["a"])({url:"/smartor/heLibraryAssort/addtree",method:"post",data:t})}function rt(t){return Object(a["a"])({url:"/smartor/heLibraryAssort/edit",method:"post",data:t})}function ot(t){return Object(a["a"])({url:"/smartor/heLibraryAssort/remove/"+t,method:"get"})}function st(t){return Object(a["a"])({url:"/smartor/heLibraryAssort/selectHeLibraryAssortList",method:"post",data:t})}n("b8cc");function it(t){return Object(a["a"])({url:"/smartor/svyLibTemplate/selectSvyLibTemplatelist",method:"post",data:t})}function ut(t){return Object(a["a"])({url:"smartor/svytemplateTask/selectInfoByCondition",method:"post",data:t})}function ct(t){return Object(a["a"])({url:"/smartor/svyLibTemplate/list",method:"get",params:t})}function mt(t){return Object(a["a"])({url:"/smartor/svyLibTemplate/remove/"+t,method:"get"})}function dt(t){return Object(a["a"])({url:"/smartor/svyLibTemplate/saveOrUpdateTemplate",method:"post",data:t})}function lt(t){return Object(a["a"])({url:"/smartor/svyLibTemplateCategory/addtree",method:"post",data:t})}function ft(t){return Object(a["a"])({url:"/smartor/svyLibTemplateCategory/edit",method:"post",data:t})}function ht(t){return Object(a["a"])({url:"/smartor/svyLibTemplateCategory/remove/"+t,method:"get"})}function pt(t){return Object(a["a"])({url:"/smartor/svyLibTemplateCategory/list",method:"post",data:t})}function bt(t){return Object(a["a"])({url:"/smartor/serviceSubtask/queryTaskByCondition",method:"post",data:t})}function gt(t){return Object(a["a"])({url:"/smartor/svytemplateTask/saveOrUpdateTaskTemp",method:"post",data:t})}function vt(t){return Object(a["a"])({url:"/smartor/svytemplateTask/remove/"+t,method:"get"})}function Ot(t){return Object(a["a"])({url:"/smartor/svytemplateTask/"+t,method:"get"})}function jt(t){return Object(a["a"])({url:"/smartor/td/add",method:"post",data:t})}function kt(t){return Object(a["a"])({url:"/smartor/td/list",method:"get",params:t})}function St(t){return Object(a["a"])({url:"/smartor/taskdept/list",method:"post",data:t})}function wt(t){return Object(a["a"])({url:"/smartor/td/remove/"+t,method:"get"})}function yt(t){return Object(a["a"])({url:"/smartor/taskdept/remove/"+t,method:"get"})}function Lt(t){return Object(a["a"])({url:"/smartor/taskdiag/remove/".concat(t),method:"get"})}function Wt(t){return Object(a["a"])({url:"/smartor/taskoper/remove/".concat(t),method:"get"})}function _t(t){return Object(a["a"])({url:"/smartor/taskdiag/list",method:"post",data:t})}function Dt(t){return Object(a["a"])({url:"/smartor/taskoper/list",method:"post",data:t})}function Tt(t){return Object(a["a"])({url:"/smartor/serviceSubtaskDetail/editByCondition",method:"post",data:t})}function Pt(t){return Object(a["a"])({url:"/smartor/serviceSubtaskDetail/add",method:"post",data:t})}function It(t){return Object(a["a"])({url:"/smartor/svyscript/list",method:"post",data:t})}function Mt(t){return Object(a["a"])({url:"/smartor/svyscript/remove/"+t,method:"get"})}function Ct(t){return Object(a["a"])({url:"/smartor/svyscript/saveOrUpdateScript",method:"post",data:t})}function At(t){return Object(a["a"])({url:"/smartor/svyLibScriptCategory/addtree",method:"post",data:t})}function xt(t){return Object(a["a"])({url:"/smartor/svyLibScriptCategory/edit",method:"post",data:t})}function Nt(t){return Object(a["a"])({url:"/smartor/svyLibScriptCategory/remove/"+t,method:"get"})}function qt(t){return Object(a["a"])({url:"/smartor/svyLibScriptCategory/list",method:"post",data:t})}function Bt(t){return Object(a["a"])({url:"/smartor/serviceExternal/query360PatInfo",method:"post",data:t})}function Rt(t){return Object(a["a"])({url:"/smartor/serviceSubtask/remove/"+t,method:"get"})}function $t(t){return Object(a["a"])({url:"/smartor/patarchive/getPatientInfo",method:"post",data:t})}function Ut(t){return Object(a["a"])({url:"/smartor/patarchive/getPatientInfoQC",method:"post",data:t})}function Ht(t){return Object(a["a"])({url:"/smartor/serviceSubtask/insertOrUpdateTask",method:"post",data:t})}function Qt(t){return Object(a["a"])({url:"/smartor/serviceSubtask/update",method:"post",data:t})}function zt(t){return Object(a["a"])({url:"/smartor/servicetask/remove/"+t,method:"get"})}function Jt(t){return Object(a["a"])({url:"/smartor/servicetask/list",method:"post",data:t})}function Et(t){return Object(a["a"])({url:"/smartor/serviceSubtask/queryTaskByCondition",method:"post",data:t})}function Ft(t){return Object(a["a"])({url:"/smartor/serviceSubtask/patItem",method:"post",data:t})}function Vt(t){return Object(a["a"])({url:"/smartor/serviceSubtask/getSubtaskByDiagname",method:"post",data:t})}function Yt(t){return Object(a["a"])({url:"/smartor/serviceSubtask/patItemByCondition",method:"post",data:t})}function Gt(t){return Object(a["a"])({url:"/smartor/ivrTaskTemplate/saveOrUpdateTempScript",method:"post",data:t})}function Kt(t){return Object(a["a"])({url:"/smartor/commonTask/taskSend",method:"post",data:t})}function Xt(t){return Object(a["a"])({url:"/smartor/servicetask/getScriptInfoByCondition",method:"post",data:t})}function Zt(t){return Object(a["a"])({url:"/smartor/outPath/getInfoByParam",method:"post",params:{param:t}})}function te(t){return Object(a["a"])({url:"/smartor/subtaskAnswer/saveQuestionCache",method:"post",data:t})}function ee(t){return Object(a["a"])({url:"/smartor/subtaskAnswer/getQuestionCache",method:"post",data:t})}function ne(t){return Object(a["a"])({url:"/smartor/subtaskAnswer/saveQuestionAnswer",method:"post",data:t})}function ae(t){return Object(a["a"])({url:"/smartor/subtaskAnswer/selectPatQuestionResult",method:"post",data:t})}function re(t){return Object(a["a"])({url:"/smartor/serviceSubtaskDetail/getPersonVoice",method:"post",data:t})}function oe(t){return Object(a["a"])({url:"/smartor/serviceSubtaskDetail/batchAdd",method:"post",data:t})}function se(t){return Object(a["a"])({url:"/smartor/serviceSubtask/addSubTaskAgain",method:"post",data:t})}function ie(t){return Object(a["a"])({url:"/smartor/serviceSubtask/addSubTask",method:"post",data:t})}function ue(t){return Object(a["a"])({url:"/smartor/import/remove/"+t,method:"get"})}function ce(t){return Object(a["a"])({url:"/smartor/import/list",method:"post",data:t})}function me(t){return Object(a["a"])({url:"/smartor/import/edit",method:"post",data:t})}function de(t){return Object(a["a"])({url:"/smartor/import/getInfo/"+t,method:"get"})}function le(t){return Object(a["a"])({url:"/smartor/patouthosp/selectPatMedOuthospCount",method:"post",data:t})}function fe(t){return Object(a["a"])({url:"/smartor/patinhosp/selectPatMedInhospListCount",method:"post",data:t})}function he(t){return Object(a["a"])({url:"/smartor/serviceSubtask/getServiceStatistics",method:"post",data:t})}function pe(t){return Object(a["a"])({url:"/smartor/patinhosp/getDeptRanking",method:"post",data:t})}function be(t){return Object(a["a"])({url:"/smartor/organization/list",method:"get"})}function ge(t){return Object(a["a"])({url:"/sms/send",method:"post",data:t})}n("c38a");function ve(t){return Object(a["a"])({url:"/smartor/satisfaction/list",method:"post",data:t})}function Oe(t){return Object(a["a"])({url:"/smartor/satisfaction/batchinsert",method:"post",data:t})}function je(t){return Object(a["a"])({url:"/smartor/satisfaction/edit",method:"post",data:t})}function ke(t){return Object(a["a"])({url:"/smartor/satisfaction/remove/"+t,method:"get"})}function Se(t){return Object(a["a"])({url:"/smartor/servicetask/getScriptByCondition",method:"post",data:t})}function we(t){return Object(a["a"])({url:"/smartor/subtaskAnswer/saveMYDQuestionAnswer",method:"post",data:t})}function ye(t){return Object(a["a"])({url:"/getDept/"+t,method:"get"})}function Le(){return Object(a["a"])({url:"/smartor/ServiceTelInfo/getList",method:"get",params:{orgid:localStorage.getItem("orgid")}})}function We(t){return Object(a["a"])({url:"/smartor/ServiceTelInfo/setState",method:"get",params:t})}},"72c7":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"websocket-demo"},[n("div",[n("h3",[t._v("Websocket呼叫中心接口")]),n("div",{staticClass:"config-area"},[n("div",{staticClass:"status-indicator"},[n("span",{class:["status-dot",t.connectionStatus]}),t._v(" 连接状态: "+t._s(t.connectionText)+" "),n("span",{class:["status-dot",t.seatStatus]}),t._v(" 座席状态: "+t._s(t.seatStatusText)+" ")]),n("div",{staticClass:"input-group"},[n("label",[t._v("CTI_WS_URL")]),n("input",{directives:[{name:"model",rawName:"v-model",value:t.config.cti_ws_url,expression:"config.cti_ws_url"}],attrs:{type:"text",placeholder:"wss://your-server.com"},domProps:{value:t.config.cti_ws_url},on:{input:function(e){e.target.composing||t.$set(t.config,"cti_ws_url",e.target.value)}}}),n("label",[t._v("坐席工号")]),n("input",{directives:[{name:"model",rawName:"v-model",value:t.config.seatname,expression:"config.seatname"}],attrs:{type:"text",placeholder:t.randomNum},domProps:{value:t.config.seatname},on:{input:function(e){e.target.composing||t.$set(t.config,"seatname",e.target.value)}}}),n("label",[t._v("坐席分机")]),n("input",{directives:[{name:"model",rawName:"v-model",value:t.config.seatnum,expression:"config.seatnum"}],attrs:{type:"text",placeholder:t.randomNum},domProps:{value:t.config.seatnum},on:{input:function(e){e.target.composing||t.$set(t.config,"seatnum",e.target.value)}}}),n("label",[t._v("密码")]),n("input",{directives:[{name:"model",rawName:"v-model",value:t.config.password,expression:"config.password"}],attrs:{type:"text",placeholder:"123456"},domProps:{value:t.config.password},on:{input:function(e){e.target.composing||t.$set(t.config,"password",e.target.value)}}})]),n("div",{staticClass:"input-group"},[n("label",[t._v("外线号码")]),n("input",{directives:[{name:"model",rawName:"v-model",value:t.customerPhone,expression:"customerPhone"}],attrs:{type:"text",placeholder:"请输入电话号码"},domProps:{value:t.customerPhone},on:{input:function(e){e.target.composing||(t.customerPhone=e.target.value)}}}),n("label",[t._v("技能组")]),n("input",{directives:[{name:"model",rawName:"v-model",value:t.config.group,expression:"config.group"}],attrs:{type:"text",placeholder:"a3"},domProps:{value:t.config.group},on:{input:function(e){e.target.composing||t.$set(t.config,"group",e.target.value)}}})])]),n("div",{staticClass:"button-area"},[n("div",{staticClass:"button-row"},[n("button",{attrs:{disabled:!t.isConnected||t.isSeatLoggedIn},on:{click:t.handleSeatLogin}},[t._v(" 签入 ")]),n("button",{attrs:{disabled:!t.isSeatLoggedIn},on:{click:t.handleSeatLogout}},[t._v(" 签出 ")]),n("button",{attrs:{disabled:!t.isSeatLoggedIn},on:{click:t.callout}},[t._v("外呼")]),n("button",{attrs:{disabled:!t.isSeatLoggedIn},on:{click:t.hangup}},[t._v("挂机")])]),n("div",{staticClass:"button-row"},[n("button",{attrs:{disabled:!t.isSeatLoggedIn},on:{click:t.afk}},[t._v("示忙")]),n("button",{attrs:{disabled:!t.isSeatLoggedIn},on:{click:t.online}},[t._v("示闲")]),n("button",{attrs:{disabled:!t.isSeatLoggedIn},on:{click:t.hold}},[t._v("保持")]),n("button",{attrs:{disabled:!t.isSeatLoggedIn},on:{click:t.holdresume}},[t._v(" 取消保持 ")])])]),n("h3",[t._v("协议日志区 "),n("button",{on:{click:t.testclear}},[t._v("清除")])]),n("div",{staticClass:"log-area"},[t._v(t._s(t.logs))])])])},r=[],o=n("f458"),s=n("5173"),i=n("6ec7"),u=n("6932"),c=(n("618d"),n("fb51"),n("7a82"),n("8ada"),n("e795"),n("cfee"),n("8adb"),n("35f6"),n("e8a6"),n("7184"),n("65bf"),n("40d6")),m={name:"WebsocketDemo",emits:["status-change","call-status","error"],props:{customerPhone:{type:String,default:""},autoLogin:{type:Boolean,default:!0}},data:function(){return{config:{cti_ws_url:"",seatname:"",seatnum:"",password:"123456",phone:"",uuid:"",other:"8001",group:"a3",paramid:"3"},randomNum:"",randomID:"",logs:"",ws:null,isConnected:!1,isSeatLoggedIn:!1,currentCallStatus:"idle",seatResourceAcquired:!1,reconnectAttempts:0,maxReconnectAttempts:5,heartbeatTimer:null}},computed:{connectionStatus:function(){return this.isConnected?"connected":"disconnected"},connectionText:function(){return this.isConnected?"已连接":"未连接"},seatStatus:function(){return this.isSeatLoggedIn?"logged-in":"logged-out"},seatStatusText:function(){return this.isSeatLoggedIn?"已签入":"未签入"}},watch:{customerPhone:function(t){this.config.phone=t},isSeatLoggedIn:function(t){this.$emit("status-change",{isLoggedIn:t,seatNumber:this.config.seatnum,status:t?"ready":"offline"})}},mounted:function(){var t=this;return Object(u["a"])(Object(i["a"])().m((function e(){return Object(i["a"])().w((function(e){while(1)switch(e.n){case 0:return e.n=1,t.initializeSeatResource();case 1:t.initializeWebSocket();case 2:return e.a(2)}}),e)})))()},beforeUnmount:function(){this.cleanup()},methods:{initializeWebSocket:function(){var t=this;try{var e="https:"===window.location.protocol;if(this.config.cti_ws_url=e?"wss://9.208.2.190:8092/cal-api/":"ws://40.78.0.169:6688","undefined"===typeof window.WebSocket)return void this.addLog("错误: 浏览器不支持WebSocket");this.connectWebSocket()}catch(n){this.addLog("初始化WebSocket错误: ".concat(n.message)),setTimeout((function(){return t.connectWebSocket()}),2e3)}},initializeSeatResource:function(){var t=this;return Object(u["a"])(Object(i["a"])().m((function e(){var n,a;return Object(i["a"])().w((function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,Object(c["b"])();case 1:if(n=e.v,!(n.data&&n.data.length>0)){e.n=3;break}return t.randomNum=8e3,t.randomID=8e3,t.config.seatname=t.randomNum,t.config.seatnum=t.randomNum,e.n=2,t.startCallsetState();case 2:t.seatResourceAcquired=!0,t.addLog("座席号资源获取成功: ".concat(t.randomNum));case 3:e.n=5;break;case 4:e.p=4,a=e.v,console.error("获取座席号失败:",a),t.addLog("错误: 获取座席号资源失败"),t.$emit("error",{type:"seat_acquisition_failed",error:a});case 5:return e.a(2)}}),e,null,[[0,4]])})))()},startCallsetState:function(){var t=this;return Object(u["a"])(Object(i["a"])().m((function e(){var n;return Object(i["a"])().w((function(e){while(1)switch(e.p=e.n){case 0:return e.p=0,e.n=1,Object(c["c"])({id:t.randomID,state:1});case 1:t.addLog("座席号状态更新为使用中"),e.n=3;break;case 2:throw e.p=2,n=e.v,console.error("更新座席号状态失败:",n),n;case 3:return e.a(2)}}),e,null,[[0,2]])})))()},releaseSeatResource:function(){var t=this;return Object(u["a"])(Object(i["a"])().m((function e(){var n;return Object(i["a"])().w((function(e){while(1)switch(e.p=e.n){case 0:if(!t.seatResourceAcquired||!t.randomID){e.n=4;break}return e.p=1,e.n=2,Object(c["c"])({id:t.randomID,state:0});case 2:t.addLog("座席号资源已释放"),t.seatResourceAcquired=!1,e.n=4;break;case 3:e.p=3,n=e.v,console.error("释放座席号失败:",n);case 4:return e.a(2)}}),e,null,[[1,3]])})))()},connectWebSocket:function(){var t=this;if(!this.ws||this.ws.readyState!==WebSocket.OPEN)if(this.reconnectAttempts>=this.maxReconnectAttempts)this.addLog("错误: 达到最大重连次数,停止重连");else try{var e=this.config.cti_ws_url;"https:"===window.location.protocol&&e.startsWith("ws://")&&(e=e.replace("ws://","wss://")),this.ws=new WebSocket(e),this.ws.onopen=function(){t.isConnected=!0,t.reconnectAttempts=0,t.addLog("WebSocket连接成功"),t.startHeartbeat(),t.autoLogin&&t.seatResourceAcquired&&setTimeout((function(){return t.handleSeatLogin()}),500)},this.ws.onmessage=function(e){t.handleWebSocketMessage(e)},this.ws.onclose=function(e){t.isConnected=!1,t.isSeatLoggedIn=!1,t.stopHeartbeat(),t.addLog("WebSocket连接关闭: ".concat(e.code," ").concat(e.reason)),t.reconnectAttempts<t.maxReconnectAttempts&&(t.reconnectAttempts++,setTimeout((function(){return t.connectWebSocket()}),3e3))},this.ws.onerror=function(e){t.addLog("WebSocket错误: ".concat(e.message))}}catch(n){this.addLog("连接WebSocket失败: ".concat(n.message)),setTimeout((function(){return t.connectWebSocket()}),3e3)}},handleWebSocketMessage:function(t){var e=this;try{if(t.data instanceof Blob){var n=new FileReader;n.onload=function(){try{var t=n.result;e.addLog("收到Blob消息: ".concat(t)),e.processWebSocketData(t)}catch(a){e.addLog("Blob数据处理错误: ".concat(a.message))}},n.readAsText(t.data)}else"string"===typeof t.data?(this.addLog("收到文本消息: ".concat(t.data)),this.processWebSocketData(t.data)):this.addLog("未知数据类型: ".concat(Object(s["a"])(t.data)))}catch(a){this.addLog("消息处理错误: ".concat(a.message))}},processWebSocketData:function(t){console.log(t,"消息1");try{var e=JSON.parse(t);console.log(e,"消息2"),"system"===e.cmd&&"keepalive"===e.action&&this.keepalive(e.seatname,e.seatnum),"calloutend"===e.action&&this.hangup(),"system"===e.cmd&&"seatlogin"===e.action&&(this.isSeatLoggedIn=!0,this.addLog("座席签入成功"),this.$emit("status-change",{isLoggedIn:!0,seatNumber:this.config.seatnum,status:"ready"})),"system"===e.cmd&&"seatlogout"===e.action&&(this.isSeatLoggedIn=!1,this.addLog("座席签出成功"),this.$emit("status-change",{isLoggedIn:!1,status:"offline"})),"control"===e.cmd&&"tp_callin"===e.action&&(this.config.uuid=e.uuid,this.addLog("自动设置UUID: ".concat(e.uuid)),this.$emit("call-status",{status:"incoming",uuid:e.uuid,phone:e.phone||"未知号码"})),"control"===e.cmd&&"callout"===e.action&&this.$emit("call-status",{status:e.status||"calling",uuid:e.uuid,phone:this.config.phone}),"control"===e.cmd&&"hangup"===e.action&&this.$emit("call-status",{status:"idle",uuid:e.uuid}),"control"===e.cmd&&e.status&&this.handleCallStatusChange(e)}catch(n){this.addLog("JSON解析错误: ".concat(n.message,", 原始数据: ").concat(t))}},handleCallStatusChange:function(t){var e={ringing:"振铃中",connected:"通话中",held:"已保持",ended:"通话结束"};this.addLog("通话状态: ".concat(e[t.status]||t.status)),this.$emit("call-status",{status:t.status,uuid:t.uuid,phone:t.phone||this.config.phone})},startHeartbeat:function(){var t=this;this.heartbeatTimer=setInterval((function(){t.isConnected&&t.isSeatLoggedIn&&t.keepalive(t.config.seatname,t.config.seatnum)}),3e4)},stopHeartbeat:function(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)},handleSeatLogin:function(){var t=this;return Object(u["a"])(Object(i["a"])().m((function e(){var n,a,r,o,s;return Object(i["a"])().w((function(e){while(1)switch(e.n){case 0:if(t.seatResourceAcquired){e.n=1;break}return t.addLog("错误: 未获取座席号资源,无法签入"),e.a(2);case 1:if(n=t.config,a=n.seatname,r=n.seatnum,o=n.password,a&&r){e.n=2;break}return t.addLog("错误: 座席工号和分机号不能为空"),e.a(2);case 2:s={cmd:"system",action:"seatlogin",seatname:a,seatnum:r,password:o,timestamp:Date.now()},t.sendWebSocketMessage(s);case 3:return e.a(2)}}),e)})))()},handleSeatLogout:function(){var t=this;return Object(u["a"])(Object(i["a"])().m((function e(){var n,a,r,o;return Object(i["a"])().w((function(e){while(1)switch(e.n){case 0:n=t.config,a=n.seatname,r=n.seatnum,o={cmd:"system",action:"seatlogout",seatname:a,seatnum:r,timestamp:Date.now()},t.sendWebSocketMessage(o)&&(t.isSeatLoggedIn=!1,setTimeout((function(){return t.releaseSeatResource()}),1e3));case 1:return e.a(2)}}),e)})))()},disconnectWebSocket:function(){this.ws&&(this.ws.close(),this.ws=null,this.isConnected=!1,this.addLog("WebSocket已断开"))},sendWebSocketMessage:function(t){if(!this.isConnected||!this.ws)return this.addLog("错误: WebSocket未连接"),!1;try{var e="string"===typeof t?t:JSON.stringify(t);return this.ws.send(e),this.addLog("发送消息: ".concat(e)),!0}catch(n){return this.addLog("发送消息失败: ".concat(n.message)),!1}},validateParams:function(t,e){var n,a=Object(o["a"])(e);try{for(a.s();!(n=a.n()).done;){var r=n.value;if(!t[r]||""===t[r].toString().trim())return this.addLog("错误: ".concat(r," 不能为空")),!1}}catch(s){a.e(s)}finally{a.f()}return!0},seatlogin:function(){var t=this,e=this.config,n=e.seatname,a=e.seatnum,r=e.password;e.cti_ws_url;this.validateParams({seatname:n,seatnum:a},["seatname","seatnum"])&&(this.connectWebSocket(),setTimeout((function(){var e={cmd:"system",action:"seatlogin",seatname:n,seatnum:a,password:r,timestamp:Date.now()};t.sendWebSocketMessage(e)}),1e3))},seatlogout:function(){var t=this.config,e=t.seatname,n=t.seatnum;if(this.validateParams({seatname:e,seatnum:n},["seatname","seatnum"])){var a={cmd:"system",action:"seatlogout",seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(a),this.ws.close()}},afk:function(){var t={cmd:"system",action:"afk",seatname:this.config.seatname,seatnum:this.config.seatnum,timestamp:Date.now()};this.sendWebSocketMessage(t)},online:function(){var t={cmd:"system",action:"online",seatname:this.config.seatname,seatnum:this.config.seatnum,timestamp:Date.now()};this.sendWebSocketMessage(t)},pickup:function(){var t=this.config,e=t.seatname,n=t.seatnum;if(this.validateParams({seatnum:n},["seatnum"])){var a={cmd:"control",action:"pickup",seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(a)}},hangup:function(){var t={cmd:"control",action:"hangup",seatname:this.config.seatname,seatnum:this.config.seatnum,timestamp:Date.now()};this.sendWebSocketMessage(t)},callout:function(){var t=arguments,e=this;return Object(u["a"])(Object(i["a"])().m((function n(){var a,r,o;return Object(i["a"])().w((function(n){while(1)switch(n.n){case 0:if(a=t.length>0&&void 0!==t[0]?t[0]:null,r=a||e.customerPhone||e.config.phone,r){n.n=1;break}return e.addLog("错误: 被叫号码不能为空"),e.$emit("error",{type:"phone_number_required"}),n.a(2);case 1:if(e.isSeatLoggedIn){n.n=2;break}return e.addLog("错误: 座席未签入,无法外呼"),n.a(2);case 2:o={cmd:"control",action:"callout",phone:r,seatname:e.config.seatname,seatnum:e.config.seatnum,timestamp:Date.now()},e.sendWebSocketMessage(o),e.$emit("call-status",{status:"calling",phone:r});case 3:return n.a(2)}}),n)})))()},cleanup:function(){this.stopHeartbeat(),this.ws&&(this.ws.close(),this.ws=null),this.releaseSeatResource()},transfer:function(){var t=this.config,e=t.seatname,n=t.seatnum,a=t.phone,r=t.uuid;if(this.validateParams({seatnum:n,phone:a,uuid:r},["seatnum","phone","uuid"])){var o={cmd:"control",action:"transfer",uuid:r,phone:a,seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(o)}},transferresume:function(){var t=this.config,e=t.seatname,n=t.seatnum,a=t.phone,r=t.uuid;if(this.validateParams({seatnum:n,phone:a,uuid:r},["seatnum","phone","uuid"])){var o={cmd:"control",action:"transferresume",uuid:r,phone:a,seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(o)}},hold:function(){var t={cmd:"control",action:"hold",uuid:this.config.uuid,seatname:this.config.seatname,seatnum:this.config.seatnum,timestamp:Date.now()};this.sendWebSocketMessage(t)},holdresume:function(){var t={cmd:"control",action:"holdresume",uuid:this.config.uuid,seatname:this.config.seatname,seatnum:this.config.seatnum,timestamp:Date.now()};this.sendWebSocketMessage(t)},remove:function(){var t=this.config,e=t.seatname,n=t.seatnum,a=t.phone;if(this.validateParams({seatnum:n,phone:a},["seatnum","phone"])){var r={cmd:"control",action:"remove",phone:a,seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(r)}},insert:function(){var t=this.config,e=t.seatname,n=t.seatnum,a=t.phone;if(this.validateParams({seatnum:n,phone:a},["seatnum","phone"])){var r={cmd:"control",action:"insert",phone:a,seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(r)}},monitor:function(){var t=this.config,e=t.seatname,n=t.seatnum,a=t.phone;if(this.validateParams({seatnum:n,phone:a},["seatnum","phone"])){var r={cmd:"control",action:"monitor",phone:a,seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(r)}},monitor_to_talk:function(){var t=this.config,e=t.seatname,n=t.seatnum,a=t.phone;if(this.validateParams({seatnum:n,phone:a},["seatnum","phone"])){var r={cmd:"control",action:"monitor_to_talk",phone:a,seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(r)}},monitor_end:function(){var t=this.config,e=t.seatname,n=t.seatnum,a=t.phone;if(this.validateParams({seatnum:n,phone:a},["seatnum","phone"])){var r={cmd:"control",action:"monitor_end",phone:a,seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(r)}},choosecall:function(){var t=this.config,e=t.seatname,n=t.seatnum,a=t.uuid;if(this.validateParams({seatnum:n,uuid:a},["seatnum","uuid"])){var r={cmd:"control",action:"choosecall",uuid:a,seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(r)}},replacecall:function(){var t=this.config,e=t.seatname,n=t.seatnum,a=t.phone;if(this.validateParams({seatnum:n,phone:a},["seatnum","phone"])){var r={cmd:"control",action:"replacecall",phone:a,seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(r)}},three:function(){var t=this.config,e=t.seatname,n=t.seatnum,a=t.phone;if(this.validateParams({seatnum:n,phone:a},["seatnum","phone"])){var r={cmd:"control",action:"three",phone:a,seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(r)}},handoff_ready:function(){var t=this.config,e=t.seatname,n=t.seatnum,a=t.uuid;if(this.validateParams({seatnum:n,uuid:a},["seatnum","uuid"])){var r={cmd:"control",action:"handoff_ready",uuid:a,seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(r)}},handoff_call:function(){var t=this.config,e=t.seatname,n=t.seatnum,a=t.other,r=t.uuid;if(this.validateParams({seatnum:n,other:a,uuid:r},["seatnum","other","uuid"])){var o={cmd:"control",action:"handoff_call",uuid:r,phone:a,seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(o)}},handoff_resume:function(){var t=this.config,e=t.seatname,n=t.seatnum,a=t.uuid;if(this.validateParams({seatnum:n,uuid:a},["seatnum","uuid"])){var r={cmd:"control",action:"handoff_resume",uuid:a,seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(r)}},handoff_transfer:function(){var t=this.config,e=t.seatname,n=t.seatnum,a=t.other,r=t.uuid;if(this.validateParams({seatnum:n,other:a,uuid:r},["seatnum","other","uuid"])){var o={cmd:"control",action:"handoff_transfer",uuid:r,phone:a,seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(o)}},handoff_three:function(){var t=this.config,e=t.seatname,n=t.seatnum,a=t.uuid;if(this.validateParams({seatnum:n,uuid:a},["seatnum","uuid"])){var r={cmd:"control",action:"handoff_three",uuid:a,seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(r)}},record_start:function(){var t=this.config,e=t.seatname,n=t.seatnum,a=t.uuid;if(this.validateParams({seatnum:n,uuid:a},["seatnum","uuid"])){var r={cmd:"control",action:"record_start",uuid:a,seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(r)}},record_stop:function(){var t=this.config,e=t.seatname,n=t.seatnum,a=t.uuid;if(this.validateParams({seatnum:n,uuid:a},["seatnum","uuid"])){var r={cmd:"control",action:"record_stop",uuid:a,seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(r)}},openseatlist:function(){var t=this.config,e=t.seatname,n=t.seatnum;if(this.validateParams({seatnum:n},["seatnum"])){var a={cmd:"status",action:"openseatlist",seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(a)}},closeseatlist:function(){var t=this.config,e=t.seatname,n=t.seatnum;if(this.validateParams({seatnum:n},["seatnum"])){var a={cmd:"status",action:"closeseatlist",seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(a)}},openqueues:function(){var t=this.config,e=t.seatname,n=t.seatnum;if(this.validateParams({seatnum:n},["seatnum"])){var a={cmd:"status",action:"openqueues",seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(a)}},closequeues:function(){var t=this.config,e=t.seatname,n=t.seatnum;if(this.validateParams({seatnum:n},["seatnum"])){var a={cmd:"status",action:"closequeues",seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(a)}},opencalllist:function(){var t=this.config,e=t.seatname,n=t.seatnum;if(this.validateParams({seatnum:n},["seatnum"])){var a={cmd:"status",action:"opencalllist",seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(a)}},closecalllist:function(){var t=this.config,e=t.seatname,n=t.seatnum;if(this.validateParams({seatnum:n},["seatnum"])){var a={cmd:"status",action:"closecalllist",seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(a)}},openroutelist:function(){var t=this.config,e=t.seatname,n=t.seatnum;if(this.validateParams({seatnum:n},["seatnum"])){var a={cmd:"status",action:"openroutelist",seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(a)}},closeroutelist:function(){var t=this.config,e=t.seatname,n=t.seatnum;if(this.validateParams({seatnum:n},["seatnum"])){var a={cmd:"status",action:"closeroutelist",seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(a)}},seatlist:function(){var t=this.config.group;if(this.validateParams({group:t},["group"])){var e={cmd:"status",action:"seatlist",group:t,timestamp:Date.now()};this.sendWebSocketMessage(e)}},queues:function(){var t={cmd:"status",action:"queues",timestamp:Date.now()};this.sendWebSocketMessage(t)},calllist:function(){var t={cmd:"status",action:"calllist",timestamp:Date.now()};this.sendWebSocketMessage(t)},routelist:function(){var t={cmd:"status",action:"routelist",timestamp:Date.now()};this.sendWebSocketMessage(t)},batch:function(){var t=this.config.paramid;if(this.validateParams({paramid:t},["paramid"])){var e={cmd:"status",action:"batch",paramid:t,timestamp:Date.now()};this.sendWebSocketMessage(e)}},batch_start:function(){var t=this.config,e=t.seatname,n=t.seatnum;if(this.validateParams({seatnum:n},["seatnum"])){var a={cmd:"system",action:"batch_start",seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(a)}},batch_stop:function(){var t=this.config,e=t.seatname,n=t.seatnum;if(this.validateParams({seatnum:n},["seatnum"])){var a={cmd:"system",action:"batch_stop",seatname:e,seatnum:n,timestamp:Date.now()};this.sendWebSocketMessage(a)}},keepalive:function(t,e){var n={cmd:"system",action:"keepalive",seatname:t,seatnum:e,timestamp:Date.now()};this.sendWebSocketMessage(n)},testclear:function(){this.logs="",this.addLog("日志已清除")},addLog:function(t){var e=(new Date).toLocaleTimeString();this.logs+="[".concat(e,"] ").concat(t,"\n");var n=this.logs.split("\n");n.length>100&&(this.logs=n.slice(-50).join("\n"))}}},d=m,l=(n("8b3c"),n("1805")),f=Object(l["a"])(d,a,r,!1,null,"91586402",null);e["default"]=f.exports},"8b3c":function(t,e,n){"use strict";n("401b")}}]);