"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[14610],{87169:function(e,n,t){t.d(n,{Z:function(){return l}});var i=t(54476),s=t(59301),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{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"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},a=t(7657),c=function(e,n){return s.createElement(a.Z,(0,i.Z)({},e,{ref:n,icon:r}))};var l=s.forwardRef(c)},44220:function(e,n,t){t.r(n),t.d(n,{default:function(){return I}});var i=t(7557),s=t.n(i),r=t(37205),a=t.n(r),c=t(41498),l=t.n(c),u=t(79800),o=t.n(u),d=t(39647),h=t.n(d),f=t(59301),x=t(49389),p=t(43418),m=t(8591),g=t(95237),v=t(43604),y=t(1710),_=t(67554),j=t(36133),k=(t(73835),t(56656)),b=t.n(k),Z="ul___F_zFi",w=t(91835),S=t(37712),N=["classroomList","globalSetting","loading","user","dispatch"];b().locale("ZH-cn");var I=(0,x.connect)((function(e){var n=e.classroomList,t=e.loading,i=e.globalSetting,s=e.user;return{classroomList:n,globalSetting:i,loading:t.models.classroomList,user:s}}))((function(e){e.classroomList,e.globalSetting,e.loading,e.user;var n=e.dispatch,t=(h()(e,N),(0,x.useParams)(),(0,f.useState)()),i=o()(t,2),r=i[0],c=i[1],u=(0,f.useState)(""),d=o()(u,2),k=d[0],b=d[1];(0,f.useEffect)((function(){I()}),[]);var I=function(){var e=l()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,w.nV)();case 2:0===(null==(n=e.sent)?void 0:n.status)&&(b(n.subject_name),c(a()(n.data)));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function e(n){var t,i;n=null!==(t=n)&&void 0!==t&&t.includes(".json")?n:"".concat(n,".json"),p.Z.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:(0,S.jsx)("div",{className:"tc font16",children:"实训已经更新了，正在为您重置!"}),onOk:(i=l()(s()().mark((function t(){var i,r;return s()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,j.$Q)({url:n});case 2:if(i=t.sent){t.next=5;break}return t.abrupt("return");case 5:return m.ZP.success("重置成功，正在进入实践项目！"),t.next=8,(0,j.Ir)({id:i.shixun_identifier});case 8:if(null==(r=t.sent)||!r.game_identifier){t.next=12;break}return null===x.history||void 0===x.history||x.history.push("/tasks/".concat(r.game_identifier)),t.abrupt("return");case 12:2===(null==r?void 0:r.status)?e(null==r?void 0:r.message):3===(null==r?void 0:r.status)&&L(null==r?void 0:r.message);case 13:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)})})},L=function(e){p.Z.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:(0,S.jsxs)("div",{className:"tc font16",children:["目前该实践项目尚在内测中，将于",e,"之后开放，谢谢！"]})})},T=[{title:"序号",dataIndex:"identifier",key:"identifier",render:function(e,n,t){return t+1}},{title:"实践项目名称",dataIndex:"shixun_name",width:"60%",ellipsis:!0,key:"shixun_name"},{title:"学习进度",dataIndex:"challenges_count",key:"challenges_count",render:function(e,n){return(0,S.jsxs)("span",{children:[n.leaning_challenge_count,"/",e]})}},{title:"状态",dataIndex:"challenges_count",key:"challenges_count",render:function(e,n){return(0,S.jsx)("span",{children:n.leaning_challenge_count==e?(0,S.jsx)("span",{className:"c-green",children:"已完成"}):(0,S.jsx)("span",{className:"c-red",children:"未完成"})})}},{title:"操作",dataIndex:"shixun_name",render:function(e,t,i){return(0,S.jsx)("span",{onClick:function(){return e=t,void((0,_.tJ)(n)&&(e.is_jupyter||e.is_jupyter_lab?n({type:"shixunsDetail/execJupyter",payload:{id:e.identifier}}).then((function(e){null!=e&&e.identifier&&(null===x.history||void 0===x.history||x.history.push("/tasks/".concat(e.identifier,"/jupyter")))})):n({type:"shixunsDetail/execShixun",payload:{id:e.identifier}}).then((function(e){null!=e&&e.game_identifier?null===x.history||void 0===x.history||x.history.push("/tasks/".concat(e.game_identifier)):2===(null==e?void 0:e.status)?z(null==e?void 0:e.message):3===(null==e?void 0:e.status)&&L(null==e?void 0:e.message)}))));var e},className:"c-blue current",children:"开启挑战"})}}];return(0,S.jsx)("div",{className:"edu-container minH500",style:{width:"1200px",marginTop:"40px",marginBottom:"20px"},children:(0,S.jsxs)(g.Z,{children:[(0,S.jsx)(v.Z,{flex:"280px",children:(0,S.jsx)("ul",{className:Z,children:(0,S.jsx)("li",{children:k})})}),(0,S.jsx)(v.Z,{flex:"1px"}),(0,S.jsx)(v.Z,{flex:"1",className:"bg-white p20",children:(0,S.jsx)(y.Z,{dataSource:r||[],columns:T})})]})})}))},73835:function(){}}]);