mirror of
https://gitee.com/270580156/weiyu.git
synced 2026-05-10 01:12:30 +00:00
1 line
22 KiB
JavaScript
1 line
22 KiB
JavaScript
"use strict";(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[8544],{61107:function(t,e,a){a.d(e,{Z:function(){return u}});var n=a(77260),r=a(44194),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},s=a(54183),o=function(t,e){return r.createElement(s.Z,(0,n.Z)({},t,{ref:e,icon:i}))};var u=r.forwardRef(o)},80556:function(t,e,a){a.d(e,{Z:function(){return u}});var n=a(77260),r=a(44194),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"},s=a(54183),o=function(t,e){return r.createElement(s.Z,(0,n.Z)({},t,{ref:e,icon:i}))};var u=r.forwardRef(o)},74840:function(t,e,a){a.d(e,{Z:function(){return u}});var n=a(77260),r=a(44194),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 533h-48.1c-4.2 0-7.8 3.2-8.1 7.4C604 589.9 562.5 629 512 629s-92.1-39.1-95.8-88.6c-.3-4.2-3.9-7.4-8.1-7.4H360a8 8 0 00-8 8.4c4.4 84.3 74.5 151.6 160 151.6s155.6-67.3 160-151.6a8 8 0 00-8-8.4z"}}]},name:"smile",theme:"outlined"},s=a(54183),o=function(t,e){return r.createElement(s.Z,(0,n.Z)({},t,{ref:e,icon:i}))};var u=r.forwardRef(o)},12322:function(t,e,a){a.d(e,{Z:function(){return u}});var n=a(77260),r=a(44194),i={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M908.1 353.1l-253.9-36.9L540.7 86.1c-3.1-6.3-8.2-11.4-14.5-14.5-15.8-7.8-35-1.3-42.9 14.5L369.8 316.2l-253.9 36.9c-7 1-13.4 4.3-18.3 9.3a32.05 32.05 0 00.6 45.3l183.7 179.1-43.4 252.9a31.95 31.95 0 0046.4 33.7L512 754l227.1 119.4c6.2 3.3 13.4 4.4 20.3 3.2 17.4-3 29.1-19.5 26.1-36.9l-43.4-252.9 183.7-179.1c5-4.9 8.3-11.3 9.3-18.3 2.7-17.5-9.5-33.7-27-36.3zM664.8 561.6l36.1 210.3L512 672.7 323.1 772l36.1-210.3-152.8-149L417.6 382 512 190.7 606.4 382l211.2 30.7-152.8 148.9z"}}]},name:"star",theme:"outlined"},s=a(54183),o=function(t,e){return r.createElement(s.Z,(0,n.Z)({},t,{ref:e,icon:i}))};var u=r.forwardRef(o)},94956:function(t,e,a){a.d(e,{AT:function(){return p},Lr:function(){return k},_t:function(){return d},i8:function(){return b},n1:function(){return y},sE:function(){return m},x_:function(){return g}});var n=a(90819),r=a.n(n),i=a(73193),s=a.n(i),o=a(89933),u=a.n(o),c=a(5488),l=a(14870);function d(t){return f.apply(this,arguments)}function f(){return(f=u()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,l.request)("/api/v1/agent/query/org",{method:"GET",params:s()(s()({},e),{},{channel:c.XtJ})}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function p(t){return h.apply(this,arguments)}function h(){return(h=u()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,l.request)("/api/v1/agent/query/uid",{method:"GET",params:s()(s()({},e),{},{channel:c.XtJ})}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function g(t){return v.apply(this,arguments)}function v(){return(v=u()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,l.request)("/api/v1/agent/create",{method:"POST",data:s()(s()({},e),{},{channel:c.XtJ})}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function m(t){return x.apply(this,arguments)}function x(){return(x=u()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,l.request)("/api/v1/agent/update",{method:"POST",data:s()(s()({},e),{},{channel:c.XtJ})}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function y(t){return w.apply(this,arguments)}function w(){return(w=u()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,l.request)("/api/v1/agent/update/avatar",{method:"POST",data:s()(s()({},e),{},{channel:c.XtJ})}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function b(t){return j.apply(this,arguments)}function j(){return(j=u()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,l.request)("/api/v1/agent/update/autoreply",{method:"POST",data:s()(s()({},e),{},{channel:c.XtJ})}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function k(t){return M.apply(this,arguments)}function M(){return(M=u()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,l.request)("/api/v1/agent/delete",{method:"POST",data:s()(s()({},e),{},{channel:c.XtJ})}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}},72657:function(t,e,a){a.d(e,{Eb:function(){return d},RU:function(){return p},xL:function(){return g}});var n=a(90819),r=a.n(n),i=a(73193),s=a.n(i),o=a(89933),u=a.n(o),c=a(5488),l=a(14870);function d(){return f.apply(this,arguments)}function f(){return(f=u()(r()().mark((function t(){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,l.request)("/api/v1/service/statistic/query",{method:"GET",params:{channel:c.XtJ}}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function p(t){return h.apply(this,arguments)}function h(){return(h=u()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,l.request)("/api/v1/service/statistic/query/date",{method:"GET",params:s()(s()({},e),{},{channel:c.XtJ})}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function g(t){return v.apply(this,arguments)}function v(){return(v=u()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,l.request)("/api/v1/service/statistic/calculate",{method:"POST",data:s()(s()({},e),{},{channel:c.XtJ})}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}},40629:function(t,e,a){a.d(e,{LE:function(){return l},W5:function(){return v},c$:function(){return f},n1:function(){return x},p0:function(){return h},zl:function(){return w}});var n=a(90819),r=a.n(n),i=a(73193),s=a.n(i),o=a(89933),u=a.n(o),c=a(14870);function l(t){return d.apply(this,arguments)}function d(){return(d=u()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,c.request)("/api/v1/workgroup/query/org",{method:"GET",params:s()({},e)}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function f(t){return p.apply(this,arguments)}function p(){return(p=u()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,c.request)("/api/v1/workgroup/query/uid",{method:"GET",params:s()({},e)}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function h(t){return g.apply(this,arguments)}function g(){return(g=u()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,c.request)("/api/v1/workgroup/create",{method:"POST",data:s()({},e)}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function v(t){return m.apply(this,arguments)}function m(){return(m=u()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,c.request)("/api/v1/workgroup/update",{method:"POST",data:s()({},e)}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function x(t){return y.apply(this,arguments)}function y(){return(y=u()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,c.request)("/api/v1/workgroup/update/avatar",{method:"POST",data:s()({},e)}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function w(t){return b.apply(this,arguments)}function b(){return(b=u()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,c.request)("/api/v1/workgroup/delete",{method:"POST",data:s()({},e)}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}},79161:function(t,e,a){a.r(e),a.d(e,{default:function(){return G}});var n=a(90819),r=a.n(n),i=a(89933),s=a.n(i),o=a(45332),u=a.n(o),c=a(44194),l=a(72207),d=a(27904),f=a(49260),p=a(63628),h=a(79401),g=a(49616),v=a(32973),m=a(5780),x=a(27473),y=a(53504),w=a(78875),b=a(20228),j=a(65532),k=a(61155),M=a(12322),R=a(80556),Z=a(61107),C=a(74840),S=a(77260),Y={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M288 421a48 48 0 1096 0 48 48 0 10-96 0zm352 0a48 48 0 1096 0 48 48 0 10-96 0zM512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm263 711c-34.2 34.2-74 61-118.3 79.8C611 874.2 562.3 884 512 884c-50.3 0-99-9.8-144.8-29.2A370.4 370.4 0 01248.9 775c-34.2-34.2-61-74-79.8-118.3C149.8 611 140 562.3 140 512s9.8-99 29.2-144.8A370.4 370.4 0 01249 248.9c34.2-34.2 74-61 118.3-79.8C413 149.8 461.7 140 512 140c50.3 0 99 9.8 144.8 29.2A370.4 370.4 0 01775.1 249c34.2 34.2 61 74 79.8 118.3C874.2 413 884 461.7 884 512s-9.8 99-29.2 144.8A368.89 368.89 0 01775 775zM664 565H360c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h304c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}}]},name:"meh",theme:"outlined"},D=a(54183),z=function(t,e){return c.createElement(D.Z,(0,S.Z)({},t,{ref:e,icon:Y}))};var O=c.forwardRef(z),q=a(72657),T=a(40629),E=a(94956),P=a(28977),U=a.n(P),L=a(34599),A=a(14870),B=a(5488),I=a(18580),J=a(31549),X=l.default.RangePicker,H=d.Z.Option,G=function(){var t=(0,A.useIntl)(),e=(0,c.useState)(!1),a=u()(e,2),n=a[0],i=a[1],o=(0,L.u)((function(t){return t.currentOrg})),l=(0,c.useState)([]),S=u()(l,2),Y=S[0],D=S[1],z=(0,c.useState)({totalRatings:0,avgRating:0,satisfactionRate:0,ratingRate:0,totalRatingCount:0,satisfiedRatingCount:0,verySatisfied:0,satisfied:0,neutral:0,dissatisfied:0}),P=u()(z,2),G=P[0],F=P[1],W=(0,c.useState)(U()().startOf("day")),N=u()(W,2),Q=N[0],V=N[1],_=(0,c.useState)(U()().endOf("day")),$=u()(_,2),K=$[0],tt=$[1],et=(0,c.useState)("today"),at=u()(et,2),nt=at[0],rt=at[1],it=(0,c.useState)([U()().startOf("day"),U()().endOf("day")]),st=u()(it,2),ot=st[0],ut=st[1],ct=(0,c.useState)({current:1,pageSize:20,total:0}),lt=u()(ct,2),dt=lt[0],ft=lt[1],pt=(0,c.useState)(B.whQ),ht=u()(pt,2),gt=ht[0],vt=ht[1],mt=(0,c.useState)(),xt=u()(mt,2),yt=xt[0],wt=xt[1],bt=(0,c.useState)(),jt=u()(bt,2),kt=jt[0],Mt=jt[1],Rt=(0,c.useState)([]),Zt=u()(Rt,2),Ct=Zt[0],St=Zt[1],Yt=(0,c.useState)([]),Dt=u()(Yt,2),zt=Dt[0],Ot=Dt[1],qt=[{label:(0,J.jsx)(A.FormattedMessage,{id:"ticket.statistic.timeRange.today"}),value:"today"},{label:(0,J.jsx)(A.FormattedMessage,{id:"ticket.statistic.timeRange.yesterday"}),value:"yesterday"},{label:(0,J.jsx)(A.FormattedMessage,{id:"ticket.statistic.timeRange.week"}),value:"week"},{label:(0,J.jsx)(A.FormattedMessage,{id:"ticket.statistic.timeRange.lastWeek"}),value:"lastWeek"},{label:(0,J.jsx)(A.FormattedMessage,{id:"ticket.statistic.timeRange.month"}),value:"month"},{label:(0,J.jsx)(A.FormattedMessage,{id:"ticket.statistic.timeRange.custom"}),value:"custom"}];(0,c.useEffect)((function(){null!=o&&o.uid&&((0,T.LE)({orgUid:o.uid,pageNumber:0,pageSize:100}).then((function(t){var e;200===t.code&&St((null===(e=t.data)||void 0===e?void 0:e.content)||[])})),(0,E._t)({orgUid:o.uid,pageNumber:0,pageSize:100}).then((function(t){var e;200===t.code&&Ot((null===(e=t.data)||void 0===e?void 0:e.content)||[])})))}),[o]);var Tt=function(){var t=s()(r()().mark((function t(){var e,a,n,s,u,c,l=arguments;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=l.length>0&&void 0!==l[0]?l[0]:1,a=l.length>1&&void 0!==l[1]?l[1]:20,i(!0),t.prev=3,n={pageNumber:e-1,pageSize:a,orgUid:null==o?void 0:o.uid,startDate:ot[0].format("YYYY-MM-DD"),endDate:ot[1].format("YYYY-MM-DD"),type:gt,workgroupUid:gt===B.v5D?yt:void 0,agentUid:gt===B.fyH?kt:void 0},t.next=7,(0,q.RU)(n);case 7:s=t.sent,console.log("queryStatisticServiceByDate response:",s.data,n),200===s.code&&s.data&&(u=s.data,ft({current:e,pageSize:a,total:1}),c=[{key:u.date||U()().format("YYYY-MM-DD"),date:u.date||U()().format("YYYY-MM-DD"),totalRatingCount:u.totalRatingCount||0,satisfiedRatingCount:u.satisfiedRatingCount||0,satisfactionRate:u.satisfactionRate||0,ratingRate:u.ratingRate||0,acceptedThreadCount:u.acceptedThreadCount||0}],D(c)),t.next=16;break;case 12:t.prev=12,t.t0=t.catch(3),f.ZP.error("获取评价数据失败"),console.error("获取评价数据失败:",t.t0);case 16:return t.prev=16,i(!1),t.finish(16);case 19:case"end":return t.stop()}}),t,null,[[3,12,16,19]])})));return function(){return t.apply(this,arguments)}}();(0,c.useEffect)((function(){if("custom"===nt)V(Q),tt(K);else{var t=U()();"today"===nt?(V(t.startOf("day")),tt(t.endOf("day"))):"yesterday"===nt?(V(t.subtract(1,"day").startOf("day")),tt(t.subtract(1,"day").endOf("day"))):"week"===nt?(V(t.startOf("week")),tt(t.endOf("week"))):"lastWeek"===nt?(V(t.subtract(1,"week").startOf("week")),tt(t.subtract(1,"week").endOf("week"))):"month"===nt&&(V(t.startOf("month")),tt(t.endOf("month")))}}),[nt]),(0,c.useEffect)((function(){ut([Q,K])}),[Q,K]);var Et=function(){var t=s()(r()().mark((function t(){var e,a,n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e={orgUid:null==o?void 0:o.uid,startDate:ot[0].format("YYYY-MM-DD"),endDate:ot[1].format("YYYY-MM-DD"),type:gt,workgroupUid:gt===B.v5D?yt:void 0,agentUid:gt===B.fyH?kt:void 0},t.next=4,(0,q.RU)(e);case 4:a=t.sent,console.log("queryStatisticServiceByDate response:",a.data,e),200===a.code&&a.data&&(n=a.data,F({totalRatings:n.totalRatingCount||0,avgRating:n.satisfactionRate||0,satisfactionRate:n.satisfactionRate||0,ratingRate:n.ratingRate||0,totalRatingCount:n.totalRatingCount||0,satisfiedRatingCount:n.satisfiedRatingCount||0,verySatisfied:Math.round(.4*(n.satisfiedRatingCount||0)),satisfied:Math.round(.6*(n.satisfiedRatingCount||0)),neutral:Math.round(.2*(n.totalRatingCount||0)),dissatisfied:Math.round(.1*(n.totalRatingCount||0))})),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),console.error("获取统计数据失败:",t.t0);case 12:case"end":return t.stop()}}),t,null,[[0,9]])})));return function(){return t.apply(this,arguments)}}();(0,c.useEffect)((function(){Et(),Tt()}),[ot,gt,yt,kt]);var Pt=[{title:t.formatMessage({id:"bi.rating.table.date"}),dataIndex:"date",key:"date"},{title:t.formatMessage({id:"bi.rating.table.totalRatings"}),dataIndex:"totalRatingCount",key:"totalRatingCount"},{title:t.formatMessage({id:"bi.rating.table.satisfiedRatings"}),dataIndex:"satisfiedRatingCount",key:"satisfiedRatingCount",render:function(t,e){return(0,J.jsxs)("div",{children:[(0,J.jsx)("span",{children:t}),(0,J.jsx)(p.Z,{percent:e.totalRatingCount>0?Math.round(t/e.totalRatingCount*100):0,size:"small",showInfo:!1,strokeColor:"#52c41a"})]})}},{title:t.formatMessage({id:"bi.rating.table.ratingRate"}),dataIndex:"ratingRate",key:"ratingRate",render:function(t){return(0,J.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,J.jsx)("span",{style:{marginRight:4},children:t}),(0,J.jsx)(M.Z,{style:{color:"#faad14"}})]})}}],Ut=[{type:t.formatMessage({id:"bi.rating.table.verySatisfied"}),value:G.verySatisfied,color:"#52c41a"},{type:t.formatMessage({id:"bi.rating.table.satisfied"}),value:G.satisfied,color:"#1890ff"},{type:t.formatMessage({id:"bi.rating.table.neutral"}),value:G.neutral,color:"#faad14"},{type:t.formatMessage({id:"bi.rating.table.dissatisfied"}),value:G.dissatisfied,color:"#ff4d4f"}];return(0,J.jsxs)("div",{style:{padding:"24px"},children:[(0,J.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,J.jsx)("h2",{children:t.formatMessage({id:"bi.rating.title"})}),(0,J.jsxs)("p",{children:[t.formatMessage({id:"bi.rating.description"}),"today"===nt&&(0,J.jsxs)("span",{style:{color:"#666",marginLeft:8},children:["(",Q.format("YYYY-MM-DD"),")"]}),"yesterday"===nt&&(0,J.jsxs)("span",{style:{color:"#666",marginLeft:8},children:["(",Q.format("YYYY-MM-DD"),")"]}),("week"===nt||"lastWeek"===nt||"month"===nt||"custom"===nt)&&(0,J.jsxs)("span",{style:{color:"#666",marginLeft:8},children:["(",Q.format("YYYY-MM-DD")," ~ ",K.format("YYYY-MM-DD"),")"]})]})]}),(0,J.jsx)(h.Z,{style:{marginBottom:"24px"},children:(0,J.jsx)(g.Z,{direction:"vertical",style:{width:"100%"},children:(0,J.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,J.jsxs)(g.Z,{wrap:!0,children:[(0,J.jsx)(v.ZP.Group,{value:nt,onChange:function(t){return rt(t.target.value)},children:qt.map((function(t){return(0,J.jsx)(v.ZP.Button,{value:t.value,children:t.label},t.value)}))}),"custom"===nt&&(0,J.jsx)(X,{value:[Q,K],onChange:function(t){V(t[0]),tt(t[1])}})]}),(0,J.jsxs)(g.Z,{wrap:!0,children:[(0,J.jsxs)(d.Z,{value:gt,style:{width:120},onChange:function(t){vt(t),wt(void 0),Mt(void 0)},children:[(0,J.jsx)(H,{value:B.whQ,children:t.formatMessage({id:"bi.statistic.level.organization"})}),(0,J.jsx)(H,{value:B.v5D,children:t.formatMessage({id:"bi.statistic.level.workgroup"})}),(0,J.jsx)(H,{value:B.fyH,children:t.formatMessage({id:"bi.statistic.level.agent"})})]}),gt===B.v5D&&(0,J.jsx)(d.Z,{value:yt,style:{width:150},onChange:wt,placeholder:t.formatMessage({id:"bi.statistic.level.workgroup"}),allowClear:!0,children:Ct.map((function(t){return(0,J.jsx)(H,{value:t.uid,children:t.nickname},t.uid)}))}),gt===B.fyH&&(0,J.jsx)(d.Z,{value:kt,style:{width:150},onChange:Mt,placeholder:t.formatMessage({id:"bi.statistic.level.agent"}),allowClear:!0,children:zt.map((function(t){return(0,J.jsx)(H,{value:t.uid,children:t.nickname},t.uid)}))}),(0,J.jsx)(m.ZP,{type:"primary",icon:(0,J.jsx)(R.Z,{}),onClick:function(){return Tt()},loading:n,children:t.formatMessage({id:"bi.common.refresh"})}),(0,J.jsx)(x.Z,{title:t.formatMessage({id:"ticket.statistic.filter.export"}),children:(0,J.jsx)(m.ZP,{icon:(0,J.jsx)(Z.Z,{}),onClick:function(){var t=localStorage.getItem(B.LA8);window.open((0,I.kG)()+"/api/v1/service/statistic/export?"+new URLSearchParams({type:gt,startDate:ot[0].format("YYYY-MM-DD"),endDate:ot[1].format("YYYY-MM-DD"),workgroupUid:gt===B.v5D?yt:"",agentUid:gt===B.fyH?kt:"",orgUid:(null==o?void 0:o.uid)||"",accessToken:t||""}).toString())},children:t.formatMessage({id:"ticket.statistic.filter.export"})})})]})]})})}),(0,J.jsxs)(y.Z,{spinning:n,children:[(0,J.jsxs)(w.Z,{gutter:16,style:{marginBottom:"24px"},children:[(0,J.jsx)(b.Z,{span:6,children:(0,J.jsx)(h.Z,{children:(0,J.jsx)(j.Z,{title:t.formatMessage({id:"bi.rating.card.totalRatings"}),value:G.totalRatings,prefix:(0,J.jsx)(C.Z,{}),valueStyle:{color:"#3f8600"}})})}),(0,J.jsx)(b.Z,{span:6,children:(0,J.jsx)(h.Z,{children:(0,J.jsx)(j.Z,{title:t.formatMessage({id:"bi.rating.card.avgRating"}),value:G.avgRating,prefix:(0,J.jsx)(M.Z,{}),valueStyle:{color:"#1890ff"},suffix:"/5"})})}),(0,J.jsx)(b.Z,{span:6,children:(0,J.jsx)(h.Z,{children:(0,J.jsx)(j.Z,{title:t.formatMessage({id:"bi.rating.card.satisfactionRate"}),value:G.satisfactionRate,prefix:(0,J.jsx)(O,{}),valueStyle:{color:"#722ed1"},suffix:"%"})})}),(0,J.jsx)(b.Z,{span:6,children:(0,J.jsx)(h.Z,{children:(0,J.jsx)(j.Z,{title:t.formatMessage({id:"bi.rating.card.ratingRate"}),value:G.ratingRate,prefix:(0,J.jsx)(M.Z,{}),valueStyle:{color:"#13c2c2"},suffix:"%"})})})]}),(0,J.jsxs)(w.Z,{gutter:16,style:{marginBottom:"24px"},children:[(0,J.jsx)(b.Z,{span:12,children:(0,J.jsx)(h.Z,{title:t.formatMessage({id:"bi.rating.distribution"}),children:(0,J.jsx)("div",{style:{height:300,display:"flex",justifyContent:"center",alignItems:"center"},children:(0,J.jsxs)("div",{style:{textAlign:"center"},children:[(0,J.jsxs)("div",{style:{fontSize:"24px",fontWeight:"bold",color:"#52c41a"},children:[G.satisfactionRate,"%"]}),(0,J.jsx)("div",{style:{color:"#666"},children:t.formatMessage({id:"bi.rating.overallSatisfaction"})})]})})})}),(0,J.jsx)(b.Z,{span:12,children:(0,J.jsx)(h.Z,{title:t.formatMessage({id:"bi.rating.ratingDistribution"}),children:(0,J.jsx)("div",{style:{height:300},children:Ut.map((function(t,e){return(0,J.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:8},children:[(0,J.jsx)("span",{children:t.type}),(0,J.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,J.jsx)("div",{style:{width:12,height:12,backgroundColor:t.color,marginRight:8,borderRadius:2}}),(0,J.jsx)("span",{children:t.value})]})]},e)}))})})})]}),(0,J.jsx)(h.Z,{title:t.formatMessage({id:"bi.rating.detailData"}),children:(0,J.jsx)(k.Z,{columns:Pt,dataSource:Y,pagination:{current:dt.current,pageSize:dt.pageSize,total:dt.total,showSizeChanger:!0,showQuickJumper:!0,showTotal:function(t,e){return"".concat(e[0],"-").concat(e[1]," of ").concat(t," items")}},onChange:function(t){Tt(t.current,t.pageSize)},size:"middle"})})]})]})}}}]); |