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.
NewEduCoderBuild/p__virtualSpaces__Lists__Se...

1 line
54 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

(self.webpackChunk=self.webpackChunk||[]).push([[61713],{90921:function(e,t,n){"use strict";var i=n(82242),a=n.n(i),r=(n(59301),n(93314)),s=n(3113),l=n(37712);t.Z=function(e){var t=e.img,n=e.buttonProps,i=void 0===n?{}:n,o=e.styles,c=void 0===o?{}:o,u=e.customText,d=e.ButtonText,p=e.ButtonClick,f=e.Buttonclass,h=e.ButtonTwo,m=e.imgStyles,v=e.loading,x=void 0!==v&&v;return(0,l.jsxs)("section",{className:"tc animated fadeIn",style:a()(a()({},{color:"#999",margin:"100px auto",visibility:x?"hidden":"visible"}),c),children:[(0,l.jsx)("img",{src:t||r,style:a()(a()({},m),{},{pointerEvents:"none",userSelect:"none"})}),(0,l.jsx)("p",{className:"mt20 font14",children:u||"暂时还没有相关数据哦!"}),d&&(0,l.jsx)(s.ZP,a()(a()({className:f,onClick:p},i),{},{children:d})),h&&h]})}},59472:function(e,t,n){"use strict";n.d(t,{Z:function(){return j}});var i=n(82242),a=n.n(i),r=n(7557),s=n.n(r),l=n(41498),o=n.n(l),c=n(79800),u=n.n(c),d=n(59301),p={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},f=n(3113),h=n(74516),m=n(17968),v=n(6848),x=n(26795),g=n(44239),_=n(90921),y=n(17985),b=n(13405),w=n(37712),j=function(e){var t,n,i,r,l,c,j=e.editOffice,k=void 0===j?"view":j,S=e.data,Z=(e.theme,e.type),L=e.filename,P=e.monacoEditor,C=e.className,I=e.style,N=e.close,E=e.onClose,T=e.hasMask,O=e.disabledDownload,A=e.onImgDimensions,R=e.showNodata,M=e.recordInfo,V=(0,d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),z=u()(V,2),D=(z[0],z[1],(0,d.useState)("")),F=u()(D,2),H=(F[0],F[1]),W=(0,d.useState)(),B=u()(W,2),U=B[0],Y=B[1],q="build"===window.ENV?"/react/build":"",J=location.host.startsWith("localhost")?y.Z.PROXY_SERVER:y.Z.API_SERVER,$=(0,d.useRef)();null!==(t=S)&&void 0!==t&&t.startsWith("/api")&&"txt"!==Z&&(S=y.Z.API_SERVER+S);L&&(P.filename=L),(0,d.useEffect)((function(){var e,t=null===(e=document.cookie)||void 0===e||null===(e=e.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==t||t.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&H(t[1])}))}),[]),(0,d.useEffect)((function(){var e;"office"===Z&&(S.indexOf("bigfilescdn.")>-1||S.indexOf("bigfiles1")>-1?Y({url:S,fileType:(e=S,e.substring(e.lastIndexOf("/")+1).split(".").pop()),model:S.indexOf("model=edit")?"edit":"view"}):X())}),[Z,S]);var X=function(){var e=o()(s()().mark((function e(){var t,n,i;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",S),t=S,S.startsWith("http")||(t=location.origin+t),n=new URL(t).pathname.split("/").pop(),e.next=6,(0,g.gJ)({attachment_id:n});case 6:(i=e.sent).url=J+i.url,Y(i);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),G=function(){S.startsWith("http")||S.startsWith("blob:")?K():(0,x.Sv)(L||"educoder",S,L)},K=function(){M&&(0,b.fc)({id:null==M?void 0:M.id,watch_type:1,course_id:null==M?void 0:M.course_id}),(0,x.Nd)(L||"educoder",decodeURIComponent(S))};return(0,w.jsxs)("div",{style:a()({},I||{}),className:"".concat(T&&p.bgBlack," ").concat(Z?p.wrp:"hide"),children:[N&&(0,w.jsxs)("div",{className:p.close,ref:$,children:[!!A&&(0,w.jsx)(v.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return $.current},children:(0,w.jsx)("span",{onClick:function(){E(),A()},children:(0,w.jsx)("i",{className:"icon-yulanpizhu"})})}),!O&&(0,w.jsx)(v.Z,{title:"点击下载此文件",getPopupContainer:function(){return $.current},children:(0,w.jsx)("span",{onClick:K,children:(0,w.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,w.jsx)(v.Z,{title:"关闭",getPopupContainer:function(){return $.current},children:(0,w.jsx)("span",{className:"",onClick:E,children:(0,w.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,w.jsx)("div",{className:"".concat(p[C]," ").concat(C," ").concat(p.monaco," ").concat("txt"===Z?"show":"hide"),children:"txt"===Z&&(0,w.jsx)(w.Fragment,{children:(0,w.jsx)(m.ZP,a()({},P))})}),"audio"===Z&&(0,w.jsx)("audio",{src:"".concat((null===(n=S)||void 0===n?void 0:n.indexOf("http://"))>-1||(null===(i=S)||void 0===i?void 0:i.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(S),autoPlay:!0}),"video"===Z&&(0,w.jsx)(w.Fragment,{children:(null===(r=S)||void 0===r?void 0:r.indexOf("http"))>-1?(0,w.jsx)("video",{controls:!0,src:"".concat(S),autoPlay:!0}):(0,w.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(S),autoPlay:!0})}),"office"===Z&&U&&(0,w.jsx)("iframe",{src:"".concat(q,"/office.html?key=").concat(U.key,"&url=").concat(btoa(U.url),"&callbackUrl=").concat(J+U.callbackUrl,"&fileType=").concat(U.fileType,"&title=").concat(U.title,"&model=").concat(k,"&officeServer=").concat(y.Z.ONLYOFFICE,"&disabledDownload=").concat(!!O)}),"html"===Z&&(0,w.jsx)("iframe",{src:S+"&disposition=inline"}),"pdf"===Z&&(0,w.jsx)("iframe",{src:"".concat(q,"/js/pdfview/index.html?url=").concat(encodeURIComponent(S),"&disabledDownload=").concat(!!O)}),"image"===Z&&(0,w.jsx)("img",{src:"".concat((null===(l=S)||void 0===l?void 0:l.indexOf("http://"))>-1||(null===(c=S)||void 0===c?void 0:c.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(S)}),("other"===Z||"download"===Z)&&(0,w.jsx)(w.Fragment,{children:R?(0,w.jsx)(_.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,w.jsx)(f.ZP,{icon:(0,w.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:G,children:"下载"})}):(0,w.jsxs)(f.ZP,{type:"primary",size:"middle",onClick:G,children:[(0,w.jsx)(h.Z,{}),"点击下载"]})})]})}},90277:function(e,t,n){"use strict";n.d(t,{z:function(){return w}});var i=n(82242),a=n.n(i),r=n(37205),s=n.n(r),l=n(91232),o=n.n(l),c=n(79800),u=n.n(c),d=n(59301),p=(n(92436),n(44728)),f=(n(64018),n(77373)),h=n(17985),m=n(26795),v=n(15342),x=n(1012),g=n(59472),_=n(37712),y="@▁@",b=/<pre[^>]*>/g;var w=function(e,t){e=e||"";var n=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return t?e.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(n,(function(e,t,n,i,a,r,s){var l=t||i||r,o=n||a||s||"?";return h.Z.API_SERVER+"/api/attachments/"+l+o+"&t="+(0,m.Jn)(l,Date.now())+(e.indexOf(")")>-1?")":"&")})).replaceAll('src="(','src="').replaceAll("src='(",'src="'):e=e.replace(n,(function(e,t,n,i,a,r,s){var l=t||i||r,o=n||a||s||"?";return h.Z.API_SERVER+"/api/attachments/"+l+o+"&t="+(0,m.Jn)(l,Date.now())+(e.indexOf(")")>-1?")":"&")})).replace(/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,t,n,i,a){var r=t||i,s=n||a||"";return'"'+h.Z.API_SERVER+"/api/attachments/"+r+s+r+s+"&t="+(0,m.Jn)(r,Date.now())})).replace(/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,t,n,i,a){var r=t||i,s=n||a||"";return"("+h.Z.API_SERVER+"/files/uploads/"+r+s+r+s+"&t="+(0,m.Jn)(r,Date.now())})).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")};t.Z=function(e){var t=e.value,n=void 0===t?"":t,i=e.className,r=e.showTextOnly,l=e.showLines,c=e.style,m=void 0===c?{}:c,w=e.stylesPrev,j=void 0===w?{}:w,k=e.highlightKeywords,S=e.showProgramFill,Z=(e.isProgramFill,e.disabledFill),L=void 0!==Z&&Z,P=e.programFillValue,C=e.onFillChange,I=void 0===C?function(e){}:C,N=e.onFillBlur,E=void 0===N?function(){}:N,T=String(n),O=(0,d.useState)(""),A=u()(O,2),R=A[0],M=A[1],V=(0,d.useState)("office"),z=u()(V,2),D=z[0],F=z[1],H=(0,d.useState)([]),W=u()(H,2),B=W[0],U=W[1],Y=(0,d.useRef)("a"+(0,x.Z)()),q={};var J=function(e){return e.replace(/<style.*?>([\s\S]+?)<\/style>/gim,(function(e,t){var n=t.replace(/(\n|\r)/g,"").split("}"),i=[];return n.map((function(e){""!=e&&i.push(".".concat(Y.current," ").concat(e))})),"<style>".concat(i.join("}"),"</style>")}))},$=(0,d.useMemo)((function(){try{T=T.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+h.Z.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+h.Z.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+h.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")}catch(e){}if(S){var e=-1;return T=T.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,(function(t,n,i){var a;return function(e,t,n){var i=document.createElement(e===y?"input":"textarea");i.style.width="100%",i.style.height=e===y?"40px":"151px",i.rows=5,i.spellcheck=!1,i.name="edu-program-fill",i.placeholder="请输入",i.dataset.id=t;var a=Object.keys(q).length;return q[a]=i,'<span class="edu-program-fill-wrap '.concat(e===y?"":"show",'" style="width:').concat(e===y?"400px":"100%",'" title=').concat(n||"","><span>").concat(i.outerHTML,'<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>')}(t,++e,null==P||null===(a=P[e])||void 0===a?void 0:a.value)})),'<pre style="background:#fff;padding:4px">'.concat(J(T||""),"</pre>")}var t=J(T);t=(0,p.ZP)(t);var n=(0,p.ez)();T.match(/\[TOC\]/)&&(t=t.replace("<p>[TOC]</p>",(0,p.Qv)()),(0,p.Iy)()),t=t.replace(/(__special_katext_id_\d+__)/g,(function(e,t){var i=n[t],a=i.type,r=i.expression;return(0,v.renderToString)(function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue}(r)||"",{displayMode:"block"===a,throwOnError:!1,output:"html"})})),t=t.replace(/▁/g,"▁▁▁▁▁"),(0,p.AL)();var i=document.createElement("div");return i.innerHTML=t,r?i.innerText:k?(K(i,k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),i.innerHTML):(setTimeout((function(){return te()}),500),i.innerHTML)}),[T,k]);(0,d.useEffect)((function(){Q.current&&Q.current.querySelectorAll(["input","textarea"]).forEach((function(e){e.oninput=X,e.onblur=G}))}),[B]),(0,d.useEffect)((function(){if(null!=P&&P.length)try{var e,t=Q.current.querySelectorAll(".edu-program-fill-score"),n=Q.current.querySelectorAll('[name="edu-program-fill"]'),i=o()(n.entries());try{for(i.s();!(e=i.n()).done;){var a,r,s,l=u()(e.value,2),c=l[0],d=l[1];d.value=(null==P||null===(a=P[c])||void 0===a?void 0:a.value)||"","warning"===(null==P||null===(r=P[c])||void 0===r?void 0:r.type)?d.className="program-fill-warning":"success"===(null==P||null===(s=P[c])||void 0===s?void 0:s.type)?d.className="program-fill-success":d.className=""}}catch(e){i.e(e)}finally{i.f()}var p,f=o()(t.entries());try{for(f.s();!(p=f.n()).done;){var h,m,v=u()(p.value,2),x=v[0];v[1].innerHTML=null!=P&&null!==(h=P[x])&&void 0!==h&&h.score?"".concat(null==P||null===(m=P[x])||void 0===m?void 0:m.score,"分"):""}}catch(e){f.e(e)}finally{f.f()}U(P)}catch(e){console.log(e,"error")}}),[P]);var X=function(e){B[e.target.dataset.id]=B[e.target.dataset.id]||{},B[e.target.dataset.id].value=e.target.value,U(s()(B)),I(B,e.target.dataset.id)},G=function(e){B[e.target.dataset.id]=B[e.target.dataset.id]||{},B[e.target.dataset.id].value=e.target.value,U(s()(B)),E(B,e.target.dataset.id)};function K(e,t){return e.childNodes.forEach((function(e){if(e.childNodes.length>0)K(e,t);else if("IMG"!==e.nodeName)if(e.innerHTML){var n;e.innerHTML=null===(n=e.innerHTML)||void 0===n?void 0:n.replace(new RegExp(t,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>')}else{var i=document.createElement("span");i.innerHTML=e.textContent.replace(new RegExp(t,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),e.replaceWith(i)}}))}var Q=(0,d.useRef)();function ee(e){var t=e.target;if("A"===t.tagName.toUpperCase()){var n=t.getAttribute("href");if(n.indexOf("office")>-1)e.preventDefault(),M(n),F("office");else if(n.indexOf("application/pdf")>-1)e.preventDefault(),M(n),F("pdf");else if(n.indexOf("text/html")>-1)e.preventDefault(),M(n),F("html");else if(n.startsWith("#")){e.preventDefault();var i=document.getElementById(n.replace("#",""));i&&i.scrollIntoView(!0)}}}p.jb.WebkitLineClamp=l,l&&(m=a()(a()({},m),p.jb));var te=function(){var e,t=null===(e=Q.current)||void 0===e?void 0:e.querySelectorAll("video");null==t||t.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(f.ZP.isSupported()){var t=new f.ZP;t.loadSource(e.src),t.attachMedia(e)}}))};return(0,d.useEffect)((function(){if(Q.current&&$&&$.match(b)&&window.PR.prettyPrint(),Q.current)return Q.current.addEventListener("click",ee),function(){var e;null===(e=Q.current)||void 0===e||e.removeEventListener("click",ee),(0,p.AL)(),(0,p.Iy)()}}),[$,Q.current,ee]),(0,_.jsxs)(_.Fragment,{children:[r&&(0,_.jsx)("div",{ref:Q,children:$}),!r&&(0,_.jsx)("div",{ref:Q,style:a()({},m),className:"".concat(i||""," ").concat(L?"disabled-fill":""," markdown-body ").concat(Y.current),dangerouslySetInnerHTML:{__html:$}}),(0,_.jsx)(g.Z,{close:!0,data:R,type:null!=R&&R.length?D:"",style:a()({},j),onClose:function(){return M("")}})]})}},97259:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return te}});var i=n(7557),a=n.n(i),r=n(41498),s=n.n(r),l=n(79800),o=n.n(l),c=n(59301),u=n(27786),d="wrap___dX7Vx",p=n(82242),f=n.n(p),h=n(39647),m=n.n(h),v=n(78241),x=n(8591),g=n(98135),_=n(5112),y=n(46651),b=n(95237),w=n(24905),j=n(6848),k=n(3113),S={flex_box_center:"flex_box_center___y1YZJ",flex_space_between:"flex_space_between___wTOwl",flex_box_vertical_center:"flex_box_vertical_center___XmLwW",flex_box_center_end:"flex_box_center_end___gWVqd",flex_box_column:"flex_box_column___PjZDS",form:"form___JA0Ze",text:"text___cCcOQ",img:"img___ht1lh",title:"title___mljGY",list:"list___isVFT",btn:"btn___IUjb1"},Z=n(17985),L=n(97650),P=n(65233),C=n(25914),I=n(90277),N=n(37712),E=["globalSetting","virtualSpaces","dispatch"],T=["key","name"],O=(0,P.connect)((function(e){return{globalSetting:e.globalSetting,virtualSpaces:e.virtualSpaces}}))((function(e){e.globalSetting;var t,n,i=e.virtualSpaces,r=e.dispatch,l=(m()(e,E),(0,P.useParams)()),d=i.virtualSpacesDetails,p=i.menus,h=(0,c.useState)(!1),O=o()(h,2),A=O[0],R=O[1],M=(0,c.useState)(!0),V=o()(M,2),z=(V[0],V[1],v.Z.useForm()),D=o()(z,1)[0],F=(0,c.useState)([]),H=o()(F,2),W=H[0],B=H[1],U=(0,c.useState)([]),Y=o()(U,2),q=Y[0],J=Y[1],$=(0,c.useState)(!1),X=o()($,2),G=X[0],K=X[1],Q={homepage:"该模块为虚拟社区主页可编辑展示本虚拟社区的基本介绍支持markdown编辑器编辑展示内容",workplace:"该模块为虚拟社区个人工作台,可统计社区数据、通知公告、教研活动等内容",announcement:"该模块为通知公告模块,可以发布、编辑和删除通知公告内容",lesson:"该模块为好课展示模块,支持添加好课和添加好课链接",survey:"该模块为课程调研模块,可以对相关调研文件进行上传、查看、下载、删除操作",knowledge:"该模块为知识体系模块,主要分为四个子模块:课程定位与目标、课程知识点、知识图谱描述、知识图谱。",plan:"该模块为课程教案模块,支持以文件夹的形式管理课程相关的教案文件",material:"该模块为课程教材模块,主要分为两个子模块:主教材、实践教材",experiment:"该模块为实验体系模块,支持老师从实践项目和实践课程中选用实验加入",discussion:"该模块为交流研讨模块,支持发布交流研讨的信息和上传相关附件视频。",resources:"该模块为教学资源模块,支持上传对应教材的教学资源和添加外链资源",settings:"该模块为社区设置模块,支持对社区名称、社区类型、标识、封面图、详情顶部背景和模块展示控制、人员管理进行设置",digtal:"该模块为数字课堂模块,支持添加数字课堂的标题、链接和封面"};(0,c.useEffect)((function(){if(null!=d&&d.id&&null!=p&&p.length){var e,t,n,i;D.setFieldsValue({name:null==d?void 0:d.name,vs_type:null==d?void 0:d.vs_type,identifier:null==d?void 0:d.identifier,settings:p.map((function(e){return f()(f()({},e),{},{checked:!e.hidden})}))});var a=null!=d&&null!==(e=d.cover_url)&&void 0!==e&&e.includes("attachments")?[{response:{id:null==d||null===(t=d.cover_url)||void 0===t||null===(t=t.split("?")[0])||void 0===t?void 0:t.split("/")[3]}}]:[],r=null!=d&&null!==(n=d.backbground_image_url)&&void 0!==n&&n.includes("attachments")?[{response:{id:null==d||null===(i=d.backbground_image_url)||void 0===i||null===(i=i.split("?")[0])||void 0===i?void 0:i.split("/")[3]}}]:[];B(a),J(r)}}),[d,p]),console.log("newFileList",W,q);var ee=function(){var e=s()(a()().mark((function e(t){var n,i,s,o,c;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return R(!0),o={name:null==t?void 0:t.name,vs_type:null==t?void 0:t.vs_type,identifier:null==t?void 0:t.identifier,cover_id:(null==W||null===(n=W[0])||void 0===n||null===(n=n.response)||void 0===n?void 0:n.id)||"",backbground_image_id:(null==q||null===(i=q[0])||void 0===i||null===(i=i.response)||void 0===i?void 0:i.id)||"",modules_list:null==t||null===(s=t.settings)||void 0===s?void 0:s.map((function(e){return f()(f()({},e),{},{hidden:!e.checked})}))},e.next=4,(0,u.ZP)("/api/virtual_classrooms/".concat(l.virtual_spacesId,".json"),{method:"put",body:o});case 4:-1!==(null==(c=e.sent)?void 0:c.status)&&(x.ZP.success("修改成功"),r({type:"virtualSpaces/getVirtualSpacesMenus",payload:{id:null==t?void 0:t.identifier}}),r({type:"virtualSpaces/getVirtualSpacesDetails",payload:{id:null==t?void 0:t.identifier}}),P.history.replace("/".concat("classroom"===(null==t?void 0:t.vs_type)?"vtrs":"101","/").concat(null==t?void 0:t.identifier,"/settings?leftMenuId=").concat(window.localStorage.getItem("vtrsModuleId")))),-3===(null==c?void 0:c.status)&&D.setFields([{name:"identifier",errors:["该标识已存在,请更换"]}]),R(!1);case 8:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),te=function(e,t){["uploading","done","removed"].includes(e.file.status)&&("uploading"===e.file.status&&K(!0),"done"===e.file.status&&K(!1),1===t?B(e.fileList):J(e.fileList))},ne=function(e,t){1===t?B([]):J([])},ie=function(e,t){if(!("image/jpeg"===e.type||"image/png"===e.type))return x.ZP.warning("请上传jpg或png的图片!"),!1;var n=e.size/1024>200,i=e.size/1024/1024>1;return n&&1===t?(x.ZP.warning("文件大小必须小于200KB"),!1):i&&2===t?(x.ZP.warning("文件大小必须小于1MB"),!1):(1===t?B([]):J([]),!0)},ae=function(e){var t,n;return(0,N.jsxs)("div",{className:S.img,children:[(0,N.jsx)("img",{src:(0,I.z)("/api/attachments/"+(1===e?null==W||null===(t=W[0])||void 0===t||null===(t=t.response)||void 0===t?void 0:t.id:null==q||null===(n=q[0])||void 0===n||null===(n=n.response)||void 0===n?void 0:n.id),!0),alt:"avatar",style:{width:"100%"}}),(0,N.jsx)("div",{children:(0,N.jsx)(L.Z,{onClick:function(){1===e?B([]):J([])},style:{fontSize:"16px",color:"red"}})})]})},re="",se=function e(t,n){return p.find((function(e){return e.name==t+"("+n+")"}))?e(t,n+1):re=t+"("+n+")",re};return(0,N.jsxs)(v.Z,{form:D,colon:!1,onFinish:ee,className:S.form,children:[(0,N.jsx)(v.Z.Item,{label:"社区名称",name:"name",rules:[{required:!0,message:"请输入社区名称"},{whitespace:!0,message:"请输入社区名称"},{max:60,message:"只能输入60个字符"}],children:(0,N.jsx)(g.Z,{style:{width:516},maxLength:60,placeholder:"请输入社区名称"})}),(0,N.jsx)(v.Z.Item,{label:"社区类型",initialValue:"classroom",name:"vs_type",rules:[{required:!0,message:"请输入社区类型"}],children:(0,N.jsxs)(_.ZP.Group,{children:[(0,N.jsx)(_.ZP,{value:"classroom",children:"虚拟教研室"}),(0,N.jsx)(_.ZP,{className:"ml20",value:"plan",children:"101计划"})]})}),(0,N.jsx)(v.Z.Item,{label:(0,N.jsx)("span",{style:{width:66},children:"标识"}),name:"identifier",rules:[{pattern:/^[a-zA-Z0-9]+$/,message:"仅支持填写英文和数字"}],children:(0,N.jsx)(g.Z,{style:{width:516},maxLength:15})}),(0,N.jsx)(v.Z.Item,{name:"cover_id",label:"封面图",className:"mt30",children:(0,N.jsxs)("div",{className:S.upload,children:[null!=W&&null!==(t=W[0])&&void 0!==t&&null!==(t=t.response)&&void 0!==t&&t.id?ae(1):(0,N.jsx)(y.Z,{fileList:W,action:"".concat(Z.Z.API_SERVER,"/api/attachments.json"),onChange:function(e){return te(e,1)},onRemove:function(e){return ne(0,1)},beforeUpload:function(e){return ie(e,1)},withCredentials:!0,accept:"image/*",children:(0,N.jsx)(C.op,{className:"radius2",children:"上传图片"})}),(0,N.jsx)("aside",{className:S.text,children:"仅支持上传jpg/png格式文件文件大小不能超过200KB建议使用282*228像素如不上传默认使用系统图片。"})]})}),(0,N.jsx)(v.Z.Item,{name:"backbground_image_id",label:"详情顶部背景",className:"mt30",children:(0,N.jsxs)("div",{className:S.upload,children:[null!=q&&null!==(n=q[0])&&void 0!==n&&null!==(n=n.response)&&void 0!==n&&n.id?ae(2):(0,N.jsx)(y.Z,{fileList:q,action:"".concat(Z.Z.API_SERVER,"/api/attachments.json"),onChange:function(e){return te(e,2)},onRemove:function(e){return ne(0,2)},beforeUpload:function(e){return ie(e,2)},withCredentials:!0,accept:"image/*",children:(0,N.jsx)(C.op,{className:"radius2",children:"上传图片"})}),(0,N.jsx)("aside",{className:S.text,children:"仅支持上传jpg/png格式文件文件大小不能超过1MB建议使用3840*148像素如不上传默认使用系统图片。"})]})}),(0,N.jsxs)("div",{className:S.title,children:[(0,N.jsx)("b",{}),(0,N.jsx)("span",{children:"模块展示控制"})]}),(0,N.jsx)("div",{className:S.list,children:(0,N.jsx)(v.Z.List,{name:"settings",children:function(e,t){var n=t.add,i=(t.remove,t.move);return(0,N.jsx)(N.Fragment,{children:e.map((function(t,a){t.key;var r,s,l,o,c=t.name,u=m()(t,T);return(0,N.jsx)("div",{children:(0,N.jsxs)(b.Z,{align:"top",children:[(0,N.jsx)(v.Z.Item,f()(f()({},u),{},{className:"mr20",valuePropName:"checked",name:[c,"checked"],children:(0,N.jsx)(w.Z,{disabled:null===(r=p[c])||void 0===r?void 0:r.disabled})})),(0,N.jsx)(v.Z.Item,f()(f()({},u),{},{style:{flex:1},name:[c,"name"],rules:[{required:!0,validator:function(e,t){var n;return(null==t||null===(n=t.replaceAll(" ",""))||void 0===n?void 0:n.length)<=14?Promise.resolve():Promise.reject("字数限制在14个字以内")}}],children:(0,N.jsx)(g.Z,{})})),(0,N.jsxs)("div",{className:"ml20",style:{width:60,display:"flex",alignItems:"center",justifyContent:"left",paddingTop:6},children:[(0,N.jsx)("div",{className:"mr10",children:(0,N.jsx)(j.Z,{placement:"right",title:Q[null==p||null===(s=p[c])||void 0===s?void 0:s.icon_type],children:(0,N.jsx)("i",{className:"iconfont icon-tishixiaowenhao",style:{color:"#3061D0"}})})}),0!==a&&a<=e.length-2&&(0,N.jsx)("div",{onClick:function(){var t;i(a,a-1);var n=null===(t=D.getFieldValue("settings"))||void 0===t?void 0:t.map((function(t,n){return e.map((function(e,i){n===i&&(t.position=Number(e.name)+1)})),t}));D.setFieldValue("settings",n)},children:(0,N.jsx)("i",{className:"iconfont icon-shangyi3",style:{transform:"translateY(2px)"}})}),a<e.length-2&&(0,N.jsx)("div",{onClick:function(){var t;i(a,a+1);var n=null===(t=D.getFieldValue("settings"))||void 0===t?void 0:t.map((function(t,n){return e.map((function(e,i){n===i&&(t.position=Number(e.name)+1)})),t}));D.setFieldValue("settings",n)},className:0===a?"":"ml10",style:{transform:"rotate(180deg) translateY(1px)"},children:(0,N.jsx)("i",{className:"iconfont icon-shangyi3"})}),a<e.length-1&&"announcement"!=(null===(l=p[null==t?void 0:t.name])||void 0===l?void 0:l.icon_type)&&"workplace"!=(null===(o=p[null==t?void 0:t.name])||void 0===o?void 0:o.icon_type)&&(0,N.jsx)(j.Z,{placement:"bottom",title:"复制",children:(0,N.jsx)("i",{className:"iconfont icon-fuzhi8 current",style:{marginLeft:10,marginTop:"-2px"},onClick:function(){var e,i,a,r,s,l,o,u,d,f,h,m,v,x=se(null===(e=p[null==t?void 0:t.name])||void 0===e?void 0:e.name,1);n({name:x,position:null===(i=p[null==t?void 0:t.name])||void 0===i?void 0:i.position,icon_type:null===(a=p[null==t?void 0:t.name])||void 0===a?void 0:a.icon_type,module_url:null===(r=p[null==t?void 0:t.name])||void 0===r?void 0:r.module_url,hidden:null===(s=p[null==t?void 0:t.name])||void 0===s?void 0:s.hidden,disabled:null===(l=p[null==t?void 0:t.name])||void 0===l?void 0:l.disabled,children:null===(o=p[null==t?void 0:t.name])||void 0===o?void 0:o.children},c+1),p.splice(c+1,0,{name:x,position:null===(u=p[null==t?void 0:t.name])||void 0===u?void 0:u.position,icon_type:null===(d=p[null==t?void 0:t.name])||void 0===d?void 0:d.icon_type,module_url:null===(f=p[null==t?void 0:t.name])||void 0===f?void 0:f.module_url,hidden:null===(h=p[null==t?void 0:t.name])||void 0===h?void 0:h.hidden,disabled:null===(m=p[null==t?void 0:t.name])||void 0===m?void 0:m.disabled,children:null===(v=p[null==t?void 0:t.name])||void 0===v?void 0:v.children})}})})]})]})},c)}))})}})}),(0,N.jsx)(k.ZP,{disabled:G,loading:A,type:"primary",className:S.btn,onClick:function(){D.submit()},children:"确认修改"})]})})),A=n(43418),R=n(53864),M=n(90921),V={flex_box_center:"flex_box_center____FAUe",flex_space_between:"flex_space_between___JShCL",flex_box_vertical_center:"flex_box_vertical_center___YhLcd",flex_box_center_end:"flex_box_center_end___yfXIw",flex_box_column:"flex_box_column___zPH_W",warp:"warp____XM76",Content:"Content___dD_y0",imgstyle:"imgstyle___d5fnu",cardstyle:"cardstyle___uUh0g",paddingcard:"paddingcard___uEvZt",titlefont:"titlefont___HssVh",flexEnd:"flexEnd___Hl39R",modalinput:"modalinput___Vs9yI",items:"items___Gh25j",adminsstyle:"adminsstyle___dby7X",upadmin:"upadmin___JBDfN",yes:"yes___VIGe0",no:"no___e0VYU"},z=n(37205),D=n.n(z),F=n(88522),H=n(14491),W=n(26724),B=n.n(W),U=n(99232),Y=n.n(U),q=n(12384),J=n(71202),$=n(38629),X=(0,P.connect)((function(e){return{classroomList:e.classroomList,loading:e.loading}}))((function(e){var t,n,i=e.classroomList,r=(e.loading,e.dispatch),l=(0,P.useParams)(),u=i.actionTabs,d=(0,c.useState)([]),p=o()(d,2),h=p[0],m=p[1],_=(0,c.useState)(!0),y=o()(_,2),b=y[0],S=y[1],Z=(0,c.useState)(!1),L=o()(Z,2),C=L[0],I=L[1],E=v.Z.useForm(),T=o()(E,1)[0],O=(0,c.useState)([]),R=o()(O,2),M=R[0],V=R[1],z=(0,c.useState)(0),W=o()(z,2),U=W[0],X=W[1],G=(0,c.useState)([]),K=o()(G,2),Q=K[0],ee=K[1],te=(0,c.useState)(!0),ne=o()(te,2),ie=ne[0],ae=ne[1],re=(0,c.useRef)();(0,c.useEffect)((function(){"添加老师"===i.actionTabs.key&&(ae(!0),se())}),[i.actionTabs.key]);var se=function(){var e=s()(a()().mark((function e(){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r({type:"classroomList/getSchoolList",payload:{}});case 2:t=e.sent,m(t.map((function(e){return{value:e}})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),le=function(){var e=s()(a()().mark((function e(){var t,n,i,r,s=arguments;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=s.length>0&&void 0!==s[0]&&s[0])&&!b||C){e.next=11;break}return i=T.getFieldValue(),I(!0),X(t?1:U+1),e.next=7,(0,J.nQ)({page:t?1:U+1,container_id:l.virtual_spacesId,container_type:5,school_name:null==i?void 0:i.school_name,keyword:null==i?void 0:i.keyword});case 7:r=e.sent,V(t?D()(r.users):[].concat(D()(M),D()(r.users))),I(!1),(null===(n=r.users)||void 0===n?void 0:n.length)<10&&S(!1);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=s()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!=Q){e.next=4;break}x.ZP.error("请选择人数"),e.next=8;break;case 4:return e.next=6,(0,q.MM)(f()(f()({},l),{},{user_ids:Q}));case 6:0===e.sent.status&&(x.ZP.success("添加成功"),r({type:"classroomList/setActionTabs",payload:{key:"刷新数据"}}));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ce=[{title:"",dataIndex:"added",width:40,ellipsis:!0,render:function(e,t){return(0,N.jsx)(w.Z,{value:t.numid,checked:Q.includes(String(t.numid)),disabled:!!e})}},{title:"姓名",width:100,ellipsis:!0,dataIndex:"username",render:function(e,t){return(0,N.jsx)(j.Z,{placement:"bottom",title:e,children:(0,N.jsx)(P.Link,{className:"bold c-black",to:"/users/".concat(t.login),target:"_blank",children:e||"--"})})}},{title:"手机",width:100,dataIndex:"phone",ellipsis:!0,render:function(e){return(0,N.jsx)(j.Z,{placement:"bottom",title:e,children:(0,N.jsx)("span",{children:e||"--"})})}},{title:"邮箱",dataIndex:"email",width:100,ellipsis:!0,render:function(e){return(0,N.jsx)(j.Z,{placement:"bottom",title:e,children:(0,N.jsx)("span",{children:e||"--"})})}},{title:"学号/工号",width:100,dataIndex:"student_number",ellipsis:!0,render:function(e){return(0,N.jsx)(j.Z,{placement:"bottom",title:e,children:(0,N.jsx)("span",{children:e||"--"})})}},{title:"学校/单位",width:150,dataIndex:"school_name",ellipsis:!0,render:function(e){return(0,N.jsx)(j.Z,{placement:"bottom",title:e,children:(0,N.jsx)("span",{children:e||"--"})})}},{title:"院系/部门",dataIndex:"depart_name",width:130,ellipsis:!0,render:function(e){return(0,N.jsx)(j.Z,{placement:"bottom",title:e,children:(0,N.jsx)("span",{children:e||"--"})})}},{title:"实名认证",dataIndex:"school_name",width:100,render:function(e){return e?"是":"否"}},{title:"最后登录时间",dataIndex:"last_login_on",width:140,ellipsis:!0,render:function(e){return(0,N.jsx)(j.Z,{placement:"bottom",title:e,children:(0,N.jsx)("span",{children:Y()(e).format("YYYY-MM-DD HH:mm")})})}},{title:"状态",dataIndex:"added",width:80,render:function(e){return 1===e?(0,N.jsx)("span",{className:"c-green",children:"已添加"}):(0,N.jsx)("span",{children:"未添加"})}}];return(0,N.jsxs)(A.Z,{centered:!0,title:"添加成员",open:"添加成员"===i.actionTabs.key,okText:"确定",cancelText:"取消",width:1100,zIndex:9999,bodyStyle:{minHeight:200},onOk:s()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:oe();case 1:case"end":return e.stop()}}),e)}))),onCancel:function(){ee([]),r({type:"classroomList/setActionTabs",payload:{}})},children:[(0,N.jsxs)(v.Z,{layout:"inline",form:T,initialValues:{school_name:"",keyword:""},className:"mt10",children:[(0,N.jsx)(v.Z.Item,{name:"keyword",label:"姓名:",children:(0,N.jsx)(g.Z,{allowClear:!0,style:{width:370},size:"middle",defaultValue:(null===(t=u.selectArrs)||void 0===t?void 0:t.category_name)||(null===(n=u.selectArrs)||void 0===n?void 0:n.name)})}),(0,N.jsx)(v.Z.Item,{name:"school_name",label:"单位:",children:(0,N.jsx)("div",{ref:re,children:(0,N.jsx)(F.Z,{options:h,style:{width:400},size:"middle",placeholder:"请输入单位名称",filterOption:function(e,t){return-1!==t.value.toUpperCase().indexOf(e.toUpperCase())}})})}),(0,N.jsx)(v.Z.Item,{children:(0,N.jsx)(k.ZP,{htmlType:"submit",type:"primary",size:"middle",onClick:function(){return function(){var e;if(""===(null===(e=T.getFieldValue())||void 0===e?void 0:e.keyword))return V([]),void x.ZP.error("请输入姓名");ae(!1),S(!0),I(!1),ee([]),setTimeout((function(){le(!0)}),200)}()},children:"搜索"})})]}),ie&&(0,N.jsxs)("div",{className:"tc font16 c-light-black mt40 pb30",children:[(0,N.jsx)("img",{src:$.RL,width:"100",alt:""}),(0,N.jsx)("br",{}),(0,N.jsx)("p",{className:"mt20",children:"请搜索要添加的人员"})]}),!ie&&""==M&&!C&&(0,N.jsxs)("div",{className:"tc font16 c-light-black mt40 pb30",children:[(0,N.jsx)("img",{src:$.z3,width:"100",alt:""}),(0,N.jsx)("br",{}),(0,N.jsx)("p",{className:"mt20",children:"暂时还没有相关数据哦!"})]}),(!ie&&""!=M||C)&&(0,N.jsxs)("section",{children:[(0,N.jsx)("div",{className:"flexd-table-header mt20",children:(0,N.jsx)(H.Z,{pagination:!1,dataSource:[],columns:ce})}),(0,N.jsx)("div",{style:{maxHeight:260,overflow:"auto"},children:(0,N.jsx)(B(),{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(e){le()},hasMore:b,useWindow:!1,children:(0,N.jsx)(H.Z,{loading:C,showHeader:!1,pagination:!1,dataSource:M,columns:ce,onRow:function(e){return{onClick:function(e){e.currentTarget.querySelector("input").disabled||function(e){e=String(e);var t=Q.indexOf(e);t<0?Q.push(e):Q.splice(t,1),ee(D()(Q))}(e.currentTarget.querySelector("input").value)}}}})})})]})]})})),G=(0,P.connect)((function(e){return{classroomList:e.classroomList,loading:e.loading}}))((function(e){var t,n,i=e.classroomList,r=(e.loading,e.dispatch),l=(0,P.useParams)(),u=i.actionTabs,d=(0,c.useState)([]),p=o()(d,2),h=p[0],m=p[1],y=(0,c.useState)(!0),b=o()(y,2),w=b[0],S=b[1],Z=(0,c.useState)(!1),L=o()(Z,2),C=L[0],I=L[1],E=v.Z.useForm(),T=o()(E,1)[0],O=(0,c.useState)([]),R=o()(O,2),M=R[0],V=R[1],z=(0,c.useState)(0),W=o()(z,2),U=W[0],X=W[1],G=(0,c.useState)(),K=o()(G,2),Q=K[0],ee=K[1],te=(0,c.useState)(!0),ne=o()(te,2),ie=ne[0],ae=ne[1],re=(0,c.useRef)();(0,c.useEffect)((function(){"更换管理员"===i.actionTabs.key&&(ae(!0),se())}),[i.actionTabs.key]);var se=function(){var e=s()(a()().mark((function e(){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r({type:"classroomList/getSchoolList",payload:{}});case 2:t=e.sent,m(t.map((function(e){return{value:e}}))),ae(!1),S(!0),I(!1),ee(""),setTimeout((function(){le(!0)}),200);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),le=function(){var e=s()(a()().mark((function e(){var t,n,i,r,s=arguments;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t=s.length>0&&void 0!==s[0]&&s[0])&&!w||C){e.next=11;break}return i=T.getFieldValue(),I(!0),X(t?1:U+1),e.next=7,(0,J.nQ)({page:t?1:U+1,container_id:l.virtual_spacesId,container_type:5,source:"virtual_classroom",school_name:null==i?void 0:i.school_name,keyword:null==i?void 0:i.keyword});case 7:r=e.sent,V(t?D()(r.users):[].concat(D()(M),D()(r.users))),I(!1),(null===(n=r.users)||void 0===n?void 0:n.length)<10&&S(!1);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=s()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(""!=Q){e.next=4;break}x.ZP.error("请选择成员"),e.next=8;break;case 4:return e.next=6,(0,q.xt)(f()(f()({},l),{},{id:Q,virtual_classroom_id:l.virtual_spacesId}));case 6:0===e.sent.status&&(x.ZP.success("更换成功"),r({type:"classroomList/setActionTabs",payload:{key:"刷新数据"}}));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ce=[{title:"",dataIndex:"added",width:40,ellipsis:!0,render:function(e,t){return(0,N.jsx)(_.ZP,{value:t.numid,checked:Q===String(t.numid)})}},{title:"姓名",width:100,ellipsis:!0,dataIndex:"username",render:function(e,t){return(0,N.jsx)(j.Z,{placement:"bottom",title:e,children:(0,N.jsx)(P.Link,{className:"bold c-black",to:"/users/".concat(t.login),target:"_blank",children:e||"--"})})}},{title:"手机",width:100,dataIndex:"phone",ellipsis:!0,render:function(e){return(0,N.jsx)(j.Z,{placement:"bottom",title:e,children:(0,N.jsx)("span",{children:e||"--"})})}},{title:"邮箱",dataIndex:"email",width:100,ellipsis:!0,render:function(e){return(0,N.jsx)(j.Z,{placement:"bottom",title:e,children:(0,N.jsx)("span",{children:e||"--"})})}},{title:"学号/工号",width:100,dataIndex:"student_number",ellipsis:!0,render:function(e){return(0,N.jsx)(j.Z,{placement:"bottom",title:e,children:(0,N.jsx)("span",{children:e||"--"})})}},{title:"学校/单位",width:150,dataIndex:"school_name",ellipsis:!0,render:function(e){return(0,N.jsx)(j.Z,{placement:"bottom",title:e,children:(0,N.jsx)("span",{children:e||"--"})})}},{title:"院系/部门",dataIndex:"depart_name",width:130,ellipsis:!0,render:function(e){return(0,N.jsx)(j.Z,{placement:"bottom",title:e,children:(0,N.jsx)("span",{children:e||"--"})})}},{title:"实名认证",dataIndex:"school_name",width:100,render:function(e){return e?"是":"否"}},{title:"最后登录时间",dataIndex:"last_login_on",width:140,ellipsis:!0,render:function(e){return(0,N.jsx)(j.Z,{placement:"bottom",title:e,children:(0,N.jsx)("span",{children:Y()(e).format("YYYY-MM-DD HH:mm")})})}}];return(0,N.jsxs)(A.Z,{centered:!0,title:"更换管理员",open:"更换管理员"===i.actionTabs.key,okText:"确定",cancelText:"取消",width:1100,zIndex:9999,bodyStyle:{minHeight:200},onOk:s()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:oe();case 1:case"end":return e.stop()}}),e)}))),onCancel:function(){ee(""),r({type:"classroomList/setActionTabs",payload:{}})},children:[(0,N.jsxs)(v.Z,{layout:"inline",form:T,initialValues:{school_name:"",keyword:""},className:"mt10",children:[(0,N.jsx)(v.Z.Item,{name:"keyword",label:"姓名:",children:(0,N.jsx)(g.Z,{allowClear:!0,style:{width:370},size:"middle",defaultValue:(null===(t=u.selectArrs)||void 0===t?void 0:t.category_name)||(null===(n=u.selectArrs)||void 0===n?void 0:n.name)})}),(0,N.jsx)(v.Z.Item,{name:"school_name",label:"单位:",children:(0,N.jsx)("div",{ref:re,children:(0,N.jsx)(F.Z,{options:h,style:{width:400},size:"middle",placeholder:"请输入单位名称",filterOption:function(e,t){return-1!==t.value.toUpperCase().indexOf(e.toUpperCase())}})})}),(0,N.jsx)(v.Z.Item,{children:(0,N.jsx)(k.ZP,{htmlType:"submit",type:"primary",size:"middle",onClick:function(){return function(){var e;if(""===(null===(e=T.getFieldValue())||void 0===e?void 0:e.keyword))return V([]),void x.ZP.error("请输入姓名");ae(!1),S(!0),I(!1),ee(""),setTimeout((function(){le(!0)}),200)}()},children:"搜索"})})]}),ie&&(0,N.jsxs)("div",{className:"tc font16 c-light-black mt40 pb30",children:[(0,N.jsx)("img",{src:$.RL,width:"100",alt:""}),(0,N.jsx)("br",{}),(0,N.jsx)("p",{className:"mt20",children:"请搜索要添加的人员"})]}),!ie&&""==M&&!C&&(0,N.jsxs)("div",{className:"tc font16 c-light-black mt40 pb30",children:[(0,N.jsx)("img",{src:$.z3,width:"100",alt:""}),(0,N.jsx)("br",{}),(0,N.jsx)("p",{className:"mt20",children:"暂时还没有相关数据哦!"})]}),(!ie&&""!=M||C)&&(0,N.jsxs)("section",{children:[(0,N.jsx)("div",{className:"flexd-table-header mt20",children:(0,N.jsx)(H.Z,{pagination:!1,dataSource:[],columns:ce})}),(0,N.jsx)("div",{style:{maxHeight:260,overflow:"auto"},children:(0,N.jsx)(B(),{initialLoad:!1,pageStart:1,threshold:20,loadMore:function(e){le()},hasMore:w,useWindow:!1,children:(0,N.jsx)(H.Z,{loading:C,showHeader:!1,pagination:!1,dataSource:M,columns:ce,onRow:function(e){return{onClick:function(e){var t;e.currentTarget.querySelector("input").disabled||(t=e.currentTarget.querySelector("input").value,t=String(t),ee(t))}}}})})})]})]})})),K=n(33287),Q=["classroomList","globalSetting","virtualSpaces","user","loading","dispatch"],ee=(0,P.connect)((function(e){var t=e.classroomList,n=e.loading,i=e.globalSetting,a=e.virtualSpaces,r=e.user;return{classroomList:t,globalSetting:i,loading:n.effects,virtualSpaces:a,user:r}}))((function(e){var t,n=e.classroomList,i=(e.globalSetting,e.virtualSpaces),r=e.user,l=(e.loading,e.dispatch),d=(m()(e,Q),(0,c.useState)([])),p=o()(d,2),f=p[0],h=p[1],v=(0,c.useState)(!1),x=o()(v,2),g=(x[0],x[1],i.virtualSpacesDetails,(0,c.useState)("1")),_=o()(g,2),y=_[0],b=_[1],w=(0,P.useParams)(),j=(0,c.useState)({page:1,limit:16,search:"",virtual_classroom_id:w.virtual_spacesId,module_id:i.actionTabs.module_id}),k=o()(j,2),S=k[0];k[1];function L(){return C.apply(this,arguments)}function C(){return(C=s()(a()().mark((function e(){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.ZP)("/api/virtual_classrooms/".concat(w.virtual_spacesId,"/members.json"),{method:"get",params:S});case 2:t=e.sent,h(t);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function I(){return E.apply(this,arguments)}function E(){return(E=s()(a()().mark((function e(){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.ZP)("/api/virtual_classrooms/".concat(w.virtual_spacesId,"/appling_member_list.json"),{method:"get",params:S});case 2:t=e.sent,h(t);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}return(0,c.useEffect)((function(){L()}),[]),(0,c.useEffect)((function(){"刷新数据"===n.actionTabs.key&&(L(),b("1"),l({type:"virtualSpaces/getVirtualSpacesDetails",payload:{id:w.virtual_spacesId}}))}),[n.actionTabs.key]),(0,N.jsxs)("div",{className:V.warp,children:[(0,N.jsxs)("div",{className:V.Content,children:[(null==f?void 0:f.total_count)<=0&&(0,N.jsx)(M.Z,{Buttonclass:V.buttonstyle,customText:"此项目还没有成员,立即添加它们吧~"}),null==f||null===(t=f.members)||void 0===t?void 0:t.map((function(e,t){return(0,N.jsxs)("div",{className:V.items,onClick:function(){window.open("/users/".concat(e.login))},children:[(0,N.jsxs)("div",{style:{display:"flex"},children:[(0,N.jsx)("img",{src:Z.Z.IMG_SERVER+"/images/"+(null==e?void 0:e.image_url)}),(0,N.jsxs)("div",{children:[(0,N.jsxs)("div",{style:{fontSize:"16px",display:"flex",fontWeight:600},children:[null==e?void 0:e.name,(null==e?void 0:e.is_creator)&&(0,N.jsx)("div",{className:V.adminsstyle,children:"管理员"})]}),(0,N.jsxs)("div",{style:{fontSize:"14px",color:"#7D8592",marginTop:"7px"},children:[e.school,e.school&&e.department_name&&"-",e.department_name]})]})]}),(0,N.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"center"},children:[((null==e?void 0:e.is_creator)&&r.userInfo.user_id===e.user_id||(0,K.Ny)())&&0===t&&"1"===y&&(null==e?void 0:e.is_creator)&&(0,N.jsxs)("span",{onClick:function(e){e.stopPropagation(),e.preventDefault(),l({type:"classroomList/setActionTabs",payload:{key:"更换管理员",params:S}})},className:V.upadmin,children:[(0,N.jsx)("i",{className:"iconfont icon-genghuanguanliyuan mr5 font14"}),"更换管理员"]}),(null==e?void 0:e.can_remove)&&"1"===y&&(0,N.jsxs)("span",{className:"font14",onClick:function(t){var n;t.stopPropagation(),t.preventDefault(),A.Z.confirm({title:"移除成员",content:"确认将成员《".concat(e.name,"》移出虚拟社区吗?"),okText:"确认",cancelText:"取消",onOk:(n=s()(a()().mark((function t(){return a()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,u.ZP)("/api/virtual_classrooms/".concat(w.virtual_spacesId,"/members/").concat(e.user_id,".json"),{method:"Delete"});case 2:0===t.sent.status&&(L(),l({type:"virtualSpaces/getVirtualSpacesDetails",payload:{id:w.virtual_spacesId}}));case 4:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)})})},style:{color:"#3061D0",cursor:"pointer"},children:[(0,N.jsx)("i",{className:"iconfont icon-piliangshanchubeifen mr5 font14"}),"删除成员"]}),!(null!=e&&e.is_creator)&&"2"===y&&(0,N.jsxs)("div",{style:{cursor:"pointer"},children:[(0,N.jsx)("span",{onClick:function(){var t=s()(a()().mark((function t(n){return a()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.stopPropagation(),n.preventDefault(),t.next=4,(0,u.ZP)("/api/virtual_classrooms/".concat(w.virtual_spacesId,"/agree.json"),{method:"post",body:{apply_id:e.source_id}});case 4:0===t.sent.status&&I();case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),className:V.yes,children:"同意"}),(0,N.jsx)("span",{onClick:function(){var t=s()(a()().mark((function t(n){return a()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n.stopPropagation(),n.preventDefault(),t.next=4,(0,u.ZP)("/api/virtual_classrooms/".concat(w.virtual_spacesId,"/refuse.json"),{method:"post",body:{apply_id:e.source_id}});case 4:0===t.sent.status&&I();case 6:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),className:V.no,children:"拒绝"})]})]})]})}))]}),(0,N.jsx)(X,{}),(0,N.jsx)(G,{}),(0,N.jsx)(R.Z,{current:S.page,total:null==f?void 0:f.total_count,style:{textAlign:"end",marginBottom:"20px"},pageSize:S.limit,hideOnSinglePage:!0,onChange:function(e){S.page=e,"1"===y?L():I()}})]})})),te=(0,P.connect)((function(e){return{globalSetting:e.globalSetting,virtualSpaces:e.virtualSpaces}}))((function(e){var t,n=e.dispatch,i=e.virtualSpaces,r=(0,P.useParams)().virtual_spacesId,l=(0,c.useState)("1"),p=o()(l,2),f=p[0],h=p[1],m=(0,c.useState)(!1),v=o()(m,2),x=v[0],g=v[1];(0,c.useEffect)((function(){_()}),[]);var _=function(){var e=s()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.ZP)("/api/virtual_classrooms/".concat(r,"/settings_auth.json"),{method:"get"});case 2:0===e.sent.status&&g(!0);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),y=[{id:"1",name:"模块设置"},{id:"2",name:"成员设置",total:null==i||null===(t=i.virtualSpacesDetails)||void 0===t?void 0:t.members_count}];return x?(0,N.jsxs)("div",{className:d,children:[(0,N.jsx)(C.YG,{value:f,onChange:function(e){h(e)},dataSource:y,tabBarExtraContent:"2"===f&&(0,N.jsx)(C.op,{onClick:function(){n({type:"classroomList/setActionTabs",payload:{key:"添加成员",params:{}}})},children:"添加成员"})}),"1"===f&&(0,N.jsx)(O,{}),"2"===f&&(0,N.jsx)(ee,{})]}):(0,N.jsx)(N.Fragment,{})}))},44728:function(e,t,n){"use strict";n.d(t,{AL:function(){return w},Iy:function(){return p},Qv:function(){return m},ez:function(){return b},jb:function(){return f}});var i=n(79800),a=n.n(i),r=n(32834),s=n.n(r),l=n(11690);var o=[],c=["<ul>"],u=new(s().Renderer),d=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function p(){o.length=0,c=["<ul>"]}var f={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function h(e,t,n,i){if(t>=e.length||e[t].level<=n)return t;var a=e[t];i.push("<li><a href='#"+a.anchor+"'>"+a.text+"</a>");var r=[];return t=h(e,++t,a.level,r),r.length>0&&(i.push("<ul>"),r.forEach((function(e){i.push(e)})),i.push("</ul>")),i.push("</li>"),t=h(e,t,n,i)}function m(){return h(o,0,0,c),c.push("</ul>"),c.join("")}var v={heading:function(e){var t=d.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},fences:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],i=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var i=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:a()(t,1)[0].length>=i.length?e.slice(i.length):e})).join("\n")}(n,t[3]||""),r=t[2]?t[2].trim():t[2];if(["latex","katex","math"].indexOf(r)>=0){var s=_(),l=i;i=s,y[s]={type:"block",expression:l}}return{type:"code",raw:n,lang:r,text:i}}}},x=/(?:\${2})([^\n`]+?)(?:\${2})/gi,g=0,_=function(){return"__special_katext_id_".concat(g++,"__")},y={};function b(){return y}function w(){g=0,y={}}function j(e){return e=e.replace(x,(function(e,t){var n=_();return y[n]={type:"inline",expression:t},n}))}var k=u.listitem;u.listitem=function(e){return k(j(e))};var S=u.paragraph;u.paragraph=function(e){return S(j(e))};var Z=u.tablecell;u.tablecell=function(e,t){return Z(j(e),t)},u.code=function(e,t,n){var i=(t||"").match(/\S*/)[0];return i?["latex","katex","math"].indexOf(i)>=0?"<p class='editormd-tex'>".concat(e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(t,'">').concat(n?e:(0,l.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(n?e:(0,l.escape)(e,!0))+"</code></pre>"},u.heading=function(e,t,n){var i=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return o.push({anchor:i,level:t,text:e}),"<h"+t+' id="'+i+'">'+e+"</h"+t+">"},s().setOptions({silent:!0,gfm:!0,pedantic:!1}),s().use({tokenizer:v,renderer:u}),t.ZP=s()},88522:function(e,t,n){"use strict";var i=n(92310),a=n.n(i),r=n(29541),s=n(83930),l=n(59301),o=n(53487),c=n(92343),u=n(36355),d=n(57809);const{Option:p}=d.default;function f(e){return e&&e.type&&(e.type.isSelectOption||e.type.isSelectOptGroup)}const h=(e,t)=>{const{prefixCls:n,className:i,popupClassName:o,dropdownClassName:h,children:m,dataSource:v}=e,x=(0,r.Z)(m);let g;1===x.length&&(0,c.l$)(x[0])&&!f(x[0])&&([g]=x);const _=g?()=>g:void 0;let y;y=x.length&&f(x[0])?m:v?v.map((e=>{if((0,c.l$)(e))return e;switch(typeof e){case"string":return l.createElement(p,{key:e,value:e},e);case"object":{const{value:t}=e;return l.createElement(p,{key:t,value:t},e.text)}default:return}})):[];const{getPrefixCls:b}=l.useContext(u.E_),w=b("select",n);return l.createElement(d.default,Object.assign({ref:t,suffixIcon:null},(0,s.Z)(e,["dataSource","dropdownClassName"]),{prefixCls:w,popupClassName:o||h,className:a()(`${w}-auto-complete`,i),mode:d.default.SECRET_COMBOBOX_MODE_DO_NOT_USE},{getInputElement:_}),y)},m=l.forwardRef(h),v=(0,o.Z)(m);m.Option=p,m._InternalPanelDoNotUseOrYouWillBeFired=v,t.Z=m},51581:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}return function(t,n,i){return n&&e(t.prototype,n),i&&e(t,i),t}}(),a=n(59301),r=l(a),s=l(n(12708));function l(e){return e&&e.__esModule?e:{default:e}}var o=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),i(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),i=void 0;if(this.props.useWindow){var a=document.documentElement||document.body.parentNode||document.body,r=void 0!==t.pageYOffset?t.pageYOffset:a.scrollTop;i=this.props.isReverse?r:this.calculateOffset(e,r)}else i=this.props.isReverse?n.scrollTop:e.scrollHeight-n.scrollTop-n.clientHeight;i<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,i=t.element,a=t.hasMore,s=(t.initialLoad,t.isReverse),l=t.loader,o=(t.loadMore,t.pageStart,t.ref),c=(t.threshold,t.useCapture,t.useWindow,t.getScrollParent,function(e,t){var n={};for(var i in e)t.indexOf(i)>=0||Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}(t,["children","element","hasMore","initialLoad","isReverse","loader","loadMore","pageStart","ref","threshold","useCapture","useWindow","getScrollParent"]));c.ref=function(t){e.scrollComponent=t,o&&o(t)};var u=[n];return a&&(l?s?u.unshift(l):u.push(l):this.defaultLoader&&(s?u.unshift(this.defaultLoader):u.push(this.defaultLoader))),r.default.createElement(i,c,u)}}]),t}(a.Component);o.propTypes={children:s.default.node.isRequired,element:s.default.node,hasMore:s.default.bool,initialLoad:s.default.bool,isReverse:s.default.bool,loader:s.default.node,loadMore:s.default.func.isRequired,pageStart:s.default.number,ref:s.default.func,getScrollParent:s.default.func,threshold:s.default.number,useCapture:s.default.bool,useWindow:s.default.bool},o.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=o,e.exports=t.default},26724:function(e,t,n){e.exports=n(51581)}}]);