"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[14599,71212,79462,50194],{78988:function(e,n,t){function a(e){var n=!0;if(e.length>0){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:"",t=[],a=0;a0,r=null==e?void 0:e.group_id;return{title:(0,g.jsx)("div",{title:null==e?void 0:e.name,className:x,children:null==e?void 0:e.name}),value:r,key:r,icon:(0,g.jsx)("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:a?null==t?void 0:t.map((function(e){return n(e)})):[]}}return null==e?void 0:e.map((function(e){return n(e)}))},E=a?{defaultExpandedKeys:[0],defaultSelectedKeys:[0]}:{selectedKeys:n,defaultExpandedKeys:n};return(0,g.jsx)("div",{className:v,children:(0,g.jsx)(m.Z,r()(r()({},E),{},{showIcon:!0,treeData:_,onSelect:t,disabled:i},c),k)})}},4050:function(e,n,t){t.d(n,{Z:function(){return p}});var a=t(79800),r=t.n(a),i=t(78241),s=t(10249),c=t(3113),o=t(59301),l={search:"search___JA0r9",btn:"btn___GGtZC"},u=t(89392),d=t(37712),p=function(e){var n=e.value,t=e.onChange,a=i.Z.useForm(),p=r()(a,1)[0];(0,o.useEffect)((function(){n&&p.setFieldsValue(n)}),n);var f=(0,o.useRef)((0,u.throttle)((function(e){return t(e)}),2e3,{leading:!0,trailing:!1},1500)).current;return(0,d.jsx)("div",{className:l.search,children:(0,d.jsxs)(i.Z,{className:l.formWrap,colon:!1,form:p,size:"large",layout:"inline",onFinish:f,children:[(0,d.jsx)(i.Z.Item,{label:"实训信息",name:"keyword",initialValue:"",children:(0,d.jsx)(s.Z,{style:{width:280,height:40}})}),(0,d.jsx)(i.Z.Item,{label:"学校/单位",name:"schools",initialValue:"",style:{margin:"0 40px"},children:(0,d.jsx)(s.Z,{style:{width:280,height:40}})}),(0,d.jsx)(i.Z.Item,{label:"创建者/合作者",name:"creator",initialValue:"",children:(0,d.jsx)(s.Z,{style:{width:200,height:40}})}),(0,d.jsx)(c.ZP,{className:l.btn,type:"primary",htmlType:"submit",children:"搜索"})]})})}},28416:function(e,n,t){t.d(n,{S:function(){return k}});var a=t(79800),r=t.n(a),i=t(59301),s=t(20834),c=t(38854),o="main___A2KB0",l="wrap___PrMse",u="content___pEqhq",d="programName___h8PAJ",p="name___oxG0a",f="directionContentWrap____Ymcj",m="directionItem___uCMBX",h="active___vOl0l",v="subActive___WzT87",x="subItem___nVuXN",g="subMenu___DqKGV",A="action___O7v85",_=t(37712),y=[{name:"编程题",value:"PROGRAM"},{name:"单选题",value:"SINGLE"},{name:"多选题",value:"MULTIPLE"},{name:"判断题",value:"JUDGMENT"},{name:"填空题",value:"COMPLETION"},{name:"简答题",value:"SUBJECTIVE"},{name:"组合题",value:"COMBINATION"},{name:"程序填空题",value:"BPROGRAM"}],b=[{name:"简单",value:1},{name:"适中",value:2},{name:"困难",value:3}],j=[{name:"随机组卷",value:1},{name:"人工组卷",value:2}],k=function(e){e.showSelectAll;var n=e.disciplinesData,t=void 0===n?[]:n,a=e.knowledgeData,k=void 0===a?[]:a,N=e.directionValue,w=e.subDisciplineValue,C=e.typeValue,E=e.knowledgeValue,I=e.showKnowledge,Z=void 0!==I&&I,S=e.showRandomType,B=void 0!==S&&S,T=e.difficultyValue,P=e.randomValue,R=(e.selectAll,e.languagesvalue,e.className),Q=(e.languages,e.isprogram_homework),O=e.showShixun,L=void 0!==O&&O,M=e.showItemType,V=void 0===M||M,D=e.onShixunChange,F=void 0===D?function(){}:D,W=e.onDirectionChange,q=void 0===W?function(){}:W,X=e.onTypeChange,z=void 0===X?function(){}:X,H=e.onDifficultyChange,G=void 0===H?function(){}:H,Y=(e.handlelanguagesChange,e.onKnowledgeChange),U=void 0===Y?function(){}:Y,K=e.onRandomChange,J=void 0===K?function(){}:K,$=e.showTeachGroup,ee=void 0!==$&&$,ne=e.teachGroupData,te=void 0===ne?[]:ne,ae=e.onTeachGroupChange,re=void 0===ae?function(){}:ae,ie=e.teachGroupValue,se=(0,i.useState)(0),ce=r()(se,2),oe=ce[0],le=ce[1],ue=(0,i.useRef)(null),de=(0,i.useState)(0),pe=r()(de,2),fe=pe[0],me=pe[1],he=(0,i.useRef)(null);(0,i.useEffect)((function(){var e;0!==t.length&&((null==ue||null===(e=ue.current)||void 0===e?void 0:e.clientHeight)>108?le(1):le(0));0===t.length&&le(0)}),[t]),(0,i.useEffect)((function(){var e;0!==k.length&&((null==he||null===(e=he.current)||void 0===e?void 0:e.clientHeight)>108?me(1):me(0));0===k.length&&me(0)}),[k]);var ve=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;return(0,_.jsx)(s.Z,{className:g,children:e.map((function(e){return(0,_.jsx)(s.Z.Item,{children:(0,_.jsx)("a",{className:"".concat(x," ").concat(w===e.id?v:""),onClick:function(){return q(n,e.id)},children:e.name})},e.id)}))})};return(0,_.jsx)("aside",{className:R?"".concat(o," ").concat(R):o,children:(0,_.jsxs)("div",{className:l,children:[Q&&(0,_.jsx)("div",{className:d,children:"试题库-编程题"}),ee&&(0,_.jsxs)("div",{className:u,children:[(0,_.jsx)("span",{className:p,children:"团队"}),(0,_.jsxs)("div",{className:f,children:[(0,_.jsx)("li",{className:"".concat(m," ").concat(ie?"":h," "),onClick:function(){return re(null)},children:"全部"}),null==te?void 0:te.map((function(e){return(0,_.jsx)("li",{className:"".concat(m," ").concat(ie===e.group_id?h:""," "),onClick:function(){return re(e.group_id)},children:e.name},e.group_id)}))]})]}),(0,_.jsxs)("div",{className:u,children:[(0,_.jsx)("span",{className:p,children:"方向"}),(0,_.jsx)("span",{}),(0,_.jsxs)("div",{className:f,style:{overflow:"hidden",height:1===oe?88:"auto"},children:[(0,_.jsx)("li",{className:"".concat(m," ").concat(N?"":h," "),onClick:function(){return q(null)},children:"全部"}),t.map((function(e){var n;return(0,_.jsx)(i.Fragment,{children:(null===(n=e.sub_disciplines)||void 0===n?void 0:n.length)>0?(0,_.jsx)(c.Z,{placement:"bottomLeft",overlayStyle:{width:600},getPopupContainer:function(e){return e.parentNode},dropdownRender:function(){return ve(e.sub_disciplines,e.id)},children:(0,_.jsx)("li",{className:"".concat(m," ").concat(N===e.id?h:""," "),onClick:function(){return q(e.id)},children:e.name})}):(0,_.jsx)("li",{className:"".concat(m," ").concat(N===e.id?h:""," "),onClick:function(){return q(e.id)},children:e.name})},e.id)}))]}),(0,_.jsx)("div",{className:f,ref:ue,style:{height:"auto",position:"fixed",left:0,top:0,width:1024,visibility:"hidden"},children:t.map((function(e){var n;return(0,_.jsx)(i.Fragment,{children:(null===(n=e.sub_disciplines)||void 0===n?void 0:n.length)>0?(0,_.jsx)(c.Z,{placement:"bottomLeft",overlayStyle:{width:600},getPopupContainer:function(e){return e.parentNode},dropdownRender:function(){return ve(e.sub_disciplines,e.id)},children:(0,_.jsx)("li",{className:"".concat(m," ").concat(N===e.id?h:""," "),onClick:function(){return q(e.id)},children:e.name})}):(0,_.jsx)("li",{className:"".concat(m," ").concat(N===e.id?h:""," "),onClick:function(){return q(e.id)},children:e.name})},e.id)}))}),!!oe&&(0,_.jsxs)("div",{className:A,children:[1===oe&&(0,_.jsxs)("span",{onClick:function(){return le(2)},children:["展开",(0,_.jsx)("i",{className:"iconfont icon-xiala"})]}),2===oe&&(0,_.jsxs)("span",{onClick:function(){return le(1)},children:["收起",(0,_.jsx)("i",{style:{transform:"scale(0.5) rotate(180deg) translateY(2px)"},className:"iconfont icon-xiala"})]})]})]}),Z&&(0,_.jsxs)("div",{className:u,children:[(0,_.jsx)("span",{className:p,children:"知识点"}),(0,_.jsxs)("div",{className:f,style:{overflow:"hidden",height:1===fe?94:"auto"},children:[(0,_.jsx)("li",{className:"".concat(m," ").concat(-1===E?h:""," "),onClick:function(){return U(-1)},children:"全部"}),k.map((function(e){return(0,_.jsx)("li",{className:"".concat(m," ").concat(E===e.id?h:""," "),onClick:function(){return U(e.id)},children:e.name},e.id)}))]}),(0,_.jsx)("div",{ref:he,className:f,style:{height:"auto",position:"fixed",left:0,top:0,width:1010,visibility:"hidden"},children:k.map((function(e){return(0,_.jsx)("li",{className:"".concat(m," ").concat(E===e.id?h:""," "),onClick:function(){return U(e.id)},children:e.name},e.id)}))}),!!fe&&(0,_.jsxs)("div",{className:A,children:[1===fe&&(0,_.jsxs)("span",{onClick:function(){return me(2)},children:["展开",(0,_.jsx)("i",{className:"iconfont icon-xiala"})]}),2===fe&&(0,_.jsxs)("span",{onClick:function(){return me(1)},children:["收起",(0,_.jsx)("i",{style:{transform:"scale(0.5) rotate(180deg) translateY(2px)"},className:"iconfont icon-xiala"})]})]})]}),V&&!Q&&(0,_.jsxs)("div",{className:u,children:[(0,_.jsx)("span",{className:p,children:"题型"}),(0,_.jsx)("li",{className:"".concat(m," ").concat(C?"":h," "),onClick:function(){return z(null)},children:"全部"}),(0,_.jsxs)("div",{className:f,children:[y.map((function(e){return(0,_.jsx)("li",{className:"".concat(m," ").concat(C===e.value?h:""," "),onClick:function(){return z(e.value)},children:e.name},e.name)})),L&&(0,_.jsx)("li",{className:m,onClick:function(){return F()},children:"实训题"},"实训题")]})]}),(0,_.jsxs)("div",{className:u,children:[(0,_.jsx)("span",{className:p,children:"难度"}),(0,_.jsx)("li",{className:"".concat(m," ").concat(T?"":h," "),onClick:function(){return G(null)},children:"全部"}),(0,_.jsx)("div",{className:f,children:b.map((function(e){return(0,_.jsx)("li",{className:"".concat(m," ").concat(T===e.value?h:""," "),onClick:function(){return G(e.value)},children:e.name},e.name)}))})]}),B&&(0,_.jsxs)("div",{className:u,children:[(0,_.jsx)("span",{className:p,children:"类型"}),(0,_.jsx)("li",{className:"".concat(m," ").concat(P?"":h," "),onClick:function(){return J(null)},children:"全部"}),(0,_.jsx)("div",{className:f,children:j.map((function(e){return(0,_.jsx)("li",{className:"".concat(m," ").concat(P===e.value?h:""," "),onClick:function(){return J(e.value)},children:e.name},e.name)}))})]})]})})}},32831:function(e,n,t){t.d(n,{Z:function(){return b}});var a=t(82242),r=t.n(a),i=t(7557),s=t.n(i),c=t(41498),o=t.n(c),l=t(79800),u=t.n(l),d=t(59301),p={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},f=t(3113),m=t(70557),h=t(63631),v=t(6848),x=t(83287),g=t(94280),A=t(13767),_=t(91689),y=t(37712),b=function(e){var n,t,a,i,c,l,b,j=e.editOffice,k=void 0===j?"view":j,N=e.data,w=(e.theme,e.type),C=e.filename,E=e.monacoEditor,I=e.className,Z=e.style,S=e.close,B=e.onClose,T=e.hasMask,P=e.disabledDownload,R=e.onImgDimensions,Q=e.showNodata,O=(0,d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),L=u()(O,2),M=(L[0],L[1],(0,d.useState)("")),V=u()(M,2),D=(V[0],V[1]),F=(0,d.useState)(),W=u()(F,2),q=W[0],X=W[1],z="build"===window.ENV?"/react/build":"",H=location.host.startsWith("localhost")?_.Z.PROXY_SERVER:_.Z.API_SERVER,G=(0,d.useRef)();null!==(n=N)&&void 0!==n&&n.startsWith("/api")&&"txt"!==w&&(N=_.Z.API_SERVER+N),C&&(E.filename=C),(0,d.useEffect)((function(){var e,n=null===(e=document.cookie)||void 0===e||null===(e=e.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==n||n.map((function(e){var n=e.split("=");"_educoder_session"===n[0]&&D(n[1])}))}),[]),(0,d.useEffect)((function(){"office"===w&&Y()}),[w,N]);var Y=function(){var e=o()(s()().mark((function e(){var n,t,a;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=N,N.startsWith("http")||(n=location.origin+n),t=new URL(n).pathname.split("/").pop(),e.next=5,(0,g.gJ)({attachment_id:t});case 5:a=e.sent,X(a);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),U=function(){K()},K=function(){(0,x.Nd)(C||"educoder",decodeURIComponent(N))};return(0,y.jsxs)("div",{style:r()({},Z||{}),className:"".concat(T&&p.bgBlack," ").concat(w?p.wrp:"hide"),children:[S&&(0,y.jsxs)("div",{className:p.close,ref:G,children:[!!R&&(0,y.jsx)(v.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return G.current},children:(0,y.jsx)("span",{onClick:function(){B(),R()},children:(0,y.jsx)("i",{className:"icon-yulanpizhu"})})}),!P&&(0,y.jsx)(v.Z,{title:"点击下载此文件",getPopupContainer:function(){return G.current},children:(0,y.jsx)("span",{onClick:K,children:(0,y.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,y.jsx)(v.Z,{title:"关闭",getPopupContainer:function(){return G.current},children:(0,y.jsx)("span",{className:"",onClick:B,children:(0,y.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,y.jsx)("div",{className:"".concat(p[I]," ").concat(I," ").concat(p.monaco," ").concat("txt"===w?"show":"hide"),children:"txt"===w&&(0,y.jsx)(h.ZP,r()({},E))}),"audio"===w&&(0,y.jsx)("audio",{src:(null===(t=N)||void 0===t?void 0:t.indexOf("http"))>-1||null!==(a=N)&&void 0!==a&&a.startsWith("/api")?N:"data:image/png;base64,".concat(N),autoPlay:!0}),"video"===w&&(0,y.jsx)(y.Fragment,{children:(null===(i=N)||void 0===i?void 0:i.indexOf("http"))>-1||null!==(c=N)&&void 0!==c&&c.startsWith("/api")?(0,y.jsx)("video",{controls:!0,src:"".concat(N),autoPlay:!0}):(0,y.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(N),autoPlay:!0})}),"office"===w&&q&&(0,y.jsx)("iframe",{src:"".concat(z,"/office.html?key=").concat(q.key,"&url=").concat(H+q.url,"&callbackUrl=").concat(H+q.callbackUrl,"&fileType=").concat(q.fileType,"&title=").concat(q.title,"&model=").concat(k,"&officeServer=").concat(_.Z.ONLYOFFICE,"&disabledDownload=").concat(!!P)}),"html"===w&&(0,y.jsx)("iframe",{src:N+"&disposition=inline"}),"pdf"===w&&(0,y.jsx)("iframe",{src:"".concat(z,"/js/pdfview/index.html?url=").concat(N,"&disabledDownload=").concat(!!P)}),"image"===w&&(0,y.jsx)("img",{src:(null===(l=N)||void 0===l?void 0:l.indexOf("http"))>-1||null!==(b=N)&&void 0!==b&&b.startsWith("/api")?N:"data:image/png;base64,".concat(N)}),("other"===w||"download"===w)&&(0,y.jsx)(y.Fragment,{children:Q?(0,y.jsx)(A.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,y.jsx)(f.ZP,{icon:(0,y.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:U,children:"下载"})}):(0,y.jsxs)(f.ZP,{type:"primary",size:"middle",onClick:U,children:[(0,y.jsx)(m.Z,{}),"点击下载"]})})]})}},71212:function(e,n,t){t.d(n,{Z:function(){return W}});var a=t(82242),r=t.n(a),i=t(37205),s=t.n(i),c=t(91232),o=t.n(c),l=t(79800),u=t.n(l),d=t(59301),p=(t(88831),t(32834)),f=t.n(p),m=t(11690);var h=[],v=["