Files
weiyu/deploy/server/admin/p__Dashboard__Bi__Service__Rating.36a76fa1.async.js
2025-11-11 16:36:56 +08:00

1 line
20 KiB
JavaScript

"use strict";(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[8544],{61107:function(t,e,a){a.d(e,{Z:function(){return c}});var n=a(83910),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 c=r.forwardRef(o)},80556:function(t,e,a){a.d(e,{Z:function(){return c}});var n=a(83910),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 c=r.forwardRef(o)},74840:function(t,e,a){a.d(e,{Z:function(){return c}});var n=a(83910),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 c=r.forwardRef(o)},12322:function(t,e,a){a.d(e,{Z:function(){return c}});var n=a(83910),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 c=r.forwardRef(o)},33019:function(t,e,a){a.d(e,{Lr:function(){return m},_t:function(){return d},sE:function(){return h},x_:function(){return p}});var n=a(90819),r=a.n(n),i=a(73193),s=a.n(i),o=a(89933),c=a.n(o),u=a(39497),l=a(14906);function d(t){return f.apply(this,arguments)}function f(){return(f=c()(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:u.XtJ})}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function p(t){return g.apply(this,arguments)}function g(){return(g=c()(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:u.XtJ})}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function h(t){return v.apply(this,arguments)}function v(){return(v=c()(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:u.XtJ})}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function m(t){return x.apply(this,arguments)}function x(){return(x=c()(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:u.XtJ})}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}},99355:function(t,e,a){a.d(e,{Eb:function(){return d},RU:function(){return p},xL:function(){return h}});var n=a(90819),r=a.n(n),i=a(73193),s=a.n(i),o=a(89933),c=a.n(o),u=a(39497),l=a(14906);function d(){return f.apply(this,arguments)}function f(){return(f=c()(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:u.XtJ}}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function p(t){return g.apply(this,arguments)}function g(){return(g=c()(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:u.XtJ})}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function h(t){return v.apply(this,arguments)}function v(){return(v=c()(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:u.XtJ})}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}},2077:function(t,e,a){a.d(e,{LE:function(){return l},W5:function(){return g},p0:function(){return f},zl:function(){return v}});var n=a(90819),r=a.n(n),i=a(73193),s=a.n(i),o=a(89933),c=a.n(o),u=a(14906);function l(t){return d.apply(this,arguments)}function d(){return(d=c()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,u.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=c()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,u.request)("/api/v1/workgroup/create",{method:"POST",data:s()({},e)}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function g(t){return h.apply(this,arguments)}function h(){return(h=c()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,u.request)("/api/v1/workgroup/update",{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=c()(r()().mark((function t(e){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",(0,u.request)("/api/v1/workgroup/delete",{method:"POST",data:s()({},e)}));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)}},72141:function(t,e,a){a.r(e),a.d(e,{default:function(){return F}});var n=a(90819),r=a.n(n),i=a(89933),s=a.n(i),o=a(45332),c=a.n(o),u=a(44194),l=a(35281),d=a(13847),f=a(59533),p=a(87629),g=a(40110),h=a(39487),v=a(79369),m=a(82770),x=a(78578),y=a(65207),j=a(34201),w=a(79489),b=a(94447),M=a(54943),R=a(12322),k=a(80556),Z=a(61107),C=a(74840),S=a(83910),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 u.createElement(D.Z,(0,S.Z)({},t,{ref:e,icon:Y}))};var O=u.forwardRef(z),q=a(99355),E=a(2077),T=a(33019),U=a(96596),L=a.n(U),P=a(98830),B=a(14906),A=a(39497),I=a(5932),H=a(31549),J=l.default.RangePicker,X=d.Z.Option,F=function(){var t=(0,B.useIntl)(),e=(0,u.useState)(!1),a=c()(e,2),n=a[0],i=a[1],o=(0,P.u)((function(t){return t.currentOrg})),l=(0,u.useState)([]),S=c()(l,2),Y=S[0],D=S[1],z=(0,u.useState)({totalRatings:0,avgRating:0,satisfactionRate:0,ratingRate:0,totalRatingCount:0,satisfiedRatingCount:0,verySatisfied:0,satisfied:0,neutral:0,dissatisfied:0}),U=c()(z,2),F=U[0],G=U[1],W=(0,u.useState)(L()().startOf("day")),N=c()(W,2),Q=N[0],V=N[1],_=(0,u.useState)(L()().endOf("day")),K=c()(_,2),$=K[0],tt=K[1],et=(0,u.useState)("today"),at=c()(et,2),nt=at[0],rt=at[1],it=(0,u.useState)([L()().startOf("day"),L()().endOf("day")]),st=c()(it,2),ot=st[0],ct=st[1],ut=(0,u.useState)({current:1,pageSize:20,total:0}),lt=c()(ut,2),dt=lt[0],ft=lt[1],pt=(0,u.useState)(A.whQ),gt=c()(pt,2),ht=gt[0],vt=gt[1],mt=(0,u.useState)(),xt=c()(mt,2),yt=xt[0],jt=xt[1],wt=(0,u.useState)(),bt=c()(wt,2),Mt=bt[0],Rt=bt[1],kt=(0,u.useState)([]),Zt=c()(kt,2),Ct=Zt[0],St=Zt[1],Yt=(0,u.useState)([]),Dt=c()(Yt,2),zt=Dt[0],Ot=Dt[1],qt=[{label:(0,H.jsx)(B.FormattedMessage,{id:"ticket.statistic.timeRange.today"}),value:"today"},{label:(0,H.jsx)(B.FormattedMessage,{id:"ticket.statistic.timeRange.yesterday"}),value:"yesterday"},{label:(0,H.jsx)(B.FormattedMessage,{id:"ticket.statistic.timeRange.week"}),value:"week"},{label:(0,H.jsx)(B.FormattedMessage,{id:"ticket.statistic.timeRange.lastWeek"}),value:"lastWeek"},{label:(0,H.jsx)(B.FormattedMessage,{id:"ticket.statistic.timeRange.month"}),value:"month"},{label:(0,H.jsx)(B.FormattedMessage,{id:"ticket.statistic.timeRange.custom"}),value:"custom"}];(0,u.useEffect)((function(){null!=o&&o.uid&&((0,E.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,T._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 Et=function(){var t=s()(r()().mark((function t(){var e,a,n,s,c,u,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:ht,workgroupUid:ht===A.v5D?yt:void 0,agentUid:ht===A.fyH?Mt: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&&(c=s.data,ft({current:e,pageSize:a,total:1}),u=[{key:c.date||L()().format("YYYY-MM-DD"),date:c.date||L()().format("YYYY-MM-DD"),totalRatingCount:c.totalRatingCount||0,satisfiedRatingCount:c.satisfiedRatingCount||0,satisfactionRate:c.satisfactionRate||0,ratingRate:c.ratingRate||0,acceptedThreadCount:c.acceptedThreadCount||0}],D(u)),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,u.useEffect)((function(){if("custom"===nt)V(Q),tt($);else{var t=L()();"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,u.useEffect)((function(){ct([Q,$])}),[Q,$]);var Tt=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:ht,workgroupUid:ht===A.v5D?yt:void 0,agentUid:ht===A.fyH?Mt: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,G({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,u.useEffect)((function(){Tt(),Et()}),[ot,ht,yt,Mt]);var Ut=[{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,H.jsxs)("div",{children:[(0,H.jsx)("span",{children:t}),(0,H.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,H.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,H.jsx)("span",{style:{marginRight:4},children:t}),(0,H.jsx)(R.Z,{style:{color:"#faad14"}})]})}}],Lt=[{type:t.formatMessage({id:"bi.rating.table.verySatisfied"}),value:F.verySatisfied,color:"#52c41a"},{type:t.formatMessage({id:"bi.rating.table.satisfied"}),value:F.satisfied,color:"#1890ff"},{type:t.formatMessage({id:"bi.rating.table.neutral"}),value:F.neutral,color:"#faad14"},{type:t.formatMessage({id:"bi.rating.table.dissatisfied"}),value:F.dissatisfied,color:"#ff4d4f"}];return(0,H.jsxs)("div",{style:{padding:"24px"},children:[(0,H.jsxs)("div",{style:{marginBottom:"24px"},children:[(0,H.jsx)("h2",{children:t.formatMessage({id:"bi.rating.title"})}),(0,H.jsxs)("p",{children:[t.formatMessage({id:"bi.rating.description"}),"today"===nt&&(0,H.jsxs)("span",{style:{color:"#666",marginLeft:8},children:["(",Q.format("YYYY-MM-DD"),")"]}),"yesterday"===nt&&(0,H.jsxs)("span",{style:{color:"#666",marginLeft:8},children:["(",Q.format("YYYY-MM-DD"),")"]}),("week"===nt||"lastWeek"===nt||"month"===nt||"custom"===nt)&&(0,H.jsxs)("span",{style:{color:"#666",marginLeft:8},children:["(",Q.format("YYYY-MM-DD")," ~ ",$.format("YYYY-MM-DD"),")"]})]})]}),(0,H.jsx)(g.Z,{style:{marginBottom:"24px"},children:(0,H.jsx)(h.Z,{direction:"vertical",style:{width:"100%"},children:(0,H.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,H.jsxs)(h.Z,{wrap:!0,children:[(0,H.jsx)(v.ZP.Group,{value:nt,onChange:function(t){return rt(t.target.value)},children:qt.map((function(t){return(0,H.jsx)(v.ZP.Button,{value:t.value,children:t.label},t.value)}))}),"custom"===nt&&(0,H.jsx)(J,{value:[Q,$],onChange:function(t){V(t[0]),tt(t[1])}})]}),(0,H.jsxs)(h.Z,{wrap:!0,children:[(0,H.jsxs)(d.Z,{value:ht,style:{width:120},onChange:function(t){vt(t),jt(void 0),Rt(void 0)},children:[(0,H.jsx)(X,{value:A.whQ,children:t.formatMessage({id:"bi.statistic.level.organization"})}),(0,H.jsx)(X,{value:A.v5D,children:t.formatMessage({id:"bi.statistic.level.workgroup"})}),(0,H.jsx)(X,{value:A.fyH,children:t.formatMessage({id:"bi.statistic.level.agent"})})]}),ht===A.v5D&&(0,H.jsx)(d.Z,{value:yt,style:{width:150},onChange:jt,placeholder:t.formatMessage({id:"bi.statistic.level.workgroup"}),allowClear:!0,children:Ct.map((function(t){return(0,H.jsx)(X,{value:t.uid,children:t.nickname},t.uid)}))}),ht===A.fyH&&(0,H.jsx)(d.Z,{value:Mt,style:{width:150},onChange:Rt,placeholder:t.formatMessage({id:"bi.statistic.level.agent"}),allowClear:!0,children:zt.map((function(t){return(0,H.jsx)(X,{value:t.uid,children:t.nickname},t.uid)}))}),(0,H.jsx)(m.ZP,{type:"primary",icon:(0,H.jsx)(k.Z,{}),onClick:function(){return Et()},loading:n,children:t.formatMessage({id:"bi.common.refresh"})}),(0,H.jsx)(x.Z,{title:t.formatMessage({id:"ticket.statistic.filter.export"}),children:(0,H.jsx)(m.ZP,{icon:(0,H.jsx)(Z.Z,{}),onClick:function(){var t=localStorage.getItem(A.LA8);window.open((0,I.kG)()+"/api/v1/service/statistic/export?"+new URLSearchParams({type:ht,startDate:ot[0].format("YYYY-MM-DD"),endDate:ot[1].format("YYYY-MM-DD"),workgroupUid:ht===A.v5D?yt:"",agentUid:ht===A.fyH?Mt:"",orgUid:(null==o?void 0:o.uid)||"",accessToken:t||""}).toString())},children:t.formatMessage({id:"ticket.statistic.filter.export"})})})]})]})})}),(0,H.jsxs)(y.Z,{spinning:n,children:[(0,H.jsxs)(j.Z,{gutter:16,style:{marginBottom:"24px"},children:[(0,H.jsx)(w.Z,{span:6,children:(0,H.jsx)(g.Z,{children:(0,H.jsx)(b.Z,{title:t.formatMessage({id:"bi.rating.card.totalRatings"}),value:F.totalRatings,prefix:(0,H.jsx)(C.Z,{}),valueStyle:{color:"#3f8600"}})})}),(0,H.jsx)(w.Z,{span:6,children:(0,H.jsx)(g.Z,{children:(0,H.jsx)(b.Z,{title:t.formatMessage({id:"bi.rating.card.avgRating"}),value:F.avgRating,prefix:(0,H.jsx)(R.Z,{}),valueStyle:{color:"#1890ff"},suffix:"/5"})})}),(0,H.jsx)(w.Z,{span:6,children:(0,H.jsx)(g.Z,{children:(0,H.jsx)(b.Z,{title:t.formatMessage({id:"bi.rating.card.satisfactionRate"}),value:F.satisfactionRate,prefix:(0,H.jsx)(O,{}),valueStyle:{color:"#722ed1"},suffix:"%"})})}),(0,H.jsx)(w.Z,{span:6,children:(0,H.jsx)(g.Z,{children:(0,H.jsx)(b.Z,{title:t.formatMessage({id:"bi.rating.card.ratingRate"}),value:F.ratingRate,prefix:(0,H.jsx)(R.Z,{}),valueStyle:{color:"#13c2c2"},suffix:"%"})})})]}),(0,H.jsxs)(j.Z,{gutter:16,style:{marginBottom:"24px"},children:[(0,H.jsx)(w.Z,{span:12,children:(0,H.jsx)(g.Z,{title:t.formatMessage({id:"bi.rating.distribution"}),children:(0,H.jsx)("div",{style:{height:300,display:"flex",justifyContent:"center",alignItems:"center"},children:(0,H.jsxs)("div",{style:{textAlign:"center"},children:[(0,H.jsxs)("div",{style:{fontSize:"24px",fontWeight:"bold",color:"#52c41a"},children:[F.satisfactionRate,"%"]}),(0,H.jsx)("div",{style:{color:"#666"},children:t.formatMessage({id:"bi.rating.overallSatisfaction"})})]})})})}),(0,H.jsx)(w.Z,{span:12,children:(0,H.jsx)(g.Z,{title:t.formatMessage({id:"bi.rating.ratingDistribution"}),children:(0,H.jsx)("div",{style:{height:300},children:Lt.map((function(t,e){return(0,H.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:8},children:[(0,H.jsx)("span",{children:t.type}),(0,H.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,H.jsx)("div",{style:{width:12,height:12,backgroundColor:t.color,marginRight:8,borderRadius:2}}),(0,H.jsx)("span",{children:t.value})]})]},e)}))})})})]}),(0,H.jsx)(g.Z,{title:t.formatMessage({id:"bi.rating.detailData"}),children:(0,H.jsx)(M.Z,{columns:Ut,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){Et(t.current,t.pageSize)},size:"middle"})})]})]})}}}]);