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.
1 line
29 KiB
1 line
29 KiB
(self.webpackChunk=self.webpackChunk||[]).push([[25470,82595],{60954:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var a=n(4751),s=n(59301),i={icon:{tag:"svg",attrs:{"fill-rule":"evenodd",viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 112c17.7 0 32 14.3 32 32v736c0 17.7-14.3 32-32 32H144c-17.7 0-32-14.3-32-32V144c0-17.7 14.3-32 32-32zm-40 72H184v656h656V184zM640.01 338.83c.03 0 .05.01.09.06l45.02 45.01a.2.2 0 01.05.09.12.12 0 010 .07c0 .02-.01.04-.05.08L557.25 512l127.87 127.86a.27.27 0 01.05.06v.02a.12.12 0 010 .07c0 .03-.01.05-.05.09l-45.02 45.02a.2.2 0 01-.09.05.12.12 0 01-.07 0c-.02 0-.04-.01-.08-.05L512 557.25 384.14 685.12c-.04.04-.06.05-.08.05a.12.12 0 01-.07 0c-.03 0-.05-.01-.09-.05l-45.02-45.02a.2.2 0 01-.05-.09.12.12 0 010-.07c0-.02.01-.04.06-.08L466.75 512 338.88 384.14a.27.27 0 01-.05-.06l-.01-.02a.12.12 0 010-.07c0-.03.01-.05.05-.09l45.02-45.02a.2.2 0 01.09-.05.12.12 0 01.07 0c.02 0 .04.01.08.06L512 466.75l127.86-127.86c.04-.05.06-.06.08-.06a.12.12 0 01.07 0z"}}]},name:"close-square",theme:"outlined"},r=n(68475),o=function(e,t){return s.createElement(r.Z,(0,a.Z)({},e,{ref:t,icon:i}))};var l=s.forwardRef(o)},36289:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return W}});var a=n(82242),s=n.n(a),i=n(7557),r=n.n(i),o=n(41498),l=n.n(o),u=n(79800),c=n.n(u),d=n(59301),M=n(96707),p=n(43418),j=n(8591),h=n(3113),g=n(56511),N=n(38854),L=n(20834),m=n(53864),x=n(82595),D=n(68339),y=n(39647),f=n.n(y),v=n(5112),S="title___GjBar",I="content___I7QWQ",_="add___S7NYy",C="colorBlue___msrvf",w="radio___KDCSZ",b=n(37712),O=["shixunsDetail","globalSetting","loading","dispatch","onReloadData"],E=(0,M.connect)((function(e){var t=e.shixunsDetail,n=e.loading;return{shixunsDetail:t,globalSetting:e.globalSetting,loading:n}}))((function(e){var t=e.shixunsDetail,n=(e.globalSetting,e.loading),a=e.dispatch,s=e.onReloadData,i=(f()(e,O),(0,d.useState)()),o=c()(i,2),u=o[0],M=o[1],h=(0,d.useState)([]),g=c()(h,2),N=g[0],L=g[1];(0,d.useEffect)((function(){"Collaborators-ChangeManager"===t.actionTabs.key&&m()}),[t.actionTabs.key]);var m=function(){var e=l()(r()().mark((function e(){var n,s;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a({type:"shixunsDetail/getChangeManager",payload:{id:null===(n=t.actionTabs.params)||void 0===n?void 0:n.id}});case 2:s=e.sent,L(s||[]);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),x=function(){var e=l()(r()().mark((function e(){var n,i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(u){e.next=3;break}return j.ZP.info("所选人员为空,没有更换成功"),e.abrupt("return");case 3:return e.next=5,a({type:"shixunsDetail/changeManager",payload:{id:null===(n=t.actionTabs.params)||void 0===n?void 0:n.id,user_id:u}});case 5:i=e.sent,D(),i&&(s(),j.ZP.info(i.message));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),D=function(){a({type:"shixunsDetail/setActionTabs",payload:{}}),M(null)};return(0,b.jsx)(p.Z,{centered:!0,keyboard:!1,closable:!1,title:"更换管理员",open:"Collaborators-ChangeManager"===t.actionTabs.key,confirmLoading:n.effects["shixunsDetail/changeManager"],onOk:x,onCancel:D,children:(0,b.jsxs)("div",{children:[(0,b.jsxs)("div",{className:S,children:["选择的成员将会成为新的管理员",(0,b.jsx)("br",{}),"您将不再拥有管理员的权限,但您仍是合作团队的一员"]}),(0,b.jsx)("div",{className:I,children:N.length?(0,b.jsx)(v.ZP.Group,{value:u,onChange:function(e){return M(e.target.value)},children:N.map((function(e,t){return(0,b.jsx)(v.ZP,{className:w,value:e.user_id,children:e.name},t)}))}):(0,b.jsx)("div",{className:_,children:(0,b.jsxs)("span",{children:["请先将新的管理员通过",(0,b.jsx)("a",{className:C,onClick:function(){var e;a({type:"shixunsDetail/setActionTabs",payload:{key:"Collaborators-AddCollaborator",params:{id:null===(e=t.actionTabs.params)||void 0===e?void 0:e.id}}})},children:'"添加合作者"'}),"加入合作者列表"]})})})]})})})),T=n(99313),A=n(76992),z=n(95325),k=T.Z.TabPane,Q=function(e){var t=e.visible,n=e.onCancel,a=e.onSelectGroup,s=e.shixunId,i=e.onSelectCollaborator;return(0,b.jsx)(p.Z,{title:"添加合作者",open:t,width:1100,centered:!0,keyboard:!1,onCancel:n,maskClosable:!1,bodyStyle:{minHeight:400,padding:"0 20px 20px 20px"},footer:null,children:(0,b.jsxs)(T.Z,{defaultActiveKey:"1",children:[(0,b.jsx)(k,{tab:"搜索添加",children:(0,b.jsx)(A.Z,{onCancel:n,container_type:2,container_id:s,onSelect:i})},"1"),(0,b.jsx)(k,{tab:"团队添加",children:(0,b.jsx)(z.Z,{onCancel:n,onSelect:a})},"2")]})})},P={bg:"bg___sOdPb",wrap:"wrap___HoeSx",modal:"modal___t4bFU",content:"content___VMlwP",head:"head___eFHNj",headCount:"headCount___q7_8n",button:"button___OaGYh",itemWrap:"itemWrap___EgP_Y",imgWrap:"imgWrap___VcWR7",img:"img___PgTvY",manager:"manager___vGc7D",itemContent:"itemContent___JJG1i",nameWrap:"nameWrap___h4JTB",name:"name___yhHE5",actionGroup:"actionGroup___LDeZm",deleteIcon:"deleteIcon___Mmc7F",schoolWrap:"schoolWrap___Ru_DY",school:"school___zbcZj",countWrap:"countWrap___Mrp5n"},Z=n(43501),Y=n(88083),W=(0,M.connect)((function(e){var t=e.shixunsDetail,n=e.loading;return{shixunsDetail:t,globalSetting:e.globalSetting,user:e.user,loading:n}}))((function(e){var t,n,a,i,o=e.shixunsDetail,u=(e.globalSetting,e.loading),y=e.user,f=e.dispatch,v=(0,M.useParams)(),S=(0,d.useRef)(),I=(0,d.useState)(0),_=c()(I,2),C=_[0],w=_[1],O=(0,d.useState)([]),T=c()(O,2),A=T[0],z=T[1],k=(0,d.useState)({id:null,page:1}),W=c()(k,2),U=W[0],G=W[1],R=null===(t=y.userInfo)||void 0===t||null===(t=t.shixun)||void 0===t?void 0:t.editable,B=(null===(n=y.userInfo)||void 0===n?void 0:n.role)<=2||(null===(a=y.userInfo)||void 0===a||null===(a=a.shixun)||void 0===a?void 0:a.is_creator);(0,d.useEffect)((function(){S.current=v.id,U.id=S.current,G(U),H(U)}),[]);var H=function(){var e=l()(r()().mark((function e(t){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f({type:"shixunsDetail/getCollaboratorsData",payload:t});case 2:(n=e.sent)&&(z(n.members||[]),w(n.member_count));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),J=function(){var e=l()(r()().mark((function e(){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return U.page=1,G(U),t=(0,Y.g)(),e.next=5,f({type:"user/getUserInfo",payload:t});case 5:return e.next=7,H(U);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();function F(){return F=l()(r()().mark((function e(t,n,a,s){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f({type:"shixunsDetail/updateCollaboratorEditable",payload:{identifier:t,user_id:n,editable:a?0:1}});case 2:H(U);case 3:case"end":return e.stop()}}),e)}))),F.apply(this,arguments)}function V(){f({type:"shixunsDetail/setActionTabs",payload:{}})}var X,q,$={visible:"Collaborators-AddCollaborator"===o.actionTabs.key,onCancel:V,shixunId:S.current,onSelectCollaborator:(q=l()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return V(),e.next=3,f({type:"shixunsDetail/addCollaborator",payload:{id:S.current,user_ids:t}});case 3:e.sent&&(j.ZP.success("添加成功"),J());case 5:case"end":return e.stop()}}),e)}))),function(e){return q.apply(this,arguments)}),onSelectGroup:(X=l()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return V(),e.next=3,f({type:"shixunsDetail/addTeachGroupMember",payload:{identifier:S.current,group_id:t.group_id}});case 3:e.sent&&(j.ZP.success("添加成功"),J());case 5:case"end":return e.stop()}}),e)}))),function(e){return X.apply(this,arguments)})};return(0,b.jsxs)("section",{className:P.bg,children:[(0,b.jsxs)("div",{className:P.wrap,children:[(0,b.jsxs)("div",{className:P.content,children:[(null===(i=o.detail)||void 0===i?void 0:i.identity)<5&&(0,b.jsxs)("div",{className:P.head,children:[(0,b.jsxs)("span",{className:P.headCount,children:[C,"人"]}),(0,b.jsxs)("div",{children:[B&&(0,b.jsx)(h.ZP,{type:"primary",ghost:!0,className:P.button,onClick:function(){f({type:"shixunsDetail/setActionTabs",payload:{key:"Collaborators-ChangeManager",params:{id:S.current}}})},children:"更换管理员"}),R&&(0,b.jsx)(h.ZP,{type:"primary",className:P.button,onClick:function(){f({type:"shixunsDetail/setActionTabs",payload:{key:"Collaborators-AddCollaborator",params:{id:S.current}}})},children:"添加合作者"})]})]}),(0,b.jsx)("div",{className:P.list,children:(0,b.jsx)(g.Z,{loading:u.effects["shixunsDetail/getCollaboratorsData"],active:!0,avatar:{size:40},paragraph:{rows:3},className:"mt30",children:A.map((function(e,t){var n,a,s,i,u,c,d,h;return(0,b.jsxs)("div",{className:P.itemWrap,children:[(0,b.jsxs)("a",{href:null===(n=e.user)||void 0===n?void 0:n.user_url,target:"_blank",className:P.imgWrap,children:[(0,b.jsx)("img",{alt:"用户头像",height:"48",width:"48",className:P.img,src:"".concat(D.Z.IMG_SERVER,"/images/").concat(null===(a=e.user)||void 0===a?void 0:a.image_url)}),(null===(s=e.user)||void 0===s?void 0:s.shixun_manager)&&(0,b.jsx)("span",{className:P.manager,children:"创建者"})]}),(0,b.jsxs)("div",{className:P.itemContent,children:[(0,b.jsxs)("p",{className:P.nameWrap,children:[(0,b.jsx)("a",{href:e.user.user_url,target:"_blank",className:P.name,children:null===(i=e.user)||void 0===i?void 0:i.name}),(0,b.jsxs)("div",{className:P.actionGroup,children:[B?null!==(u=e.user)&&void 0!==u&&u.shixun_manager?null:(0,b.jsx)(N.Z,{dropdownRender:function(){return(0,b.jsxs)(L.Z,{selectedKeys:[e.editable?"1":"2"],onClick:function(){var t;!function(e,t,n,a){F.apply(this,arguments)}(o.detail.identifier,e.user.user_id,e.editable,null===(t=e.user)||void 0===t?void 0:t.name)},children:[(0,b.jsx)(L.Z.Item,{children:"编辑权限"},1),(0,b.jsx)(L.Z.Item,{children:"查看权限"},2)]})},children:(0,b.jsxs)("div",{children:[e.editable?(0,b.jsx)("span",{style:{fontSize:"16px"},className:"c-grey-c",children:"编辑权限"}):(0,b.jsx)("span",{style:{fontSize:"16px"},className:"c-grey-c",children:"查看权限"})," ",(0,b.jsx)(Z.Z,{style:{fontSize:"14px",color:"#888888"}})]})}):e.editable?(0,b.jsx)("span",{className:"c-green",children:"可编辑实训"}):(0,b.jsx)("span",{className:"c-grey-c",children:"不可编辑实训"}),null!==(c=e.user)&&void 0!==c&&c.shixun_manager||!R||e.user.user_id===(null===(d=y.userInfo)||void 0===d?void 0:d.user_id)?null:(0,b.jsx)("a",{className:"c-grey-c",onClick:function(){var t,n,a;return n=null===(t=e.user)||void 0===t?void 0:t.user_id,void p.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:(0,b.jsx)("div",{className:P.modal,children:"确定要删除吗?"}),onOk:(a=l()(r()().mark((function e(){var t,a;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,f({type:"shixunsDetail/deleteCollaborators",payload:{id:S.current,userId:n}});case 2:if(a=e.sent,(null===(t=y.userInfo)||void 0===t?void 0:t.user_id)!==n){e.next=6;break}return M.history.push("/shixuns"),e.abrupt("return");case 6:j.ZP.info(null==a?void 0:a.message),U.page=1,G(U),H(U);case 10:case"end":return e.stop()}}),e)}))),function(){return a.apply(this,arguments)})})},children:"删除"})]})]}),(0,b.jsx)("p",{className:P.schoolWrap,children:(0,b.jsx)("span",{className:P.school,children:null===(h=e.user)||void 0===h?void 0:h.school_name})})]})]},t)}))})})]}),C>10&&(0,b.jsx)("div",{className:P.countWrap,children:(0,b.jsx)(m.Z,{showQuickJumper:!0,showSizeChanger:!1,total:C,onChange:function(e){return function(e){U.page=e,G(U),H(U)}(e)},pageSize:10,current:U.page})})]}),(0,b.jsx)(x.Z,{}),(0,b.jsx)(E,{onReloadData:J}),(0,b.jsx)(Q,s()({},$))]})}))},82595:function(e,t,n){"use strict";n.d(t,{Z:function(){return A}});var a=n(79800),s=n.n(a),i=n(39647),r=n.n(i),o=n(59301),l=n(96707),u=n(68339),c=n(93948),d=n(6848),M="rightWrap___Y_2WO",p="learnWrap___mca1k",j="learnTopWrap___cn6Tj",h="courseWrap___N3Z6X",g="pathWrap___QSdXs",N="pathImg___VjPqu",L="pathContentItem___sxOSQ",m="pathContentWrap___WttwX",x="pathContentName___evsEv",D="pathContent___fz4ds",y="pathContentCount___Jlv3G",f="recommandTrainingWrap___F1gpg",v="recommandContent___JZYAA",S="recommandLevel___McDUw",I="color888___l_1AP",_="skillWrap___j6j3B",C="skillTopWrap___kIJbE",w="titleImg___I8kT9";Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var b=n(42441),O=n(7276),E=(n(56047),n(37712)),T=["shixunsDetail","user","globalSetting","loading","dispatch"],A=(0,l.connect)((function(e){var t=e.shixunsDetail,n=e.user,a=e.loading;return{shixunsDetail:t,user:n,globalSetting:e.globalSetting,loading:a.models.index}}))((function(e){var t,n,a,i,l,A,z,k,Q,P,Z,Y,W,U,G,R,B,H=e.shixunsDetail,J=e.user,F=(e.globalSetting,e.loading,e.dispatch,r()(e,T),(0,o.useState)(!0)),V=s()(F,2);V[0],V[1];console.log("----",H);var X,q,$=null!==(t=H.rightData)&&void 0!==t&&t.complete_count?Number(null===(n=H.rightData)||void 0===n?void 0:n.complete_count)/Number(null===(a=H.rightData)||void 0===a?void 0:a.challenge_count)*100:0;return H.rightData?(0,E.jsxs)("section",{className:M,children:[!(null!==(i=H.detail)&&void 0!==i&&i.is_jupyter)&&(null===(l=H.detail)||void 0===l||null===(l=l.task_operation)||void 0===l?void 0:l[2])&&(null==J||null===(A=J.userInfo)||void 0===A?void 0:A.login)&&!(null===(z=H.rightData)||void 0===z||!z.complete_count)&&(null===(k=H.rightData)||void 0===k?void 0:k.complete_count)>0&&(0,E.jsxs)("div",{className:p,children:[(0,E.jsxs)("div",{className:j,children:[(0,E.jsxs)("span",{children:[(0,E.jsx)("img",{className:w,src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTAgMmMuMDIgMCAuMDMuNzUuMDMyIDEuODM5bC4wMyA4LjE2SDkuMTlsLTMuOTMyIDYuMDA1aC45OEwxMC4wNjIgMTJIMjBjMCA1LjUyMy00LjQ3NyAxMC0xMCAxMFMwIDE3LjUyMyAwIDEyIDQuNDc3IDIgMTAgMlptLS4zNDggMTIuOTM4Yy0uNDYzIDAtLjgzNC4xNDctMS4xMTMuNDQzLS4yNzkuMjk1LS40MTguNjkzLS40MTggMS4xOTMgMCAuNDUzLjEzLjgxOS4zOSAxLjA5Ni4yNjEuMjc3LjY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",{className:"".concat(I," font14"),children:["已完成 ",(null===(Q=H.rightData)||void 0===Q?void 0:Q.complete_count)||0," 关 / 共",(null===(P=H.rightData)||void 0===P?void 0:P.challenge_count)||0," 关"]})})]}),(0,E.jsx)(c.Z,{percent:$,showInfo:!1,status:"active",strokeColor:{"0%":"#29BD8B","100%":"#29BD8B"}})]}),!(null===(Z=H.rightData)||void 0===Z||null===(Z=Z.paths)||void 0===Z||!Z.length)&&(0,E.jsxs)("div",{className:h,children:[(0,E.jsxs)("p",{className:"mb20 font16",children:[(0,E.jsx)("img",{className:w,src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMS4yNDguMDI2aDIuNDk1Yy44MzMgMCAxLjI0OS40MTUgMS4yNDkgMS4yNDN2MTcuMzljMCAuODI5LS40MTYgMS4yNDMtMS4yNDkgMS4yNDNIMS4yNDhDLjQxNiAxOS45MDIgMCAxOS40ODggMCAxOC42NlYxLjI3QzAgLjQ0LjQxNi4wMjUgMS4yNDguMDI1Wk03LjQ4OC4wMjZoMi40OTZjLjgzMiAwIDEuMjQ4LjQxNSAxLjI0OCAxLjI0M3YxNy4zOWMwIC44MjktLjQxNiAxLjI0My0xLjI0OCAxLjI0M0g3LjQ4OGMtLjgzMiAwLTEuMjQ4LS40MTQtMS4yNDgtMS4yNDJWMS4yN2MwLS44My40MTYtMS4yNDQgMS4yNDgtMS4yNDRaIiBmaWxsPSIjNTA5MUZGIi8+PHBhdGggZD0ibTEzLjQwNC42ODggMi40MTItLjY0NmMuMzItLjA4NS42Ni0uMDQuOTQ3LjEyNC4yODcuMTY1LjQ5Ni40MzcuNTgyLjc1NWw0LjUyMiAxNi44YTEuMjQyIDEuMjQyIDAgMCAxLS44ODMgMS41MmwtMi40MTEuNjQ0YTEuMjQ5IDEuMjQ5IDAgMCAxLTEuNTI4LS44NzlMMTIuNTIyIDIuMjA4YTEuMjM4IDEuMjM4IDAgMCAxIC4xMjQtLjk0M2MuMTY2LS4yODUuNDM5LS40OTQuNzU4LS41Nzl2LjAwMloiIGZpbGw9IiNCNkQwRkMiLz48L2c+PC9zdmc+",alt:""}),"所属课程"]}),(0,E.jsx)("div",{children:null===(Y=H.rightData)||void 0===Y?void 0:Y.paths.map((function(e,t){return t>2?null:(0,E.jsxs)("div",{className:g,children:[(0,E.jsx)("a",{href:"/paths/".concat(e.id),target:"_blank",children:(0,E.jsx)("img",{alt:"实训",src:"".concat(u.Z.IMG_SERVER,"/").concat(e.image_url),className:N})}),(0,E.jsxs)("div",{className:m,children:[(0,E.jsx)("a",{href:"/paths/".concat(e.id),target:"_blank",className:x,children:e.name}),(0,E.jsxs)("p",{className:D,children:[(0,E.jsx)(d.Z,{placement:"bottom",title:"章节",children:(0,E.jsxs)("span",{className:y,children:[(0,E.jsx)("i",{className:"iconfont icon-shixun mr3"}),e.stages_count]})}),(0,E.jsx)(d.Z,{placement:"bottom",title:"学习人数",children:(0,E.jsxs)("span",{className:y,children:[(0,E.jsx)("i",{className:"iconfont icon-chengyuan mr3"}),e.members_count]})})]})]})]},e.id)}))})]}),(0,E.jsx)("div",{}),!(null===(W=H.rightData)||void 0===W||null===(W=W.recommands)||void 0===W||!W.length)&&J.userInfo.main_site&&(0,E.jsxs)("div",{className:f,children:[(0,E.jsxs)("p",{className:"mb20 font16",children:[(0,E.jsx)("img",{className:w,src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMTUuNTAzIDIxLjg5NmEyLjA2NyAyLjA2NyAwIDAgMS0uODctLjIwMSA0NTEuOTg3IDQ1MS45ODcgMC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0uMTM1LS4wMjhaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==",alt:""}),(null==H||null===(U=H.detail)||void 0===U||null===(U=U.disciplines)||void 0===U?void 0:U.length)>0?"相关推荐":"热门推荐"]}),(0,E.jsx)("div",{children:null===(G=H.rightData)||void 0===G?void 0:G.recommands.map((function(e,t){return t>2?null:(0,E.jsxs)("div",{className:L,children:[(0,E.jsx)("a",{href:"/shixuns/".concat(e.identifier,"/challenges"),target:"_blank",children:(0,E.jsx)("img",{src:"".concat(u.Z.IMG_SERVER,"/").concat(e.pic),className:N})}),(0,E.jsxs)("div",{className:m,style:{marginBottom:-4},children:[(0,E.jsx)(d.Z,{placement:"bottom",title:e.name,children:(0,E.jsx)("a",{href:"/shixuns/".concat(e.identifier,"/challenges"),target:"_blank",className:x,children:e.name})}),(0,E.jsxs)("p",{className:"".concat(D," ").concat(v),children:[(0,E.jsxs)("span",{children:[e.stu_num," 人学习"]}),(0,E.jsx)("span",{className:S,children:e.level})]})]})]},t)}))})]}),(null===(R=H.rightData)||void 0===R||null===(R=R.tags)||void 0===R?void 0:R.length)>0&&(0,E.jsxs)("div",{className:_,children:[(0,E.jsx)("p",{className:"".concat(C," font16 mb20"),children:(0,E.jsxs)("span",{children:["技能标签",(0,E.jsx)("span",{className:"ml5 c-grey-c",children:null===(B=H.rightData)||void 0===B||null===(B=B.tags)||void 0===B?void 0:B.length})]})}),(0,E.jsx)(b.Z,{option:(q=new Image,q.src=O.yt,{backgroundColor:"#fff",tooltip:{pointFormat:"{series.name}</b>"},series:[{type:"wordCloud",sizeRange:[10,30],rotationRange:[-90,90],rotationStep:45,gridSize:2,shape:"pentagon",maskImage:q,textStyle:{normal:{color:function(){return"rgb("+Math.round(255*Math.random())+", "+Math.round(255*Math.random())+", "+Math.round(255*Math.random())+")"}}},left:"center",top:"center",right:null,bottom:null,width:"100%",height:"100%",data:(null==H||null===(X=H.rightData)||void 0===X||null===(X=X.tags)||void 0===X?void 0:X.map((function(e,t){return{name:e.tag_name,value:t}})))||[]}]}),style:{height:370},opts:{renderer:"svg"}})]})]}):null}))},88522:function(e,t,n){"use strict";var a=n(92310),s=n.n(a),i=n(89616),r=n(54798),o=n(59301),l=n(53487),u=n(92343),c=n(36355),d=n(57809);const{Option:M}=d.default;function p(e){return e&&e.type&&(e.type.isSelectOption||e.type.isSelectOptGroup)}const j=(e,t)=>{const{prefixCls:n,className:a,popupClassName:l,dropdownClassName:j,children:h,dataSource:g}=e,N=(0,i.Z)(h);let L;1===N.length&&(0,u.l$)(N[0])&&!p(N[0])&&([L]=N);const m=L?()=>L:void 0;let x;x=N.length&&p(N[0])?h:g?g.map((e=>{if((0,u.l$)(e))return e;switch(typeof e){case"string":return o.createElement(M,{key:e,value:e},e);case"object":{const{value:t}=e;return o.createElement(M,{key:t,value:t},e.text)}default:return}})):[];const{getPrefixCls:D}=o.useContext(c.E_),y=D("select",n);return o.createElement(d.default,Object.assign({ref:t,suffixIcon:null},(0,r.Z)(e,["dataSource","dropdownClassName"]),{prefixCls:y,popupClassName:l||j,className:s()(`${y}-auto-complete`,a),mode:d.default.SECRET_COMBOBOX_MODE_DO_NOT_USE},{getInputElement:m}),x)},h=o.forwardRef(j),g=(0,l.Z)(h);h.Option=M,h._InternalPanelDoNotUseOrYouWillBeFired=g,t.Z=h},44e3:function(e,t,n){"use strict";var a=n(84966),s=n(10711);const i=a.ZP;i.Header=a.h4,i.Footer=a.$_,i.Content=a.VY,i.Sider=s.Z,t.Z=i},51581:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),s=n(59301),i=o(s),r=o(n(12708));function o(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.scrollListener=n.scrollListener.bind(n),n.eventListenerOptions=n.eventListenerOptions.bind(n),n.mousewheelListener=n.mousewheelListener.bind(n),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),a(t,[{key:"componentDidMount",value:function(){this.pageLoaded=this.props.pageStart,this.options=this.eventListenerOptions(),this.attachScrollListener()}},{key:"componentDidUpdate",value:function(){if(this.props.isReverse&&this.loadMore){var e=this.getParentElement(this.scrollComponent);e.scrollTop=e.scrollHeight-this.beforeScrollHeight+this.beforeScrollTop,this.loadMore=!1}this.attachScrollListener()}},{key:"componentWillUnmount",value:function(){this.detachScrollListener(),this.detachMousewheelListener()}},{key:"isPassiveSupported",value:function(){var e=!1,t={get passive(){e=!0}};try{document.addEventListener("test",null,t),document.removeEventListener("test",null,t)}catch(e){}return e}},{key:"eventListenerOptions",value:function(){var e=this.props.useCapture;return this.isPassiveSupported()&&(e={useCapture:this.props.useCapture,passive:!0}),e}},{key:"setDefaultLoader",value:function(e){this.defaultLoader=e}},{key:"detachMousewheelListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.scrollComponent.parentNode),e.removeEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture)}},{key:"detachScrollListener",value:function(){var e=window;!1===this.props.useWindow&&(e=this.getParentElement(this.scrollComponent)),e.removeEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),e.removeEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture)}},{key:"getParentElement",value:function(e){var t=this.props.getScrollParent&&this.props.getScrollParent();return null!=t?t:e&&e.parentNode}},{key:"filterProps",value:function(e){return e}},{key:"attachScrollListener",value:function(){var e=this.getParentElement(this.scrollComponent);if(this.props.hasMore&&e){var t=window;!1===this.props.useWindow&&(t=e),t.addEventListener("mousewheel",this.mousewheelListener,this.options?this.options:this.props.useCapture),t.addEventListener("scroll",this.scrollListener,this.options?this.options:this.props.useCapture),t.addEventListener("resize",this.scrollListener,this.options?this.options:this.props.useCapture),this.props.initialLoad&&this.scrollListener()}}},{key:"mousewheelListener",value:function(e){1!==e.deltaY||this.isPassiveSupported()||e.preventDefault()}},{key:"scrollListener",value:function(){var e=this.scrollComponent,t=window,n=this.getParentElement(e),a=void 0;if(this.props.useWindow){var s=document.documentElement||document.body.parentNode||document.body,i=void 0!==t.pageYOffset?t.pageYOffset:s.scrollTop;a=this.props.isReverse?i:this.calculateOffset(e,i)}else a=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;a<Number(this.props.threshold)&&e&&null!==e.offsetParent&&(this.detachScrollListener(),this.beforeScrollHeight=n.scrollHeight,this.beforeScrollTop=n.scrollTop,"function"==typeof this.props.loadMore&&(this.props.loadMore(this.pageLoaded+=1),this.loadMore=!0))}},{key:"calculateOffset",value:function(e,t){return e?this.calculateTopPosition(e)+(e.offsetHeight-t-window.innerHeight):0}},{key:"calculateTopPosition",value:function(e){return e?e.offsetTop+this.calculateTopPosition(e.offsetParent):0}},{key:"render",value:function(){var e=this,t=this.filterProps(this.props),n=t.children,a=t.element,s=t.hasMore,r=(t.initialLoad,t.isReverse),o=t.loader,l=(t.loadMore,t.pageStart,t.ref),u=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var n={};for(var a in e)t.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=e[a]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));u.ref=function(t){e.scrollComponent=t,l&&l(t)};var c=[n];return s&&(o?r?c.unshift(o):c.push(o):this.defaultLoader&&(r?c.unshift(this.defaultLoader):c.push(this.defaultLoader))),i.default.createElement(a,u,c)}}]),t}(s.Component);l.propTypes={children:r.default.node.isRequired,element:r.default.node,hasMore:r.default.bool,initialLoad:r.default.bool,isReverse:r.default.bool,loader:r.default.node,loadMore:r.default.func.isRequired,pageStart:r.default.number,ref:r.default.func,getScrollParent:r.default.func,threshold:r.default.number,useCapture:r.default.bool,useWindow:r.default.bool},l.defaultProps={element:"div",hasMore:!1,initialLoad:!0,pageStart:0,ref:null,threshold:250,useWindow:!0,isReverse:!1,useCapture:!1,loader:null,getScrollParent:null},t.default=l,e.exports=t.default},26724:function(e,t,n){e.exports=n(51581)}}]); |