(self.webpackChunk=self.webpackChunk||[]).push([[13581,4977,88314,214,55251],{70740:function(e,n,t){"use strict";t.d(n,{Z:function(){return c}});var r=t(38329),s=t(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M632 698.3l141.9-112a8 8 0 000-12.6L632 461.7c-5.3-4.2-13-.4-13 6.3v76H295c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h324v76c0 6.7 7.8 10.4 13 6.3zm261.3-405L730.7 130.7c-7.5-7.5-16.7-13-26.7-16V112H144c-17.7 0-32 14.3-32 32v278c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V184h136v136c0 17.7 14.3 32 32 32h320c17.7 0 32-14.3 32-32V205.8l136 136V422c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8v-83.5c0-17-6.7-33.2-18.7-45.2zM640 288H384V184h256v104zm264 436h-56c-4.4 0-8 3.6-8 8v108H184V732c0-4.4-3.6-8-8-8h-56c-4.4 0-8 3.6-8 8v148c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V732c0-4.4-3.6-8-8-8z"}}]},name:"delivered-procedure",theme:"outlined"},i=t(91851),a=function(e,n){return s.createElement(i.Z,(0,r.Z)({},e,{ref:n,icon:o}))};var c=s.forwardRef(a)},11419:function(e,n,t){"use strict";t.d(n,{Z:function(){return c}});var r=t(38329),s=t(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 00-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 00471 99.9c-52 0-98 35-111.8 85.1l-85.9 311H144c-17.7 0-32 14.3-32 32v364c0 17.7 14.3 32 32 32h601.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM184 852V568h81v284h-81zm636.4-353l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 16.5-7.2 32.2-19.6 43l-21.9 19 13.9 25.4a56.2 56.2 0 016.9 27.3c0 22.4-13.2 42.6-33.6 51.8H329V564.8l99.5-360.5a44.1 44.1 0 0142.2-32.3c7.6 0 15.1 2.2 21.1 6.7 9.9 7.4 15.2 18.6 14.6 30.5l-9.6 198.4h314.4C829 418.5 840 436.9 840 456c0 16.5-7.2 32.1-19.6 43z"}}]},name:"like",theme:"outlined"},i=t(91851),a=function(e,n){return s.createElement(i.Z,(0,r.Z)({},e,{ref:n,icon:o}))};var c=s.forwardRef(a)},87306:function(e,n,t){"use strict";t.d(n,{Z:function(){return c}});var r=t(38329),s=t(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},i=t(91851),a=function(e,n){return s.createElement(i.Z,(0,r.Z)({},e,{ref:n,icon:o}))};var c=s.forwardRef(a)},71029:function(e,n,t){"use strict";t.d(n,{Z:function(){return c}});var r=t(38329),s=t(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"},i=t(91851),a=function(e,n){return s.createElement(i.Z,(0,r.Z)({},e,{ref:n,icon:o}))};var c=s.forwardRef(a)},51811:function(e,n,t){"use strict";function r(e){var n=!0;if(e.length>0){for(var t=0;t1&&void 0!==arguments[1]?arguments[1]:"",t=[],r=0;r0&&(c=[],null==t||null===(r=t.data)||void 0===r||r.map((function(e){var n;null==e||null===(n=e.ec_point_ids)||void 0===n||n.map((function(e){c.push(e)}))})),m(i()(i()({},null==t||null===(o=t.data)||void 0===o?void 0:o[0]),{},{ec_point_ids:c})),y(null==t?void 0:t.data));case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function P(){return(P=u()(s()().mark((function e(){var n,t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,v.ZP)("/api/schools/".concat(null==r||null===(n=r.userInfo)||void 0===n||null===(n=n.course)||void 0===n?void 0:n.course_school_id,"/ec_majors/get_major_list.json"),{method:"get"});case 2:t=e.sent,Z(null==t?void 0:t.data),(d||a)&&I();case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,h.useEffect)((function(){var e;null!=r&&null!==(e=r.userInfo)&&void 0!==e&&null!==(e=e.course)&&void 0!==e&&e.course_school_id&&function(){P.apply(this,arguments)}()}),[null==r||null===(n=r.userInfo)||void 0===n||null===(n=n.course)||void 0===n?void 0:n.course_school_id]),(0,k.jsxs)("div",{style:{display:null!==(t=r.userInfo.course)&&void 0!==t&&t.is_openengineering?"":"none"},children:[(0,k.jsx)("p",{style:{fontSize:"16px",fontWeight:400},children:"工程认证考核知识点"}),null==j?void 0:j.map((function(e,n){return(0,k.jsxs)("div",{style:{display:"flex",alignItems:"center",marginBottom:"10px"},children:[(0,k.jsx)(A,{rz:E,item:e,type:n,setitem:function(e){j.splice(n,1,e),y(c()(j));var t=[];null==j||j.map((function(e){var n;null==e||null===(n=e.ec_point_ids)||void 0===n||n.map((function(e){t.push(e)}))})),m(i()(i()({},e),{},{ec_point_ids:t}))}}),0!=n&&(0,k.jsx)(x.Z,{onClick:function(){j.splice(n,1),y(c()(j))},style:{marginLeft:10,fontSize:"20px"}}),(0,k.jsx)(g.Z,{onClick:function(){j.push({}),y(c()(j))},style:{marginLeft:10,fontSize:"20px"}})]},n)}))]})})))},44193:function(e,n,t){"use strict";t.d(n,{Z:function(){return E}});var r=t(10574),s=t.n(r),o=t(39343),i=t.n(o),a=t(11006),c=t.n(a),l=t(59301),u=t(78241),d=t(8591),p=t(43418),h=t(52409),m=t(1056),f=t(72315),x=t(95237),g=t(43604),v=t(9498),w=t.n(v),j=t(85578),y=t(22211),k={tips:"tips___e8J4O",homeworkType:"homeworkType___ZjN2X",antdTable:"antdTable___amDdp",modalWrapper:"modalWrapper___XPojI"},A=t(70622),b=t(39020),C=t(37712),E=(0,y.connect)((function(e){return{shixunHomeworks:e.shixunHomeworks,classroomList:e.classroomList}}))((function(e){var n=e.dispatch,t=e.courseEndTime,r=(e.classroomList,e.successCallback),o=void 0===r?function(){}:r,a=e.visible,v=e.homeworkIds,y=e.courseId,E=e.isBatch,Z=(e.shixunHomeworks,u.Z.useForm()),I=c()(Z,1)[0],S=(0,l.useState)(!1),P=c()(S,2),_=P[0],B=P[1],N=(0,l.useState)(!1),H=c()(N,2),T=H[0],R=H[1],L=(0,l.useState)(!1),z=c()(L,2),O=z[0],D=z[1],F=(0,l.useState)([]),Q=c()(F,2),M=Q[0],K=Q[1],J=(0,l.useState)([]),Y=c()(J,2),W=Y[0],U=Y[1],G=(0,l.useState)([]),q=c()(G,2),V=q[0],X=q[1],$=(0,l.useState)([]),ee=c()($,2),ne=ee[0],te=ee[1],re=(0,l.useState)([]),se=c()(re,2),oe=se[0],ie=se[1],ae=(0,l.useState)([]),ce=c()(ae,2),le=ce[0],ue=ce[1],de=(0,l.useState)([]),pe=c()(de,2),he=pe[0],me=pe[1],fe=(0,l.useState)([]),xe=c()(fe,2),ge=xe[0],ve=xe[1],we=(0,l.useState)([]),je=c()(we,2),ye=je[0],ke=je[1];(0,l.useEffect)((function(){a?Ae():Ce()}),[a]);var Ae=function(){var e=i()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return B(!0),e.next=3,(0,A.oR)(v[0],{course_id:y});case 3:n=e.sent,D(n.no_group),E?(me(n.all_course_groups),ve(n.all_course_groups)):(te(n.late_course_groups),ie(n.late_course_groups),K(n.submit_course_groups),U(n.submit_course_groups)),B(!1),I.setFieldsValue({end_time:w()()});case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),be=function(){var e=i()(s()().mark((function e(){var t,r,i;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=I.getFieldsValue(),r=w()(t.end_time).format("YYYY-MM-DD HH:mm"),!(E?0===ye.length:0===V.length&&0===le.length)||O){e.next=6;break}return d.ZP.warning("请选择需要操作的班级"),e.abrupt("return");case 6:return R(!0),e.next=9,(0,A.Mc)(y,{no_group:O,homework_ids:v,group_ids:E?ye:V,end_time:r,late_group_ids:E?ye:le});case 9:i=e.sent,R(!1),0===i.status&&(Ce(),d.ZP.success("操作成功"),o(),n({type:"classroomList/setActionTabs",payload:{key:"清除选择数据"}}));case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ce=function(){X([]),ue([]),U([]),ie([])};return(0,C.jsxs)(p.Z,{centered:!0,title:"立即截止",className:k.modalWrapper,width:E||O?520:760,open:a,confirmLoading:T,destroyOnClose:!0,okText:"截止",cancelText:"取消",onOk:function(){return be()},onCancel:function(){Ce(),n({type:"classroomList/setActionTabs",payload:{}})},children:[(0,C.jsxs)("div",{className:k.tips,children:[(0,C.jsx)("div",{children:"1、截止后学生不能再提交作业。"}),(0,C.jsx)("div",{children:"2、本操作只对“提交中”、“补交中”的作业有效。"})]}),(0,C.jsx)(u.Z,{form:I,layout:"vertical",children:(0,C.jsx)(u.Z.Item,{name:"end_time",label:"截止时间",children:(0,C.jsx)(h.default,{style:{width:"100%"},disabledDate:function(e){return(0,b.Q8)(e,t)},disabledTime:function(e){return(0,b.d0)(e)},placeholder:"请选择结束时间",showTime:{format:"HH:mm",defaultValue:w()((0,j.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1})})}),!O&&(0,C.jsx)(C.Fragment,{children:E?(0,C.jsxs)("div",{children:[(0,C.jsx)(m.Z,{placeholder:"搜索班级",onChange:function(e){ve(he.filter((function(n){return n.name.indexOf(e.target.value)>-1})))}}),(0,C.jsx)(f.Z,{style:{marginTop:"10px",height:"300px",overflow:"auto"},className:k.antdTable,rowSelection:{type:"checkbox",onChange:function(e){ke(e)}},rowKey:"id",pagination:!1,dataSource:ge,loading:_,columns:[{title:"班级",dataIndex:"name"}]})]}):(0,C.jsxs)(x.Z,{gutter:24,children:[(0,C.jsxs)(g.Z,{span:14,children:[(0,C.jsx)("div",{className:k.homeworkType,children:"作业截止"}),(0,C.jsx)(m.Z,{placeholder:"搜索班级",onChange:function(e){U(M.filter((function(n){return n.name.indexOf(e.target.value)>-1})))}}),(0,C.jsx)("div",{className:k.tableWrapper,children:(0,C.jsx)(f.Z,{style:{marginTop:"10px",height:"260px",overflow:"auto"},className:k.antdTable,rowSelection:{type:"checkbox",onChange:function(e){X(e)}},rowKey:"id",pagination:!1,dataSource:W,loading:_,columns:[{title:"班级",dataIndex:"name",ellipsis:!0},{title:"发布时间",dataIndex:"publish_time"},{title:"截止时间",dataIndex:"end_time"}]})})]}),(0,C.jsxs)(g.Z,{flex:10,style:{maxWidth:"280px"},children:[(0,C.jsx)("div",{className:k.homeworkType,children:"补交截止"}),(0,C.jsx)(m.Z,{placeholder:"搜索班级",onChange:function(e){ie(ne.filter((function(n){return n.name.indexOf(e.target.value)>-1})))}}),(0,C.jsx)("div",{className:k.tableWrapper,children:(0,C.jsx)(f.Z,{style:{marginTop:"10px",height:"260px",overflow:"auto",maxWidth:"280px"},className:k.antdTable,rowSelection:{type:"checkbox",onChange:function(e){ue(e)}},rowKey:"id",pagination:!1,loading:_,dataSource:oe,columns:[{title:"班级",dataIndex:"name",ellipsis:!0,width:120},{title:"截止时间",dataIndex:"late_time"}]})})]})]})})]})}))},78075:function(e,n,t){"use strict";t.d(n,{Z:function(){return k}});var r=t(26801),s=t.n(r),o=t(10574),i=t.n(o),a=t(39343),c=t.n(a),l=t(11006),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"},h=t(3113),m=t(98915),f=t(55989),x=t(6848),g=t(85578),v=t(86018),w=t(57732),j=t(67871),y=t(37712),k=function(e){var n,t,r,o,a,l,k,A=e.editOffice,b=void 0===A?"view":A,C=e.data,E=(e.theme,e.type),Z=e.filename,I=e.monacoEditor,S=e.className,P=e.style,_=e.close,B=e.onClose,N=e.hasMask,H=e.disabledDownload,T=e.onImgDimensions,R=e.showNodata,L=(0,d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),z=u()(L,2),O=(z[0],z[1],(0,d.useState)("")),D=u()(O,2),F=(D[0],D[1]),Q=(0,d.useState)(),M=u()(Q,2),K=M[0],J=M[1],Y="build"===window.ENV?"/react/build":"",W=location.host.startsWith("localhost")?j.Z.PROXY_SERVER:j.Z.API_SERVER;console.log("disabledDownload---",H);var U=(0,d.useRef)();null!==(n=C)&&void 0!==n&&n.startsWith("/api")&&"txt"!==E&&(C=j.Z.API_SERVER+C),Z&&(I.filename=Z),(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]&&F(n[1])}))}),[]),(0,d.useEffect)((function(){"office"===E&&G()}),[E,C]);var G=function(){var e=c()(i()().mark((function e(){var n,t,r;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",C),n=C,C.startsWith("http")||(n=location.origin+n),t=new URL(n).pathname.split("/").pop(),e.next=6,(0,v.gJ)({attachment_id:t});case 6:r=e.sent,J(r);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=function(){C.startsWith("http")||C.startsWith("blob:")?V():(0,g.Sv)(Z||"educoder",C,Z)},V=function(){(0,g.Nd)(Z||"educoder",decodeURIComponent(C))};return console.log(C,"data"),(0,y.jsxs)("div",{style:s()({},P||{}),className:"".concat(N&&p.bgBlack," ").concat(E?p.wrp:"hide"),children:[_&&(0,y.jsxs)("div",{className:p.close,ref:U,children:[!!T&&(0,y.jsx)(x.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return U.current},children:(0,y.jsx)("span",{onClick:function(){B(),T()},children:(0,y.jsx)("i",{className:"icon-yulanpizhu"})})}),!H&&(0,y.jsx)(x.Z,{title:"点击下载此文件",getPopupContainer:function(){return U.current},children:(0,y.jsx)("span",{onClick:V,children:(0,y.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,y.jsx)(x.Z,{title:"关闭",getPopupContainer:function(){return U.current},children:(0,y.jsx)("span",{className:"",onClick:B,children:(0,y.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,y.jsx)("div",{className:"".concat(p[S]," ").concat(S," ").concat(p.monaco," ").concat("txt"===E?"show":"hide"),children:"txt"===E&&(0,y.jsx)(f.ZP,s()({},I))}),"audio"===E&&(0,y.jsx)("audio",{src:(null===(t=C)||void 0===t?void 0:t.indexOf("http"))>-1||null!==(r=C)&&void 0!==r&&r.startsWith("/api")?C:"data:image/png;base64,".concat(C),autoPlay:!0}),"video"===E&&(0,y.jsx)(y.Fragment,{children:(null===(o=C)||void 0===o?void 0:o.indexOf("http"))>-1||null!==(a=C)&&void 0!==a&&a.startsWith("/api")?(0,y.jsx)("video",{controls:!0,src:"".concat(C),autoPlay:!0}):(0,y.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(C),autoPlay:!0})}),"office"===E&&K&&(0,y.jsx)("iframe",{src:"".concat(Y,"/office.html?key=").concat(K.key,"&url=").concat(W+K.url,"&callbackUrl=").concat(W+K.callbackUrl,"&fileType=").concat(K.fileType,"&title=").concat(K.title,"&model=").concat(b,"&officeServer=").concat(j.Z.ONLYOFFICE,"&disabledDownload=").concat(!!H)}),"html"===E&&(0,y.jsx)("iframe",{src:C+"&disposition=inline"}),"pdf"===E&&(0,y.jsx)("iframe",{src:"".concat(Y,"/js/pdfview/index.html?url=").concat(C,"&disabledDownload=").concat(!!H)}),"image"===E&&(0,y.jsx)("img",{src:(null===(l=C)||void 0===l?void 0:l.indexOf("http"))>-1||null!==(k=C)&&void 0!==k&&k.startsWith("/api")?C:"data:image/png;base64,".concat(C)}),("other"===E||"download"===E)&&(0,y.jsx)(y.Fragment,{children:R?(0,y.jsx)(w.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,y.jsx)(h.ZP,{icon:(0,y.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:q,children:"下载"})}):(0,y.jsxs)(h.ZP,{type:"primary",size:"middle",onClick:q,children:[(0,y.jsx)(m.Z,{}),"点击下载"]})})]})}},80416:function(e,n,t){"use strict";t.d(n,{Z:function(){return M}});var r=t(26801),s=t.n(r),o=t(93923),i=t.n(o),a=t(98190),c=t.n(a),l=t(11006),u=t.n(l),d=t(59301),p=(t(31020),t(32834)),h=t.n(p),m=t(11690);var f=[],x=["