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.
2 lines
39 KiB
2 lines
39 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[3943],{76198:function(Ce,te,u){u.d(te,{$Y:function(){return G},A0:function(){return fe},EP:function(){return m},F_:function(){return z},G9:function(){return K},GB:function(){return _},GR:function(){return I},GW:function(){return ae},Hp:function(){return N},Ir:function(){return V},N$:function(){return f},NZ:function(){return b},Nv:function(){return ye},OA:function(){return a},OJ:function(){return ie},QF:function(){return Ve},RS:function(){return k},RY:function(){return M},Rj:function(){return Te},SX:function(){return L},Tp:function(){return w},Ui:function(){return Q},V1:function(){return He},Vn:function(){return n},dL:function(){return pe},fo:function(){return x},gK:function(){return r},hK:function(){return ne},i3:function(){return o},ib:function(){return s},lS:function(){return c},m5:function(){return S},n4:function(){return l},n_:function(){return E},oP:function(){return _e},p2:function(){return q},pl:function(){return H},rM:function(){return D},sM:function(){return h},t2:function(){return ue},tD:function(){return A},u8:function(){return W},um:function(){return Be},vm:function(){return se},wQ:function(){return Z},wj:function(){return Ee},wt:function(){return $},yS:function(){return F},yi:function(){return R},ym:function(){return O},z2:function(){return y}});const l="FETCH_TASK_START",V="FETCH_TASK_FAILURE",R="FETCH_TASK_SUCCESS",y="UPDATE_TASK_DATA",m="HIDE_EVALUATE_RESULT",S="SHOW_EVALUATE_RESULT",K="UPDATE_TIMESTRAP",z="MOVE_X",Z="MOVE_Y",o="TRIGGER_RIGHT_PANEL_MASK ",E="SET_ACTIVE_INDEX",h="GET_TASK_LIST",N="SHOW_TASK_LIST",ne="HIDE_TASK_LIST",s="SET_TASK_STAR",c="TRIGGER_ENLARGE_UNITY3D ",r="TRIGGER_TAB_FIXED ",I="GET_DISCUSSES",A="SHOW_DISCUSSES_LOADING",W="TOP_OR_DOWN_DISCUSS",D="PLUS_DISCUSS",F="SET_ACTION_TYPE",k="SHOW_REWARD_DIALOG",ue="CANCEL_REWARD_DIALOG",n="SET_REWARD",L="ACTIVE_DISCUSS_INDEX",g="CREATE_DISCUSS",x="DISABLE_DISCUSS",$="SHOW_ANSWER_LOADING",H="FETCH_ANSWER_INFO",b="HIGH_TIP_MODAL",Te="SHOW_TIP_MODAL",O="SELECT_UNLOCK_ANSWER",ie="SET_CHOOSE_ANSWERS",Ee="EVAL_CHOOSE_START",He="EVAL_CHOOSE_END",v="SHOW_REP_loading",_="FETCH_REP_CONTENT",f="EDIT_REP_CONTENT",Y="SET_REP_PATH",Q="SHOW_EVALUATE_LOADING",fe="HIDE_EVALUATE_LOADING",q="SET_EVALUATE_MESSAGE",ae="SET_SHOW_DIR",ee="SET_EDITOR_SETTING",G="SET_EDITOR_THEME",w="SET_EDITOR_FONTSIZE",_e="SET_REPOS",ge="SHOW_PATH_LIST",ve="HIDE_PATH_LIST",a="HIDE_PICTURE_VIEW",se="SHOW_PICTURE_VIEW",pe="SHOW_NOTICE",ye="HIDE_NOTICE",we="SET_TAB_INDEX",xe="SET_SSH_TABS",Ie="SET_SSH_CONFIGDATA",Se="SET_SSH_CONFIGDATAARR",M="SET_VNC_LOADING ",Be="ON_TAB_TO_SPACE ",Ve="ON_AUTO_FORMAT "},95318:function(Ce,te,u){u.d(te,{Z:function(){return ne}});var l=u(3113),V=u(59301),R=Object.defineProperty,y=Object.defineProperties,m=Object.getOwnPropertyDescriptors,S=Object.getOwnPropertySymbols,K=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,Z=(s,c,r)=>c in s?R(s,c,{enumerable:!0,configurable:!0,writable:!0,value:r}):s[c]=r,o=(s,c)=>{for(var r in c||(c={}))K.call(c,r)&&Z(s,r,c[r]);if(S)for(var r of S(c))z.call(c,r)&&Z(s,r,c[r]);return s},E=(s,c)=>y(s,m(c)),h=(s,c)=>{var r={};for(var I in s)K.call(s,I)&&c.indexOf(I)<0&&(r[I]=s[I]);if(s!=null&&S)for(var I of S(s))c.indexOf(I)<0&&z.call(s,I)&&(r[I]=s[I]);return r},N=(s,c,r)=>new Promise((I,A)=>{var W=k=>{try{F(r.next(k))}catch(ue){A(ue)}},D=k=>{try{F(r.throw(k))}catch(ue){A(ue)}},F=k=>k.done?I(k.value):Promise.resolve(k.value).then(W,D);F((r=r.apply(s,c)).next())});const ne=s=>{var c=s,{children:r}=c,I=h(c,["children"]);const[A,W]=(0,V.useState)(!1);return V.createElement(l.ZP,E(o({},I),{loading:A,onClick:D=>N(void 0,null,function*(){try{W(!0),yield I.onClick(D),W(!1)}catch(F){console.error(F),W(!1)}})}),r)}},18726:function(Ce,te,u){u.d(te,{Z:function(){return o}});var l=u(59301),V=u(3113),R=u(8591),y=u(46651),m=u(81407),S=u(97650),K=u(46961),z={img:"img___BgL9D"},o=({value:E,onChange:h,getFileProgress:N})=>{const[ne,s]=(0,l.useState)(!1),c=l.createElement(V.ZP,{loading:ne,icon:l.createElement(m.Z,null)},"\u9009\u62E9\u4E0A\u4F20\u6587\u4EF6"),r=()=>l.createElement("div",{className:z.img},l.createElement("img",{src:K.Z.API_SERVER+"/api/attachments/"+E,alt:"avatar",style:{width:288}}),l.createElement("div",null,l.createElement(S.Z,{onClick:()=>h(""),style:{fontSize:"16px",color:"red"}}))),I=A=>{var W,D,F,k,ue,n;if(N&&N(A),A.file.status==="uploading"){s(!0);return}if(A.file.status==="done"){if(s(!1),A.file.status==="done"&&((D=(W=A.file)==null?void 0:W.response)==null?void 0:D.status)===-1){R.ZP.error((k=(F=A.file)==null?void 0:F.response)==null?void 0:k.message);return}h((n=(ue=A==null?void 0:A.file)==null?void 0:ue.response)==null?void 0:n.id)}};return l.createElement(l.Fragment,null,E?r():l.createElement("div",null,l.createElement(y.default,{withCredentials:!0,name:"file",showUploadList:!1,action:`${K.Z.API_SERVER}/api/attachments.json`,onChange:I,accept:"image/*"},c),l.createElement("div",{className:"mt20 c-light-black"},"\u8BF4\u660E\uFF1A\u652F\u6301\u4E0A\u4F20jpg/png\u7B49\u683C\u5F0F\u6587\u4EF6\uFF0C\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC72M,\u5EFA\u8BAE\u4F7F\u7528288*158\u50CF\u7D20\uFF1B"),l.createElement("div",{className:"c-light-black"},"\u5982\u4E0D\u4E0A\u4F20\uFF0C\u9ED8\u8BA4\u4F7F\u7528\u7CFB\u7EDF\u56FE\u7247\u3002")))}},77353:function(Ce,te,u){u.d(te,{Z:function(){return y}});var l=u(63144),V={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},R=u(59301),y=({message:m,className:S,children:K,style:z={}})=>R.createElement("div",{className:`custom-spinner ${V.idsRingWrapper} ${S}`},R.createElement("div",{className:V.ldsRing},R.createElement("div",null),R.createElement("div",null),R.createElement("div",null),R.createElement("div",null)),m?R.createElement("p",{style:z},m):null,K,R.createElement(l.Outlet,null))},51355:function(Ce,te,u){u.d(te,{Z:function(){return y}});var l=u(59301),V=u(44259),R=u(13879),y=()=>{const[m,S]=(0,l.useState)(""),[K,z]=(0,l.useState)(0);let[Z,o]=(0,l.useState)(),[E,h]=(0,l.useState)();const[N,ne]=(0,l.useState)(!1),s=(0,l.useRef)("");(0,l.useEffect)(()=>V.Z.subscribe("preview-image",L=>{S(L),console.log(k.current),document.body.style.overflow="hidden"}),[]),(0,l.useEffect)(()=>(document.addEventListener("keydown",c),()=>{document.removeEventListener("keydown",c)}),[]),(0,l.useEffect)(()=>{s.current=m},[m]);function c(n){n.keyCode==27&&s.current&&r()}function r(){document.body.style.overflow="auto",o(void 0),h(void 0),z(0),S("")}function I(){z(K+90)}function A(){Z=k.current.width*1.1,E=k.current.height*1.1,h(E),o(Z)}function W(){Z=k.current.width/1.1,E=k.current.height/1.1,h(E),o(Z)}const D=(0,l.useRef)(),F=(0,l.useRef)(),k=(0,l.useRef)(),ue=n=>{(n.nativeEvent.target===D.current||n.nativeEvent.target===F.current)&&r()};return l.createElement(l.Fragment,null,m?l.createElement("div",null,l.createElement("div",{className:"preview-wrp-group",ref:F},l.createElement(R.Z,{className:"image-preview",src:m,style:{display:"none"},preview:{visible:!0,src:m,movable:!1,onVisibleChange:n=>{S("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},51593:function(Ce,te,u){u.d(te,{Z:function(){return He}});var l=u(59301),V=u(63144),R=u(57809),y=u(43418),m=u(8591),S=u(6848),K=u(48209),z=u(95237),Z=u(43604),o=u(3113),E=u(39146),h=u(11473),N=u(15826),ne=u(33288),s=u(21797),c=u(84015),r={tree:"tree___SHCwq",learn:"learn___buOG9",name:"name___dwQwe",sign:"sign___aQzc5",pdf_name:"pdf_name___m1wEX",name_style:"name_style___CnJ7d",color333:"color333___TbHdH"},I=u(89392),A=u(43501),W=u(88845),D=u(35099),F=u(15276),k=u(46961),ue=u(95318),n=u(59301),L=Object.defineProperty,g=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,$=Object.prototype.propertyIsEnumerable,H=(v,_,f)=>_ in v?L(v,_,{enumerable:!0,configurable:!0,writable:!0,value:f}):v[_]=f,b=(v,_)=>{for(var f in _||(_={}))x.call(_,f)&&H(v,f,_[f]);if(g)for(var f of g(_))$.call(_,f)&&H(v,f,_[f]);return v},Te=(v,_)=>{var f={};for(var Y in v)x.call(v,Y)&&_.indexOf(Y)<0&&(f[Y]=v[Y]);if(v!=null&&g)for(var Y of g(v))_.indexOf(Y)<0&&$.call(v,Y)&&(f[Y]=v[Y]);return f},O=(v,_,f)=>new Promise((Y,Q)=>{var fe=ee=>{try{ae(f.next(ee))}catch(G){Q(G)}},q=ee=>{try{ae(f.throw(ee))}catch(G){Q(G)}},ae=ee=>ee.done?Y(ee.value):Promise.resolve(ee.value).then(fe,q);ae((f=f.apply(v,_)).next())});const{Option:ie}=R.default,Ee=v=>{var _=v,{pathsDetail:f,globalSetting:Y,user:Q,loading:fe,visibleType:q,subjectHomeworkType:ae,updateSort:ee,isPaths:G,dispatch:w,keywords:_e,isShowSchedule:ge,getData:ve}=_,a=Te(_,["pathsDetail","globalSetting","user","loading","visibleType","subjectHomeworkType","updateSort","isPaths","dispatch","keywords","isShowSchedule","getData"]);let[se,pe]=(0,l.useState)([]),[ye,we]=(0,l.useState)([]);const xe=(0,V.useParams)(),[Ie,Se]=(0,l.useState)([]),[M,Be]=(0,l.useState)({});(0,l.useEffect)(()=>{if(a.data&&!(0,I.isEqual)(a.data,Ie)){ye=[];const e=JSON.parse(JSON.stringify(a.data));Ae(e,0),Se([...e]),a!=null&&a.expandAll||q!="All"?pe([...ye]):pe([])}},[a.data,q,a==null?void 0:a.expandAll]),(0,l.useEffect)(()=>{var e,d,i,j,P,J,re,t,le,ce;let oe;if((e=f.detail)!=null&&e.has_start){const X=(i=(d=f.detail)==null?void 0:d.courses)==null?void 0:i.findIndex(de=>{var T;return parseInt((T=de.course_status)==null?void 0:T.status)===1});oe=X>-1?X:0}else{let X=(J=(P=(j=f.detail)==null?void 0:j.courses)==null?void 0:P.map(de=>{var T;return parseInt((T=de.course_status)==null?void 0:T.status)}))==null?void 0:J.lastIndexOf(2);oe=X>-1?X:0,X=(t=(re=f.detail)==null?void 0:re.courses)==null?void 0:t.findIndex(de=>{var T;return parseInt((T=de.course_status)==null?void 0:T.status)===0}),oe=X>-1?X:oe}(le=f.detail)!=null&&le.courses&&Be(((ce=f.detail)==null?void 0:ce.courses[oe])||{})},[f.detail]);const Ve=(e,d)=>{y.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u5B9A\u5220\u9664\u8BE5\u5B9E\u8BAD\u5417\uFF1F",onOk:()=>{}})},C=e=>{y.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:"\u786E\u5B9A\u5220\u9664\u8BE5\u7AE0\u8282\u5417\uFF1F",onOk:()=>O(void 0,null,function*(){})})},B=(e,d)=>O(void 0,null,function*(){const i=d?yield(0,c.BK)({id:e}):yield(0,c.Ir)({id:e});if(i!=null&&i.game_identifier||i!=null&&i.identifier){(0,N.xg)(d?`/tasks/${i==null?void 0:i.identifier}/jupyter`:`/tasks/${i.game_identifier}?subject_id=${xe.pathId||""}`);return}(i==null?void 0:i.status)===-3?(0,N.eF)():(i==null?void 0:i.status)===2?U(i==null?void 0:i.message):(i==null?void 0:i.status)===3&&p(i==null?void 0:i.message)}),U=e=>{e=e!=null&&e.includes(".json")?e:`${e}.json`,y.default.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:n.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:()=>O(void 0,null,function*(){const d=yield(0,s.$Q)({url:e});if(!d)return;m.ZP.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8DF5\u9879\u76EE\uFF01");const i=yield(0,c.Ir)({id:d.shixun_identifier});if(i!=null&&i.game_identifier){(0,N.xg)(`/tasks/${i.game_identifier}`);return}(i==null?void 0:i.status)===2?U(i==null?void 0:i.message):(i==null?void 0:i.status)===3&&p(i==null?void 0:i.message)})})},p=e=>{y.default.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:n.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",e,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},Oe=e=>{console.log("onDragEnter:",e)},Ne=e=>O(void 0,null,function*(){var d,i,j,P;console.log("onDrop:",e);const J=e.node.props.eventKey,re=e.dragNode.props.eventKey,t=e.node.props.pos.split("-"),le=e.dropPosition-Number(t[t.length-1]);if(t.length>3&&!e.node.dragOverGapBottom&&!e.node.dragOverGapTop||e.node.dragOver&&e.dragNodesKeys.length>1||t.length>2&&e.dragNodesKeys.length>1)return!1;let ce=["Attachment","Hack","Shixun","SubjectHomework","Videoltem"];if(ce.includes((d=e.dragNode)==null?void 0:d.item_type)&&((i=e.node)==null?void 0:i.item_type)!="StageCatalog"&&le===0||((j=e.dragNode)==null?void 0:j.item_type)==="StageCatalog"&&ce.includes((P=e.node)==null?void 0:P.item_type)&&le===0)return!1;const oe=(T,Fe,ke)=>{for(let he=0;he<T.length;he++){if(T[he].key===Fe)return ke(T[he],he,T);T[he].children&&oe(T[he].children,Fe,ke)}},X=[...Ie];let de;if(oe(X,re,(T,Fe,ke)=>{ke.splice(Fe,1),de=T}),!e.dropToGap)oe(X,J,T=>{T.children=T.children||[],T.children.unshift(de)});else if((e.node.props.children||[]).length>0&&e.node.props.expanded&&le===1)oe(X,J,T=>{T.children=T.children||[],T.children.unshift(de)});else{let T,Fe;oe(X,J,(ke,he,je)=>{T=je,Fe=he}),le===-1?T.splice(Fe,0,de):T.splice(Fe+1,0,de)}yield ee({stage_id:a.stage_id,list:X}),Ae(X,0,0,!0),console.log("data:",X),Se([...X]),pe([...se,e.node.key])}),Ae=(e,d,i,j)=>{d=d||0,e.map((P,J)=>{var re;try{return P.key2=d+1+"-"+(J+1),P.key3=a.index+1+"-"+(J+1),P.title="",j||(P.key=d+1+"-"+(J+1)),d?P.index=i+"-"+(J+1):P.index=P.key3,(re=P.children)!=null&&re.length&&(ye.push(P.key2),Ae(P.children,P.key2,P.index,j)),P}catch(t){}})},Pe=e=>{e=e||"";let d=new RegExp(_e,"ig");const i=e.replace(d,'<span style="color:#3061D0">$&</span>');return _e?n.createElement("span",{dangerouslySetInnerHTML:{__html:i}}):e},Ze=(e,d)=>{const{learning_status:i,name:j}=e;return(i==null?void 0:i[0])==="can"&&(i==null?void 0:i[1])==="try"?n.createElement("div",{className:r.learn},n.createElement("span",{className:r.name},d?j:Pe(j)),n.createElement("span",{className:r.sign},"\u514D\u8D39\u8BD5\u5B66")):d?j:Pe(j)},Re=e=>{q==="All"&&(se.includes(e)?pe(se.filter(d=>d!=e)):pe(se.concat(e)))},Le=e=>O(void 0,null,function*(){if((0,F.tJ)(w,!0)){if(e!=null&&e.need_authorize){(0,F.rX)(!1);return}B(e.identifier,e.is_jupyter||e.is_jupyter_lab),M!=null&&M.course_id&&(0,h.JS)({id:M==null?void 0:M.course_id})}}),me=e=>O(void 0,null,function*(){var d,i,j,P,J;if(!(0,F.tJ)(w))return;if(!((d=Q.userInfo)!=null&&d.admin)&&!((i=Q.userInfo)!=null&&i.business)&&!e.can_view&&e.item_type!=="Attachment")return y.default.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:n.createElement("div",{className:"tc font14"},"\u5F53\u524D\u89C6\u9891\u4E3A\u521B\u5EFA\u8005\u6240\u5C5E\u5355\u4F4D\u5185\u90E8\u6559\u5B66\u8D44\u6599\uFF0C\u5916\u5355\u4F4D\u7528\u6237\u65E0\u89C2\u770B\u6743\u9650")});e.link&&(0,ne.DH)({is_f:1,id:e.id,point:0,total:0});const re=a!=null&&a.course_id?`course_id=${a==null?void 0:a.course_id}`:`subject_id=${xe.pathId||a.subject_id}`;if(((P=e==null?void 0:e.name)==null?void 0:P.substr((j=e==null?void 0:e.name)==null?void 0:j.lastIndexOf("."))).toUpperCase()===".ZIP"){if(!((J=f.detail)!=null&&J.allow_download)){m.ZP.info("\u6559\u5B66\u8BFE\u4EF6\u4E0D\u652F\u6301\u4E0B\u8F7D");return}(0,N.FH)(e.name,k.Z.API_SERVER+e.url)}else(0,N.xg)(e.link||`/video/${e.id}?${re}`);if(e.item_type==="Attachment"&&e.complete_status!=2){const le=yield(0,h.rS)({attachment_id:e.id,status:2})}(e.item_type==="Attachment"||e.item_type==="VideoItem")&&ve()}),Ue=e=>{let d;return e.item_type==="Shixun"?e.is_all_choice?d=n.createElement(S.Z,{title:"\u9009\u62E9\u9898"},n.createElement("i",{className:"iconfont icon-xuanzeti3 c-lake-blue font20"})):d=n.createElement(S.Z,{title:"\u5B9E\u8BAD\u9898"},n.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"})):e.item_type==="VideoItem"?d=n.createElement("i",{className:"iconfont icon-shipin2 c-purple-8C1 font20"}):e.item_type==="StageCatalog"?d=n.createElement("i",{className:"iconfont icon-kongbai c-brilliant-blue font20"}):e.item_type==="ExaminationBank"?d=n.createElement("i",{className:"iconfont icon-zhangjieceshibeifen c-brilliant-blue font20"}):e.item_type==="HomeworkCommon"&&e.homework_type==="hack"?d=n.createElement("i",{className:"iconfont icon-bianchengzuoye1 font20",style:{color:"#E99237"}}):e.item_type==="SubjectHomework"&&e.homework_type==="group"?d=n.createElement("i",{className:"iconfont icon-fenzuzuoye3 font20",style:{color:"#acc218"}}):e.item_type==="SubjectHomework"&&e.homework_type==="normal"?d=n.createElement("i",{className:"iconfont icon-tuwenzuoye font20",style:{color:"#1db37f"}}):d=n.createElement("i",{className:"iconfont icon-kejian1 c-cyan-blue font20"}),d},We={},[De,be]=(0,l.useState)(!1),Ge=e=>{De||be(!0)},Ke=()=>{be(!1)},Me=(0,l.useMemo)(()=>(console.log("doms:"),n.createElement(K.default,{className:r.tree,disabled:a.disabled,expandedKeys:[...se],draggable:!0,onDragEnter:Oe,onDrop:Ne,onExpand:Re,blockNode:!0,titleRender:e=>{var d,i,j,P,J,re;let t=e;if(q=="SubjectHomework"){if(ae=="group_count"&&(t==null?void 0:t.homework_type)!="group"||ae=="normal_count"&&(t==null?void 0:t.homework_type)!="normal")return null}else if(t.item_type!==q&&q!=="All")return null;const le=((d=e==null?void 0:e.learning_status)==null?void 0:d[0])==="can";return n.createElement(z.Z,{align:"middle",className:"font14",onClick:()=>Re(t.key),style:{flexWrap:"nowrap",whiteSpace:"nowrap"},onMouseOver:()=>Ge(t.key)},n.createElement(Z.Z,{flex:"30px",style:{display:"flex",alignItems:"center"}},e.item_type==="VideoItem"?n.createElement("i",{className:"iconfont icon-shipin2 c-purple-8C1 font20"}):e.item_type==="StageCatalog"?n.createElement("i",{className:"iconfont icon-kongbai c-brilliant-blue font20"}):e.item_type==="SubjectHomework"&&e.homework_type==="group"?n.createElement("i",{className:"iconfont icon-fenzuzuoye3 font20",style:{color:"#acc218"}}):e.item_type==="SubjectHomework"&&e.homework_type==="normal"?n.createElement("i",{className:"iconfont icon-tuwenzuoye font20",style:{color:"#1db37f"}}):e.item_type==="ExaminationBank"?n.createElement("i",{className:"iconfont icon-zhangjieceshibeifen font20",style:{color:"#e9a318"}}):e.item_type==="HomeworkCommon"&&e.homework_type==="hack"?n.createElement("i",{className:"iconfont icon-bianchengzuoye1 font20",style:{color:"#E99237"}}):e.item_type==="Shixun"&&e.is_all_choice?n.createElement(S.Z,{title:"\u9009\u62E9\u9898"},n.createElement("i",{className:"iconfont icon-xuanzeti3 c-lake-blue font20"})):e.item_type==="Shixun"&&!e.is_all_choice?n.createElement(S.Z,{title:"\u5B9E\u8BAD\u9898"},n.createElement("i",{className:"iconfont icon-shixunti2 c-light-primary font20"})):n.createElement("i",{className:"iconfont icon-kejian1 c-cyan-blue font20"})),n.createElement(Z.Z,{flex:"1",className:r.color333,style:{display:"flex",alignItems:"center",width:300}},a.cust_seq&&n.createElement("span",{className:`${r.color333} mr10`},e.index),e.item_type!=="Attachment"&&n.createElement("div",{className:r.name_style},n.createElement(S.Z,{placement:"topLeft",title:e.name},Ze(e,!1))),e.item_type==="Attachment"&&n.createElement("a",{target:"_blank",className:r.pdf_name,title:e.name,onClick:()=>O(void 0,null,function*(){if((0,F.tJ)(w)){if(M!=null&&M.course_id){const ce=yield(0,h.JS)({id:M==null?void 0:M.course_id})}switch(e.item_type){case"Attachment":me(t);break;case"VideoItem":me(e);break;case"ExaminationBank":me(e);break;case"HomeworkCommon":me(e);break;case"SubjectHomework":(e.homework_type=="group"||e.homework_type=="normal")&&me(e);break;case"Shixun":Le(e);break}}})},e.name),e.item_type==="Shixun"&&e.is_unity_3d&&n.createElement("span",{style:{background:"#a300d8",color:"#fff",borderRadius:"13px",marginLeft:"5px",width:"68px",height:"20px",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:"12px"}},"\u865A\u62DF\u4EFF\u771F"),e.item_type==="Shixun"&&e.is_jupyter_lab&&n.createElement("span",{style:{background:"#ff6802",color:"#fff",borderRadius:"13px",marginLeft:"5px",width:"76px",height:"20px",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:"12px"}},"JupyterLab"),e.item_type==="Shixun"&&e.is_jupyter&&n.createElement("span",{style:{background:"#ff6802",color:"#fff",borderRadius:"13px",marginLeft:"5px",width:"112px",height:"20px",display:"inline-flex",alignItems:"center",justifyContent:"center",fontSize:"12px"}},"Jupyter Notebook"),e.item_type==="Shixun"&&((i=e==null?void 0:e.shixun_marks)==null?void 0:i.length)>0&&(((j=Q==null?void 0:Q.userInfo)==null?void 0:j.role)==1||((P=Q==null?void 0:Q.userInfo)==null?void 0:P.role)==2)&&(e==null?void 0:e.shixun_marks.map((ce,oe)=>n.createElement(S.Z,{title:`${ce}`,key:oe},n.createElement("span",{style:{background:"#43a2ff",color:"#fff",borderRadius:"13px",marginLeft:"5px",height:"20px",textAlign:"center",fontSize:"12px",maxWidth:"70px",padding:"0px 13px",overflow:"hidden",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",justifyContent:"center",textOverflow:"ellipsis"}},ce)))),!!((J=e.schools)!=null&&J.length)&&n.createElement(S.Z,{title:"\u8BE5\u5B9E\u8DF5\u9879\u76EE\u9762\u5411\u6307\u5B9A\u5355\u4F4D\u5F00\u653E"},n.createElement("i",{className:"iconfont icon-zhidinggongkai1 ml10 c-orange",style:{transform:"translateY(1px)",display:"inline-block"}})),e.item_type==="Shixun"&&!!(e!=null&&e.finished_challenges_count)&&n.createElement(S.Z,{title:`\u5B8C\u6210\u5EA6:${Math.round((e==null?void 0:e.finished_challenges_count)/(e==null?void 0:e.challenges_count)*100)}%`},n.createElement("i",{className:`iconfont icon-a-wanchengdu100 ml10 ${(e==null?void 0:e.finished_challenges_count)-(e==null?void 0:e.challenges_count)===0?"c-light-green":"c-grey-333"}`,style:{transform:"translateY(1px)",display:"inline-block"}}))),!a.disabled&&n.createElement("aside",{style:{color:"#0152d9",fontSize:"14px",marginRight:"20px"}},"\u62D6\u52A8\u53EF\u4EE5\u6539\u53D8\u9879\u76EE\u663E\u793A\u987A\u5E8F"),De&&n.createElement(Z.Z,{className:"tr"},(t.item_type==="VideoItem"||(t==null?void 0:t.item_type)==="Attachment"||(t==null?void 0:t.item_type)==="StageCatalog"||(t==null?void 0:t.item_type)==="SubjectHomework"||(t==null?void 0:t.item_type)==="ExaminationBank"||(t==null?void 0:t.item_type)==="HomeworkCommon")&&!a.disabled&&!a.hiddenEditBtn&&n.createElement(S.Z,{title:"\u7F16\u8F91"},n.createElement("span",{onClick:()=>{a.editVidoItem(b({stage_id:a.stage_id},t))},style:{color:"#ccc",marginRight:"10px"}},n.createElement(E.Z,null))),!a.disabled&&n.createElement(n.Fragment,null,n.createElement(S.Z,{title:"\u5220\u9664"},n.createElement("span",{onClick:()=>{a.deleteStages({id:t.stage_item_id,stage_id:a.stage_id})},className:"iconfont icon-shanchu c-grey-c"}))),a.showVideoPlay&&a.disabled&&t.item_type==="SubjectHomework"&&le&&n.createElement("aside",null,!(0,D.JA)()&&G&&((0,D.Ny)()||(t==null?void 0:t.is_free)||!(t!=null&&t.is_free)&&(t==null?void 0:t.is_trial_study))&&n.createElement(o.ZP,{className:"mr10",type:"primary",onClick:()=>O(void 0,null,function*(){(0,F.tJ)(w)&&w({type:"shixunsDetail/setActionTabs",payload:{key:"Stage-SendModal",params:{id:t.stage_item_id,title:(t==null?void 0:t.homework_type)=="group"?"\u5206\u7EC4\u4F5C\u4E1A":"\u56FE\u6587\u4F5C\u4E1A"}}})})},"\u53D1\u9001"),!(0,D.JA)()&&G&&n.createElement(o.ZP,{type:"primary",onClick:()=>O(void 0,null,function*(){(0,F.tJ)(w)&&a.showInfoModal(b({stage_id:a.stage_id},t))})},"\u67E5\u770B\u8BE6\u60C5")),a.showVideoPlay&&a.disabled&&t.item_type==="ExaminationBank"&&le&&n.createElement("aside",null,!(0,D.JA)()&&G&&((0,D.Ny)()||(t==null?void 0:t.is_free)||!(t!=null&&t.is_free)&&(t==null?void 0:t.is_trial_study))&&n.createElement(o.ZP,{className:"mr10",type:"primary",onClick:()=>O(void 0,null,function*(){(0,F.tJ)(w)&&w({type:"shixunsDetail/setActionTabs",payload:{key:"Stage-SendModal",params:{id:t.stage_item_id,title:"\u6D4B\u9A8C",examinationid:t.id}}})})},"\u53D1\u9001"),!(0,D.JA)()&&G&&n.createElement(o.ZP,{type:"primary",onClick:()=>O(void 0,null,function*(){(0,F.tJ)(w)&&window.open(`/paperlibrary/see/${t.id}?defaultActiveKey=1`)})},"\u67E5\u770B\u8BE6\u60C5")),a.showVideoPlay&&a.disabled&&t.item_type==="HomeworkCommon"&&le&&n.createElement("aside",null,!(0,D.JA)()&&G&&((0,D.Ny)()||(t==null?void 0:t.is_free)||!(t!=null&&t.is_free)&&(t==null?void 0:t.is_trial_study))&&n.createElement(o.ZP,{className:"mr10",type:"primary",onClick:()=>O(void 0,null,function*(){(0,F.tJ)(w)&&w({type:"shixunsDetail/setActionTabs",payload:{key:"Stage-SendModal",params:{id:t.stage_item_id,title:"\u7F16\u7A0B\u4F5C\u4E1A",examinationid:t.id}}})})},"\u53D1\u9001"),!(0,D.JA)()&&G&&n.createElement(o.ZP,{type:"primary",onClick:()=>O(void 0,null,function*(){(0,F.tJ)(w)&&a.showInfoModal(b({stage_id:a.stage_id},t))})},"\u67E5\u770B\u8BE6\u60C5")),a.showVideoPlay&&a.disabled&&t.item_type==="VideoItem"&&le&&n.createElement("aside",null,!(0,D.JA)()&&G&&((0,D.Ny)()||(t==null?void 0:t.is_free)||!(t!=null&&t.is_free)&&(t==null?void 0:t.is_trial_study))&&n.createElement(o.ZP,{className:"mr10",type:"primary",onClick:()=>O(void 0,null,function*(){(0,F.tJ)(w)&&w({type:"shixunsDetail/setActionTabs",payload:{key:"Stage-SendModal",params:{id:t.stage_item_id,title:"\u89C6\u9891"}}})})},"\u53D1\u9001"),n.createElement(o.ZP,{type:"primary",className:"mr10",onClick:()=>O(void 0,null,function*(){me(t)})},t.last_point>0?"\u7EE7\u7EED\u5B66\u4E60":"\u5F00\u59CB\u5B66\u4E60")),(t.allow_visit||t.to_be_built||!t.shixun_status)&&a.disabled&&t.item_type==="Shixun"&&le&&n.createElement("aside",null,!(0,D.JA)()&&G&&!t.shixun_status&&((0,D.Ny)()||(t==null?void 0:t.is_free)||!(t!=null&&t.is_free)&&(t==null?void 0:t.is_trial_study))&&n.createElement(o.ZP,{className:"ml10",type:"primary",onClick:()=>O(void 0,null,function*(){(0,F.tJ)(w)&&w({type:"shixunsDetail/setActionTabs",payload:{key:"Stage-SendModal",params:{id:t.stage_item_id,title:"\u5B9E\u8BAD",is_jupyter:t==null?void 0:t.is_jupyter,identifier:t==null?void 0:t.identifier}}})})},"\u53D1\u9001"),n.createElement(o.ZP,{className:"ml10",type:"primary",onClick:()=>O(void 0,null,function*(){(0,F.tJ)(w)&&(M!=null&&M.course_id&&(yield(0,h.JS)({id:M==null?void 0:M.course_id})),window.open(`/shixuns/${t.identifier}/challenges`))})},"\u67E5\u770B\u8BE6\u60C5"),!t.shixun_status&&n.createElement(ue.Z,{className:"ml10",type:"primary",onClick:()=>O(void 0,null,function*(){return new Promise(ce=>O(void 0,null,function*(){Le(t),setTimeout(()=>{ce()},2e3)}))})},t!=null&&t.need_authorize?"\u9700\u6388\u6743":e!=null&&e.finished_challenges_count?(e==null?void 0:e.finished_challenges_count)-(e==null?void 0:e.challenges_count)===0?"\u518D\u6B21\u5B9E\u6218":"\u7EE7\u7EED\u5B9E\u6218":"\u5F00\u59CB\u5B9E\u6218"))),n.createElement(Z.Z,null,a.disabled&&t.shixun_status==="\u6682\u672A\u516C\u5F00"&&n.createElement("span",{className:`${r.color204} ml5`},"\u6682\u672A\u53D1\u5E03"),t.shixun_status==="\u5DF2\u5220\u9664"&&n.createElement("span",{className:`${r.color204} ml5`},"\u5DF2\u5220\u9664"),a.disabled&&!ge&&t.item_type==="Shixun"&&!!t.challenges_count&&n.createElement("span",{className:"exper\u02C6iment-number ml5 c-grey-999"},"\u5B9E\u9A8C\u6570 ",t.challenges_count),a.disabled&&ge&&t.item_type==="Shixun"&&!!t.challenges_count&&t.shixun_status!=="\u6682\u672A\u516C\u5F00"&&t.shixun_status!=="\u5DF2\u5220\u9664"&&n.createElement(n.Fragment,null,n.createElement("i",{className:"iconfont icon-wanchenggouxuan font14",style:{marginLeft:"5px",color:t.finished_challenges_count===t.challenges_count?"#50DAAE":"#DEDEDE"}}),n.createElement("span",{style:{marginLeft:"4px"}},n.createElement("span",{style:{color:"#165DFF",fontSize:"14px"}},t.finished_challenges_count),n.createElement("span",{style:{color:"#DEDEDE",fontSize:"14px"}},"/",t.challenges_count))),a.disabled&&ge&&(t.item_type==="VideoItem"||t.item_type==="Attachment")&&(t.complete_status==0?n.createElement("i",{className:"iconfont icon-weidianjixuexi font14",style:{color:"#DEDEDE"}}):t.complete_status==1?n.createElement("i",{className:"iconfont icon-yidianjixuexiweiwancheng font14",style:{color:"#50DAAE"}}):n.createElement("i",{className:"iconfont icon-xuexiwancheng font14",style:{color:"#50DAAE"}})),q==="All"&&!!((re=e.children)!=null&&re.length)&&n.createElement("span",{className:"ml10"},se.includes(e.key)?n.createElement(A.Z,null):n.createElement(W.Z,null))))},treeData:Ie})),[Ie,ye,se,q,De]);return n.createElement(n.Fragment,null,Me)};var He=(0,V.connect)(({pathsDetail:v,loading:_,user:f,globalSetting:Y})=>({pathsDetail:v,globalSetting:Y,user:f,loading:_.effects}))(Ee)},20403:function(Ce,te,u){u.d(te,{Z:function(){return n}});var l=u(59301),V=u(63144),R=u(98135),y=u(78241),m=u(8591),S=u(43418),K=u(93948),z=u(24905),Z=u(12563),o={modal:"modal___EKlPQ",uploadWrap:"uploadWrap___YGxav",upload:"upload___ouqG9",uploadLink:"uploadLink___nuif6",fileProgress:"fileProgress___tf4qy",fileCancel:"fileCancel___Bh3Wh",videoName:"videoName___Ra0NM",contentItem:"contentItem___zMdIq","tagsList-content":"tagsList-content___sDVph"},E=u(88511),h=u(18726),N=u(35099),ne=Object.defineProperty,s=Object.getOwnPropertySymbols,c=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,I=(L,g,x)=>g in L?ne(L,g,{enumerable:!0,configurable:!0,writable:!0,value:x}):L[g]=x,A=(L,g)=>{for(var x in g||(g={}))c.call(g,x)&&I(L,x,g[x]);if(s)for(var x of s(g))r.call(g,x)&&I(L,x,g[x]);return L},W=(L,g,x)=>new Promise(($,H)=>{var b=ie=>{try{O(x.next(ie))}catch(Ee){H(Ee)}},Te=ie=>{try{O(x.throw(ie))}catch(Ee){H(Ee)}},O=ie=>ie.done?$(ie.value):Promise.resolve(ie.value).then(b,Te);O((x=x.apply(L,g)).next())});const{TextArea:D}=R.default,F=1024,k=(L,g)=>{var x;const{uploadInfo:$={}}=g.payload||{};switch(g.type){case"addVideo":return{videoList:[...L.videoList,{name:$.file.name,size:$.file.size,type:$.file.type,fileHash:$.fileHash,state:$.state,videoId:$.videoId,loaded:$.loaded||0,title:""}]};case"removeVideo":return{videoList:L.videoList.filter(H=>H.name!==g.payload.name)};case"removeAll":return{videoList:[]};case"updateProgress":return{videoList:L.videoList.map(H=>H.name===g.payload.uploadInfo.file.name?A(A({},H),{loaded:g.payload.progressPercent,videoId:$.videoId,fileHash:$.fileHash}):H)};case"updateTitle":return{videoList:(x=L.videoList)==null?void 0:x.map(H=>H.name===g.payload.item.name?A(A({},H),{title:g.payload.title}):H)};default:return{videoList:[]}}},ue=({user:L,globalSetting:g,loading:x,dispatch:$,visible:H,editData:b,onCancel:Te=()=>{},onOk:O=()=>{},queryParams:ie={}})=>{var Ee;const He=(0,V.useParams)(),[v]=y.default.useForm(),[_,f]=(0,l.useReducer)(k,{videoList:[]}),[Y,Q]=(0,l.useState)(!1),fe=(0,l.useRef)(),[q,ae]=(0,l.useState)(),[ee,G]=(0,l.useState)(!1),[w,_e]=(0,l.useState)(!1),ge=(0,N.Ny)()?3:1;(0,l.useEffect)(()=>{var C,B,U;H&&b&&(G(b.is_link),ae(b.link),!b.is_link&&f({type:"addVideo",payload:{uploadInfo:{file:{name:b.filename||""},videoId:b.video_id,loaded:100}}}),M(((C=b==null?void 0:b.tags)==null?void 0:C.map(p=>p==null?void 0:p.name))||[]),v.setFieldsValue({name:b.name,description:b.description,attachment_id:(B=b==null?void 0:b.video)==null?void 0:B.attachment_id,allow_skip:(U=b==null?void 0:b.video_item)==null?void 0:U.allow_skip}))},[b,H]);const ve=()=>{const C=document.getElementById("fileUpload");C.value=""},a=C=>{var B;G(!1);const U=C.target.files[0];if(!U){ve();return}const p=U.name.toLowerCase();if(p&&p.indexOf(".avi")==-1&&p.indexOf(".flv")==-1&&p.indexOf(".f4v")==-1&&p.indexOf(".m4v")==-1&&p.indexOf(".mov")==-1&&p.indexOf(".mp4")==-1&&p.indexOf(".rmvb")==-1&&p.indexOf(".swf")==-1&&p.indexOf(".webm")==-1&&p.indexOf(".wmv")==-1){m.ZP.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),ve();return}if(U.size>F*ge*1024*1024){m.ZP.info(`\u89C6\u9891\u5927\u5C0F\u8D85\u8FC7${ge}G`),ve();return}if((B=_.videoList)!=null&&B.find(Oe=>Oe.name===U.name)){m.ZP.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),ve();return}pe(U)},se=(C,B)=>{S.default.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:l.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",B?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:()=>{ve(),f({type:"removeVideo",payload:{name:C}})}})},pe=C=>{var B,U='{"Vod":{}}';if(Q(!0),fe.current){fe.current.addFile(C,null,null,null,U);return}(0,E.o)((B=L.userInfo)==null?void 0:B.login,"",{create:!fe,addFileSuccess:p=>{f({type:"addVideo",payload:{uploadInfo:p}})},onUploadProgress:(p,Oe,Ne)=>{const Ae=Math.ceil(Ne*100);f({type:"updateProgress",payload:{uploadInfo:p,progressPercent:Ae}}),ve()},onUploadFailed:p=>{m.ZP.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:p=>{Q(!1)},onUploadSucceed:p=>{Q(!1)},onUploadError:p=>{Q(!1)},gotUploader:p=>{p.addFile(C,null,null,null,U),fe.current=p}})},ye=()=>W(void 0,null,function*(){var C,B;if(yield v.validateFields(),!ee&&!((C=_.videoList)!=null&&C.length)||ee&&!q){m.ZP.info("\u8BF7\u5148\u4E0A\u4F20\u89C6\u9891\u6216\u8005\u6DFB\u52A0\u5916\u94FE");return}_e(!0);const U=ee?{link:q}:{video_id:(B=_.videoList)==null?void 0:B[0].videoId},p=yield O(A(A(A({},U),ie),{name:v.getFieldValue("name"),attachment_id:v.getFieldValue("attachment_id"),description:v.getFieldValue("description"),tags:v.getFieldValue("tag"),allow_skip:v.getFieldValue("allow_skip")}));_e(!1),p.id&&we()}),we=()=>{v.resetFields(),f({type:"removeAll"}),ae(null),M([]),G(null)},xe=()=>{Te(),we()},Ie=()=>{var C,B,U,p,Oe,Ne,Ae,Pe,Ze,Re,Le,me;return l.createElement(l.Fragment,null,!ee&&!!((C=_.videoList)!=null&&C.length)&&l.createElement("div",{className:o.fileProgress},((U=(B=_.videoList)==null?void 0:B[0])==null?void 0:U.loaded)==100?l.createElement("div",{className:`${o.videoName} font14`},(Oe=(p=_.videoList)==null?void 0:p[0])==null?void 0:Oe.name):l.createElement(K.Z,{style:{width:"80%"},percent:(Ae=(Ne=_.videoList)==null?void 0:Ne[0])==null?void 0:Ae.loaded,status:((Ze=(Pe=_.videoList)==null?void 0:Pe[0])==null?void 0:Ze.loaded)==100?"normal":"active"}),l.createElement("div",{className:o.fileCancel,onClick:()=>{var Ue,We,De,be;return se((We=(Ue=_.videoList)==null?void 0:Ue[0])==null?void 0:We.name,((be=(De=_.videoList)==null?void 0:De[0])==null?void 0:be.loaded)==100)}},((Le=(Re=_.videoList)==null?void 0:Re[0])==null?void 0:Le.loaded)===100?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20")),!((me=_.videoList)!=null&&me.length)&&l.createElement("div",{className:o.uploadWrap},l.createElement("label",{htmlFor:"fileUpload",className:o.upload},l.createElement("i",{className:"iconfont icon-shangchuanshipin1 mr5"}),"\u4E0A\u4F20\u89C6\u9891"),l.createElement("label",{className:`${o.upload} ${o.uploadLink}`,onClick:()=>G(!0)},l.createElement("i",{className:"iconfont icon-lianjie1 mr5"}),"\u6DFB\u52A0\u5916\u94FE")),ee&&l.createElement(R.default,{className:"mt5",placeholder:"\u8BF7\u8F93\u5165\u89C6\u9891\u94FE\u63A5",value:q,onChange:Ue=>ae(Ue.target.value)}))},[Se,M]=(0,l.useState)([]),Be=C=>{if(C.key=="Enter"){const B=v.getFieldValue("tag");if(v.setFieldsValue({tag:""}),!B){m.ZP.info("\u6807\u7B7E\u4E0D\u80FD\u4E3A\u7A7A");return}if(Se.filter(U=>U===B).length>0){m.ZP.info("\u5DF2\u6709\u76F8\u540C\u540D\u79F0\u6807\u7B7E");return}Se.push(B),M([...Se])}},Ve=(C,B)=>{C.preventDefault(),M([...Se.filter(U=>U!=B)])};return l.createElement(S.default,{centered:!0,maskClosable:!1,destroyOnClose:!0,title:b?"\u7F16\u8F91\u89C6\u9891\u9879\u76EE":"\u65B0\u5EFA\u89C6\u9891\u9879\u76EE",width:740,className:o.modal,open:H,confirmLoading:w,onOk:ye,onCancel:xe},l.createElement(y.default,{form:v},l.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:a,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}),l.createElement(y.default.Item,{label:"\u9879\u76EE\u540D\u79F0",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u9879\u76EE\u540D\u79F0"}]},l.createElement(R.default,{maxLength:40,placeholder:"\u8BF7\u8F93\u5165\u4E0D\u8D85\u8FC740\u5B57\u7684\u9879\u76EE\u540D\u79F0"})),l.createElement(y.default.Item,{label:"\u9879\u76EE\u5185\u5BB9",name:"content",className:o.contentItem},Ie()),l.createElement(y.default.Item,{name:"attachment_id",label:"\u4E0A\u4F20\u5C01\u9762\u56FE:"},l.createElement(h.Z,{getFileProgress:C=>{if(C.file.status==="uploading"){_e(!0);return}C.file.status==="done"&&_e(!1)}})),l.createElement(y.default.Item,{label:"\u9879\u76EE\u7B80\u4ECB",name:"description",className:"ml8"},l.createElement(D,{rows:5,maxLength:800,placeholder:"\u8BF7\u8F93\u5165\u672C\u89C6\u9891\u7B80\u4ECB\uFF0C\u6700\u591A\u4E0D\u8D85\u8FC7800\u5B57"})),l.createElement(y.default.Item,{label:"\u77E5\u8BC6\u6807\u7B7E",name:"tag",className:"ml8"},l.createElement(R.default,{onKeyUp:Be})),l.createElement(y.default.Item,{label:"\u64AD\u653E\u8BBE\u7F6E",name:"allow_skip",valuePropName:"checked",className:"ml8",initialValue:!0},l.createElement(z.default,null,"\u5141\u8BB8\u5FEB\u8FDB\u64AD\u653E")),l.createElement("div",{className:o["tagsList-content"]},Se.map((C,B)=>l.createElement(Z.default,{key:B+C,closable:!0,onClose:U=>{Ve(U,C)}},C))),l.createElement("div",{className:"c-grey-999"},l.createElement("div",null,"\u6CE8\u610F\uFF1A"),l.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",l.createElement(V.Link,{to:`/users/${(Ee=L.userInfo)==null?void 0:Ee.login}/videos/protocol`,target:"_blank",className:o.colorBlue},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),l.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC7",ge,"G\uFF1B"),l.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"),l.createElement("div",null,"4\u3001\u5982\u679C\u89C6\u9891\u6765\u81EA\u4E8E\u5916\u90E8\u94FE\u63A5\uFF0C\u672C\u7F51\u7AD9\u4E0D\u63D0\u4F9B\u64AD\u653E\u9875\u9762\uFF0C\u65E0\u6CD5\u63D0\u4F9B\u7EDF\u8BA1\u6570\u636E\u3002"))))};var n=(0,V.connect)(({user:L,loading:g,globalSetting:x})=>({user:L,globalSetting:x,loading:g}))(ue)},88511:function(Ce,te,u){u.d(te,{o:function(){return Z}});var l=u(76265),V=u(93125),R=u.n(V);let y="",m,S="";function K(o){z(o)}function z(o){m=new(R()).Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:0x6803cbd867207,enableUploadProgress:!1,addFileSuccess:function(E){console.log("addFileSuccess: "+E.file.name),o.addFileSuccess&&o.addFileSuccess(E),m.startUpload()},onUploadstarted:function(E){const h=E.file.name;if(E.videoId){var ne=`/api/users/${y}/video_auths.json`;(0,l.ZP)(ne,{method:"put",body:{video_id:E.videoId,title:h,file_name:h,virtual_classroom_id:S}}).then(s=>{if(s.status==-1){o.onUploadError&&o.onUploadError(E);return}const c=s.data;var r=c.UploadAuth,I=c.UploadAddress,A=c.VideoId;m.setUploadAuthAndAddress(E,r,I)}).catch(s=>{m.deleteFile(m._curIndex),m.nextUpload(),console.log(s)})}else{var N=`/api/users/${y}/video_auths.json`;const s="";(0,l.ZP)(N,{method:"Post",body:{title:s+h,file_name:s+h,virtual_classroom_id:S}}).then(c=>{if(c){const W=c.data;var r=W.UploadAuth,I=W.UploadAddress,A=W.VideoId;m.setUploadAuthAndAddress(E,r,I,A)}}).catch(c=>{m.deleteFile(m._curIndex),m.nextUpload(),console.log(c)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(E){o.onUploadSucceed&&o.onUploadSucceed(E),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(E,h,N){o.onUploadFailed&&o.onUploadFailed(E),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(E,h,N){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(E,h,N){o.onUploadProgress&&o.onUploadProgress(E,h,N);var ne=Math.ceil(N*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(E){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var h=`/api/users/${y}/video_auths.json`;(0,l.ZP)(h,{method:"put",body:{video_id:E.videoId}}).then(N=>{var s=N.data.UploadAuth;m.resumeUploadWithAuth(s)}).catch(N=>{console.log(N)})},onUploadEnd:function(E){o.onUploadEnd&&o.onUploadEnd(E),console.log("onUploadEnd: uploaded all the files")}}),o.gotUploader&&o.gotUploader(m)}function Z(o,E,h){o&&(y=o),E&&(S=E),K(h)}}}]);
|