|
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[71783],{7406:function(e,n,s){var t=s(82242),i=s.n(t),a=(s(59301),s(93314)),c=s(3113),l=s(37712);n.Z=function(e){var n=e.img,s=e.buttonProps,t=void 0===s?{}:s,r=e.styles,o=void 0===r?{}:r,u=e.customText,d=e.ButtonText,m=e.ButtonClick,p=e.Buttonclass,h=e.ButtonTwo,x=e.imgStyles,f=e.loading,_=void 0!==f&&f;return(0,l.jsxs)("section",{className:"tc animated fadeIn",style:i()(i()({},{color:"#999",margin:"100px auto",visibility:_?"hidden":"visible"}),o),children:[(0,l.jsx)("img",{src:n||a,style:i()(i()({},x),{},{pointerEvents:"none",userSelect:"none"})}),(0,l.jsx)("p",{className:"mt20 font14",children:u||"暂时还没有相关数据哦!"}),d&&(0,l.jsx)(c.ZP,i()(i()({className:p,onClick:m},t),{},{children:d})),h&&h]})}},82396:function(e,n,s){s.r(n),s.d(n,{default:function(){return Fe}});var t=s(82242),i=s.n(t),a=s(85573),c=s.n(a),l=s(7557),r=s.n(l),o=s(41498),u=s.n(o),d=s(79800),m=s.n(d),p=s(59301),h=s(7880),x="wrap___O1tn7",f=s(90963),_=s(38854),j=s(71418),v=s(53864),g=s(64887),y=s(98135),N=s(78241),k=s(43428),b=s(3113),w=s(8591),Z=s(95237),S=s(43604),C=s(24905),L=s(6848),T=s(28103),I="drawer___A_PEI",P="menu___K7LJA",z="actived___jzUGM",B="actived2___UNcoI",A="subTag___E54g9",D="directionName___EyQuv",E="menuDirection___qmHXv",M="listItem___ZO5AA",R="info___raEGy",O="title___TE8wt",Q="titleLeft___cyNcR",H="search___SLT83",W="description___xhaap",F="menuCourse___jXQvt",X=s(85062),J=s(7406),U=s(54506),q=s(89918),G=s(37712),Y=y.Z.Search,V={id:"type",name:"来源",children:[{name:"全部",id:"all",type:"type"},{name:"我的",id:"mine",type:"type"}]},K={id:"diff",name:"难度",children:[{name:"全部",id:"",type:"diff"},{name:"初级",id:1,type:"diff"},{name:"中级",id:2,type:"diff"},{name:"中高级",id:3,type:"diff"},{name:"高级",id:4,type:"diff"}]},$=(0,h.connect)((function(e){return{classroomList:e.classroomList,loading:e.loading}}))((function(e){var n,s,t,a,c=e.classroomList,l=(e.loading,e.dispatch),o=e.cb,d=e.shixunIds,x=void 0===d?[]:d,f=(0,h.useParams)(),_=((0,h.useLocation)(),c.actionTabs,N.Z.useForm()),j=(m()(_,1)[0],c.shixunLists),g=(0,p.useState)([]),y=m()(g,2),$=y[0],ee=y[1],ne=(0,p.useState)([]),se=m()(ne,2),te=se[0],ie=se[1],ae=(0,p.useState)({page:1,type:"all",diff:0,status:"published",order:"desc",limit:10,sort:"myshixuns_count",tag_level:null,sub_discipline_id:null,discipline_id:null}),ce=m()(ae,2),le=ce[0],re=ce[1];(0,p.useEffect)((function(){"选用实践项目"===c.actionTabs.key&&l({type:"classroomList/getShixunLists",payload:i()({},le)})}),[c.actionTabs.key,le]),(0,p.useEffect)((function(){oe()}),[f]);var oe=function(){var e=u()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,X.I_)({});case 2:n=e.sent,ie((null==n?void 0:n.disciplines)||[]);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ue=function(e,n,s){le.tag_level=e,le.sub_discipline_id=n,le.discipline_id=s,re(i()({},le)),l({type:"classroomList/getShixunLists",payload:i()({},le)})},de=function(){l({type:"classroomList/setActionTabs",payload:{}}),re({page:1,type:"all",diff:0,status:"all",order:"desc",limit:10,sort:"myshixuns_count",tag_level:null,sub_discipline_id:null,discipline_id:null})};return"选用实践项目"!==c.actionTabs.key?null:(0,G.jsxs)(k.Z,{placement:"bottom",height:"100%",closable:!0,onClose:de,open:"选用实践项目"===c.actionTabs.key,rootClassName:I,footer:(0,G.jsxs)("div",{className:"tc",children:[(0,G.jsx)(b.ZP,{size:"middle",onClick:function(){de(),ee([])},style:{marginRight:8},children:"取消"}),(0,G.jsx)(b.ZP,{size:"middle",onClick:u()(r()().mark((function e(){var n,s,t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=r()().mark((function e(){var n,s;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=$[t],!x.includes(n)){e.next=4;break}return w.ZP.info("请勿重复选择:".concat(null==j||null===(s=j.shixun_list)||void 0===s||null===(s=s.find((function(e){return e.id===n})))||void 0===s?void 0:s.title)),e.abrupt("return",{v:void 0});case 4:case"end":return e.stop()}}),e)})),t=0;case 2:if(!(t<(null==$?void 0:$.length))){e.next=10;break}return e.delegateYield(n(),"t0",4);case 4:if(!(s=e.t0)){e.next=7;break}return e.abrupt("return",s.v);case 7:t++,e.next=2;break;case 10:de(),o($),ee([]);case 13:case"end":return e.stop()}}),e)}))),type:"primary",children:"确定"})]}),children:[(0,G.jsx)("section",{className:"tc",children:(0,G.jsx)(Y,{placeholder:"实践项目名称/院校名称/创建者",enterButton:"搜索",size:"middle",className:H,onSearch:function(e){le.keyword=e,le.page=1,l({type:"classroomList/getShixunLists",payload:i()({},le)})}})}),(0,G.jsxs)("section",{className:"edu-container",children:[(0,G.jsxs)("ul",{className:P,children:[(0,G.jsx)("li",{children:V.name}),null==V||null===(n=V.children)||void 0===n?void 0:n.map((function(e,n){return(0,G.jsx)("li",{className:le[V.id]==e.id?z:"",onClick:function(){le[V.id]=e.id,re(i()({},le)),l({type:"classroomList/getShixunLists",payload:i()({},le)})},children:(0,G.jsx)("strong",{children:e.name})})}))]}),(0,G.jsxs)("ul",{className:E,children:[(0,G.jsx)("li",{className:D,children:"方向"}),(0,G.jsx)("li",{className:le.discipline_id?"":z,onClick:function(){ue(null,null,null)},children:(0,G.jsx)("strong",{children:"全部"})}),null==te?void 0:te.map((function(e,n){return(0,G.jsxs)("li",{className:le.discipline_id==e.id?z:"",children:[(0,G.jsx)("strong",{onClick:function(){ue(1,null,e.id)},children:e.name}),(0,G.jsx)("div",{children:e.sub_disciplines.map((function(n,s){return(0,G.jsxs)("div",{className:"mt5",children:[(0,G.jsx)("div",{className:le.sub_discipline_id==n.id?"".concat(B," ").concat(A):A,onClick:function(){ue(2,n.id,e.id)},children:n.name}),(0,G.jsx)("ul",{className:"mt5",children:n.tags&&n.tags.map((function(n,s){return(0,G.jsx)("li",{className:le.sub_discipline_id==n.id&&3===le.tag_level?B:"",onClick:function(){ue(3,n.id,e.id)},children:n.name},s)}))})]},s)}))})]},n)}))]}),(0,G.jsxs)("ul",{className:P,children:[(0,G.jsx)("li",{children:K.name}),null==K||null===(s=K.children)||void 0===s?void 0:s.map((function(e,n){return(0,G.jsx)("li",{className:le[K.id]==e.id?z:"",onClick:function(){le[K.id]=e.id,re(i()({},le)),l({type:"classroomList/getShixunLists",payload:i()({},le)})},children:(0,G.jsx)("strong",{children:e.name})})}))]}),(0,G.jsxs)(Z.Z,{children:[(0,G.jsx)(S.Z,{flex:"1",children:(0,G.jsx)("div",{className:F,style:{margin:"0px 15px"},children:(0,G.jsxs)("ul",{children:[(0,G.jsxs)("li",{children:["已选",(0,G.jsx)("span",{className:"c-blue",children:$.length}),"个"]}),(0,G.jsxs)("li",{children:["共",(0,G.jsx)("span",{className:"c-blue",children:j.shixuns_count}),"个"]}),(0,G.jsxs)("li",{className:"current",onClick:function(){le.order="asc"===le.order?"desc":"asc",re(i()({},le))},children:["学习人数",(0,G.jsx)("p",{className:"edu-sorter current ".concat(le.order),children:"asc"===le.order?(0,G.jsx)("span",{className:"iconfont icon-sanjiaoxing-up"}):(0,G.jsx)("span",{className:"iconfont icon-sanjiaoxing-down"})})]})]})})}),(0,G.jsx)(S.Z,{className:"c-grey-999",children:"mine"===(null==le?void 0:le.type)?"已静默/公开发布的实践项目进入本列表备选":"仅已公开发布的实践项目进入本列表备选"})]}),null==j||null===(t=j.shixun_list)||void 0===t?void 0:t.map((function(e,n){return(0,G.jsxs)("div",{className:M,children:[(0,G.jsx)(C.Z,{checked:$.includes(e.id),value:e.id,disabled:null==e?void 0:e.need_authorize,onChange:function(n){$.indexOf(e.id);$.indexOf(e.id)>-1?ee($.filter((function(n){return n!==e.id}))):ee($.concat(e.id))}}),(0,G.jsxs)("div",{className:R,children:[(0,G.jsx)("div",{className:O,children:(0,G.jsxs)("div",{className:Q,children:[(0,G.jsx)("a",{className:"c-black",href:"/shixuns/".concat(null==e?void 0:e.identifier,"/challenges"),target:"_blank",children:(0,G.jsx)("strong",{className:"font16",dangerouslySetInnerHTML:{__html:e.title}})}),(null==e?void 0:e.need_authorize)&&(0,G.jsx)("span",{onClick:function(){(0,U.rX)(!1)},style:{marginRight:"auto"},className:"tag-style bg-pink current ml10",children:"需授权"}),(0,q.Ny)()&&1===(null==e?void 0:e.mark_status)&&(0,G.jsx)(L.Z,{title:null==e?void 0:e.mark_content,children:(0,G.jsx)("span",{style:{marginRight:"auto",background:"#2FA34F"},className:"tag-style current ml10",children:"正常"})}),(0,q.Ny)()&&2===(null==e?void 0:e.mark_status)&&(0,G.jsx)(L.Z,{title:null==e?void 0:e.mark_content,children:(0,G.jsx)("span",{style:{marginRight:"auto",background:"#FF8C29"},className:"tag-style current ml10",children:"需完善"})}),(0,q.Ny)()&&3===(null==e?void 0:e.mark_status)&&(0,G.jsx)(L.Z,{title:null==e?void 0:e.mark_content,children:(0,G.jsx)("span",{style:{marginRight:"auto",background:"#E53333"},className:"tag-style current ml10",children:"无法使用"})})]})}),(0,G.jsx)("div",{className:"flex-wrp mt10 font14 c-light-black",children:(0,G.jsx)("span",{className:W,dangerouslySetInnerHTML:{__html:e.description}})}),(0,G.jsx)("div",{className:" mt15",children:e.challenge_names.map((function(e,n){return(0,G.jsxs)("span",{className:"mr30 font12",children:["第",n+1,"关 ",e," "]},n)}))}),(0,G.jsx)(T.Z,{dashed:!0}),(0,G.jsxs)("div",{className:"c-light-black mt20 font12",children:[(0,G.jsx)("span",{children:e.author_name}),(0,G.jsx)("span",{className:"ml15 mr15",children:"|"}),(0,G.jsx)("span",{children:e.author_school_name}),(0,G.jsx)("span",{className:"ml15 mr15",children:"|"}),(0,G.jsxs)("span",{children:["难度系数 ",e.level]}),(0,G.jsx)("span",{className:"ml15 mr15",children:"|"}),(0,G.jsx)("span",{children:"学习人数 "}),(0,G.jsx)("span",{children:e.study_count})]})]})]},n)})),0===(null==j||null===(a=j.shixun_list)||void 0===a?void 0:a.length)&&(0,G.jsx)(J.Z,{}),(0,G.jsx)("p",{})]}),(0,G.jsx)("div",{className:"tc mt20",children:(0,G.jsx)(v.Z,{defaultCurrent:1,hideOnSinglePage:!0,defaultPageSize:20,showSizeChanger:!1,current:le.page||1,showQuickJumper:!0,total:null==j?void 0:j.shixuns_count,onChange:function(e){le.page=e,re(i()({},le))}})})]},"bottom")})),ee=s(5112),ne="drawer___TIdMd",se="listItem___xctQk",te="info___TVoda",ie="title___tbgwQ",ae="titleLeft___itHF1",ce="search___p3840",le="description___QUPVu",re="menuCourse___SpFbG",oe=s(94433),ue=y.Z.Search,de=(0,h.connect)((function(e){return{classroomList:e.classroomList,loading:e.loading.effects}}))((function(e){var n,s,t=e.classroomList,a=e.loading,c=e.dispatch,l=e.onOk,o=(0,p.useState)(i()({},(0,h.useParams)())),d=m()(o,2),x=d[0],f=(d[1],t.coursesLists),_=(0,p.useState)([]),g=m()(_,2),y=g[0],N=g[1],Z=(0,p.useState)({page:1,type:"all",order:"desc",limit:20,sort:"myshixuns_count"}),S=m()(Z,2),C=S[0],L=S[1];return(0,p.useEffect)((function(){"选用实践课程"===t.actionTabs.key&&(c({type:"classroomList/getCoursesLists",payload:i()({},C)}),N([]))}),[t.actionTabs.key,x.categoryId,C]),"选用实践课程"!==t.actionTabs.key?null:(0,G.jsxs)(k.Z,{placement:"bottom",height:"100%",closable:!0,onClose:function(){c({type:"classroomList/setActionTabs",payload:{key:""}})},open:"选用实践课程"===t.actionTabs.key,rootClassName:ne,footer:(0,G.jsxs)("div",{className:"tc",style:{height:"64px",display:"flex",alignItems:"center",justifyContent:"center"},children:[(0,G.jsx)(b.ZP,{size:"middle",onClick:function(){c({type:"classroomList/setActionTabs",payload:{key:""}})},style:{marginRight:8,width:"120px",height:"40px",fontSize:"16px",borderRadius:"4px"},children:"取消"}),(0,G.jsx)(b.ZP,{style:{width:"120px",height:"40px",fontSize:"16px",borderRadius:"4px"},size:"middle",loading:a["classroomList/createCoursesHomework"],onClick:u()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!==(null==y?void 0:y.length)){e.next=3;break}return w.ZP.error("请选择一个实践课程"),e.abrupt("return",!1);case 3:l(null===(n=y[0])||void 0===n?void 0:n.id),c({type:"classroomList/setActionTabs",payload:{key:""}});case 5:case"end":return e.stop()}}),e)}))),type:"primary",children:"确定"})]}),children:[(0,G.jsx)("section",{className:"tc",children:(0,G.jsx)(ue,{placeholder:"课程名称/创建者",enterButton:"搜索",size:"middle",className:ce,onSearch:function(e){C.keyword=e,e&&(0,oe.tk)({name:e,copywriting:e,position:"Subject"}),L(i()({},C))}})}),(0,G.jsx)("section",{className:"edu-container",children:(0,G.jsx)(j.Z,{spinning:a["classroomList/getCoursesLists"],children:(0,G.jsxs)("aside",{children:[(0,G.jsx)("div",{className:re,children:(0,G.jsxs)("ul",{children:[(0,G.jsxs)("li",{children:["已选",(0,G.jsx)("span",{className:"c-blue",children:y.length}),"课程"]}),(0,G.jsxs)("li",{children:["共",(0,G.jsx)("span",{className:"c-blue",children:f.subjects_count}),"个课程"]}),(0,G.jsxs)("li",{className:"current",onClick:function(){C.order="asc"===C.order?"desc":"asc",C.sort="shixuns_count",L(i()({},C))},children:["实训数",(0,G.jsxs)("p",{className:"edu-sorter current ".concat("shixuns_count"===C.sort&&C.order),children:[(0,G.jsx)("span",{className:"iconfont icon-sanjiaoxing-up"}),(0,G.jsx)("span",{className:"iconfont icon-sanjiaoxing-down"})]})]}),(0,G.jsxs)("li",{className:"current",onClick:function(){C.order="asc"===C.order?"desc":"asc",C.sort="myshixuns_count",L(i()({},C))},children:["学习人数",(0,G.jsxs)("p",{className:"edu-sorter current ".concat("myshixuns_count"===C.sort&&C.order),children:[(0,G.jsx)("span",{className:"iconfont icon-sanjiaoxing-up"}),(0,G.jsx)("span",{className:"iconfont icon-sanjiaoxing-down"})]})]}),(0,G.jsx)("li",{className:"".concat("all"===C.type&&"c-blue"," current"),onClick:function(){C.type="all",L(i()({},C))},children:"全部课程"}),(0,G.jsx)("li",{className:"".concat("mine"===C.type&&"c-blue"," current"),onClick:function(){C.type="mine",L(i()({},C))},children:"我的课程"})]})}),0===(null==f||null===(n=f.subject_list)||void 0===n?void 0:n.length)&&(0,G.jsx)(J.Z,{}),null==f||null===(s=f.subject_list)||void 0===s?void 0:s.map((function(e,n){var s,t;return(0,G.jsxs)("div",{className:se,style:{cursor:"auto"},children:[(0,G.jsx)(ee.ZP,{checked:y.map((function(e){return e.id})).includes(e.id),value:e.id,style:{marginTop:"1px"},disabled:null==e?void 0:e.need_authorize,onChange:function(n){N([{id:e.id,identifier:e.identifier}])}}),(0,G.jsxs)("div",{className:te,children:[(0,G.jsx)("div",{className:ie,children:(0,G.jsxs)("div",{className:ae,children:[(0,G.jsx)(h.Link,{to:"/paths/".concat(e.id),target:"_blank",children:(0,G.jsx)("strong",{className:"font16",dangerouslySetInnerHTML:{__html:e.title}})}),(null==e?void 0:e.need_authorize)&&(0,G.jsx)("span",{onClick:function(){(0,U.rX)(!1,"该课程中包含实训需授权后才可使用。 您可以在QQ服务群向管理员申请,获得继续操作的权限。")},style:{marginRight:"auto"},className:"tag-style bg-pink current ml10",children:"需授权"}),(0,G.jsx)(b.ZP,{ghost:!0,href:"/paths/".concat(e.id),type:"primary",target:"_blank",style:{borderRadius:"50px"},children:"体验课程"})]})}),(0,G.jsx)("div",{className:"flex-wrp mt10 font14 c-light-black",children:(0,G.jsx)("span",{className:le,dangerouslySetInnerHTML:{__html:e.description}})}),(0,G.jsx)(T.Z,{dashed:!0}),(0,G.jsxs)("div",{className:"c-light-black mt20",children:[null!=e&&null!==(s=e.content)&&void 0!==s&&s.author_name?(0,G.jsx)("span",{dangerouslySetInnerHTML:{__html:null==e||null===(t=e.content)||void 0===t||null===(t=t.author_name)||void 0===t?void 0:t[0]}}):(0,G.jsx)("span",{children:e.author_name}),(0,G.jsx)("span",{className:"ml15 mr15",children:"|"}),e.author_school_name&&(0,G.jsxs)(p.Fragment,{children:[(0,G.jsx)("span",{children:e.author_school_name}),(0,G.jsx)("span",{className:"ml15 mr15",children:"|"})]}),(0,G.jsx)("span",{children:"学习人数:"}),(0,G.jsx)("span",{children:e.myshixuns_count}),(0,G.jsx)("span",{className:"ml15 mr15",children:"|"}),(0,G.jsxs)("span",{children:["章节:",e.stage_count]}),(0,G.jsx)("span",{className:"ml15 mr15",children:"|"}),(0,G.jsxs)("span",{children:["实训:",e.shixuns_count]})]})]})]},e.id)}))]})})}),(0,G.jsx)("div",{className:"tc mt20",children:(0,G.jsx)(v.Z,{defaultCurrent:1,hideOnSinglePage:!0,defaultPageSize:20,current:C.page||1,showQuickJumper:!0,total:null==f?void 0:f.subjects_count,onChange:function(e){C.page=e,c({type:"classroomList/getCoursesLists",payload:i()({},C)})}})})]},"bottom")})),me=s(43418),pe=s(97022),he="itemWrapper___FDtjf",xe="imgWrapper___kuAby",fe="infoWrapper___kPiaa",_e="name___s6_8x",je="info___f4ohA",ve="smallText___NUbDW",ge="rate___uCfIz",ye="btnWrapper___oEyAe",Ne="removeBtn____Ucrs",ke="textEllipsis___dla3G",be="mr6___BYwoU",we="modalWrapper___Xvqvn",Ze="okBtn___XoB2t",Se="cancelBtn___QjfJN",Ce=(0,h.connect)((function(e){return{user:e.user,shixunsDetail:e.shixunsDetail,dispatch:e.dispatch}}))((function(e){var n,s=e.data,t=e.refreshData,i=e.virtualClassroomId,a=e.shixunsDetail,c=(e.user,e.dispatch),l=e.isCreator,o=s||{},d=o.name,x=o.user_name,_=o.school_name,j=o.challenges_count,v=o.stu_num,y=o.level,N=o.score_info,k=o.pic,b=o.identifier,C=(o.id,o.is_self),T=o.virtual_classroom_shixun_id,I=(0,p.useState)(!1),P=m()(I,2),z=P[0],B=P[1],A=function(){var e=u()(r()().mark((function e(){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:me.Z.confirm({title:"移出实践项目",icon:null,okText:"确认移出",className:we,width:428,centered:!0,closable:!1,content:(0,G.jsxs)("div",{children:["确认将实践项目《",d,"》移出虚拟社区吗?"]}),okButtonProps:{className:Ze},cancelButtonProps:{className:Se},onOk:function(){var e=u()(r()().mark((function e(){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,g.Ps)({virtual_classroom_id:i,shixun_id:T});case 2:0===e.sent.status&&t();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,p.useEffect)((function(){z&&(B(!1),E())}),[null==a||null===(n=a.detail)||void 0===n?void 0:n.id,z]);var D=function(){var e=u()(r()().mark((function e(){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return B(!0),e.next=3,c({type:"shixunsDetail/getShixunsDetail",payload:{id:b}});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),E=function(){var e,n;(0,U.tJ)(c,!0)&&(null!==(e=a.detail)&&void 0!==e&&e.is_jupyter||null!==(n=a.detail)&&void 0!==n&&n.is_jupyter_lab?c({type:"shixunsDetail/execJupyter",payload:{id:b}}).then((function(e){null!=e&&e.identifier&&window.open("/tasks/".concat(e.identifier,"/jupyter"))})):c({type:"shixunsDetail/execShixun",payload:{id:b}}).then(function(){var e=u()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==n||!n.game_identifier){e.next=3;break}return window.open("/tasks/".concat(n.game_identifier)),e.abrupt("return");case 3:2===(null==n?void 0:n.status)?M(null==n?void 0:n.message):3===(null==n?void 0:n.status)&&R(null==n?void 0:n.message);case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()))},M=function e(n){var s,t;n=null!==(s=n)&&void 0!==s&&s.includes(".json")?n:"".concat(n,".json"),me.Z.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:(0,G.jsx)("div",{className:"tc font16",children:"实训已经更新了,正在为您重置!"}),onOk:(t=u()(r()().mark((function s(){var t,i;return r()().wrap((function(s){for(;;)switch(s.prev=s.next){case 0:return s.next=2,(0,X.$Q)({url:n});case 2:if(t=s.sent){s.next=5;break}return s.abrupt("return");case 5:return w.ZP.success("重置成功,正在进入实践项目!"),s.next=8,(0,X.Ir)({id:t.shixun_identifier});case 8:if(null==(i=s.sent)||!i.game_identifier){s.next=12;break}return null===h.history||void 0===h.history||h.history.push("/tasks/".concat(i.game_identifier)),s.abrupt("return");case 12:2===(null==i?void 0:i.status)?e(null==i?void 0:i.message):3===(null==i?void 0:i.status)&&R(null==i?void 0:i.message);case 13:case"end":return s.stop()}}),s)}))),function(){return t.apply(this,arguments)})})},R=function(e){me.Z.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:(0,G.jsxs)("div",{className:"tc font16",children:["目前该实践项目尚在内测中,将于",e,"之后开放,谢谢!"]})})};return(0,G.jsxs)(Z.Z,{className:"".concat(he," mb20"),wrap:!1,onClick:D,children:[(0,G.jsx)(S.Z,{flex:"0 0 auto",className:xe,children:(0,G.jsx)("img",{src:"".concat(k),alt:""})}),(0,G.jsxs)(S.Z,{flex:1,className:"".concat(fe," ml20"),children:[(0,G.jsx)(Z.Z,{className:_e,children:(0,G.jsx)("span",{title:d,className:ke,children:d})}),(0,G.jsxs)(Z.Z,{className:je,align:"middle",wrap:!1,children:[(0,G.jsx)(S.Z,{flex:"72px",className:ke,title:x,children:x}),(0,G.jsx)(S.Z,{flex:"140px",className:"ml20 ".concat(ke),title:_,children:_}),(0,G.jsxs)(S.Z,{flex:"52px",className:"".concat(ve," ").concat(ke," ml20"),children:[(0,G.jsx)(L.Z,{title:"关卡数",children:(0,G.jsx)("i",{className:"iconfont icon-shixunguanqia font14 ".concat(be)})}),(0,G.jsx)("span",{title:j,children:j})]}),(0,G.jsxs)(S.Z,{flex:"72px",className:"".concat(ve," ").concat(ke," ml10"),children:[(0,G.jsx)(L.Z,{title:"学习人数",children:(0,G.jsx)("i",{className:"iconfont icon-chengyuan font14 ".concat(be)})}),(0,G.jsx)("span",{title:v,children:v})]}),(0,G.jsx)(S.Z,{flex:"52px",className:"".concat(ve," ml10"),children:y}),(0,G.jsx)(S.Z,{className:"ml10",children:(0,G.jsx)(pe.Z,{className:ge,allowHalf:!0,disabled:!0,defaultValue:N})}),(0,G.jsx)(S.Z,{className:"".concat(ve," ml5"),children:N})]})]}),(0,G.jsxs)(S.Z,{className:ye,children:[(0,G.jsxs)(f.op,{onClick:function(e){e.stopPropagation(),D()},children:[(0,G.jsx)("i",{className:"iconfont icon-shiyantixi font14",style:{marginRight:4}}),(0,G.jsx)("span",{children:"挑战"})]}),(C||l||(0,q.Ny)())&&(0,G.jsxs)(f.op,{className:"ml20 ".concat(Ne),onClick:function(e){e.stopPropagation(),A()},children:[(0,G.jsx)("i",{className:"iconfont icon-shanjian font14",style:{marginRight:4}}),(0,G.jsx)("span",{children:"移出"})]})]})]})})),Le="itemWrapper___ngbXA",Te="imgWrapper___AT5j9",Ie="infoWrapper___xhMza",Pe="name___C2Snj",ze="info___roajb",Be="smallText___oUD1O",Ae="btnWrapper___d_crD",De="removeBtn___ur6lt",Ee="textEllipsis___BHIv1",Me="mr6___yqxpX",Re="modalWrapper___kXUHq",Oe="okBtn___FmLSD",Qe="cancelBtn___MZ1Al",He=s(6457),We=(0,h.connect)((function(e){return{user:e.user}}))((function(e){var n=e.data,s=e.refreshData,t=e.virtualClassroomId,i=(e.user,e.isCreator),a=n||{},c=a.image_url,l=a.subject_members_names,o=a.name,d=a.members_count,m=a.user_name,p=a.school_name,h=a.shixuns_count,x=a.stages_count,_=(a.id,a.identifier),j=a.is_self,v=a.virtual_classroom_subject_id,y=function(){var e=u()(r()().mark((function e(){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:me.Z.confirm({title:"移出实践项目",icon:null,okText:"确认移出",className:Re,width:428,centered:!0,closable:!1,content:(0,G.jsxs)("div",{children:["确认将实践课程《",o,"》移出虚拟社区吗?"]}),okButtonProps:{className:Oe},cancelButtonProps:{className:Qe},onOk:function(){var e=u()(r()().mark((function e(){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,g.A)({virtual_classroom_id:t,subject_id:v});case 2:0===e.sent.status&&s();case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),N=function(){(0,He.xg)("/paths/".concat(_))};return(0,G.jsxs)(Z.Z,{className:"".concat(Le," mb20"),wrap:!1,onClick:N,children:[(0,G.jsx)(S.Z,{flex:"0 0 auto",className:Te,children:(0,G.jsx)("img",{src:"".concat(c),alt:""})}),(0,G.jsxs)(S.Z,{flex:1,className:"".concat(Ie," ml20"),children:[(0,G.jsx)(Z.Z,{className:Pe,children:(0,G.jsx)("span",{title:o,className:Ee,children:o})}),(0,G.jsxs)(Z.Z,{className:ze,align:"middle",wrap:!1,children:[(0,G.jsx)(S.Z,{flex:"72px",className:Ee,title:m,children:m}),(0,G.jsxs)(S.Z,{flex:"140px",className:"ml20 ".concat(Ee),style:{visibility:null!=p&&p.length?"visible":"hidden"},children:[(0,G.jsx)(L.Z,{title:"发布单位",children:(0,G.jsx)("i",{className:"iconfont icon-danwei1 font14 ".concat(Me)})}),(0,G.jsx)("span",{title:p,children:p})]}),(0,G.jsxs)(S.Z,{flex:"128px",className:"ml20 ".concat(Ee),style:{visibility:null!=l&&l.length?"visible":"hidden"},children:[(0,G.jsx)(L.Z,{title:"合作者",children:(0,G.jsx)("i",{className:"iconfont icon-hezuozhe font14 ".concat(Me)})}),(0,G.jsx)("span",{title:null==l?void 0:l.join("、"),children:null==l?void 0:l.join("、")})]}),(0,G.jsxs)(S.Z,{flex:"52px",className:"".concat(Be," ml40"),children:[(0,G.jsx)(L.Z,{title:"章节数",children:(0,G.jsx)("i",{className:"iconfont icon-zhangjie1 font14 ".concat(Me)})}),(0,G.jsx)("span",{children:x})]}),(0,G.jsxs)(S.Z,{flex:"52px",className:"".concat(Be," ml20"),children:[(0,G.jsx)(L.Z,{title:"实训数量",children:(0,G.jsx)("i",{className:"iconfont icon-xianshangkaoshi font12 ".concat(Me)})}),(0,G.jsx)("span",{children:h})]}),(0,G.jsxs)(S.Z,{flex:"72px",className:"".concat(Be," ").concat(Ee," ml20"),children:[(0,G.jsx)(L.Z,{title:"学习人数",children:(0,G.jsx)("i",{className:"iconfont icon-chengyuan font14 ".concat(Me)})}),(0,G.jsx)("span",{title:d,children:d})]})]})]}),(0,G.jsxs)(S.Z,{className:Ae,children:[(0,G.jsxs)(f.op,{onClick:function(e){e.stopPropagation(),N()},children:[(0,G.jsx)("i",{className:"iconfont icon-xuexi1 font14",style:{marginRight:4}}),(0,G.jsx)("span",{children:"学习"})]}),(j||i||(0,q.Ny)())&&(0,G.jsxs)(f.op,{className:"ml20 ".concat(De),onClick:function(e){e.stopPropagation(),y()},children:[(0,G.jsx)("i",{className:"iconfont icon-shanjian font14",style:{marginRight:4}}),(0,G.jsx)("span",{children:"移出"})]})]})]})})),Fe=(0,h.connect)((function(e){return{classroomList:e.classroomList,virtualSpaces:e.virtualSpaces,user:e.user}}))((function(e){var n,s=e.classroomList,t=e.virtualSpaces,a=(e.user,e.dispatch),l=(0,h.useParams)().virtual_spacesId,o=t.virtualSpacesDetails,d=null==o?void 0:o.is_creator,y=(null==o?void 0:o.is_member)||d||(0,q.Ny)(),N=null==t||null===(n=t.menus)||void 0===n||null===(n=n.find((function(e){return"experiment"===e.icon_type})))||void 0===n?void 0:n.id;(0,p.useEffect)((function(){A({page:1,limit:10}),V({page:1,limit:10})}),[window.localStorage.getItem("vtrsModuleId")]);var k=(0,p.useState)(!1),b=m()(k,2),w=b[0],Z=b[1],S=(0,p.useState)({page:1,limit:10}),C=m()(S,2),L=C[0],T=C[1],I=(0,p.useState)(),P=m()(I,2),z=P[0],B=P[1],A=function(){var e=u()(r()().mark((function e(n){var s;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Z(!0),n.virtual_module_id=window.localStorage.getItem("vtrsModuleId"),e.next=4,(0,g.rV)(l,n);case 4:if(!("status"in(s=e.sent))){e.next=7;break}return e.abrupt("return");case 7:B(s),Z(!1);case 9:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),D=(0,p.useState)(!1),E=m()(D,2),M=E[0],R=E[1],O=(0,p.useState)({page:1,limit:10}),Q=m()(O,2),H=Q[0],W=Q[1],F=(0,p.useState)(),X=m()(F,2),U=X[0],Y=X[1],V=function(){var e=u()(r()().mark((function e(n){var s;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return R(!0),n.virtual_module_id=window.localStorage.getItem("vtrsModuleId"),e.next=4,(0,g.tS)(l,n);case 4:if(!("status"in(s=e.sent))){e.next=7;break}return e.abrupt("return");case 7:Y(s),R(!1);case 9:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),K=(0,p.useState)("shixun"),ee=m()(K,2),ne=ee[0],se=ee[1],te=c()(c()({},"shixun",(0,G.jsx)(_.Z,{placement:"bottom",menu:{items:[{label:"从实践项目选用",key:"fromShixun"},{label:"从实践课程选用",key:"fromSubject"}],onClick:function(e){var n=e.key;a("fromShixun"===n?{type:"classroomList/setActionTabs",payload:{key:"选用实践项目"}}:{type:"classroomList/setActionTabs",payload:{key:"选用实践课程"}})}},children:(0,G.jsx)("div",{children:(0,G.jsx)(f.op,{children:"选用实验"})})})),"subject",(0,G.jsx)(f.op,{onClick:function(){a({type:"classroomList/setActionTabs",payload:{key:"选用实践课程"}})},children:"添加实践课程"}));return(0,G.jsxs)("section",{className:x,children:[(0,G.jsxs)(j.Z,{spinning:w||M,children:[(0,G.jsx)(f.YG,{value:ne,onChange:function(e){se(e)},tabBarExtraContent:y?te[ne]:null,dataSource:[{id:"shixun",name:"实践项目",total:null==z?void 0:z.total_count},{id:"subject",name:"实践课程",total:null==U?void 0:U.total_count}]}),"shixun"===ne&&(0,G.jsxs)("div",{style:{paddingTop:25},children:[0===(null==z?void 0:z.total_count)&&(0,G.jsx)(J.Z,{}),(null==z?void 0:z.total_count)>0&&(0,G.jsxs)("div",{children:[z.shixuns.map((function(e){return(0,G.jsx)(Ce,{isCreator:d,data:e,refreshData:u()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:z.shixuns.length<=1?(n=L.page>1?L.page-1:1,T({page:n,limit:10}),A({page:n,limit:10})):A(L);case 1:case"end":return e.stop()}}),e)}))),virtualClassroomId:l},e.id)})),(0,G.jsx)(v.Z,{pageSize:10,hideOnSinglePage:!0,total:null==z?void 0:z.total_count,current:L.page,onChange:function(e){T((function(n){return i()(i()({},n),{},{page:e})})),A({page:e,limit:10})},showQuickJumper:!0})]})]}),"subject"===ne&&(0,G.jsxs)("div",{style:{paddingTop:25},children:[0===(null==U?void 0:U.total_count)&&(0,G.jsx)(J.Z,{}),(null==U?void 0:U.total_count)>0&&(0,G.jsxs)("div",{children:[U.subjects.map((function(e){return(0,G.jsx)(We,{isCreator:d,data:e,refreshData:u()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:U.subjects.length<=1?(n=H.page>1?H.page-1:1,W({page:n,limit:10}),V({page:n,limit:10})):V(H);case 1:case"end":return e.stop()}}),e)}))),virtualClassroomId:l},e.id)})),(0,G.jsx)(v.Z,{pageSize:10,hideOnSinglePage:!0,total:null==U?void 0:U.total_count,current:H.page,onChange:function(e){W((function(n){return i()(i()({},n),{},{page:e})})),V({page:e,limit:10})},showQuickJumper:!0})]})]})]}),"选用实践项目"===s.actionTabs.key&&(0,G.jsx)($,{shixunIds:[],cb:function(){var e=u()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,g.LY)(l,{source:"shixun",shixun_ids:n,module_id:N,virtual_module_id:window.localStorage.getItem("vtrsModuleId")});case 2:return e.next=4,A({page:1,limit:10});case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()}),"选用实践课程"===s.actionTabs.key&&(0,G.jsx)(de,{onOk:function(){var e=u()(r()().mark((function e(n){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("shixun"!==ne){e.next=7;break}return e.next=3,(0,g.LY)(l,{source:"subject",subject_id:n,module_id:N,virtual_module_id:window.localStorage.getItem("vtrsModuleId")});case 3:return e.next=5,A({page:1,limit:10});case 5:e.next=11;break;case 7:return e.next=9,(0,g.bq)(l,{subject_ids:[n],module_id:N,virtual_module_id:window.localStorage.getItem("vtrsModuleId")});case 9:return e.next=11,V({page:1,limit:10});case 11:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()})]})}))}}]); |