1 |
- import{d as b,c as t,u as T,r as P,p as re,a as he,_ as y,b as k,e as xe,A as le,i as ye,f as be,w as Y,o as Ce,g as Se,h as Z,P as f,t as K,j as Oe,k as oe,l as N,m as we,n as I}from"./index-c0ea9eee.js";import{S as Ae,A as Pe}from"./index-84bc77be.js";import{S as ie,a as ke,R as q,L as ee,D as Ne,M as O}from"./index-97c28cb7.js";import"./useFlexGapSupport-20a12060.js";import"./useSize-7089b0c3.js";var Be=function(e){return!isNaN(parseFloat(e))&&isFinite(e)};const Fe=Be;var _=function(){return{prefixCls:String,hasSider:{type:Boolean,default:void 0},tagName:String}};function B(n){var e=n.suffixCls,a=n.tagName,r=n.name;return function(s){var v=b({compatConfig:{MODE:3},name:r,props:_(),setup:function(C,g){var l=g.slots,u=T(e,C),d=u.prefixCls;return function(){var F=k(k({},C),{},{prefixCls:d.value,tagName:a});return t(s,F,l)}}});return v}}var R=b({compatConfig:{MODE:3},props:_(),setup:function(e,a){var r=a.slots;return function(){return t(e.tagName,{class:e.prefixCls},r)}}}),je=b({compatConfig:{MODE:3},props:_(),setup:function(e,a){var r=a.slots,s=T("",e),v=s.direction,m=P([]),C={addSider:function(u){m.value=[].concat(xe(m.value),[u])},removeSider:function(u){m.value=m.value.filter(function(d){return d!==u})}};re(ie,C);var g=he(function(){var l,u=e.prefixCls,d=e.hasSider;return l={},y(l,"".concat(u),!0),y(l,"".concat(u,"-has-sider"),typeof d=="boolean"?d:m.value.length>0),y(l,"".concat(u,"-rtl"),v.value==="rtl"),l});return function(){var l=e.tagName;return t(l,{class:g.value},r)}}}),Le=B({suffixCls:"layout",tagName:"section",name:"ALayout"})(je),z=B({suffixCls:"layout-header",tagName:"header",name:"ALayoutHeader"})(R),$=B({suffixCls:"layout-footer",tagName:"footer",name:"ALayoutFooter"})(R),E=B({suffixCls:"layout-content",tagName:"main",name:"ALayoutContent"})(R);const H=Le;var Me={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",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:"bars",theme:"outlined"};const ze=Me;function te(n){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(a).filter(function(s){return Object.getOwnPropertyDescriptor(a,s).enumerable}))),r.forEach(function(s){$e(n,s,a[s])})}return n}function $e(n,e,a){return e in n?Object.defineProperty(n,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[e]=a,n}var U=function(e,a){var r=te({},e,a.attrs);return t(le,te({},r,{icon:ze}),null)};U.displayName="BarsOutlined";U.inheritAttrs=!1;const Ee=U;var ne={xs:"479.98px",sm:"575.98px",md:"767.98px",lg:"991.98px",xl:"1199.98px",xxl:"1599.98px",xxxl:"1999.98px"},He=function(){return{prefixCls:String,collapsible:{type:Boolean,default:void 0},collapsed:{type:Boolean,default:void 0},defaultCollapsed:{type:Boolean,default:void 0},reverseArrow:{type:Boolean,default:void 0},zeroWidthTriggerStyle:{type:Object,default:void 0},trigger:f.any,width:f.oneOfType([f.number,f.string]),collapsedWidth:f.oneOfType([f.number,f.string]),breakpoint:f.oneOf(K("xs","sm","md","lg","xl","xxl","xxxl")),theme:f.oneOf(K("light","dark")).def("dark"),onBreakpoint:Function,onCollapse:Function}},De=function(){var n=0;return function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";return n+=1,"".concat(e).concat(n)}}();const D=b({compatConfig:{MODE:3},name:"ALayoutSider",inheritAttrs:!1,props:ye(He(),{collapsible:!1,defaultCollapsed:!1,reverseArrow:!1,width:200,collapsedWidth:80}),emits:["breakpoint","update:collapsed","collapse"],setup:function(e,a){var r=a.emit,s=a.attrs,v=a.slots,m=T("layout-sider",e),C=m.prefixCls,g=be(ie,void 0),l=P(!!(e.collapsed!==void 0?e.collapsed:e.defaultCollapsed)),u=P(!1);Y(function(){return e.collapsed},function(){l.value=!!e.collapsed}),re(ke,l);var d=function(i,h){e.collapsed===void 0&&(l.value=i),r("update:collapsed",i),r("collapse",i,h)},F=P(function(o){u.value=o.matches,r("breakpoint",o.matches),l.value!==o.matches&&d(o.matches,"responsive")}),p;function x(o){return F.value(o)}var G=De("ant-sider-");g&&g.addSider(G),Ce(function(){Y(function(){return e.breakpoint},function(){try{var o;(o=p)===null||o===void 0||o.removeEventListener("change",x)}catch{var i;(i=p)===null||i===void 0||i.removeListener(x)}if(typeof window<"u"){var h=window,c=h.matchMedia;if(c&&e.breakpoint&&e.breakpoint in ne){p=c("(max-width: ".concat(ne[e.breakpoint],")"));try{p.addEventListener("change",x)}catch{p.addListener(x)}x(p)}}},{immediate:!0})}),Se(function(){try{var o;(o=p)===null||o===void 0||o.removeEventListener("change",x)}catch{var i;(i=p)===null||i===void 0||i.removeListener(x)}g&&g.removeSider(G)});var J=function(){d(!l.value,"clickTrigger")};return function(){var o,i,h,c=C.value,w=e.collapsedWidth,se=e.width,j=e.reverseArrow,ue=e.zeroWidthTriggerStyle,Q=e.trigger,A=Q===void 0?(o=v.trigger)===null||o===void 0?void 0:o.call(v):Q,X=e.collapsible,ce=e.theme,L=l.value?w:se,S=Fe(L)?"".concat(L,"px"):String(L),M=parseFloat(String(w||0))===0?t("span",{onClick:J,class:Z("".concat(c,"-zero-width-trigger"),"".concat(c,"-zero-width-trigger-").concat(j?"right":"left")),style:ue},[A||t(Ee,null,null)]):null,de={expanded:j?t(q,null,null):t(ee,null,null),collapsed:j?t(ee,null,null):t(q,null,null)},fe=l.value?"collapsed":"expanded",ve=de[fe],me=A!==null?M||t("div",{class:"".concat(c,"-trigger"),onClick:J,style:{width:S}},[A||ve]):null,ge=[s.style,{flex:"0 0 ".concat(S),maxWidth:S,minWidth:S,width:S}],pe=Z(c,"".concat(c,"-").concat(ce),(i={},y(i,"".concat(c,"-collapsed"),!!l.value),y(i,"".concat(c,"-has-trigger"),X&&A!==null&&!M),y(i,"".concat(c,"-below"),!!u.value),y(i,"".concat(c,"-zero-width"),parseFloat(S)===0),i),s.class);return t("aside",k(k({},s),{},{class:pe,style:ge}),[t("div",{class:"".concat(c,"-children")},[(h=v.default)===null||h===void 0?void 0:h.call(v)]),X||u.value&&M?me:null])}}}),W=Oe(H,{Header:z,Footer:$,Content:E,Sider:D,install:function(e){return e.component(H.name,H),e.component(z.name,z),e.component($.name,$),e.component(D.name,D),e.component(E.name,E),e}});var Ie={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M858.5 763.6a374 374 0 00-80.6-119.5 375.63 375.63 0 00-119.5-80.6c-.4-.2-.8-.3-1.2-.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-.4.2-.8.3-1.2.5-44.8 18.9-85 46-119.5 80.6a375.63 375.63 0 00-80.6 119.5A371.7 371.7 0 00136 901.8a8 8 0 008 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c.1 4.4 3.6 7.8 8 7.8h60a8 8 0 008-8.2c-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z"}}]},name:"user",theme:"outlined"};const We=Ie;function ae(n){for(var e=1;e<arguments.length;e++){var a=arguments[e]!=null?Object(arguments[e]):{},r=Object.keys(a);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(a).filter(function(s){return Object.getOwnPropertyDescriptor(a,s).enumerable}))),r.forEach(function(s){Te(n,s,a[s])})}return n}function Te(n,e,a){return e in n?Object.defineProperty(n,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[e]=a,n}var V=function(e,a){var r=ae({},e,a.attrs);return t(le,ae({},r,{icon:We}),null)};V.displayName="UserOutlined";V.inheritAttrs=!1;const _e=V,Re=b(()=>{const n=oe(),e=a=>{switch(a.key){case"logout":n.logout();break}};return()=>t("div",{class:"h-1/1 flex justify-between items-center text-light-50"},[t("div",{class:"text-20px flex-1"},[t("span",null,[N("核辐射卫生应急虚拟仿真训练--后台管理")])]),t(Ae,{size:20},{default:()=>[t(Ne,{overlay:t(O,{onClick:e},{default:()=>[t(O.Item,{key:"logout"},{default:()=>[N("退出登录")]})]})},{default:()=>{var a;return[t("div",{class:"flex items-center"},[t(Pe,{icon:t(_e,null,null)},null),t("span",{class:"ml-10px leading-normal"},[(a=n.userInfo)==null?void 0:a.loginName])])]}})]})])});const Ue=b({setup(){const n=we(),e=oe();return()=>t("div",{class:Ve},[t(O,{mode:"inline",inlineIndent:12,selectedKeys:[n.currentRoute.value.path]},{default:()=>[e.isAdmin?t(O.Item,{key:"/users"},{default:()=>[t(I("router-link"),{to:"/users"},{default:()=>[N("用户管理")]})]}):t(O.Item,{key:"/examhistory"},{default:()=>[t(I("router-link"),{to:"/examhistory"},{default:()=>[N("考核历史")]})]})]})])}}),Ve="mlgg4eb";const{Header:Ge,Content:Je,Sider:Qe}=W,nt=b(()=>()=>t(W,{class:Xe},{default:()=>[t(Ge,null,{default:()=>[t(Re,null,null)]}),t(W,null,{default:()=>[t(Qe,{class:Ye},{default:()=>[t(Ue,null,null)]}),t(Je,{class:"page_content"},{default:()=>[t(I("router-view"),null,null)]})]})]})),Xe="pq3nqh9",Ye="sr2c0hp";export{nt as default};
|