Files
weiyu/deploy/server/admin/p__Dashboard__Service__Screen__index.d28eeda2.async.js

1 line
18 KiB
JavaScript
Raw Normal View History

2025-09-25 20:41:06 +08:00
"use strict";(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[7581],{92634:function(t,e,n){n.d(e,{Wq:function(){return d}});var a=n(90819),o=n.n(a),s=n(73193),r=n.n(s),i=n(89933),l=n.n(i),c=n(5488),u=n(14870);function d(t){return h.apply(this,arguments)}function h(){return(h=l()(o()().mark((function t(e){return o()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,u.request)("/api/v1/queue/query/org",{method:"GET",params:r()(r()({},e),{},{channel:c.XtJ})}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}},86295:function(t,e,n){n.r(e);var a=n(90819),o=n.n(a),s=n(89933),r=n.n(s),i=n(45332),l=n.n(i),c=n(44194),u=n(88344),d=n(49616),h=n(5780),f=n(78875),g=n(20228),x=n(79401),p=n(65532),m=n(96501),v=n(31261),M=n(45681),y=n(93892),j=n(53504),C=n(78867),k=n(50792),Z=n(8113),b=n(58791),w=n(48004),R=n(10022),A=n(61353),I=n(25632),W=n(90297),T=n(80556),S=n(55510),z=n(74840),q=n(47305),F=n(23515),U=n(98385),E=n(93689),H=n(14870),L=n(5025),B=n(92634),J=n(34599),V=n(16698),D=n(87663),P=n(75831),$=n(28977),G=n.n($),K=n(31549);e.default=function(){(0,H.useIntl)();var t=(0,c.useContext)(P.I).isDarkMode,e=(0,V.E)((function(t){return t.currentAgent})),n=(0,J.u)((function(t){return t.currentOrg})),a=((0,D.$)((function(t){return{currentWorkgroup:t.currentWorkgroup}})).currentWorkgroup,(0,c.useState)(!1)),s=l()(a,2),i=s[0],$=s[1],N=(0,c.useState)(!1),O=l()(N,2),X=O[0],Y=O[1],Q=(0,c.useState)({totalCount:0,queuingCount:0,chattingCount:0,offlineCount:0,closedCount:0,leaveMsgCount:0,robotToAgentCount:0,avgWaitTime:0,avgResolveTime:0}),_=l()(Q,2),tt=_[0],et=_[1],nt=(0,c.useState)({onlineAgents:0,busyAgents:0,availableAgents:0,totalVisitors:0,activeChats:0,avgResponseTime:0,satisfactionRate:0,systemLoad:0}),at=l()(nt,2),ot=at[0],st=at[1],rt=(0,c.useState)([]),it=l()(rt,2),lt=it[0],ct=it[1],ut=(0,c.useState)([]),dt=l()(ut,2),ht=dt[0],ft=dt[1],gt=(0,c.useState)([]),xt=l()(gt,2),pt=xt[0],mt=xt[1],vt=(0,c.useState)([]),Mt=l()(vt,2),yt=Mt[0],jt=Mt[1],Ct=function(){var t=r()(o()().mark((function t(){var a,s,r,i;return o()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return $(!0),t.prev=1,s={pageNumber:0,pageSize:100,agentUid:null==e?void 0:e.uid,orgUid:null==n?void 0:n.uid},t.next=5,(0,B.Wq)(s);case 5:200===(null==(r=t.sent)?void 0:r.code)&&null!=r&&null!==(a=r.data)&&void 0!==a&&a.content&&(i=r.data.content.reduce((function(t,e){return t.totalCount+=e.totalCount||0,t.queuingCount+=e.queuingCount||0,t.chattingCount+=e.chattingCount||0,t.offlineCount+=e.offlineCount||0,t.closedCount+=e.closedCount||0,t.leaveMsgCount+=e.leaveMsgCount||0,t.robotToAgentCount+=e.robotToAgentCount||0,t.avgWaitTime=e.avgWaitTime||0,t.avgResolveTime=e.avgResolveTime||0,t}),{totalCount:0,queuingCount:0,chattingCount:0,offlineCount:0,closedCount:0,leaveMsgCount:0,robotToAgentCount:0,avgWaitTime:0,avgResolveTime:0}),et(i)),t.next=13;break;case 9:t.prev=9,t.t0=t.catch(1),console.error("获取队列数据失败:",t.t0),L.yw.error("获取队列数据失败");case 13:return t.prev=13,$(!1),t.finish(13);case 16:case"end":return t.stop()}}),t,null,[[1,9,13,16]])})));return function(){return t.apply(this,arguments)}}(),kt=(0,c.useCallback)((function(){var t,e,n,a=G()().hour();a>=0&&a<=6?(t=5+10*Math.random(),e=2+5*Math.random(),n=2+3*Math.random()):a>=7&&a<=11?(t=20+30*Math.random(),e=10+15*Math.random(),n=5+8*Math.random()):a>=12&&a<=13?(t=50+25*Math.random(),e=25+15*Math.random(),n=12+6*Math.random()):a>=14&&a<=17?(t=70+30*Math.random(),e=35+20*Math.random(),n=15+10*Math.random()):(t=30+40*Math.random(),e=15+20*Math.random(),n=8+8*Math.random());var o=Math.floor(n),s=Math.floor(o*(.8+.2*Math.random())),r=Math.floor(s*(.3+.4*Math.random())),i=s-r;st((function(n){return{onlineAgents:Math.max(1,s),busyAgents:Math.max(0,r),availableAgents:Math.max(0,i),totalVisitors:Math.floor(t),activeChats:Math.floor(e),avgResponseTime:Math.floor(20+40*Math.random()),satisfactionRate:Math.floor(85+12*Math.random()),systemLoad:Math.floor(30+40*Math.random())}}))}),[]),Zt=(0,c.useCallback)((function(){console.log("生成趋势数<EFBFBD><EFBFBD>