mirror of
https://gitee.com/270580156/weiyu.git
synced 2026-05-14 11:18:02 +00:00
1 line
3.2 KiB
JavaScript
1 line
3.2 KiB
JavaScript
"use strict";(self.webpackChunkadmin=self.webpackChunkadmin||[]).push([[9107],{77967:function(e,t,n){n.r(t),n.d(t,{default:function(){return M}});var a=n(45332),i=n.n(a),c=n(67738),r=n(40110),o=n(44194),s=n(14906),l=n(12074),u=n(97234),d=n(84974),f=n(21559),p=n(59247),g=n(71205),m=(n(28099),n(61930)),v=n(5932),h=n(83910),x={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M912 192H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 284H328c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h584c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM104 228a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0zm0 284a56 56 0 10112 0 56 56 0 10-112 0z"}}]},name:"unordered-list",theme:"outlined"},k=n(54183),j=function(e,t){return o.createElement(k.Z,(0,h.Z)({},e,{ref:t,icon:x}))};var y=o.forwardRef(j),b=n(31549),M=function(){var e=(0,s.useIntl)(),t=(0,s.useSearchParams)(),n=i()(t,2),a=n[0],h=n[1],x=a.get("status")||"todo",k=(0,o.useState)(x),j=i()(k,2),M=j[0],Z=j[1],w=(0,s.useModel)("@@initialState").initialState,S=(null!=w?w:{}).userInfo;(0,o.useEffect)((function(){if(null==w||!w.userInfo){s.history.push("/auth/login?redirect=".concat(encodeURIComponent("/ticket-center")))}}),[w]);var z=(0,o.useState)({total:1,processing:0,pending:0,review:0}),C=i()(z,1)[0];(0,o.useEffect)((function(){Z(x)}),[x]),(0,o.useEffect)((function(){}),[]);var I,R,E=[{path:"/ticket-list",name:e.formatMessage({id:"ticket.list"})||"工单列表",icon:(0,b.jsx)(y,{})}],H=function(e){var t=e.key;Z(t),h({status:t})},B=[{key:"all",label:"".concat(e.formatMessage({id:"ticket.center.all"})," ").concat(C.total)},{key:"processing",label:"".concat(e.formatMessage({id:"ticket.center.statistics.processing"})," ").concat(C.processing)},{key:"pending",label:"".concat(e.formatMessage({id:"ticket.center.statistics.pending"})," ").concat(C.pending)},{key:"review",label:"".concat(e.formatMessage({id:"ticket.center.statistics.review"})," ").concat(C.review)}];return(0,b.jsxs)(l.f,{title:(I=(0,v.nt)(),R=(0,v.ye)(),I&&R?R:e.formatMessage({id:"app.title"})),logo:(0,v.do)(),layout:"mix",fixedHeader:!0,fixSiderbar:!0,splitMenus:!1,route:{path:"/",routes:E},location:{pathname:"/".concat(M)},menuItemRender:function(e,t){return(0,b.jsx)("div",{onClick:function(){var t,n=null===(t=e.path)||void 0===t?void 0:t.replace("/","");n&&H({key:n})},children:t})},actionsRender:function(){return[(0,b.jsx)(d.Z,{},"fullScreen"),(0,b.jsx)(m.Z,{},"trialTip"),!1,(0,b.jsx)(g.Z,{},"GotoGithub"),!1,(0,b.jsx)(f.Z,{},"GotoAgent"),(0,b.jsx)(p.Z,{},"ContactUs")]},avatarProps:{src:null==S?void 0:S.avatar,title:(0,b.jsx)(u.gj,{}),render:function(e,t){return(0,b.jsx)(u.Kd,{menu:!0,children:t})}},footerRender:function(){return(0,b.jsx)(u.$_,{})},contentStyle:{margin:0,padding:0,background:"#f0f2f5"},children:[(0,b.jsx)("div",{style:{padding:"24px 24px 0",background:"#fff",borderBottom:"1px solid #f0f0f0"},children:(0,b.jsx)(c.Z,{activeKey:"todo"===M?"all":M,items:B,onChange:function(e){return H({key:e})},style:{marginBottom:0}})}),(0,b.jsx)("div",{style:{padding:"24px"},children:(0,b.jsx)(r.Z,{})})]})}}}]); |