(window.webpackJsonp=window.webpackJsonp||[]).push([[127],{EtUn:function(g,E,a){"use strict";a.r(E);var P=a("tJVT"),b=a("PpiC"),j=a("lUTK"),f=a("BvKs"),p=a("q1tI"),t=a.n(p),D=a("xJ1k"),s=a.n(D),O=a("9kvl"),S=a("55Ip"),k=f.a.SubMenu,C=function(r){var c,M=r.user,w=r.globalSetting,I=r.exam,_=Object(b.a)(r,["user","globalSetting","exam"]),B=t.a.useState([]),K=Object(P.a)(B,2),v=K[0],u=K[1],T=t.a.useState([]),R=Object(P.a)(T,2),L=R[0],A=R[1],N=I.showMenu;Object(p.useEffect)(function(){var n;(_==null||((n=_.location)===null||n===void 0)?void 0:n.pathname)==="/exam"&&O.c.replace("/exam/studentManagement")},[]),Object(p.useEffect)(function(){var n=U(),e=n.filterOpenKeys,o=n.filterSelectedKeys;console.log(U()),u(e),A(o)},[_==null||((c=_.location)===null||c===void 0)?void 0:c.pathname]);var l=[{title:"\u7528\u6237\u7BA1\u7406",key:"1",icon:t.a.createElement("i",{className:"iconfont icon-yonghuguanli"}),children:[{title:"\u5B66\u751F\u7BA1\u7406",key:"/exam/studentManagement"},{title:"\u6559\u5E08\u7BA1\u7406",key:"/exam/teacherManagement"}]},{title:"\u79D1\u76EE\u7BA1\u7406",key:"2",icon:t.a.createElement("i",{className:"iconfont icon-kemuguanli"}),children:[{title:"\u79D1\u76EE\u7BA1\u7406",key:"/exam/subjectManagement"},{title:"\u77E5\u8BC6\u70B9\u7BA1\u7406",key:"/exam/knowledgeManagement"}]},{title:"\u8BD5\u9898\u7BA1\u7406",key:"3",icon:t.a.createElement("i",{className:"iconfont icon-shitiguanli"}),children:[{title:"\u8BD5\u9898\u7BA1\u7406",key:"/exam/questionManagement"},{title:"\u8BD5\u9898\u7EDF\u8BA1",key:"/exam/questionStatistics"}]},{title:"\u8BD5\u5377\u7BA1\u7406",key:"4",icon:t.a.createElement("i",{className:"iconfont icon-shijuanguanli"}),children:[{title:"\u8BD5\u5377\u7BA1\u7406",key:"/exam/exerciseManagement"}]},{title:"\u8003\u8BD5\u7BA1\u7406",key:"5",icon:t.a.createElement("i",{className:"iconfont icon-kaoshiguanli"}),children:[{title:"\u8003\u8BD5\u53D1\u5E03\u7BA1\u7406",key:"/exam/examinationManagement"}]}],U=function(){for(var e,o=_==null||((e=_.location)===null||e===void 0)?void 0:e.pathname,y=[],h=[],i=0;i<l.length;i++){var x;if((x=l[i].children)===null||x===void 0?void 0:x.length){for(var d=0;d<l[i].children.length;d++)if(o.includes(l[i].children[d].key))return y=[l[i].key],h=[l[i].children[d].key],{filterOpenKeys:y,filterSelectedKeys:h}}}return{filterOpenKeys:y,filterSelectedKeys:h}},W=function(e){if(console.log(v,e,44),v[0]===e[0]){if(e.length===2){u([e[1]]);return}u([]);return}u(e)};return t.a.createElement("div",{className:s.a.wrap},N&&t.a.createElement("div",{className:s.a.left},t.a.createElement(f.a,{mode:"inline",selectedKeys:L,openKeys:v,onOpenChange:W,inlineIndent:34,className:s.a.menu,expandIcon:function(e){return e.isOpen?t.a.createElement("span",{className:"icon-shouqi custom-icon"}):t.a.createElement("span",{className:"icon-xiala2 custom-icon"})}},l.map(function(n){var e;return t.a.createElement(k,{key:n.key,icon:n.icon,title:n.title},n.children&&((e=n.children)===null||e===void 0?void 0:e.map(function(o){return t.a.createElement(f.a.Item,{key:o.key},t.a.createElement(S.Link,{to:o.key},o.title))})))}))),t.a.createElement("div",{className:s.a.right},_.children))};E.default=Object(O.a)(function(m){var r=m.globalSetting,c=m.user,M=m.exam;return{user:c,globalSetting:r,exam:M}})(C)},xJ1k:function(g,E,a){g.exports={flex_box_center:"flex_box_center___ymkLj",flex_space_between:"flex_space_between___3uBu8",flex_box_vertical_center:"flex_box_vertical_center___m2El3",flex_box_center_end:"flex_box_center_end___2RCrk",flex_box_column:"flex_box_column___2VvBq",wrap:"wrap___25-2X",left:"left___F9fEn",menu:"menu___1E1Fo",right:"right___1cCpq"}}}]);
