mirror of
https://gitee.com/270580156/weiyu.git
synced 2026-05-15 11:47:54 +00:00
1 line
23 KiB
JavaScript
1 line
23 KiB
JavaScript
"use strict";(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[9967],{6677:function(e,t,s){s.d(t,{Lr:function(){return m},_t:function(){return l},sE:function(){return p},x_:function(){return f}});var n=s(90819),r=s.n(n),i=s(73193),a=s.n(i),o=s(89933),u=s.n(o),c=s(68992),d=s(62395);function l(e){return x.apply(this,arguments)}function x(){return(x=u()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,d.request)("/api/v1/agent/query/org",{method:"GET",params:a()(a()({},t),{},{channel:c.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){return g.apply(this,arguments)}function g(){return(g=u()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,d.request)("/api/v1/agent/create",{method:"POST",data:a()(a()({},t),{},{channel:c.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){return v.apply(this,arguments)}function v(){return(v=u()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,d.request)("/api/v1/agent/update",{method:"POST",data:a()(a()({},t),{},{channel:c.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function m(e){return h.apply(this,arguments)}function h(){return(h=u()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,d.request)("/api/v1/agent/delete",{method:"POST",data:a()(a()({},t),{},{channel:c.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},91855:function(e,t,s){s.d(t,{Eb:function(){return l},RU:function(){return f},xL:function(){return p}});var n=s(90819),r=s.n(n),i=s(73193),a=s.n(i),o=s(89933),u=s.n(o),c=s(68992),d=s(62395);function l(){return x.apply(this,arguments)}function x(){return(x=u()(r()().mark((function e(){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,d.request)("/api/v1/service/statistic/query",{method:"GET",params:{channel:c.XtJ}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function f(e){return g.apply(this,arguments)}function g(){return(g=u()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,d.request)("/api/v1/service/statistic/query/date",{method:"GET",params:a()(a()({},t),{},{channel:c.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){return v.apply(this,arguments)}function v(){return(v=u()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,d.request)("/api/v1/service/statistic/calculate",{method:"POST",data:a()(a()({},t),{},{channel:c.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},44635:function(e,t,s){s.d(t,{LE:function(){return d},W5:function(){return g},p0:function(){return x},zl:function(){return v}});var n=s(90819),r=s.n(n),i=s(73193),a=s.n(i),o=s(89933),u=s.n(o),c=s(62395);function d(e){return l.apply(this,arguments)}function l(){return(l=u()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,c.request)("/api/v1/workgroup/query/org",{method:"GET",params:a()({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function x(e){return f.apply(this,arguments)}function f(){return(f=u()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,c.request)("/api/v1/workgroup/create",{method:"POST",data:a()({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e){return p.apply(this,arguments)}function p(){return(p=u()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,c.request)("/api/v1/workgroup/update",{method:"POST",data:a()({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return m.apply(this,arguments)}function m(){return(m=u()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,c.request)("/api/v1/workgroup/delete",{method:"POST",data:a()({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},32947:function(e,t,s){s.r(t);var n=s(90819),r=s.n(n),i=s(89933),a=s.n(i),o=s(45332),u=s.n(o),c=s(44194),d=s(35079),l=s(78380),x=s(63052),f=s(89654),g=s(92393),p=s(62954),v=s(72264),m=s(21478),h=s(22888),j=s(35490),w=s(44966),k=s(94011),y=s(35911),Z=s(11575),M=s(74526),F=s(36868),R=s(14546),b=s(16829),T=s(1920),C=s(68682),S=s(67308),A=s(44809),W=s(94265),Y=s(58727),O=s(61489),D=s(77686),I=s(66675),U=s(81997),q=s(6677),E=s(99754),P=s(44635),J=s(68992),H=s(45634),X=s.n(H),z=s(62395),G=s(91855),L=s(69650),B=s(87005),_=s(31549),N=L.Z.Title,Q=d.default.RangePicker,$=l.Z.Option;t.default=function(){var e,t,s=(0,z.useIntl)(),n=(0,E.Z)().translateStringTranct,i=(0,c.useState)(X()().startOf("day")),o=u()(i,2),d=o[0],H=o[1],L=(0,c.useState)(X()().endOf("day")),K=u()(L,2),V=K[0],ee=K[1],te=(0,c.useState)("today"),se=u()(te,2),ne=se[0],re=se[1],ie=(0,c.useState)(J.whQ),ae=u()(ie,2),oe=ae[0],ue=ae[1],ce=(0,c.useState)(),de=u()(ce,2),le=de[0],xe=de[1],fe=(0,c.useState)(),ge=u()(fe,2),pe=ge[0],ve=ge[1],me=(0,D.u)((function(e){return e.currentOrg})),he=(0,I.E)((function(e){return e})),je=he.agentResult,we=he.setAgentResult,ke=(0,U.$)((function(e){return e})),ye=ke.workgroupResult,Ze=ke.setWorkgroupResult,Me=(0,c.useState)(),Fe=u()(Me,2),Re=Fe[0],be=Fe[1],Te=(0,c.useState)(J.OwA),Ce=u()(Te,2),Se=Ce[0],Ae=Ce[1],We=(0,c.useState)(!1),Ye=u()(We,2),Oe=(Ye[0],Ye[1]),De=[{label:(0,_.jsx)(z.FormattedMessage,{id:"ticket.statistic.timeRange.today"}),value:"today"},{label:(0,_.jsx)(z.FormattedMessage,{id:"ticket.statistic.timeRange.yesterday"}),value:"yesterday"},{label:(0,_.jsx)(z.FormattedMessage,{id:"ticket.statistic.timeRange.week"}),value:"week"},{label:(0,_.jsx)(z.FormattedMessage,{id:"ticket.statistic.timeRange.lastWeek"}),value:"lastWeek"},{label:(0,_.jsx)(z.FormattedMessage,{id:"ticket.statistic.timeRange.month"}),value:"month"},{label:(0,_.jsx)(z.FormattedMessage,{id:"ticket.statistic.timeRange.custom"}),value:"custom"}],Ie=(s.formatMessage({id:"service.statistic.status.online"}),s.formatMessage({id:"service.statistic.status.busy"}),s.formatMessage({id:"service.statistic.status.away"}),s.formatMessage({id:"service.statistic.status.offline"}),[{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.table.agent"}),dataIndex:"name",key:"name"},{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.table.onlineTime"}),dataIndex:"onlineTime",key:"onlineTime"},{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.table.sessionCount"}),dataIndex:"sessionCount",key:"sessionCount"},{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.table.avgResponseTime"}),dataIndex:"avgResponseTime",key:"avgResponseTime"},{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.table.avgSessionTime"}),dataIndex:"avgSessionTime",key:"avgSessionTime"},{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.table.satisfaction"}),dataIndex:"satisfaction",key:"satisfaction"},{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.table.workingHours"}),dataIndex:"workingHours",key:"workingHours"},{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.table.transferRate"}),dataIndex:"transferRate",key:"transferRate"},{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.table.firstResolutionRate"}),dataIndex:"firstResolutionRate",key:"firstResolutionRate"},{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.table.overdueCount"}),dataIndex:"overdueCount",key:"overdueCount"}]);(0,c.useEffect)((function(){if("custom"===ne)H(d),ee(V),Ae(J.dd4);else{var e=X()();"today"===ne?(H(e),ee(e),Ae(J.OwA)):"yesterday"===ne?(H(e.subtract(1,"day")),ee(e.subtract(1,"day")),Ae(J.OwA)):"week"===ne?(H(e.startOf("week")),ee(e.endOf("week")),Ae(J.dd4)):"lastWeek"===ne?(H(e.subtract(1,"week").startOf("week")),ee(e.subtract(1,"week").endOf("week")),Ae(J.dd4)):"month"===ne&&(H(e.startOf("month")),ee(e.endOf("month")),Ae(J.dd4))}}),[ne]);var Ue=function(){var e=a()(r()().mark((function e(){var t,s;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return O.yw.loading("loading"),t={pageNumber:0,pageSize:50,orgUid:null==me?void 0:me.uid},e.next=4,(0,P.LE)(t);case 4:s=e.sent,console.log("fetchAllWorkgroups: ",s),200===s.code?(O.yw.destroy(),Ze(s),s.data.content.length>0&&ve(s.data.content[0].uid)):(O.yw.destroy(),O.yw.error(s.message));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),qe=function(){var e=a()(r()().mark((function e(){var t,s;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return O.yw.loading("loading"),t={pageNumber:0,pageSize:50,orgUid:null==me?void 0:me.uid},e.next=4,(0,q._t)(t);case 4:s=e.sent,console.log("fetchAllAgents: ",s),200===s.code?(O.yw.destroy(),we(s),s.data.content.length>0&&xe(s.data.content[0].uid)):(O.yw.destroy(),O.yw.error(n(s.message))),console.log("queryAllAgents response",s);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ee=function(){var e=a()(r()().mark((function e(){var t,n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Oe(!0),e.prev=1,O.yw.loading("loading"),t={type:oe,startDate:null==d?void 0:d.format("YYYY-MM-DD 00:00:00"),endDate:null==V?void 0:V.format("YYYY-MM-DD 23:59:59"),workgroupUid:pe,agentUid:le,orgUid:null==me?void 0:me.uid},e.next=6,(0,G.RU)(t);case 6:n=e.sent,console.log("queryStatisticServicesByOrg response",n,t),200===n.code?(O.yw.destroy(),be(n.data)):(O.yw.destroy(),O.yw.error(n.message)),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(1),O.yw.error(s.formatMessage({id:"ticket.message.operation.failed"}));case 14:return e.prev=14,Oe(!1),e.finish(14);case 17:case"end":return e.stop()}}),e,null,[[1,11,14,17]])})));return function(){return e.apply(this,arguments)}}(),Pe=function(){var e=a()(r()().mark((function e(){var t,s;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return O.yw.loading("loading"),t={type:oe,startDate:null==d?void 0:d.format("YYYY-MM-DD 00:00:00"),endDate:null==V?void 0:V.format("YYYY-MM-DD 23:59:59"),workgroupUid:pe,agentUid:le,orgUid:null==me?void 0:me.uid},e.next=4,(0,G.RU)(t);case 4:s=e.sent,console.log("queryStatisticServicesByOrg response",s,t),200===s.code?O.yw.destroy():(O.yw.destroy(),O.yw.error(s.message));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,c.useEffect)((function(){Ue(),qe()}),[]),(0,c.useEffect)((function(){Ee()}),[oe,le,pe]),(0,c.useEffect)((function(){Pe()}),[Se,oe,le,pe]),(0,c.useEffect)((function(){Ee()}),[d,V]),(0,_.jsxs)("div",{style:{padding:16},children:[(0,_.jsx)(x.Z,{style:{marginBottom:16},children:(0,_.jsxs)(f.Z,{direction:"vertical",style:{width:"100%"},children:[(0,_.jsxs)(f.Z,{wrap:!0,children:[(0,_.jsx)(g.ZP.Group,{value:ne,onChange:function(e){return re(e.target.value)},children:De.map((function(e){return(0,_.jsx)(g.ZP.Button,{value:e.value,children:e.label},e.value)}))}),"custom"===ne&&(0,_.jsx)(Q,{value:[d,V],onChange:function(e){H(e[0]),ee(e[1])}})]}),(0,_.jsxs)(f.Z,{wrap:!0,children:[(0,_.jsxs)(l.Z,{placeholder:(0,_.jsx)(z.FormattedMessage,{id:"ticket.statistic.filter.type"}),style:{width:200},value:oe,onChange:function(e){return ue(e)},children:[(0,_.jsx)($,{value:J.whQ,children:(0,_.jsx)(z.FormattedMessage,{id:"i18n.all"})}),(0,_.jsx)($,{value:J.fyH,children:(0,_.jsx)(z.FormattedMessage,{id:"ticket.statistic.filter.agent"})}),(0,_.jsx)($,{value:J.v5D,children:(0,_.jsx)(z.FormattedMessage,{id:"ticket.statistic.filter.workgroup"})})]}),oe===J.fyH&&(0,_.jsx)(l.Z,{placeholder:(0,_.jsx)(z.FormattedMessage,{id:"ticket.statistic.filter.agent"}),style:{width:200},value:le,onChange:function(e){return xe(e)},children:null===(e=je.data)||void 0===e||null===(e=e.content)||void 0===e?void 0:e.map((function(e){return(0,_.jsx)($,{value:null==e?void 0:e.uid,children:n(null==e?void 0:e.nickname)},null==e?void 0:e.uid)}))}),oe===J.v5D&&(0,_.jsx)(l.Z,{placeholder:(0,_.jsx)(z.FormattedMessage,{id:"ticket.statistic.filter.department"}),style:{width:200},value:pe,onChange:function(e){return ve(e)},children:null===(t=ye.data)||void 0===t||null===(t=t.content)||void 0===t?void 0:t.map((function(e){return(0,_.jsx)($,{value:null==e?void 0:e.uid,children:n(null==e?void 0:e.nickname)},null==e?void 0:e.uid)}))}),(0,_.jsx)(p.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"ticket.statistic.filter.export"}),children:(0,_.jsx)(v.ZP,{icon:(0,_.jsx)(k.Z,{}),onClick:function(){var e=localStorage.getItem(J.LA8);window.open((0,B.kG)()+"/api/v1/statistic/export?"+new URLSearchParams({type:oe,startDate:null==d?void 0:d.format("YYYY-MM-DD"),endDate:null==V?void 0:V.format("YYYY-MM-DD"),workgroupUid:pe,agentUid:le,orgUid:null==me?void 0:me.uid,accessToken:e||""}).toString())},children:(0,_.jsx)(z.FormattedMessage,{id:"ticket.statistic.filter.export"})})}),(0,_.jsx)(p.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"ticket.statistic.filter.refresh"}),children:(0,_.jsx)(v.ZP,{icon:(0,_.jsx)(y.Z,{}),onClick:function(){return Ee()},children:(0,_.jsx)(z.FormattedMessage,{id:"ticket.statistic.filter.refresh"})})}),!1]})]})}),(0,_.jsxs)(m.Z,{gutter:24,children:[(0,_.jsx)(h.Z,{xl:6,lg:12,md:12,sm:24,xs:24,children:(0,_.jsx)(x.Z,{variant:"borderless",children:(0,_.jsx)(j.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.onlineAgentCount"}),value:(null==Re?void 0:Re.onlineAgentCount)||0,prefix:(0,_.jsx)(Z.Z,{}),suffix:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.unit.person"})})})}),(0,_.jsx)(h.Z,{xl:6,lg:12,md:12,sm:24,xs:24,children:(0,_.jsx)(x.Z,{variant:"borderless",children:(0,_.jsx)(j.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.offlineAgentCount"}),value:(null==Re?void 0:Re.offlineAgentCount)||0,prefix:(0,_.jsx)(M.Z,{}),suffix:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.unit.person"})})})}),(0,_.jsx)(h.Z,{xl:6,lg:12,md:12,sm:24,xs:24,children:(0,_.jsx)(x.Z,{variant:"borderless",children:(0,_.jsx)(j.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.queuingThreadCount"}),value:(null==Re?void 0:Re.queuingThreadCount)||0,prefix:(0,_.jsx)(Z.Z,{}),suffix:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.unit.person"})})})}),(0,_.jsx)(h.Z,{xl:6,lg:12,md:12,sm:24,xs:24,children:(0,_.jsx)(x.Z,{variant:"borderless",children:(0,_.jsx)(j.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.currentThreadCount"}),value:(null==Re?void 0:Re.currentThreadCount)||0,prefix:(0,_.jsx)(F.Z,{}),suffix:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.unit.session"})})})})]}),(0,_.jsxs)(m.Z,{gutter:24,style:{marginTop:24},children:[(0,_.jsx)(h.Z,{xl:6,lg:12,md:12,sm:24,xs:24,children:(0,_.jsx)(x.Z,{variant:"borderless",children:(0,_.jsx)(j.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.maxResponseTime"}),value:(null==Re?void 0:Re.maxResponseTime)||0,prefix:(0,_.jsx)(R.Z,{}),suffix:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.unit.seconds"})})})}),(0,_.jsx)(h.Z,{xl:6,lg:12,md:12,sm:24,xs:24,children:(0,_.jsx)(x.Z,{variant:"borderless",children:(0,_.jsx)(j.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.minResponseTime"}),value:(null==Re?void 0:Re.minResponseTime)||0,prefix:(0,_.jsx)(R.Z,{}),suffix:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.unit.seconds"})})})}),(0,_.jsx)(h.Z,{xl:6,lg:12,md:12,sm:24,xs:24,children:(0,_.jsx)(x.Z,{variant:"borderless",children:(0,_.jsx)(j.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.avgFirstResponseTime"}),value:(null==Re?void 0:Re.avgFirstResponseTime)||0,prefix:(0,_.jsx)(R.Z,{}),suffix:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.unit.seconds"})})})}),(0,_.jsx)(h.Z,{xl:6,lg:12,md:12,sm:24,xs:24,children:(0,_.jsx)(x.Z,{variant:"borderless",children:(0,_.jsx)(j.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.avgWaitingTime"}),value:(null==Re?void 0:Re.avgWaitingTime)||0,prefix:(0,_.jsx)(R.Z,{}),suffix:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.unit.seconds"})})})})]}),(0,_.jsxs)(m.Z,{gutter:24,style:{marginTop:24},children:[(0,_.jsx)(h.Z,{xl:6,lg:12,md:12,sm:24,xs:24,children:(0,_.jsx)(x.Z,{variant:"borderless",children:(0,_.jsx)(j.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.totalIncomingThreads"}),value:(null==Re?void 0:Re.totalIncomingThreads)||0,prefix:(0,_.jsx)(F.Z,{}),suffix:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.unit.session"})})})}),(0,_.jsx)(h.Z,{xl:6,lg:12,md:12,sm:24,xs:24,children:(0,_.jsx)(x.Z,{variant:"borderless",children:(0,_.jsx)(j.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.acceptedThreadCount"}),value:(null==Re?void 0:Re.acceptedThreadCount)||0,prefix:(0,_.jsx)(b.Z,{}),suffix:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.unit.session"})})})}),(0,_.jsx)(h.Z,{xl:6,lg:12,md:12,sm:24,xs:24,children:(0,_.jsx)(x.Z,{variant:"borderless",children:(0,_.jsx)(j.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.acceptRate"}),value:(null==Re?void 0:Re.acceptRate)||0,prefix:(0,_.jsx)(b.Z,{}),suffix:"%"})})}),(0,_.jsx)(h.Z,{xl:6,lg:12,md:12,sm:24,xs:24,children:(0,_.jsx)(x.Z,{variant:"borderless",children:(0,_.jsx)(j.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.firstSolveRate"}),value:(null==Re?void 0:Re.firstSolveRate)||0,prefix:(0,_.jsx)(T.Z,{}),suffix:"%"})})})]}),(0,_.jsxs)(m.Z,{gutter:24,style:{marginTop:24},children:[(0,_.jsx)(h.Z,{xl:6,lg:12,md:12,sm:24,xs:24,children:(0,_.jsx)(x.Z,{variant:"borderless",children:(0,_.jsx)(j.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.robotThreadCount"}),value:(null==Re?void 0:Re.robotThreadCount)||0,prefix:(0,_.jsx)(C.Z,{}),suffix:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.unit.session"})})})}),(0,_.jsx)(h.Z,{xl:6,lg:12,md:12,sm:24,xs:24,children:(0,_.jsx)(x.Z,{variant:"borderless",children:(0,_.jsx)(j.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.robotToHumanCount"}),value:(null==Re?void 0:Re.robotToHumanCount)||0,prefix:(0,_.jsx)(S.Z,{}),suffix:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.unit.session"})})})}),(0,_.jsx)(h.Z,{xl:6,lg:12,md:12,sm:24,xs:24,children:(0,_.jsx)(x.Z,{variant:"borderless",children:(0,_.jsx)(j.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.robotSolveRate"}),value:(null==Re?void 0:Re.robotSolveRate)||0,prefix:(0,_.jsx)(b.Z,{}),suffix:"%"})})}),(0,_.jsx)(h.Z,{xl:6,lg:12,md:12,sm:24,xs:24,children:(0,_.jsx)(x.Z,{variant:"borderless",children:(0,_.jsx)(j.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.transferRate"}),value:(null==Re?void 0:Re.transferRate)||0,prefix:(0,_.jsx)(A.Z,{}),suffix:"%"})})})]}),(0,_.jsxs)(x.Z,{style:{marginTop:24},children:[(0,_.jsx)(N,{level:4,children:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.sessionDuration"})}),(0,_.jsxs)(m.Z,{gutter:24,children:[(0,_.jsx)(h.Z,{span:8,children:(0,_.jsx)(j.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.duration.within5min"}),value:(null==Re?void 0:Re.durationWithin5Min)||0,suffix:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.unit.sessions"})})}),(0,_.jsx)(h.Z,{span:8,children:(0,_.jsx)(j.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.duration.within15min"}),value:(null==Re?void 0:Re.durationWithin15Min)||0,suffix:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.unit.sessions"})})}),(0,_.jsx)(h.Z,{span:8,children:(0,_.jsx)(j.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.duration.over15min"}),value:(null==Re?void 0:Re.durationOver15Min)||0,suffix:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.unit.sessions"})})})]})]}),(0,_.jsx)(x.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.performance"}),style:{marginTop:24},extra:(0,_.jsxs)(f.Z,{children:[(0,_.jsx)(p.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.export.excel"}),children:(0,_.jsx)(v.ZP,{icon:(0,_.jsx)(W.Z,{})})}),(0,_.jsx)(p.Z,{title:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.export.pdf"}),children:(0,_.jsx)(v.ZP,{icon:(0,_.jsx)(Y.Z,{})})})]}),children:(0,_.jsx)(w.Z,{columns:Ie,dataSource:[],scroll:{x:!0},size:"small",locale:{emptyText:(0,_.jsx)(z.FormattedMessage,{id:"service.statistic.tips.noData"})}})})]})}},66675:function(e,t,s){s.d(t,{E:function(){return l}});var n=s(73193),r=s.n(n),i=s(76711),a=s.n(i),o=s(68992),u=s(58063),c=s(66266),d=s(31403),l=(0,u.Ue)()((0,c.mW)((0,c.tJ)((0,d.n)((function(e,t){return{agentResult:{data:{content:[]}},currentAgent:{uid:"",orgUid:""},insertAgent:function(t){e((function(e){e.agentResult.data.content.unshift(t)}))},updateAgent:function(t){e((function(e){var s=e.agentResult.data.content,n=s.findIndex((function(e){return e.uid===t.uid}));-1!==n?s[n]=t:console.warn("Agent with uid ".concat(t.uid," not found."))}))},setAgentResult:function(s){var n;(e({agentResult:s}),""===t().currentAgent.uid)&&((null===(n=s.data)||void 0===n||null===(n=n.content)||void 0===n?void 0:n.length)>0&&e({currentAgent:s.data.content[0]}))},setCurrentAgent:function(s){var n=t().agentResult.data.content,i=n.findIndex((function(e){return e.uid===s.uid}));if(-1!==i){var o=[].concat(a()(n.slice(0,i)),[s],a()(n.slice(i+1))),u=r()(r()({},t().agentResult),{},{data:{content:o}});e({agentResult:u,currentAgent:s})}else console.warn("Agent with the specified uid not found."),e({currentAgent:s})},deleteCurrentAgent:function(s){var n=t().agentResult.data.content,i=n.findIndex((function(e){return e.uid===s}));-1!==i?e({agentResult:r()(r()({},t().agentResult),{},{data:{content:[].concat(a()(n.slice(0,i)),a()(n.slice(i+1)))}})}):console.warn("Agent not found in cache:",s),t().currentAgent.uid===s&&e({currentAgent:{uid:"",orgUid:""}})},deleteAgentCache:function(){return e({},!0)}}})),{name:o.zzK})))},81997:function(e,t,s){s.d(t,{$:function(){return l}});var n=s(73193),r=s.n(n),i=s(76711),a=s.n(i),o=s(68992),u=s(58063),c=s(66266),d=s(31403),l=(0,u.Ue)()((0,c.mW)((0,c.tJ)((0,d.n)((function(e,t){return{workgroupResult:{data:{content:[]}},currentWorkgroup:{uid:"",nickname:"",avatar:"",description:"",orgUid:""},insertWorkgroup:function(t){e((function(e){e.workgroupResult.data.content.unshift(t)}))},updateWorkgroup:function(t){e((function(e){var s=e.workgroupResult.data.content,n=s.findIndex((function(e){return e.uid===t.uid}));-1!==n?s[n]=t:console.warn("Workgroup with uid ".concat(t.uid," not found."))}))},deleteWorkgroup:function(t){e((function(e){var s=e.workgroupResult.data.content,n=s.findIndex((function(e){return e.uid===t.uid}));-1!==n?s.splice(n,1):console.warn("Workgroup with uid ".concat(t.uid," not found."))}))},setWorkgroupResult:function(s){var n;(e({workgroupResult:s}),""===t().currentWorkgroup.uid)&&((null===(n=s.data)||void 0===n||null===(n=n.content)||void 0===n?void 0:n.length)>0&&e({currentWorkgroup:s.data.content[0]}))},setCurrentWorkgroup:function(s){var n=t().workgroupResult.data.content,i=n.findIndex((function(e){return e.uid===s.uid}));if(-1!==i){var o=[].concat(a()(n.slice(0,i)),[s],a()(n.slice(i+1))),u=r()(r()({},t().workgroupResult),{},{data:{content:o}});e({workgroupResult:u,currentWorkgroup:s})}else console.warn("Workgroup with the specified uid not found."),e({currentWorkgroup:s})},deleteCurrentWorkgroup:function(s){var n=t().workgroupResult.data.content,i=n.findIndex((function(e){return e.uid===s}));-1!==i?e({workgroupResult:r()(r()({},t().workgroupResult),{},{data:{content:[].concat(a()(n.slice(0,i)),a()(n.slice(i+1)))}})}):console.warn("Workgroup not found in cache:",s),t().currentWorkgroup.uid===s&&e({currentWorkgroup:{uid:"",orgUid:""}})},deleteWorkgroupCache:function(){return e({},!0)}}})),{name:o.b6l})))}}]); |