mirror of https://gitee.com/topiam/eiam
19 lines
8.5 KiB
JavaScript
19 lines
8.5 KiB
JavaScript
/*
|
|
* eiam-portal - Employee Identity and Access Management Program
|
|
* Copyright © 2020-2023 TopIAM (support@topiam.cn)
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU Affero General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU Affero General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
"use strict";(self.webpackChunktopiam_portal=self.webpackChunktopiam_portal||[]).push([[301],{17880:function(nt,y,i){i.r(y),i.d(y,{default:function(){return Q}});var R=i(7863),S=i.n(R),M=i(77566),L=i.n(M),G=i(76091),f=i.n(G),N=i(14912),$=i.n(N),c=i(84530),E=i(79685),I=i(9560),t=i(63342),Z=function(){return(0,t.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 200 200",children:[(0,t.jsxs)("defs",{children:[(0,t.jsxs)("linearGradient",{id:"linearGradient-1",x1:"62.102%",x2:"108.197%",y1:"0%",y2:"37.864%",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:"#4285EB"}),(0,t.jsx)("stop",{offset:"100%",stopColor:"#2EC7FF"})]}),(0,t.jsxs)("linearGradient",{id:"linearGradient-2",x1:"69.644%",x2:"54.043%",y1:"0%",y2:"108.457%",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:"#29CDFF"}),(0,t.jsx)("stop",{offset:"37.86%",stopColor:"#148EFF"}),(0,t.jsx)("stop",{offset:"100%",stopColor:"#0A60FF"})]}),(0,t.jsxs)("linearGradient",{id:"linearGradient-3",x1:"69.691%",x2:"16.723%",y1:"-12.974%",y2:"117.391%",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:"#FA816E"}),(0,t.jsx)("stop",{offset:"41.473%",stopColor:"#F74A5C"}),(0,t.jsx)("stop",{offset:"100%",stopColor:"#F51D2C"})]}),(0,t.jsxs)("linearGradient",{id:"linearGradient-4",x1:"68.128%",x2:"30.44%",y1:"-35.691%",y2:"114.943%",children:[(0,t.jsx)("stop",{offset:"0%",stopColor:"#FA8E7D"}),(0,t.jsx)("stop",{offset:"51.264%",stopColor:"#F74A5C"}),(0,t.jsx)("stop",{offset:"100%",stopColor:"#F51D2C"})]})]}),(0,t.jsx)("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1",children:(0,t.jsx)("g",{transform:"translate(-20 -20)",children:(0,t.jsx)("g",{transform:"translate(20 20)",children:(0,t.jsxs)("g",{children:[(0,t.jsxs)("g",{fillRule:"nonzero",children:[(0,t.jsxs)("g",{children:[(0,t.jsx)("path",{fill:"url(#linearGradient-1)",d:"M91.588 4.177L4.18 91.513a11.981 11.981 0 000 16.974l87.408 87.336a12.005 12.005 0 0016.989 0l36.648-36.618c4.209-4.205 4.209-11.023 0-15.228-4.208-4.205-11.031-4.205-15.24 0l-27.783 27.76c-1.17 1.169-2.945 1.169-4.114 0l-69.802-69.744c-1.17-1.169-1.17-2.942 0-4.11l69.802-69.745c1.17-1.169 2.944-1.169 4.114 0l27.783 27.76c4.209 4.205 11.032 4.205 15.24 0 4.209-4.205 4.209-11.022 0-15.227L108.581 4.056c-4.719-4.594-12.312-4.557-16.993.12z"}),(0,t.jsx)("path",{fill:"url(#linearGradient-2)",d:"M91.588 4.177L4.18 91.513a11.981 11.981 0 000 16.974l87.408 87.336a12.005 12.005 0 0016.989 0l36.648-36.618c4.209-4.205 4.209-11.023 0-15.228-4.208-4.205-11.031-4.205-15.24 0l-27.783 27.76c-1.17 1.169-2.945 1.169-4.114 0l-69.802-69.744c-1.17-1.169-1.17-2.942 0-4.11l69.802-69.745c2.912-2.51 7.664-7.596 14.642-8.786 5.186-.883 10.855 1.062 17.009 5.837L108.58 4.056c-4.719-4.594-12.312-4.557-16.993.12z"})]}),(0,t.jsx)("path",{fill:"url(#linearGradient-3)",d:"M153.686 135.855c4.208 4.205 11.031 4.205 15.24 0l27.034-27.012c4.7-4.696 4.7-12.28 0-16.974l-27.27-27.15c-4.218-4.2-11.043-4.195-15.254.013-4.209 4.205-4.209 11.022 0 15.227l18.418 18.403c1.17 1.169 1.17 2.943 0 4.111l-18.168 18.154c-4.209 4.205-4.209 11.023 0 15.228z"})]}),(0,t.jsx)("ellipse",{cx:"100.519",cy:"100.437",fill:"url(#linearGradient-4)",rx:"23.6",ry:"23.581"})]})})})})]})},z=Z,D=i(73838),W=i(8821),H=function(n){var e,r;return!n.route&&(n.noFound||n.notFound)||((e=n.route)===null||e===void 0?void 0:e.unaccessible)&&(n.unAccessible||n.noAccessible)||(!n.route||((r=n.route)===null||r===void 0?void 0:r.unaccessible))&&(0,t.jsx)(D.ZP,{status:n.route?"403":"404",title:n.route?"403":"404",subTitle:n.route?"\u62B1\u6B49\uFF0C\u4F60\u65E0\u6743\u8BBF\u95EE\u8BE5\u9875\u9762":"\u62B1\u6B49\uFF0C\u4F60\u8BBF\u95EE\u7684\u9875\u9762\u4E0D\u5B58\u5728",extra:(0,t.jsx)(W.ZP,{type:"primary",onClick:function(){return c.history.push("/")},children:"\u8FD4\u56DE\u9996\u9875"})})||n.children},B=H,O=i(86977),T=i(54363),p=i(56815),P=i(61109),U=i(65184),V=i(64682),j=i(11343);function X(a){var n,e;if(a.runtimeConfig.rightRender)return a.runtimeConfig.rightRender(a.initialState,a.setInitialState,a.runtimeConfig);var r=(0,t.jsxs)("span",{className:"umi-plugin-layout-action",children:[(0,t.jsx)(O.C,{size:"small",className:"umi-plugin-layout-avatar",src:((n=a.initialState)===null||n===void 0?void 0:n.avatar)||"https://gw.alipayobjects.com/zos/antfincdn/XAosXuNZyF/BiazfanxmamNRoxxVxka.png",alt:"avatar"}),(0,t.jsx)("span",{className:"umi-plugin-layout-name",children:(e=a.initialState)===null||e===void 0?void 0:e.name})]});if(a.loading)return(0,t.jsx)("div",{className:"umi-plugin-layout-right",children:(0,t.jsx)(T.Z,{size:"small",style:{marginLeft:8,marginRight:8}})});var d={className:"umi-plugin-layout-menu",selectedKeys:[],items:[{key:"logout",label:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(V.Z,{}),"\u9000\u51FA\u767B\u5F55"]}),onClick:function(){var s,g;a==null||(s=a.runtimeConfig)===null||s===void 0||(g=s.logout)===null||g===void 0||g.call(s,a.initialState)}}]},x=p.Z.startsWith("5.")||p.Z.startsWith("4.24.")?{menu:d}:{overlay:(0,t.jsx)(P.Z,f()({},d))};return(0,t.jsxs)("div",{className:"umi-plugin-layout-right anticon",children:[a.runtimeConfig.logout?(0,t.jsx)(U.Z,f()(f()({},x),{},{overlayClassName:"umi-plugin-layout-container",children:r})):r,(0,t.jsx)(j.pD,{})]})}var C=i(50521),K=i(52442),Y=function a(n,e){if(n.length===0)return[];var r=[],d=$()(n),x;try{for(d.s();!(x=d.n()).done;){var v=x.value,s=f()({},v);e(v)?Array.isArray(s.routes)&&r.push.apply(r,L()(a(s.routes,e))):(Array.isArray(s.children)&&(s.children=a(s.children,e),s.routes=s.children),r.push(s))}}catch(g){d.e(g)}finally{d.f()}return r},J=function a(n){return n.length===0?[]:n.map(function(e){var r=f()({},e);return e.originPath&&(r.path=e.originPath),Array.isArray(e.routes)&&(r.routes=a(e.routes)),Array.isArray(e.children)&&(r.children=a(e.children)),r})},Q=function(a){var n=(0,c.useLocation)(),e=(0,c.useNavigate)(),r=(0,c.useAppData)(),d=r.clientRoutes,x=r.pluginManager,v=C.t&&(0,C.t)("@@initialState")||{initialState:void 0,loading:!1,setInitialState:null},s=v.initialState,g=v.loading,A=v.setInitialState,m={navTheme:"light",colorPrimary:"#1677FF",layout:"mix",contentWidth:"Fluid",fixedHeader:!0,fixSiderbar:!0,splitMenus:!1,colorWeak:!1,title:"\u7EDF\u4E00\u8EAB\u4EFD\u8BA4\u8BC1\u5E73\u53F0",pwa:!1,logo:"/full-logo.svg",iconfontUrl:"",siderWidth:190,locale:!0},b=(0,j.YB)(),k=b.formatMessage,l=x.applyPlugins({key:"layout",type:"modify",initialValue:f()({},v)}),w=Y(d.filter(function(u){return u.id==="ant-design-pro-layout"}),function(u){return!!u.isLayout&&u.id!=="ant-design-pro-layout"||!!u.isWrapper}),q=(0,K.Mf)(J(w)),_=S()(q,1),F=_[0],tt=(0,E.useMemo)(function(){var u,o,h;return(u=(0,c.matchRoutes)(F.children,n.pathname))===null||u===void 0||(o=u.pop)===null||o===void 0||(h=o.call(u))===null||h===void 0?void 0:h.route},[n.pathname]);return(0,t.jsx)(I.f,f()(f()({route:F,location:n,title:m.title||"plugin-layout",navTheme:"dark",siderWidth:256,onMenuHeaderClick:function(o){o.stopPropagation(),o.preventDefault(),e("/")},formatMessage:m.formatMessage||k,menu:{locale:m.locale},logo:z,menuItemRender:function(o,h){return o.isUrl||o.children?h:o.path&&n.pathname!==o.path?(0,t.jsx)(c.Link,{to:o.path.replace("/*",""),target:o.target,children:h}):h},itemRender:function(o){return(0,t.jsx)(c.Link,{to:o.path,children:o.breadcrumbName})},disableContentMargin:!0,fixSiderbar:!0,fixedHeader:!0},l),{},{rightContentRender:l.rightContentRender!==!1&&function(u){var o=X({runtimeConfig:l,loading:g,initialState:s,setInitialState:A});return l.rightContentRender?l.rightContentRender(u,o,{userConfig:m,runtimeConfig:l,loading:g,initialState:s,setInitialState:A}):o},children:(0,t.jsx)(B,{route:tt,noFound:l==null?void 0:l.noFound,notFound:l==null?void 0:l.notFound,unAccessible:l==null?void 0:l.unAccessible,noAccessible:l==null?void 0:l.noAccessible,children:l.childrenRender?l.childrenRender((0,t.jsx)(c.Outlet,{}),a):(0,t.jsx)(c.Outlet,{})})}))}}}]);
|