mirror of
https://gitee.com/270580156/weiyu.git
synced 2026-05-18 05:08:02 +00:00
1 line
40 KiB
JavaScript
1 line
40 KiB
JavaScript
"use strict";(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[8185],{5305:function(e,t,n){n.d(t,{EN:function(){return d},G_:function(){return p},Vh:function(){return y},WN:function(){return g},ry:function(){return x}});var r=n(90819),i=n.n(r),a=n(73193),s=n.n(a),o=n(89933),c=n.n(o),u=n(36265),l=n(5861);function d(e){return h.apply(this,arguments)}function h(){return(h=c()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/ai/statistic/token/query/org",{method:"GET",params:s()(s()({},t),{},{channel:u.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){return f.apply(this,arguments)}function f(){return(f=c()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/ai/statistic/token/delete",{method:"POST",data:s()(s()({},t),{},{channel:u.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function x(e,t){return v.apply(this,arguments)}function v(){return(v=c()(i()().mark((function e(t,n){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/ai/statistic/token/hourly",{method:"GET",params:{orgUid:t,date:n,channel:u.XtJ}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e,t,n){return b.apply(this,arguments)}function b(){return(b=c()(i()().mark((function e(t,n,r){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/ai/statistic/token/hourly/provider",{method:"GET",params:{orgUid:t,date:n,aiProvider:r,channel:u.XtJ}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e,t,n){return m.apply(this,arguments)}function m(){return(m=c()(i()().mark((function e(t,n,r){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/ai/statistic/token/hourly/model",{method:"GET",params:{orgUid:t,date:n,aiModelType:r,channel:u.XtJ}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},35241:function(e,t,n){n.d(t,{K_:function(){return y},Np:function(){return p},dx:function(){return x},xH:function(){return g},xs:function(){return d}});var r=n(90819),i=n.n(r),a=n(73193),s=n.n(a),o=n(89933),c=n.n(o),u=n(36265),l=n(5861);function d(e){return h.apply(this,arguments)}function h(){return(h=c()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/freeswitch/cdr/query/org",{method:"GET",params:s()(s()({},t),{},{channel:u.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){return f.apply(this,arguments)}function f(){return(f=c()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/freeswitch/cdr/create",{method:"POST",data:s()(s()({},t),{},{channel:u.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function x(e){return v.apply(this,arguments)}function v(){return(v=c()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/freeswitch/cdr/update",{method:"POST",data:s()(s()({},t),{},{channel:u.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e){return b.apply(this,arguments)}function b(){return(b=c()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/freeswitch/cdr/delete",{method:"POST",data:s()(s()({},t),{},{channel:u.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e){return m.apply(this,arguments)}function m(){return(m=c()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/freeswitch/cdr/delete/org",{method:"POST",data:s()(s()({},t),{},{channel:u.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},13883:function(e,t,n){n.d(t,{Az:function(){return d},Bv:function(){return S},DO:function(){return y},L0:function(){return T},RF:function(){return k},Xc:function(){return x},YO:function(){return Z},jX:function(){return g},tu:function(){return p}});var r=n(90819),i=n.n(r),a=n(73193),s=n.n(a),o=n(89933),c=n.n(o),u=n(36265),l=n(5861);function d(e){return h.apply(this,arguments)}function h(){return(h=c()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/article/query/org",{method:"GET",params:s()(s()({},t),{},{channel:u.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){return f.apply(this,arguments)}function f(){return(f=c()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/article/create",{method:"POST",data:s()(s()({},t),{},{channel:u.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function x(e){return v.apply(this,arguments)}function v(){return(v=c()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/article/update",{method:"POST",data:s()(s()({},t),{},{channel:u.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(e){return b.apply(this,arguments)}function b(){return(b=c()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/article/delete",{method:"POST",data:s()(s()({},t),{},{channel:u.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e){return m.apply(this,arguments)}function m(){return(m=c()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/article/deleteAll",{method:"POST",data:s()(s()({},t),{},{channel:u.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function k(e){return j.apply(this,arguments)}function j(){return(j=c()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/article/updateIndex",{method:"POST",data:s()(s()({},t),{},{channel:u.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Z(e){return w.apply(this,arguments)}function w(){return(w=c()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/article/updateVectorIndex",{method:"POST",data:s()(s()({},t),{},{channel:u.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function T(e){return C.apply(this,arguments)}function C(){return(C=c()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/article/updateAllIndex",{method:"POST",data:s()(s()({},t),{},{channel:u.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(e){return M.apply(this,arguments)}function M(){return(M=c()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/article/updateAllVectorIndex",{method:"POST",data:s()(s()({},t),{},{channel:u.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},90694:function(e,t,n){n.d(t,{Wq:function(){return d}});var r=n(90819),i=n.n(r),a=n(73193),s=n.n(a),o=n(89933),c=n.n(o),u=n(36265),l=n(5861);function d(e){return h.apply(this,arguments)}function h(){return(h=c()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/queue/query/org",{method:"GET",params:s()(s()({},t),{},{channel:u.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},71940:function(e,t,n){n.d(t,{Eb:function(){return d},RU:function(){return p}});var r=n(90819),i=n.n(r),a=n(73193),s=n.n(a),o=n(89933),c=n.n(o),u=n(36265),l=n(5861);function d(){return h.apply(this,arguments)}function h(){return(h=c()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/service/statistic/query",{method:"GET",params:{channel:u.XtJ}}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){return f.apply(this,arguments)}function f(){return(f=c()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/service/statistic/query/date",{method:"GET",params:s()(s()({},t),{},{channel:u.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},65818:function(e,t,n){n.d(t,{AD:function(){return d}});var r=n(90819),i=n.n(r),a=n(73193),s=n.n(a),o=n(89933),c=n.n(o),u=n(36265),l=n(5861);function d(e){return h.apply(this,arguments)}function h(){return(h=c()(i()().mark((function e(t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,l.request)("/api/v1/ticket/statistic/query/date",{method:"GET",params:s()(s()({},t),{},{channel:u.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},76071:function(e,t,n){var r=n(74494);t.Z=function(){var e=(0,r.Z)().isDarkMode;return{leftSiderStyle:{borderRight:e?"1px solid #333":"1px solid #ccc",background:e?"#141414":"#f5f5f5",height:"100vh",overflow:"auto"},leftSiderWidth:250,headerStyle:{background:e?"#141414":"#fff"},rightSiderStyle:{borderLeft:e?"1px solid #333":"1px solid #ccc",background:e?"#141414":"#f5f5f5"},contentStyle:{minHeight:120,background:e?"#141414":"#f5f5f5",height:"100vh",overflow:"auto",padding:10}}}},92633:function(e,t,n){n.r(t),n.d(t,{default:function(){return he}});var r=n(45332),i=n.n(r),a=n(71865),s=n(5861),o=n(44194),c=n(81512),u=n(25709),l=n(2157),d=n(31549),h=function(e){var t=e.open,n=e.onClose,r=(0,s.useIntl)(),i=(0,s.useNavigate)(),a=function(){localStorage.setItem("skipVerification","true"),n()};return(0,d.jsx)(u.Z,{title:r.formatMessage({id:"welcome.verify.modal.title",defaultMessage:"账号验证提示"}),open:t,onCancel:a,footer:[(0,d.jsx)(l.ZP,{onClick:a,children:r.formatMessage({id:"welcome.verify.later",defaultMessage:"稍后验证"})},"later"),(0,d.jsx)(l.ZP,{type:"primary",onClick:function(){n(),i("/setting/certification")},children:r.formatMessage({id:"welcome.verify.now",defaultMessage:"立即验证"})},"now")],children:(0,d.jsx)("p",{children:r.formatMessage({id:"welcome.verify.modal.description",defaultMessage:"您的邮箱和手机号尚未验证,为保障账号安全,建议您尽快完成验证。"})})})},p=n(11258),f=n(42539),x=n(73193),v=n.n(x),g=n(90819),b=n.n(g),y=n(89933),m=n.n(y),k=n(45516),j=n(99689),Z=n(37351),w=n(20921),T=n(96082),C=n(76185),S=n(22060),M=n(46435),q=n(63889),D=n(9134),P=n(10497),I=n(8651),R=n(6544),O=n(63071),A=n(27987),E=n(35911),F=n(11575),J=n(32893),X=n(50463),N=n(35567),z=n(12201),H=n(80597),L=n(15883),Y=n(13911),G=n(25847),U=n(57949),W=n(96596),K=n.n(W),V=n(5286),_=n(71940),B=n(65818),Q=n(5305),$=n(35241),ee=n(13883),te=n(36265);function ne(e){return re.apply(this,arguments)}function re(){return(re=m()(b()().mark((function e(t){return b()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,s.request)("/api/v1/notice/query/org",{method:"GET",params:v()(v()({},t),{},{channel:te.XtJ})}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ie=n(90694),ae=j.default.RangePicker,se=Z.Z.Title,oe=Z.Z.Text,ce=function(e){if(!e||e<=0)return"0s";if(e<60)return"".concat(Math.round(e),"s");var t=Math.floor(e/60),n=Math.round(e%60);return"".concat(t,"m ").concat(n,"s")},ue=function(e){return null==e||Number.isNaN(e)?0:Math.max(0,Math.min(100,Math.round(e)))},le=function(){var e,t,n,r,c,u,h=(0,k.s0)(),p=(0,s.useIntl)(),f=(0,o.useCallback)((function(e,t,n){return p.formatMessage({id:e,defaultMessage:t},n)}),[p]),x=function(){try{return!1}catch(e){return!1}}(),g=(0,a.u)((function(e){return e.currentOrg})),y=(0,o.useState)([K()().startOf("day").subtract(6,"day"),K()().endOf("day")]),j=i()(y,2),Z=j[0],W=j[1],re=(0,o.useState)(),le=i()(re,2),de=le[0],he=le[1],pe=(0,o.useState)(),fe=i()(pe,2),xe=fe[0],ve=fe[1],ge=(0,o.useState)(),be=i()(ge,2),ye=be[0],me=be[1],ke=(0,o.useState)([]),je=i()(ke,2),Ze=je[0],we=je[1],Te=(0,o.useState)(0),Ce=i()(Te,2),Se=Ce[0],Me=Ce[1],qe=(0,o.useState)([]),De=i()(qe,2),Pe=De[0],Ie=De[1],Re=(0,o.useState)(0),Oe=i()(Re,2),Ae=Oe[0],Ee=Oe[1],Fe=(0,o.useState)([]),Je=i()(Fe,2),Xe=Je[0],Ne=Je[1],ze=(0,o.useState)(0),He=i()(ze,2),Le=He[0],Ye=He[1],Ge=(0,o.useState)([]),Ue=i()(Ge,2),We=Ue[0],Ke=Ue[1],Ve=(0,o.useMemo)((function(){return{kpis:!0,ticketStatusPie:!0,aiTokenLine:!0,serviceStatusPie:!0,serviceDurationLine:!0,serviceHourlyLine:!0,recentCalls:x,articles:!0,notices:!0,agentPerformance:!0}}),[x]),_e=(0,o.useState)(Ve),Be=i()(_e,2),Qe=Be[0],$e=Be[1],et=(0,o.useState)(!1),tt=i()(et,2),nt=tt[0],rt=tt[1],it=(0,o.useState)(!1),at=i()(it,2),st=at[0],ot=at[1],ct=(0,o.useMemo)((function(){var e;return null===(e=Z[0])||void 0===e?void 0:e.format("YYYY-MM-DD")}),[Z]),ut=(0,o.useMemo)((function(){var e;return null===(e=Z[1])||void 0===e?void 0:e.format("YYYY-MM-DD")}),[Z]),lt=(0,o.useCallback)(m()(b()().mark((function e(){var t,n,r,a,s,o,c,u,l,d,h,p,v,y,m,k,j,Z,w,T,C,S,M;return b()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=g&&g.uid){e.next=2;break}return e.abrupt("return");case 2:return ot(!0),e.prev=3,t=g.uid,n=x?(0,$.xs)({orgUid:t,pageNumber:0,pageSize:10,startStamp:"".concat(ct," 00:00:00"),endStamp:"".concat(ut," 23:59:59"),sortBy:"startStamp",sortDirection:"DESC"}):Promise.resolve(void 0),e.next=8,Promise.all([(0,_.RU)({orgUid:t,startDate:ct,endDate:ut,type:te.whQ}),(0,B.AD)({orgUid:t,startDate:ct,endDate:ut,type:te.whQ}),(0,Q.ry)(t,ut||K()().format("YYYY-MM-DD")),n,(0,ee.Az)({orgUid:t,pageNumber:0,pageSize:5,sortBy:"createdAt",sortDirection:"DESC"}),ne({orgUid:t,pageNumber:0,pageSize:5,sortBy:"createdAt",sortDirection:"DESC"}),(0,ie.Wq)({orgUid:t,pageNumber:0,pageSize:100,day:ut})]);case 8:if(r=e.sent,a=i()(r,7),s=a[0],o=a[1],c=a[2],u=a[3],l=a[4],d=a[5],h=a[6],200!==(null==s?void 0:s.code)||!s.data){e.next=21;break}he(s.data),e.next=25;break;case 21:return e.next=23,(0,_.Eb)();case 23:200===(null==(p=e.sent)?void 0:p.code)&&he(p.data);case 25:200===(null==o?void 0:o.code)&&ve(o.data),200===(null==c?void 0:c.code)&&me(c.data),x&&u&&"number"==typeof u.code&&200===u.code?(we((null===(v=(m=u).data)||void 0===v?void 0:v.content)||[]),Me((null===(y=m.data)||void 0===y?void 0:y.totalElements)||0)):x||(we([]),Me(0)),200===(null==l?void 0:l.code)&&(Ie((null===(k=l.data)||void 0===k?void 0:k.content)||[]),Ee((null===(j=l.data)||void 0===j?void 0:j.totalElements)||0)),200===(null==d?void 0:d.code)&&(Ne((null===(Z=d.data)||void 0===Z?void 0:Z.content)||[]),Ye((null===(w=d.data)||void 0===w?void 0:w.totalElements)||0)),200===(null==h?void 0:h.code)&&(C=(null===(T=h.data)||void 0===T?void 0:T.content)||[],S=Array.from({length:24},(function(){return 0})),C.forEach((function(e){(e.threadsCountByHour||[]).forEach((function(e,t){t>=0&&t<24&&(S[t]+=e||0)}))})),Ke(S.map((function(e,t){return{hour:"".concat(t,":00"),count:e}})))),e.next=37;break;case 33:e.prev=33,e.t0=e.catch(3),M=e.t0 instanceof Error?e.t0.message:f("dashboard.load.failed","加载仪表盘数据失败"),V.yw.error(M);case 37:return e.prev=37,ot(!1),e.finish(37);case 40:case"end":return e.stop()}}),e,null,[[3,33,37,40]])}))),[null==g?void 0:g.uid,ct,ut,f,x]);(0,o.useEffect)((function(){if(null!=g&&g.uid){var e="dashboard_visibility_".concat(g.uid);try{var t=localStorage.getItem(e);if(t){var n=JSON.parse(t);$e(v()(v()({},Ve),n))}else $e(Ve)}catch(e){$e(Ve)}}}),[null==g?void 0:g.uid]),(0,o.useEffect)((function(){if(null!=g&&g.uid){var e="dashboard_visibility_".concat(g.uid);try{localStorage.setItem(e,JSON.stringify(Qe))}catch(e){}}}),[Qe,null==g?void 0:g.uid]),(0,o.useEffect)((function(){lt()}),[lt]);var dt=(0,o.useMemo)((function(){var e=xe,t=(null==e?void 0:e.totalTickets)||0;return[{type:f("ticket.status.new","新建"),value:(null==e?void 0:e.newTickets)||0},{type:f("ticket.status.processing","处理中"),value:(null==e?void 0:e.processingTickets)||0},{type:f("ticket.status.resolved","已解决"),value:(null==e?void 0:e.resolvedTickets)||0},{type:f("ticket.status.closed","已结束"),value:(null==e?void 0:e.closedTickets)||0},{type:f("ticket.status.holding","挂起中"),value:(null==e?void 0:e.holdingTickets)||0},{type:f("ticket.status.pending","待处理"),value:(null==e?void 0:e.pendingTickets)||0}].filter((function(e){return e.value>0||0===t}))}),[xe,f]),ht=(0,o.useMemo)((function(){var e=(null==ye?void 0:ye.hourlyData)||[],t=new Map;return e.forEach((function(e){"number"==typeof e.hour&&t.set(e.hour,e)})),Array.from({length:24},(function(e,n){var r,i;return{hour:"".concat(n,":00"),tokens:(null===(r=t.get(n))||void 0===r?void 0:r.totalTokens)||0,requests:(null===(i=t.get(n))||void 0===i?void 0:i.totalRequests)||0}}))}),[ye]),pt=(0,o.useMemo)((function(){var e=de||{},t=[{type:f("thread.process.status.queuing","排队中"),value:e.queuingThreadCount||0},{type:f("queue.member.status.serving","正在服务"),value:e.currentThreadCount||0},{type:f("service.thread.status.accepted","已接入"),value:e.acceptedThreadCount||0},{type:f("queue.member.status.abandoned","已放弃"),value:e.abandonedThreadCount||0},{type:f("leave.msg.status.transferred","已转接"),value:e.transferredThreadCount||0},{type:f("service.thread.status.invited","邀请接入"),value:e.invitedThreadCount||0}],n=t.reduce((function(e,t){return e+(t.value||0)}),0);return t.filter((function(e){return e.value>0||0===n}))}),[de,f]),ft=(0,o.useMemo)((function(){var e=de||{};return[{bucket:f("service.statistic.duration.within5min","5分钟内结束"),value:e.durationWithin5Min||0},{bucket:f("service.statistic.duration.within15min","5-15分钟结束"),value:e.durationWithin15Min||0},{bucket:f("service.statistic.duration.over15min","超过15分钟"),value:e.durationOver15Min||0}]}),[de,f]),xt=[{title:f("dashboard.calls.table.caller","主叫"),dataIndex:"callerIdNumber",key:"callerIdNumber",width:140},{title:f("dashboard.calls.table.callee","被叫"),dataIndex:"destinationNumber",key:"destinationNumber",width:140},{title:f("dashboard.calls.table.startedAt","开始时间"),dataIndex:"startStamp",key:"startStamp",render:function(e){return K()(e).format("MM-DD HH:mm")}},{title:f("dashboard.calls.table.duration","时长"),dataIndex:"billsec",key:"billsec",render:function(e){return ce(e)}},{title:f("dashboard.calls.table.hangupCause","挂断原因"),dataIndex:"hangupCause",key:"hangupCause",ellipsis:!0}],vt=[{title:f("dashboard.kbase.table.title","标题"),dataIndex:"title",key:"title",render:function(e){return(0,d.jsx)(w.Z,{title:e,children:(0,d.jsx)(oe,{ellipsis:!0,style:{maxWidth:220,display:"inline-block"},children:e})})}},{title:f("dashboard.kbase.table.readCount","阅读"),dataIndex:"readCount",key:"readCount",width:100},{title:f("dashboard.kbase.table.createdAt","发布时间"),dataIndex:"createdAt",key:"createdAt",width:160,render:function(e){return K()(e).format("MM-DD HH:mm")}},{title:f("dashboard.kbase.table.status","状态"),key:"published",width:100,render:function(e,t){return t.published?(0,d.jsx)(T.Z,{color:"green",children:f("dashboard.kbase.status.published","已发布")}):(0,d.jsx)(T.Z,{children:f("dashboard.kbase.status.draft","草稿")})}}],gt=[{title:f("dashboard.notice.table.title","标题"),dataIndex:"title",key:"title",render:function(e){return(0,d.jsx)(w.Z,{title:e,children:(0,d.jsx)(oe,{ellipsis:!0,style:{maxWidth:320,display:"inline-block"},children:e||"-"})})}},{title:f("dashboard.notice.table.type","类型"),dataIndex:"type",key:"type",width:120,render:function(e){return e?(0,d.jsx)(T.Z,{color:"blue",children:e}):"-"}},{title:f("dashboard.notice.table.status","状态"),dataIndex:"status",key:"status",width:120,render:function(e){var t="published"===e?f("dashboard.notice.status.published","Published"):"draft"===e?f("dashboard.notice.status.draft","Draft"):e||"-";return e?(0,d.jsx)(T.Z,{color:"published"===e?"green":"draft"===e?"default":"gold",children:t}):"-"}},{title:f("dashboard.notice.table.createdAt","发布时间"),dataIndex:"createdAt",key:"createdAt",width:160,render:function(e){return e?K()(e).format("MM-DD HH:mm"):"-"}}],bt=[{title:f("service.statistic.table.agent","客服名称"),dataIndex:"name",key:"name"},{title:f("service.statistic.table.onlineTime","在线时长"),dataIndex:"onlineTime",key:"onlineTime",render:function(e){return void 0!==e?"".concat(e,"h"):"-"}},{title:f("service.statistic.table.sessionCount","接待会话数"),dataIndex:"sessionCount",key:"sessionCount"},{title:f("service.statistic.table.avgResponseTime","平均响应时间"),dataIndex:"avgResponseTime",key:"avgResponseTime",render:function(e){return void 0!==e?"".concat(e).concat(f("service.statistic.unit.minute","分钟")):"-"}},{title:f("service.statistic.table.avgSessionTime","平均会话时长"),dataIndex:"avgSessionTime",key:"avgSessionTime",render:function(e){return void 0!==e?"".concat(e).concat(f("service.statistic.unit.minute","分钟")):"-"}},{title:f("service.statistic.table.satisfaction","满意度评分"),dataIndex:"satisfaction",key:"satisfaction",render:function(e){return void 0!==e?"".concat(e,"%"):"-"}},{title:f("service.statistic.table.workingHours","工作时长"),dataIndex:"workingHours",key:"workingHours",render:function(e){return void 0!==e?"".concat(e,"h"):"-"}},{title:f("service.statistic.table.transferRate","转接率"),dataIndex:"transferRate",key:"transferRate",render:function(e){return void 0!==e?"".concat(e,"%"):"-"}},{title:f("service.statistic.table.firstResolutionRate","首次解决率"),dataIndex:"firstResolutionRate",key:"firstResolutionRate",render:function(e){return void 0!==e?"".concat(e,"%"):"-"}},{title:f("service.statistic.table.overdueCount","超时会话数"),dataIndex:"overdueCount",key:"overdueCount"}],yt=(0,o.useMemo)((function(){if(!de)return[];var e=de,t=Number(e.acceptedThreadCount||0),n=Number(e.transferredThreadCount||0),r=Number(e.onlineTime||0),i=Number(e.avgFirstResponseTime||0),a=Number(e.avgConversationTime||0),s=r>0?Math.round(r/3600*10)/10:0,o=i>0?Math.round(i/60):0,c=a>0?Math.round(a/60):0,u=ue(e.satisfactionRate),l=t>0?ue(n/t*100):0,d=void 0!==e.firstResolutionRate?ue(e.firstResolutionRate):void 0,h=void 0!==e.overdueThreadCount?Number(e.overdueThreadCount):void 0;return[{key:"org-summary",name:(null==g?void 0:g.name)||"组织汇总",onlineTime:s,sessionCount:t,avgResponseTime:o,avgSessionTime:c,satisfaction:u,workingHours:s,transferRate:l,firstResolutionRate:d,overdueCount:h}]}),[de,null==g?void 0:g.name]);return(0,d.jsxs)(C.Z,{direction:"vertical",size:16,style:{width:"100%"},children:[(0,d.jsx)(S.Z,{variant:"borderless",styles:{body:{padding:16}},children:(0,d.jsxs)(M.Z,{justify:"space-between",align:"middle",gutter:[16,16],children:[(0,d.jsxs)(q.Z,{flex:"auto",children:[(0,d.jsx)(se,{level:4,style:{margin:0},children:f("dashboard.title","运营概览")}),(0,d.jsx)(oe,{type:"secondary",children:f("dashboard.subtitle","在线客服、工单、呼叫中心、知识库、AI助手 一体化总览")})]}),(0,d.jsx)(q.Z,{children:(0,d.jsxs)(C.Z,{children:[(0,d.jsx)(ae,{allowClear:!1,value:Z,onChange:function(e){return e&&W([e[0].startOf("day"),e[1].endOf("day")])},presets:[{label:f("queue.statistic.today","今日"),value:[K()().startOf("day"),K()().endOf("day")]},{label:f("queue.statistic.yesterday","昨日"),value:[K()().subtract(1,"day").startOf("day"),K()().subtract(1,"day").endOf("day")]},{label:f("queue.statistic.week","近7天"),value:[K()().startOf("day").subtract(6,"day"),K()().endOf("day")]},{label:f("queue.statistic.month","近30天"),value:[K()().startOf("day").subtract(29,"day"),K()().endOf("day")]}]}),(0,d.jsx)(l.ZP,{icon:(0,d.jsx)(E.Z,{}),onClick:lt,children:f("pages.refresh","刷新")}),(0,d.jsx)(D.Z,{trigger:["click"],open:nt,onOpenChange:rt,title:(0,d.jsx)("b",{children:f("dashboard.settings.title","显示设置")}),content:(0,d.jsxs)(C.Z,{direction:"vertical",size:8,children:[(0,d.jsx)(P.Z,{checked:Qe.kpis,onChange:function(e){return $e((function(t){return v()(v()({},t),{},{kpis:e.target.checked})}))},children:f("dashboard.settings.kpis","KPI 指标")}),(0,d.jsx)(I.Z,{style:{margin:"4px 0"}}),(0,d.jsx)(P.Z,{checked:Qe.ticketStatusPie,onChange:function(e){return $e((function(t){return v()(v()({},t),{},{ticketStatusPie:e.target.checked})}))},children:f("dashboard.settings.ticketStatusPie","工单状态分布")}),(0,d.jsx)(P.Z,{checked:Qe.aiTokenLine,onChange:function(e){return $e((function(t){return v()(v()({},t),{},{aiTokenLine:e.target.checked})}))},children:f("dashboard.settings.aiTokenLine","AI Token 今日使用趋势")}),(0,d.jsx)(I.Z,{style:{margin:"4px 0"}}),(0,d.jsx)(P.Z,{checked:Qe.serviceStatusPie,onChange:function(e){return $e((function(t){return v()(v()({},t),{},{serviceStatusPie:e.target.checked})}))},children:f("dashboard.settings.serviceStatusPie","会话状态分布")}),(0,d.jsx)(P.Z,{checked:Qe.serviceDurationLine,onChange:function(e){return $e((function(t){return v()(v()({},t),{},{serviceDurationLine:e.target.checked})}))},children:f("dashboard.settings.serviceDurationLine","会话时长分布")}),(0,d.jsx)(P.Z,{checked:Qe.serviceHourlyLine,onChange:function(e){return $e((function(t){return v()(v()({},t),{},{serviceHourlyLine:e.target.checked})}))},children:f("dashboard.settings.serviceHourlyLine","会话请求时间点")}),(0,d.jsx)(I.Z,{style:{margin:"4px 0"}}),x&&(0,d.jsx)(P.Z,{checked:Qe.recentCalls,onChange:function(e){return $e((function(t){return v()(v()({},t),{},{recentCalls:e.target.checked})}))},children:f("dashboard.settings.recentCalls","最近呼叫")}),(0,d.jsx)(P.Z,{checked:Qe.articles,onChange:function(e){return $e((function(t){return v()(v()({},t),{},{articles:e.target.checked})}))},children:f("dashboard.settings.articles","最近知识库文章")}),(0,d.jsx)(P.Z,{checked:Qe.notices,onChange:function(e){return $e((function(t){return v()(v()({},t),{},{notices:e.target.checked})}))},children:f("dashboard.settings.notices","平台动态")}),(0,d.jsx)(I.Z,{style:{margin:"4px 0"}}),(0,d.jsx)(P.Z,{checked:Qe.agentPerformance,onChange:function(e){return $e((function(t){return v()(v()({},t),{},{agentPerformance:e.target.checked})}))},children:f("dashboard.settings.agentPerformance","客服绩效统计")}),(0,d.jsxs)(C.Z,{size:8,children:[(0,d.jsx)(l.ZP,{size:"small",onClick:function(){return $e(Ve)},children:f("dashboard.settings.reset","恢复默认")}),(0,d.jsx)(l.ZP,{size:"small",type:"primary",onClick:function(){return rt(!1)},children:f("dashboard.settings.done","完成")})]})]}),children:(0,d.jsx)(l.ZP,{children:f("dashboard.settings.title","显示设置")})})]})})]})}),Qe.kpis&&(0,d.jsxs)(M.Z,{gutter:[16,16],children:[(0,d.jsx)(q.Z,{xs:24,sm:12,md:8,lg:6,xl:4,children:(0,d.jsx)(S.Z,{loading:st,children:(0,d.jsx)(R.Z,{title:(0,d.jsx)(w.Z,{title:f("dashboard.kpi.onlineAgents.tooltip","当前在线客服数量 / 总客服数"),children:(0,d.jsxs)("span",{style:{cursor:"pointer"},onClick:function(){return h("/bi/online-service/agent")},children:[(0,d.jsx)(F.Z,{})," ",f("dashboard.kpi.onlineAgents","在线客服")]})}),value:null!==(e=null==de?void 0:de.onlineAgentCount)&&void 0!==e?e:0,suffix:"/ ".concat(Math.max(0,(null!==(t=null==de?void 0:de.onlineAgentCount)&&void 0!==t?t:0)+(null!==(n=null==de?void 0:de.offlineAgentCount)&&void 0!==n?n:0)))})})}),(0,d.jsx)(q.Z,{xs:24,sm:12,md:8,lg:6,xl:4,children:(0,d.jsx)(S.Z,{loading:st,children:(0,d.jsx)(R.Z,{title:(0,d.jsx)(w.Z,{title:f("dashboard.kpi.queuingThreads.tooltip","当前排队中的会话数量"),children:(0,d.jsxs)("span",{style:{cursor:"pointer"},onClick:function(){return h("/bi/online-service/thread")},children:[(0,d.jsx)(J.Z,{})," ",f("dashboard.kpi.queuingThreads","排队会话")]})}),value:null!==(r=null==de?void 0:de.queuingThreadCount)&&void 0!==r?r:0})})}),(0,d.jsx)(q.Z,{xs:24,sm:12,md:8,lg:6,xl:4,children:(0,d.jsx)(S.Z,{loading:st,children:(0,d.jsx)(R.Z,{title:(0,d.jsx)(w.Z,{title:f("dashboard.kpi.acceptRate.tooltip","选定时间内已接入会话占比"),children:(0,d.jsxs)("span",{style:{cursor:"pointer"},onClick:function(){return h("/bi/online-service/thread")},children:[(0,d.jsx)(X.Z,{})," ",f("service.statistic.acceptRate","接通率")]})}),value:ue(null==de?void 0:de.acceptRate),suffix:"%"})})}),(0,d.jsx)(q.Z,{xs:24,sm:12,md:8,lg:6,xl:4,children:(0,d.jsx)(S.Z,{loading:st,children:(0,d.jsx)(R.Z,{title:(0,d.jsx)(w.Z,{title:f("dashboard.kpi.avgFirstResponse.tooltip","从用户发起到客服首次回复的平均时长"),children:(0,d.jsxs)("span",{style:{cursor:"pointer"},onClick:function(){return h("/bi/online-service/thread")},children:[(0,d.jsx)(X.Z,{})," ",f("dashboard.kpi.avgFirstResponse","平均首响")]})}),value:ce(null==de?void 0:de.avgFirstResponseTime)})})}),(0,d.jsx)(q.Z,{xs:24,sm:12,md:8,lg:6,xl:4,children:(0,d.jsx)(S.Z,{loading:st,children:(0,d.jsx)(R.Z,{title:(0,d.jsx)(w.Z,{title:f("dashboard.kpi.ticketTotal.tooltip","选定时间内创建的工单总量"),children:(0,d.jsxs)("span",{style:{cursor:"pointer"},onClick:function(){return h("/bi/ticket-service/overview")},children:[(0,d.jsx)(N.Z,{})," ",f("dashboard.kpi.ticketTotal","工单总数")]})}),value:null!==(c=null==xe?void 0:xe.totalTickets)&&void 0!==c?c:0})})}),(0,d.jsx)(q.Z,{xs:24,sm:12,md:8,lg:6,xl:4,children:(0,d.jsx)(S.Z,{loading:st,children:(0,d.jsx)(R.Z,{title:(0,d.jsx)(w.Z,{title:f("dashboard.kpi.satisfaction.tooltip","客户评价的满意度比例"),children:(0,d.jsxs)("span",{style:{cursor:"pointer"},onClick:function(){return h("/bi/ticket-service/rating")},children:[(0,d.jsx)(z.Z,{})," ",f("dashboard.kpi.satisfaction","满意度")]})}),value:ue(null!==(u=null==xe?void 0:xe.customerSatisfactionRate)&&void 0!==u?u:null==de?void 0:de.satisfactionRate),suffix:"%"})})})]}),(Qe.serviceStatusPie||Qe.serviceDurationLine)&&(0,d.jsx)(M.Z,{gutter:[16,16],children:Qe.serviceStatusPie&&Qe.serviceDurationLine?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(q.Z,{xs:24,lg:10,children:(0,d.jsx)(S.Z,{title:(0,d.jsx)(w.Z,{title:f("dashboard.service.statusDistribution.tooltip","在线客服会话的状态分布"),children:(0,d.jsxs)("span",{style:{cursor:"pointer"},onClick:function(){return h("/bi/online-service/thread")},children:[(0,d.jsx)(F.Z,{})," ",f("dashboard.service.statusDistribution","会话状态分布")]})}),loading:st,children:st?(0,d.jsx)(O.Z,{active:!0,paragraph:{rows:6}}):(0,d.jsx)(G.Z,{data:pt,angleField:"value",colorField:"type",radius:.9,legend:{position:"bottom"},height:300})})}),(0,d.jsx)(q.Z,{xs:24,lg:14,children:(0,d.jsx)(S.Z,{title:(0,d.jsx)(w.Z,{title:f("dashboard.service.sessionDuration.tooltip","会话时长区间内的会话数量"),children:(0,d.jsxs)("span",{style:{cursor:"pointer"},onClick:function(){return h("/bi/online-service/thread")},children:[(0,d.jsx)(X.Z,{})," ",f("service.statistic.sessionDuration","会话时长分布")]})}),extra:(0,d.jsx)(oe,{type:"secondary",children:f("dashboard.unit.sessionCount","单位:会话数")}),loading:st,children:st?(0,d.jsx)(O.Z,{active:!0,paragraph:{rows:6}}):(0,d.jsx)(U.Z,{data:ft,xField:"bucket",yField:"value",smooth:!0,height:300,tooltip:{showMarkers:!1},xAxis:{label:{autoRotate:!1}}})})})]}):Qe.serviceStatusPie?(0,d.jsx)(q.Z,{xs:24,children:(0,d.jsx)(S.Z,{title:(0,d.jsx)(w.Z,{title:f("dashboard.service.statusDistribution.tooltip","在线客服会话的状态分布"),children:(0,d.jsxs)("span",{style:{cursor:"pointer"},onClick:function(){return h("/bi/online-service/thread")},children:[(0,d.jsx)(F.Z,{})," ",f("dashboard.service.statusDistribution","会话状态分布")]})}),loading:st,children:st?(0,d.jsx)(O.Z,{active:!0,paragraph:{rows:6}}):(0,d.jsx)(G.Z,{data:pt,angleField:"value",colorField:"type",radius:.9,legend:{position:"bottom"},height:300})})}):(0,d.jsx)(q.Z,{xs:24,children:(0,d.jsx)(S.Z,{title:(0,d.jsx)(w.Z,{title:f("dashboard.service.sessionDuration.tooltip","会话时长区间内的会话数量"),children:(0,d.jsxs)("span",{style:{cursor:"pointer"},onClick:function(){return h("/bi/online-service/thread")},children:[(0,d.jsx)(X.Z,{})," ",f("service.statistic.sessionDuration","会话时长分布")]})}),extra:(0,d.jsx)(oe,{type:"secondary",children:f("dashboard.unit.sessionCount","单位:会话数")}),loading:st,children:st?(0,d.jsx)(O.Z,{active:!0,paragraph:{rows:6}}):(0,d.jsx)(U.Z,{data:ft,xField:"bucket",yField:"value",smooth:!0,height:300,tooltip:{showMarkers:!1},xAxis:{label:{autoRotate:!1}}})})})}),Qe.serviceHourlyLine&&(0,d.jsx)(M.Z,{gutter:[16,16],children:(0,d.jsx)(q.Z,{xs:24,children:(0,d.jsx)(S.Z,{title:(0,d.jsx)(w.Z,{title:f("dashboard.service.hourlyRequests.tooltip","每小时发起会话请求的人次"),children:(0,d.jsxs)("span",{style:{cursor:"pointer"},onClick:function(){return h("/bi/online-service/thread")},children:[(0,d.jsx)(J.Z,{})," ",f("dashboard.service.hourlyRequests","在线客服会话请求时间点")]})}),extra:(0,d.jsx)(oe,{type:"secondary",children:f("dashboard.unit.peoplePerHour","单位:人次/小时")}),loading:st,children:st?(0,d.jsx)(O.Z,{active:!0,paragraph:{rows:6}}):(0,d.jsx)(U.Z,{data:We,xField:"hour",yField:"count",smooth:!0,height:300,tooltip:{showMarkers:!1},xAxis:{tickCount:12}})})})}),Qe.agentPerformance&&(0,d.jsx)(M.Z,{gutter:[16,16],children:(0,d.jsx)(q.Z,{xs:24,children:(0,d.jsx)(S.Z,{title:(0,d.jsx)(w.Z,{title:f("dashboard.agentPerformance.tooltip","客服维度关键绩效指标汇总"),children:(0,d.jsxs)("span",{style:{cursor:"pointer"},onClick:function(){return h("/bi/online-service/agent")},children:[(0,d.jsx)(F.Z,{})," ",f("dashboard.agentPerformance.title","客服绩效统计")]})}),extra:(0,d.jsx)(oe,{type:"secondary",children:f("dashboard.agentPerformance.extra","按客服汇总")}),loading:st,children:(0,d.jsx)(A.Z,{rowKey:function(e){return e.key||"".concat(e.name)},size:"small",columns:bt,dataSource:yt,scroll:{x:!0},pagination:{pageSize:10},locale:{emptyText:f("noData","暂无数据")}})})})}),(Qe.ticketStatusPie||Qe.aiTokenLine)&&(0,d.jsx)(M.Z,{gutter:[16,16],children:Qe.ticketStatusPie&&Qe.aiTokenLine?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(q.Z,{xs:24,lg:10,children:(0,d.jsx)(S.Z,{title:(0,d.jsx)(w.Z,{title:f("dashboard.ticket.statusDistribution.tooltip","选定时间内各状态工单数量占比"),children:(0,d.jsxs)("span",{style:{cursor:"pointer"},onClick:function(){return h("/bi/ticket-service/overview")},children:[(0,d.jsx)(N.Z,{})," ",f("dashboard.ticket.statusDistribution","工单状态分布")]})}),loading:st,children:st?(0,d.jsx)(O.Z,{active:!0,paragraph:{rows:6}}):(0,d.jsx)(G.Z,{data:dt,angleField:"value",colorField:"type",radius:.9,legend:{position:"bottom"},height:300})})}),(0,d.jsx)(q.Z,{xs:24,lg:14,children:(0,d.jsx)(S.Z,{title:(0,d.jsx)(w.Z,{title:f("dashboard.ai.tokenTodayTrend.tooltip","今日各小时 Token 消耗趋势"),children:(0,d.jsxs)("span",{style:{cursor:"pointer"},onClick:function(){return h("/bi/robot-service/token")},children:[(0,d.jsx)(H.Z,{})," ",f("dashboard.ai.tokenTodayTrend","AI Token 今日使用趋势")]})}),extra:(0,d.jsx)(oe,{type:"secondary",children:f("dashboard.unit.token","单位:Token")}),loading:st,children:st?(0,d.jsx)(O.Z,{active:!0,paragraph:{rows:6}}):(0,d.jsx)(U.Z,{data:ht,xField:"hour",yField:"tokens",smooth:!0,height:300,tooltip:{showMarkers:!1},xAxis:{tickCount:12}})})})]}):Qe.ticketStatusPie?(0,d.jsx)(q.Z,{xs:24,children:(0,d.jsx)(S.Z,{title:(0,d.jsx)(w.Z,{title:f("dashboard.ticket.statusDistribution.tooltip","选定时间内各状态工单数量占比"),children:(0,d.jsxs)("span",{style:{cursor:"pointer"},onClick:function(){return h("/bi/ticket-service/overview")},children:[(0,d.jsx)(N.Z,{})," ",f("dashboard.ticket.statusDistribution","工单状态分布")]})}),loading:st,children:st?(0,d.jsx)(O.Z,{active:!0,paragraph:{rows:6}}):(0,d.jsx)(G.Z,{data:dt,angleField:"value",colorField:"type",radius:.9,legend:{position:"bottom"},height:300})})}):(0,d.jsx)(q.Z,{xs:24,children:(0,d.jsx)(S.Z,{title:(0,d.jsx)(w.Z,{title:f("dashboard.ai.tokenTodayTrend.tooltip","今日各小时 Token 消耗趋势"),children:(0,d.jsxs)("span",{style:{cursor:"pointer"},onClick:function(){return h("/bi/robot-service/token")},children:[(0,d.jsx)(H.Z,{})," ",f("dashboard.ai.tokenTodayTrend","AI Token 今日使用趋势")]})}),extra:(0,d.jsx)(oe,{type:"secondary",children:f("dashboard.unit.token","单位:Token")}),loading:st,children:st?(0,d.jsx)(O.Z,{active:!0,paragraph:{rows:6}}):(0,d.jsx)(U.Z,{data:ht,xField:"hour",yField:"tokens",smooth:!0,height:300,tooltip:{showMarkers:!1},xAxis:{tickCount:12}})})})}),x&&Qe.recentCalls&&(0,d.jsx)(M.Z,{gutter:[16,16],children:(0,d.jsx)(q.Z,{xs:24,children:(0,d.jsx)(S.Z,{title:(0,d.jsx)(w.Z,{title:f("dashboard.calls.tooltip","FreeSWITCH 最近呼入/呼出记录(仅调试)"),children:(0,d.jsxs)("span",{style:{cursor:"pointer"},onClick:function(){return h("/bi/callcenter-service/summary")},children:[(0,d.jsx)(L.Z,{})," ",f("dashboard.calls.title","最近呼叫")]})}),extra:(0,d.jsx)(oe,{type:"secondary",children:f("dashboard.calls.total","共 {total} 通",{total:Se})}),children:(0,d.jsx)(A.Z,{rowKey:function(e){return e.uid},size:"small",loading:st,columns:xt,dataSource:Ze,pagination:!1})})})}),(Qe.articles||Qe.notices)&&(0,d.jsx)(M.Z,{gutter:[16,16],children:Qe.articles&&Qe.notices?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(q.Z,{xs:24,lg:12,children:(0,d.jsx)(S.Z,{title:(0,d.jsxs)("span",{children:[(0,d.jsx)(Y.Z,{})," ",f("dashboard.kbase.title","最近知识库文章")]}),extra:(0,d.jsx)(oe,{type:"secondary",children:f("dashboard.kbase.total","共 {total} 篇",{total:Ae})}),children:(0,d.jsx)(A.Z,{rowKey:function(e){return e.uid},size:"small",loading:st,columns:vt,dataSource:Pe,pagination:!1})})}),(0,d.jsx)(q.Z,{xs:24,lg:12,children:(0,d.jsx)(S.Z,{title:(0,d.jsx)("span",{children:f("dashboard.notice.title","平台动态")}),extra:(0,d.jsx)(oe,{type:"secondary",children:f("dashboard.notice.total","共 {total} 条",{total:Le})}),children:(0,d.jsx)(A.Z,{rowKey:function(e){return e.uid},size:"small",loading:st,columns:gt,dataSource:Xe,pagination:!1})})})]}):Qe.articles?(0,d.jsx)(q.Z,{xs:24,children:(0,d.jsx)(S.Z,{title:(0,d.jsxs)("span",{children:[(0,d.jsx)(Y.Z,{})," ",f("dashboard.kbase.title","最近知识库文章")]}),extra:(0,d.jsx)(oe,{type:"secondary",children:f("dashboard.kbase.total","共 {total} 篇",{total:Ae})}),children:(0,d.jsx)(A.Z,{rowKey:function(e){return e.uid},size:"small",loading:st,columns:vt,dataSource:Pe,pagination:!1})})}):(0,d.jsx)(q.Z,{xs:24,children:(0,d.jsx)(S.Z,{title:(0,d.jsx)("span",{children:f("dashboard.notice.title","平台动态")}),extra:(0,d.jsx)(oe,{type:"secondary",children:f("dashboard.notice.total","共 {total} 条",{total:Le})}),children:(0,d.jsx)(A.Z,{rowKey:function(e){return e.uid},size:"small",loading:st,columns:gt,dataSource:Xe,pagination:!1})})})})]})},de=n(76071),he=function(){var e=(0,de.Z)().contentStyle,t=((0,s.useModel)("@@initialState").initialState||{}).userInfo,n=(0,a.u)((function(e){return e.setCurrentOrg})),r=(0,s.useIntl)(),u=(0,s.useAccess)();u.canDebug&&f.Z.log("Developing canDebug");var l=(0,o.useState)(!1),x=i()(l,2),v=x[0],g=x[1],b=(0,o.useState)(!1),y=i()(b,2),m=y[0],k=y[1];return(0,o.useEffect)((function(){!function(){if(t){if(!t.currentOrganization)return f.Z.log("before initOrganization",t),void g(!0);f.Z.log("after initOrganization"),n(t.currentOrganization)}}(),"true"!==localStorage.getItem("skipVerification")&&(!t||t.emailVerified||t.mobileVerified||k(!0))}),[t]),(0,d.jsxs)("div",{style:e,children:[(0,d.jsx)(s.Access,{accessible:u.canAdmin()&&!u.isCommunityEdition(),fallback:(0,d.jsx)("div",{style:{marginTop:100,textAlign:"center"},children:(0,d.jsx)(p.Z,{description:r.formatMessage({id:"welcome.empty.enterprisePlatformOnly",defaultMessage:"企业版&&平台版在此显示统计数据等"})})}),children:(0,d.jsx)(le,{})}),(0,d.jsx)(c.Z,{open:v,onClose:function(){return g(!1)},onSuccess:function(e){n(e),window.location.reload()}}),(0,d.jsx)(h,{open:m,onClose:function(){return k(!1)}})]})}}}]); |