You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Classrooms__New__index.a...

1 line
34 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(self.webpackChunk=self.webpackChunk||[]).push([[1702],{74516:function(e,t,o){"use strict";o.d(t,{Z:function(){return i}});var n=o(4751),s=o(59301),l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0048.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2z"}}]},name:"arrow-down",theme:"outlined"},a=o(68475),r=function(e,t){return s.createElement(a.Z,(0,n.Z)({},e,{ref:t,icon:l}))};var i=s.forwardRef(r)},90921:function(e,t,o){"use strict";var n=o(82242),s=o.n(n),l=(o(59301),o(93314)),a=o(3113),r=o(37712);t.Z=function(e){var t=e.img,o=e.buttonProps,n=void 0===o?{}:o,i=e.styles,c=void 0===i?{}:i,d=e.customText,u=e.ButtonText,p=e.ButtonClick,m=e.Buttonclass,f=e.ButtonTwo,h=e.imgStyles,x=e.loading,v=void 0!==x&&x;return(0,r.jsxs)("section",{className:"tc animated fadeIn",style:s()(s()({},{color:"#999",margin:"100px auto",visibility:v?"hidden":"visible"}),c),children:[(0,r.jsx)("img",{src:t||l,style:s()(s()({},h),{},{pointerEvents:"none",userSelect:"none"})}),(0,r.jsx)("p",{className:"mt20 font14",children:d||"暂时还没有相关数据哦!"}),u&&(0,r.jsx)(a.ZP,s()(s()({className:m,onClick:p},n),{},{children:u})),f&&f]})}},59472:function(e,t,o){"use strict";o.d(t,{Z:function(){return w}});var n=o(82242),s=o.n(n),l=o(7557),a=o.n(l),r=o(41498),i=o.n(r),c=o(79800),d=o.n(c),u=o(59301),p={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},m=o(3113),f=o(74516),h=o(17968),x=o(6848),v=o(26795),_=o(44239),y=o(90921),g=o(17985),j=o(13405),b=o(37712),w=function(e){var t,o,n,l,r,c,w=e.editOffice,C=void 0===w?"view":w,k=e.data,N=(e.theme,e.type),Z=e.filename,A=e.monacoEditor,S=e.className,P=e.style,E=e.close,O=e.onClose,I=e.hasMask,D=e.disabledDownload,R=e.onImgDimensions,T=e.showNodata,Y=e.recordInfo,F=(0,u.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),V=d()(F,2),B=(V[0],V[1],(0,u.useState)("")),U=d()(B,2),W=(U[0],U[1]),M=(0,u.useState)(),H=d()(M,2),L=H[0],J=H[1],q="build"===window.ENV?"/react/build":"",Q=location.host.startsWith("localhost")?g.Z.PROXY_SERVER:g.Z.API_SERVER,G=(0,u.useRef)();null!==(t=k)&&void 0!==t&&t.startsWith("/api")&&"txt"!==N&&(k=g.Z.API_SERVER+k);Z&&(A.filename=Z),(0,u.useEffect)((function(){var e,t=null===(e=document.cookie)||void 0===e||null===(e=e.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==t||t.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&W(t[1])}))}),[]),(0,u.useEffect)((function(){var e;"office"===N&&(k.indexOf("bigfilescdn.")>-1||k.indexOf("bigfiles1")>-1?J({url:k,fileType:(e=k,e.substring(e.lastIndexOf("/")+1).split(".").pop()),model:k.indexOf("model=edit")?"edit":"view"}):z())}),[N,k]);var z=function(){var e=i()(a()().mark((function e(){var t,o,n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",k),t=k,k.startsWith("http")||(t=location.origin+t),o=new URL(t).pathname.split("/").pop(),e.next=6,(0,_.gJ)({attachment_id:o});case 6:(n=e.sent).url=Q+n.url,J(n);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),K=function(){k.startsWith("http")||k.startsWith("blob:")?X():(0,v.Sv)(Z||"educoder",k,Z)},X=function(){Y&&(0,j.fc)({id:null==Y?void 0:Y.id,watch_type:1,course_id:null==Y?void 0:Y.course_id}),(0,v.Nd)(Z||"educoder",decodeURIComponent(k))};return(0,b.jsxs)("div",{style:s()({},P||{}),className:"".concat(I&&p.bgBlack," ").concat(N?p.wrp:"hide"),children:[E&&(0,b.jsxs)("div",{className:p.close,ref:G,children:[!!R&&(0,b.jsx)(x.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return G.current},children:(0,b.jsx)("span",{onClick:function(){O(),R()},children:(0,b.jsx)("i",{className:"icon-yulanpizhu"})})}),!D&&(0,b.jsx)(x.Z,{title:"点击下载此文件",getPopupContainer:function(){return G.current},children:(0,b.jsx)("span",{onClick:X,children:(0,b.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,b.jsx)(x.Z,{title:"关闭",getPopupContainer:function(){return G.current},children:(0,b.jsx)("span",{className:"",onClick:O,children:(0,b.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,b.jsx)("div",{className:"".concat(p[S]," ").concat(S," ").concat(p.monaco," ").concat("txt"===N?"show":"hide"),children:"txt"===N&&(0,b.jsx)(b.Fragment,{children:(0,b.jsx)(h.ZP,s()({},A))})}),"audio"===N&&(0,b.jsx)("audio",{src:"".concat((null===(o=k)||void 0===o?void 0:o.indexOf("http://"))>-1||(null===(n=k)||void 0===n?void 0:n.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(k),autoPlay:!0}),"video"===N&&(0,b.jsx)(b.Fragment,{children:(null===(l=k)||void 0===l?void 0:l.indexOf("http"))>-1?(0,b.jsx)("video",{controls:!0,src:"".concat(k),autoPlay:!0}):(0,b.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(k),autoPlay:!0})}),"office"===N&&L&&(0,b.jsx)("iframe",{src:"".concat(q,"/office.html?key=").concat(L.key,"&url=").concat(btoa(L.url),"&callbackUrl=").concat(Q+L.callbackUrl,"&fileType=").concat(L.fileType,"&title=").concat(L.title,"&model=").concat(C,"&officeServer=").concat(g.Z.ONLYOFFICE,"&disabledDownload=").concat(!!D)}),"html"===N&&(0,b.jsx)("iframe",{src:k+"&disposition=inline"}),"pdf"===N&&(0,b.jsx)("iframe",{src:"".concat(q,"/js/pdfview/index.html?url=").concat(encodeURIComponent(k),"&disabledDownload=").concat(!!D)}),"image"===N&&(0,b.jsx)("img",{src:"".concat((null===(r=k)||void 0===r?void 0:r.indexOf("http://"))>-1||(null===(c=k)||void 0===c?void 0:c.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(k)}),("other"===N||"download"===N)&&(0,b.jsx)(b.Fragment,{children:T?(0,b.jsx)(y.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,b.jsx)(m.ZP,{icon:(0,b.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:K,children:"下载"})}):(0,b.jsxs)(m.ZP,{type:"primary",size:"middle",onClick:K,children:[(0,b.jsx)(f.Z,{}),"点击下载"]})})]})}},77966:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return U}});var n=o(7557),s=o.n(n),l=o(82242),a=o.n(l),r=o(41498),i=o.n(r),c=o(79800),d=o.n(c),u=o(59301),p=o(65233),m=o(78241),f=o(8591),h=o(43418),x=o(3113),v=o(88522),_=o(98135),y=o(84291),g=o(24905),j=o(5112),b=o(46651),w=o(99232),C=o.n(w),k=o(10527),N=o(64994),Z=o(27786),A=o(71202),S={bg:"bg___scGBN",wrap:"wrap___h5b4S",middle:"middle___hq_IK",row:"row___EoLy1",title:"title___BQ3Sj",size:"size___Tag29",download:"download___ROULb",preview:"preview___JP69C",delete:"delete___JF6Ct",annotation:"annotation___DCmsV",crumbs:"crumbs___JJo3q",titleWrap:"titleWrap___Cnywx",flexRow:"flexRow___FVlte",flexJustifyCenter:"flexJustifyCenter___Q_2Lz",flexAlignCenter:"flexAlignCenter___d6nhw",flexColumn:"flexColumn___mCDIJ",fieldWrap:"fieldWrap___dOMry",checkUsersFromCode:"checkUsersFromCode___toyn5",courseField:"courseField___qQV_5",courseExample:"courseExample___IY_Tc",period:"period___vIGwk",credit:"credit___aOpp2",endTime:"endTime___E5PEn",width655:"width655___Zwxr5",color999:"color999___ZFcVB",colorCDCDCD:"colorCDCDCD___Cb3mH",color0152d9:"color0152d9___bDkNR",backgroundFa:"backgroundFa___lmMKC",bBtn:"bBtn____iNQx",schoolHintWrap:"schoolHintWrap___VeMJ3",w700:"w700___YWsgj",classromediv:"classromediv___Ee2n7",glow:"glow___uTEgy",modal:"modal___xWdwx",content:"content___b2kXV",box:"box___iMIt6"},P="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAf5JREFUOE+tVT1oE2EYft5LgqF3/lBqaWMTiE1ahYpLJpFCNydbFQUzZBDppkuJCJXSUUxpOwgOQkHFDqVNi4tVcHOsDiKGXNqhYi4ilUByPbQx98p3ckfIT5Ngbny/53m+5/353iPU+ZjZs61/n2DiCWaOAOT7B2ONiLaIaSOk9G0QUamaTtWBtKFdoTISDB6sd5kdI9AOuxAf7vKtV+IcQWaWMvvaQ2bEDxOqcURIhGXffSIyxZkjqOrZR+2KOW4JiSHl1D1HUKSJMifbcVaDddFVkT6JBmT0XKpZzZpdJmoaVvrPUqaYu27CXGlGaOVcgnSDVF17yczRVgg25knuHdb2trBwOopzst+hEtEypYvZNIChVgR/myVM767ibf4zJBCeDU/ivByopKqULmpFgBU7upn/hLlvrzETGMfo8TMO+EepgLs7L/DF0KC4vJgL3sSFY6EqH6TXCL76+REPdtfglTxYCt/GiDxgiQgxIeo/0o3HgzEEvSfrJGUJ1qY8+zWJ5N4HdLtlTPaPYTH7Br/MEiJHg5gPRnHC3dWoQmrdppRh4s72c7wvZBzitZ4Ipv2X4SZXw3JbTWk0NoZ5gFvqU6SMHKYGLiHWe7Fp36yxOWywhdP8HwM9bqdnjd3Zgy0QHX169pUdXQ7W6uz0+rKddmzBVlb7f34BfwEB2vw97tKWNAAAAABJRU5ErkJggg==",E="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAkNJREFUOE+tlUtLG1EUx/9nRidpCEm6EKGQiBYC3Wfjxp24EIwJNNHiA/EraMnSZWnUha4EQRRaTBet6MKVn8CqCGqpGskDIgqaBGPSPGZOmbHGPCaCNHd5Hr97Xvdcgs5h5tZCLDZIzIMMuIjojWrGzAkCfjLRhuRwbBBRsdadagWleNwjK0oQzG/1LivLiMKiIEy32O0/Ku3KQGYWCrHYJzBPPwuqC4mCksMRICJFVZWB+Wj084thj3CioKGj42MZqKUpy99fFFmNsSiKXjV9+teAX5U1Kx0doXh4iFdDQ4AoVrmWLi6Q39qCaWICZLE86YjCksPxjvLR6Hswf6v0Sk9OIr+zA4PbDev8fBlaOj9Hyu+HcnMD69ISDH191XES+agQiXxh4EOlpnhwgNToKDiTKUPleBxJnw/K9TWknh7YlpcBSaoCEvCV8pHIbwDO2voV9/aQGhsD399D6u2FfHwMOZGA1N0N28oKYDTqlfyUCtHoHTOb9bQadGQEnMtp6laXC7a1NZDJpNs/Iso8C1TTS7rdkC8vNYCxvx+WxUVAEBoDG6Ws3N4i6fdDPjuD2NkJ5eoKnM3C6PHAMjfXCHqq2xROp5EcHkbp5ASi04nXoRDkcPihpirU64VldrYO+tAUnbG5CwSQW19HS1cXbKEQhLY2LcXi7i5S4+Ma1LqwAMPAQP3Y6A32n+1tFDY3YZ6ZgdDeXuVU3N9HdnUV5qkpiHZ7/WCrkqY+vccrmrocVGjT19djpE1bsJWV/58v4C/igjuIQ13SqQAAAABJRU5ErkJggg==",O=o(56102),I=o(26795),D=o(33287),R=o(26063),T=o(17985),Y=o(59472),F=o(29831),V=o(37712),B=function(e){return e&&e<C()().endOf("day").subtract(1,"days")},U=(0,p.connect)((function(e){var t=e.user,o=e.newClassroom,n=e.loading,s=e.globalSetting,l=e.classroomList,a=e.shixunHomeworks;return{user:t,newClassroom:o,globalSetting:s,loading:n.effects,classroomList:l,shixunHomeworks:a}}))((function(e){var t,o,n,l,r,c,w,U,W,M,H=e.user,L=e.newClassroom,J=e.globalSetting,q=(e.classroomList,e.shixunHomeworks),Q=e.loading,G=e.dispatch,z=(0,p.useParams)(),K=(0,p.useSearchParams)(),X=d()(K,1)[0],$=m.Z.useForm(),ee=d()($,1)[0],te=(0,u.useState)({}),oe=d()(te,2),ne=oe[0],se=oe[1],le=(0,u.useState)(),ae=d()(le,2),re=ae[0],ie=ae[1],ce=(0,u.useState)({}),de=d()(ce,2),ue=de[0],pe=de[1],me=(0,u.useState)([]),fe=d()(me,2),he=fe[0],xe=fe[1],ve=(0,u.useState)(""),_e=d()(ve,2),ye=_e[0],ge=_e[1],je=(0,u.useState)(),be=d()(je,2),we=be[0],Ce=be[1],ke=(0,u.useState)(!1),Ne=d()(ke,2),Ze=(Ne[0],Ne[1],(0,u.useState)({content:"",type:""})),Ae=d()(Ze,2),Se=Ae[0],Pe=Ae[1],Ee=(0,u.useState)(!1),Oe=d()(Ee,2),Ie=Oe[0],De=Oe[1];(0,u.useEffect)((function(){if(!z.coursesId)return ie(!1),function(){Te.apply(this,arguments)}(),ee.setFieldsValue({set:0,is_show_conceal:!1}),void se({set:0,is_show_conceal:!1});ie(!0),Re()}),[z.coursesId]),(0,u.useEffect)((function(){if(he.user_school){var e=he.user_school;ee.setFieldsValue({school:e}),Ye(e)}}),[he]);var Re=function(){var e=i()(s()().mark((function e(){var t,o;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,A.EO)({coursesId:z.coursesId});case 2:null!=(t=e.sent)&&t.course_id&&(pe(a()({},t)||{}),o={course:t.course_list_name,classroom:t.name,period:t.class_period,credit:t.credit,allowed_quit:null==t?void 0:t.allowed_quit,endTime:t.end_date&&C()(t.end_date),publicClassroom:1===t.is_public,classModule:t.course_module_types,school:t.school,set:t.invite_code_halt,allow_copy:null==t?void 0:t.allow_copy,is_show_conceal:null==t?void 0:t.is_show_conceal,student_join_approve:null==t?void 0:t.student_join_approve,student_join_pro:null==t?void 0:t.student_join_pro},Ye(t.school),se(a()({},o)),Ce(null==t?void 0:t.student_attachment),ee.setFieldsValue(a()({},o)));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function Te(){return Te=i()(s()().mark((function e(){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Z.ZP)("/api/courses/new.json",{method:"get"});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(xe(t),ee.setFieldValue("classModule",null==t?void 0:t.course_module_types));case 4:case"end":return e.stop()}}),e)}))),Te.apply(this,arguments)}var Ye=function(e){G({type:"newClassroom/getSchoolList",payload:{search:e}})},Fe=function(e){Ye(e)},Ve=function(){X.get("username")?p.history.push("/users/".concat(X.get("username"),"/classrooms")):p.history.push(re?"/classrooms/".concat(z.coursesId):"/classrooms")},Be=function(){var e=i()(s()().mark((function e(t){var o,n,l,r,i,c,d,u,m,v,_,y,g,j,b,w,k,N,P,E,R,T,Y,F,B,U;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if((0,D.aN)()||!re){e.next=3;break}return f.ZP.info("课堂信息只有课堂管理员可以调整"),e.abrupt("return");case 3:if(n=(o=t||{}).course,l=o.credit,r=o.classroom,i=o.period,c=o.endTime,d=o.publicClassroom,u=o.classModule,m=o.school,v=o.set,_=void 0===v?0:v,y=o.allow_copy,g=o.allowed_quit,j=o.is_show_conceal,b=o.student_join_approve,w=void 0!==b&&b,k=o.student_join_pro,N=void 0!==k&&k,P=c&&C()(c).format("YYYY-MM-DD"),E={course_list_name:n,name:r,class_period:i,allowed_quit:g,credit:l,end_date:P,is_public:d?1:0,course_module_types:u,school:m,set:_,allow_copy:y,is_show_conceal:j,student_join_approve:w,student_join_pro:N},!re){e.next=17;break}return e.next=9,(0,A.fr)(a()(a()({},E),{coursesId:z.coursesId,student_attachment_id:null==we?void 0:we.id}));case 9:if(R=e.sent,0!==(null===(T=R)||void 0===T?void 0:T.status)){e.next=15;break}return e.next=13,(0,Z.ZP)("/api/courses/".concat(z.coursesId,"/left_banner.json"),{method:"get",params:{id:z.coursesId}});case 13:(Y=e.sent)&&p.history.push("".concat(null==Y||null===(F=Y.course_modules)||void 0===F?void 0:F[0].category_url));case 15:e.next=21;break;case 17:return e.next=19,G({type:"newClassroom/submitCourses",payload:E});case 19:-1!==(R=e.sent).status&&("0"===localStorage.getItem("Noviceguide")||G({type:"shixunHomeworks/setActionTabs",payload:{key:"底部弹窗",type:7,text:(0,V.jsx)("div",{children:"非常棒!教学课堂已经新建完成!接下来您可以点击 “进入课堂详情”去邀请您的学生、设置课堂内容了~"})}}),(0,I.L9)(["教学课堂","新建课堂"]),h.Z.info({title:"课堂创建成功",width:600,className:"custom-modal-divider ".concat(S.modal),icon:null,okText:"进入课堂详情",content:(0,V.jsxs)("div",{className:S.content,children:[(0,V.jsxs)("p",{children:["您的课堂《",n,"》已经创建成功,可复制下方的邀请码,邀请老师、助教和学生加入课堂进行教学和学习。"]}),(0,V.jsx)("p",{children:"被邀请用户可以在加入课堂弹窗中输入邀请码加入课堂中。"}),(0,V.jsxs)("div",{className:S.box,children:[(0,V.jsx)("span",{children:"邀请码:"}),(0,V.jsx)("div",{children:null===(B=R)||void 0===B?void 0:B.invite_code}),(0,V.jsx)(O.CopyToClipboard,{text:null===(U=R)||void 0===U?void 0:U.invite_code,onCopy:function(){return f.ZP.success("复制成功")},children:(0,V.jsx)(x.ZP,{type:"primary",children:"复制邀请码"})})]})]}),onOk:function(){window.scrollTo(0,0),R&&window.open(R.first_category_url,"_self"),"0"===localStorage.getItem("Noviceguide")||G({type:"shixunHomeworks/setActionTabs",payload:{key:"底部弹窗",type:11,text:(0,V.jsx)("div",{children:"接下来,咱们给教学课堂添加一个“课程实验”~点击“选用实践项目”,选择一个作业,然后点击“立即发布”就给实践课堂添加了一个课程实验。"})}})}}));case 21:R&&window.localStorage.setItem("yslGuideone","true");case 22:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ue=([{label:"公告栏",value:"announcement"},{label:"实训作业",value:"shixun_homework"},{label:"普通作业",value:"common_homework"},(null===(t=H.userInfo)||void 0===t?void 0:t.main_site)&&{label:"分组作业",value:"group_homework"},{label:"试卷",value:"exercise"},{label:"问卷",value:"poll"},{label:"教学资料",value:"attachment"},{label:"视频直播",value:"video"},{label:"讨论",value:"board"},{label:"分班",value:"course_group"},{label:"统计",value:"statistics"},{label:"签到",value:"attendance"},(null===(o=H.userInfo)||void 0===o?void 0:o.admin)&&{label:"模板管理",value:"template"}].filter((function(e){var t;return!!e&&(null==J||null===(t=J.setting)||void 0===t||!t.is_local||"视频直播"!==e.label)})),{display:"block",height:"30px",lineHeight:"30px"}),We={action:"".concat(T.Z.API_SERVER,"/api/attachments.json"),withCredentials:!0,onChange:function(e){var t;"done"===e.file.status&&ge(null==e||null===(t=e.file)||void 0===t?void 0:t.response)},accept:".xls,.xlsx"};return(0,V.jsx)("div",{className:S.wrap,children:(0,V.jsxs)("div",{className:S.bg,children:[(0,V.jsxs)("div",{className:S.crumbs,children:[(0,V.jsx)("span",{children:"教学课堂"}),(0,V.jsx)("i",{className:"iconfont icon-zhankai1"}),(0,V.jsxs)("b",{children:[re?"编辑":"创建","课堂"]})]}),(0,V.jsxs)("div",{className:S.titleWrap,children:[(0,V.jsxs)("span",{children:[re?"编辑":"创建","课堂"]}),(0,V.jsx)("b",{onClick:Ve,children:"返回"})]}),(0,V.jsxs)(m.Z,{form:ee,className:S.formWrap,scrollToFirstError:!0,colon:!1,layout:"vertical",initialValues:{allowed_quit:!1,classModule:["shixun_homework","common_homework","group_homework","exercise","attachment","course_group","video","attendance","statistics"]},onValuesChange:function(e,t){se(a()({},ee.getFieldsValue()))},onFinish:Be,children:[(0,V.jsx)("div",{className:S.fieldWrap,style:{marginTop:28},children:(0,V.jsxs)("div",{className:S.flexRow,children:[(0,V.jsx)(m.Z.Item,{className:S.width655,name:"course",label:"课程名称",rules:[{required:!0,message:"不能为空"}],children:(0,V.jsx)(v.Z,{className:S.courseField,onSearch:function(e){ee.setFieldsValue({classroom:e}),function(e){G({type:"newClassroom/getSearchCourseList",payload:{search:e}})}(e)},onSelect:function(e){e&&ee.setFieldsValue({classroom:e})},options:L.searchCourseList.map((function(e){return{value:e.name}})),children:(0,V.jsx)(_.Z,{placeholder:"例如:数据结构",maxLength:60,addonAfter:"".concat((null===(n=ne.course)||void 0===n?void 0:n.length)||0,"/60")})})}),(0,V.jsxs)("div",{className:S.courseExample,children:[(0,V.jsxs)("div",{className:"".concat(S.flexRow," ").concat(S.flexAlignCenter),children:[(0,V.jsx)("img",{src:P,width:12}),(0,V.jsx)("span",{className:"".concat(S.color999," font12 ml5"),children:"正确示例:数据结构"})]}),(0,V.jsxs)("div",{className:"".concat(S.flexRow," ").concat(S.flexAlignCenter),children:[(0,V.jsx)("img",{src:E,width:12}),(0,V.jsxs)("span",{className:"".concat(S.color999," font12 ml5"),children:["错误示例:数据结构",C()().format("YYYY"),"春"]})]})]})]})}),(0,V.jsx)("div",{className:S.fieldWrap,children:(0,V.jsxs)("div",{className:S.flexRow,children:[(0,V.jsx)(m.Z.Item,{className:S.width655,name:"classroom",label:"课堂名称",rules:[{required:!0,message:"不能为空"}],children:(0,V.jsx)(_.Z,{placeholder:"例如数据结构2016秋季班级",maxLength:60,addonAfter:"".concat((null===(l=ee.getFieldValue("classroom"))||void 0===l?void 0:l.length)||0,"/60")})}),(0,V.jsxs)("div",{className:S.courseExample,children:[(0,V.jsxs)("div",{className:"".concat(S.flexRow," ").concat(S.flexAlignCenter),children:[(0,V.jsx)("img",{src:P,width:12}),(0,V.jsxs)("span",{className:"".concat(S.color999," font12 ml5"),children:["正确示例:数据结构",C()().format("YYYY"),"春季班级"]})]}),(0,V.jsxs)("div",{className:"".concat(S.flexRow," ").concat(S.flexAlignCenter),children:[(0,V.jsx)("img",{src:E,width:12}),(0,V.jsxs)("span",{className:"".concat(S.color999," font12 ml5"),children:["错误示例:",C()().format("YYYY"),"春季班级数据结构"]})]})]})]})}),(0,V.jsx)("div",{className:S.fieldWrap,children:(0,V.jsxs)("div",{className:S.flexColumn,children:[(0,V.jsx)(m.Z.Item,{className:S.period,name:"period",label:"总学时",rules:[{pattern:new RegExp(/^[0-9]+([.]{1}[0-9]+){0,1}$/,"g"),message:"必须是数值"}],children:(0,V.jsx)(_.Z,{placeholder:"例如30",maxLength:5,addonAfter:"".concat((null===(r=ne.period)||void 0===r?void 0:r.toString().length)||0,"/5")})}),(0,V.jsx)(m.Z.Item,{className:S.credit,name:"credit",label:"学分",rules:[{pattern:new RegExp(/^[0-9]+([.]{1}[0-9]+){0,1}$/,"g"),message:"必须是数值"}],children:(0,V.jsx)(_.Z,{placeholder:"例如3",maxLength:5,addonAfter:"".concat((null===(c=ne.credit)||void 0===c?void 0:c.toString().length)||0,"/5")})}),(0,V.jsx)(m.Z.Item,{className:S.endTime,name:"endTime",label:"结束时间",children:(0,V.jsx)(y.default,{showToday:!1,placeholder:"请选择结束时间",locale:k.Z,format:"YYYY-MM-DD",disabledDate:B})})]})}),(0,V.jsx)("div",{className:S.fieldWrap,children:(0,V.jsx)("div",{className:S.flexRow,children:(0,V.jsx)(m.Z.Item,{className:S.courseFormItem,name:"classModule",label:"课堂模块",children:(0,V.jsx)(g.Z.Group,{children:re?null==ue||null===(w=ue.course_modules)||void 0===w?void 0:w.map((function(e,t){return(0,V.jsx)(g.Z,{value:e.module_type,style:{fontSize:"14px"},children:e.module_name},e.module_type)})):null==he||null===(U=he.course_modules)||void 0===U?void 0:U.map((function(e,t){return(0,V.jsx)(g.Z,{value:e.module_type,style:{fontSize:"14px"},children:e.module_name},e.module_type)}))})})})}),(0,V.jsxs)("div",{className:S.fieldWrap,children:[(0,V.jsx)(m.Z.Item,{style:{marginBottom:0},name:"publicClassroom",label:"公开设置",valuePropName:"checked",children:(0,V.jsxs)(g.Z,{children:["公开课堂",(0,V.jsx)("span",{style:{color:"#5f6367"},children:"(选中后所有用户均可进入并浏览本课堂,否则仅本课堂成员可进入)"})]})}),!!ne.publicClassroom&&(0,V.jsx)(m.Z.Item,{style:{marginBottom:0},className:"ml20",name:"allow_copy",valuePropName:"checked",children:(0,V.jsxs)(g.Z,{children:["允许非本课堂教师复制课堂",(0,V.jsx)("span",{style:{color:"#5f6367"},children:"(选中后,平台上任何教师都可以复制本课堂)"})]})}),(0,V.jsx)(m.Z.Item,{style:{marginBottom:0},name:"allowed_quit",valuePropName:"checked",children:(0,V.jsxs)(g.Z,{children:["允许退出课堂",(0,V.jsx)("span",{style:{color:"#5f6367"},children:"(选中后,学生可以主动退出课堂,否则学生无法主动退出。)"})]})}),(0,V.jsx)(m.Z.Item,{name:"is_show_conceal",valuePropName:"checked",children:(0,V.jsxs)(g.Z,{children:["允许学生查看手机号和邮箱地址",(0,V.jsx)("span",{style:{color:"#5f6367"},children:"(选中后,学生可以查看课堂内其他成员完整的手机号和邮箱地址,否则对手机号和邮箱进行脱敏处理)"})]})})]}),re&&(0,V.jsx)("div",{className:S.fieldWrap,children:(0,V.jsx)(m.Z.Item,{className:S.courseFormItem,name:"set",label:"邀请码设置",children:(0,V.jsxs)(j.ZP.Group,{children:[(0,V.jsxs)(j.ZP,{style:Ue,value:0,children:["对所有角色启用",(0,V.jsx)("span",{style:{color:"#5f6367"},children:"(选中后用户可以以任意身份加入课堂)"})]}),0===ne.set&&(0,V.jsx)(m.Z.Item,{name:"student_join_approve",className:S.checkUsersFromCode,valuePropName:"checked",children:(0,V.jsxs)(g.Z,{children:["使用邀请码加入课堂的所有角色均需要审核",(0,V.jsx)("span",{style:{color:"#5f6367"},children:"(选中后,申请加入的学生、助教、老师均需要通过审核才能加入课堂,否则仅教师和助教加入时需要审核)"})]})}),0===ne.set&&(0,V.jsx)(m.Z.Item,{name:"student_join_pro",className:S.checkUsersFromCode,valuePropName:"checked",children:(0,V.jsxs)(g.Z,{children:["使用邀请码加入课堂的用户需进行职业认证",(0,V.jsx)("span",{style:{color:"#5f6367"},children:"(选中后,申请加入的用户需职业认证,未职业认证的用户需课堂管理员或老师进行审批)"})]})}),ne.student_join_pro&&(0,V.jsx)("div",{style:{height:30,fontSize:14,marginLeft:45},children:(0,V.jsxs)("span",{style:{display:"flex",height:30,lineHeight:"30px",alignItems:"center"},children:[null!=we&&we.id?(0,V.jsx)("div",{children:(0,V.jsxs)("div",{className:S.row,children:[(0,V.jsxs)("div",{className:S.title,onClick:function(){Pe({content:T.Z.API_SERVER+we.url,type:"office"})},children:[(0,V.jsx)("i",{className:"iconfont icon-fujian1"}),(0,V.jsx)("span",{title:we.title||we.filename,children:we.title||we.filename})]}),(0,V.jsxs)("div",{className:S.preview,onClick:function(){Pe({content:T.Z.API_SERVER+we.url,type:"office"})},children:[(0,V.jsx)("i",{className:"iconfont icon-yulan"}),"查看"]}),(0,V.jsxs)("div",{className:S.delete,onClick:function(){Ce("")},children:[(0,V.jsx)("i",{className:"iconfont icon-piliangshanchubeifen"}),"删除"]})]})}):(0,V.jsx)("a",{onClick:function(){De(!0)},children:"上传课堂名单"}),(0,V.jsx)("span",{style:{color:"#5f6367"},children:"(名单内用户申请加入课堂时,无需审核,系统自动审核通过)"})]})}),(0,V.jsxs)(j.ZP,{style:Ue,value:2,children:["对学生停用",(0,V.jsx)("span",{style:{color:"#5f6367"},children:"(选中后用户以学生身份加入课堂时,邀请码无效)"})]}),(0,V.jsxs)(j.ZP,{style:Ue,value:1,children:["对所有角色停用",(0,V.jsx)("span",{style:{color:"#5f6367"},children:"(选中后本邀请码失效,用户不能主动加入课堂)"})]})]})})}),(0,V.jsxs)("div",{className:S.fieldWrap,style:{marginTop:20},children:[(0,V.jsx)("div",{className:"".concat(S.flexRow," ").concat(S.flexAlignCenter," ").concat(S.school),children:(0,V.jsx)(m.Z.Item,{className:S.courseFormItem,name:"school",label:"课堂所属单位",rules:[{required:!0,message:"不能为空"}],children:(0,V.jsx)(v.Z,{maxTagTextLength:60,className:S.w700,placeholder:"请输入并选择课本堂的所属单位",onSearch:Fe,onChange:Fe,options:null===(W=L.schoolList)||void 0===W?void 0:W.map((function(e){return{value:e}}))})})}),ne.school&&!(null!==(M=L.schoolList)&&void 0!==M&&M.find((function(e){return e===ne.school})))&&(0,V.jsx)("div",{className:S.schoolHintWrap,children:(0,V.jsxs)("span",{className:S.colorCDCDCD,children:["未找到包含“",ne.school,"”的高校,如有需要,请",(0,V.jsx)("span",{style:{color:"blue",cursor:"pointer"},onClick:function(){h.Z.info({title:"联系平台运营",width:400,icon:null,centered:!0,content:(0,V.jsxs)("div",{style:{textAlign:"center"},children:[(0,V.jsx)("div",{style:{textAlign:"left"},children:"请扫码或搜索加入头歌官方交流QQ群727685969联系群内的运营进行咨询和申请新增学校名称。"}),(0,V.jsx)("img",{src:F,style:{width:"170px",height:"170px",marginTop:"20px"}})]}),okText:"我知道了"})},children:"联系平台运营"}),"申请新增"]})})]}),(0,V.jsxs)("div",{className:S.backgroundFa,children:[(0,V.jsx)("div",{className:S.bBtn,onClick:Ve,children:"取消"}),(0,V.jsx)(x.ZP,{className:"".concat(6===q.actionTabs.type?S.classromediv:""),onClick:function(){return ee.submit()},loading:Q["newClassroom/submitCourses"],children:"提交"})]})]}),(0,V.jsx)(h.Z,{open:Ie,title:"上传课堂名单",onOk:function(){Ce(ye),De(!1)},onCancel:function(){Ce(""),ge(""),De(!1)},children:(0,V.jsxs)("div",{children:[(0,V.jsxs)("p",{children:[(0,V.jsx)("span",{children:"步骤1"}),"下载",(0,V.jsx)("a",{href:T.Z.API_SERVER+"/api/courses/down_student_template ",download:"模版.xlsx",children:"课堂名单模版"}),"批量导入成员"]}),(0,V.jsxs)("p",{style:{display:"flex"},children:[(0,V.jsx)("span",{children:"步骤2"}),(0,V.jsxs)("div",{children:[(0,V.jsx)("div",{children:"上传填写好的《课堂名单模板》"}),(0,V.jsx)(b.Z,a()(a()({},We),{},{children:(0,V.jsx)(x.ZP,{type:"primary",icon:(0,V.jsx)(R.Z,{}),children:"选择文件"})}))]})]})]})}),(0,V.jsx)(N.Z,{schoolName:ne.school,onSuccess:function(e){Fe(e),ee.setFieldsValue({school:e}),se(a()(a()({},ne),{},{school:e}))}}),(0,V.jsx)(Y.Z,{close:!0,data:null==Se?void 0:Se.content,type:null==Se?void 0:Se.type,hasMask:!0,editOffice:"view",onClose:function(){Pe({content:"",type:""})}})]})})}))},10527:function(e,t,o){"use strict";var n=o(88239).default;t.Z=void 0;var s=n(o(65835)),l=n(o(6432));const a={lang:Object.assign({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},s.default),timePickerLocale:Object.assign({},l.default)};a.lang.ok="确定";var r=a;t.Z=r},6432:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]};t.default=o},25769:function(e,t,o){"use strict";var n=o(98040),s={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var o,l,a,r,i,c,d=!1;t||(t={}),o=t.debug||!1;try{if(a=n(),r=document.createRange(),i=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(n){if(n.stopPropagation(),t.format)if(n.preventDefault(),void 0===n.clipboardData){o&&console.warn("unable to use e.clipboardData"),o&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var l=s[t.format]||s.default;window.clipboardData.setData(l,e)}else n.clipboardData.clearData(),n.clipboardData.setData(t.format,e);t.onCopy&&(n.preventDefault(),t.onCopy(n.clipboardData))})),document.body.appendChild(c),r.selectNodeContents(c),i.addRange(r),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");d=!0}catch(n){o&&console.error("unable to copy using execCommand: ",n),o&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),d=!0}catch(n){o&&console.error("unable to copy using clipboardData: ",n),o&&console.error("falling back to prompt"),l=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(l,e)}}finally{i&&("function"==typeof i.removeRange?i.removeRange(r):i.removeAllRanges()),c&&document.body.removeChild(c),a()}return d}},65835:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o={locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"};t.default=o},83145:function(e,t,o){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var n=l(o(59301)),s=l(o(25769));function l(e){return e&&e.__esModule?e:{default:e}}function a(e){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function r(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function i(e,t){if(null==e)return{};var o,n,s=function(e,t){if(null==e)return{};var o,n,s={},l=Object.keys(e);for(n=0;n<l.length;n++)o=l[n],t.indexOf(o)>=0||(s[o]=e[o]);return s}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n<l.length;n++)o=l[n],t.indexOf(o)>=0||Object.prototype.propertyIsEnumerable.call(e,o)&&(s[o]=e[o])}return s}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t){return!t||"object"!==a(t)&&"function"!=typeof t?m(e):t}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function f(e,t){return f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},f(e,t)}function h(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}var x=function(e){function t(){var e,o;c(this,t);for(var l=arguments.length,a=new Array(l),r=0;r<l;r++)a[r]=arguments[r];return h(m(o=u(this,(e=p(t)).call.apply(e,[this].concat(a)))),"onClick",(function(e){var t=o.props,l=t.text,a=t.onCopy,r=t.children,i=t.options,c=n.default.Children.only(r),d=(0,s.default)(l,i);a&&a(l,d),c&&c.props&&"function"==typeof c.props.onClick&&c.props.onClick(e)})),o}var o,l,a;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(t,e),o=t,l=[{key:"render",value:function(){var e=this.props,t=(e.text,e.onCopy,e.options,e.children),o=i(e,["text","onCopy","options","children"]),s=n.default.Children.only(t);return n.default.cloneElement(s,function(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?r(o,!0).forEach((function(t){h(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):r(o).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}({},o,{onClick:this.onClick}))}}],l&&d(o.prototype,l),a&&d(o,a),t}(n.default.PureComponent);t.CopyToClipboard=x,h(x,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(e,t,o){"use strict";var n=o(83145).CopyToClipboard;n.CopyToClipboard=n,e.exports=n},98040:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,o=[],n=0;n<e.rangeCount;n++)o.push(e.getRangeAt(n));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||o.forEach((function(t){e.addRange(t)})),t&&t.focus()}}},29831:function(e,t,o){"use strict";e.exports=o.p+"static/touge_code.728ce351.jpg"},88239:function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports}}]);