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__Shixuns__Detail__id.asyn...

1 line
72 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.

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[52875,4585,71950],{10459:function(e,n,t){function i(e){var n=!0;if(e.length>0){for(var t=0;t<e.length;t++)if(0==e[t].compile_success||!e[t].compile_success){n=!1;break}}else n=!1;return n}function a(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=[],i=0;i<e.length;i++){var a=e[i],c=n?"".concat(n,"/").concat(a.name):"".concat(a.name);t.push({title:a.name,isLeaf:"tree"!==a.type,key:c})}return t}function c(e,n,t){for(var i=0;i<e.length;i++){var a=e[i];if(a.key===n){a.children=t;break}a.children&&c(a.children,n,t)}return e}function l(e,n,t){var i;return function(){var a=this,c=arguments,l=function(){i=null,t||e.apply(a,c)},s=t&&!i;clearTimeout(i),i=setTimeout(l,n),s&&e.apply(a,c)}}t.d(n,{Ax:function(){return c},Ds:function(){return l},KI:function(){return s},SI:function(){return a},f1:function(){return i}});var s=t(71681).Z.API_SERVER},11680:function(e,n,t){t.d(n,{Z:function(){return k}});var i=t(91232),a=t.n(i),c=t(79800),l=t.n(c),s=t(59301),r="teacher_name___BzxwZ",o="teacher_school___bBT_c",u="teacher_type___WrppP",d="teacherList___RE3zy",h="teacher_header___zF6G0",f="btn_list___gobq0",p="sy___zyrWK",m="xy___FwJSl",v="bj___gn9Hm",_="sc___Ree9z",x="techer_content___me4s8",g="img___T_z5s",j="teacher_img___NHN5k",y="content___gSkvU",N="shuji_jianjie___ArUYc",b=t(3634),w=t(6848),S=t(8591),C=t(43418),M=t(37712),k=function(e){var n,i,c,k=e.v,I=e.k,Z=e.showBtn,L=e.params,E=e.getData,A=e.setDialogvisible,P=e.setTeacherForm,T=e.teachers,R=(0,s.useRef)(),D=(0,s.useState)(),O=l()(D,2),z=O[0],V=O[1],U=(0,s.useState)(!0),F=l()(U,2),H=F[0],B=F[1];return(0,s.useEffect)((function(){if(R.current){var e=function(){var e,n=new ResizeObserver((function(e){var n,t=a()(e);try{for(t.s();!(n=t.n()).done;){var i=n.value;V(i.target.offsetHeight>=200),console.log(i.target.offsetHeight)}}catch(e){t.e(e)}finally{t.f()}}));return n.observe(null===(e=R.current)||void 0===e?void 0:e.firstElementChild),n}();return function(){var n,t;(null===(n=R.current)||void 0===n?void 0:n.firstElementChild)&&e.unobserve(null===(t=R.current)||void 0===t?void 0:t.firstElementChild)}}}),[R.current]),(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)("div",{className:d,children:[(0,M.jsx)("div",{className:h,children:(0,M.jsxs)("div",{style:{display:"flex",height:"0.55rem",alignItems:"center",width:"8.16rem",position:"relative"},children:[(0,M.jsx)(w.Z,{title:null==k?void 0:k.name,children:(0,M.jsx)("div",{className:r,children:null==k?void 0:k.name})}),(0,M.jsx)(w.Z,{title:null==k?void 0:k.career,children:(0,M.jsx)("div",{className:o,children:null==k?void 0:k.career})}),(0,M.jsx)(w.Z,{title:null==k?void 0:k.school,children:(0,M.jsx)("div",{className:o,children:null==k?void 0:k.school})}),(0,M.jsx)(w.Z,{title:1==(null==k?void 0:k.identity)?"负责教师":"合作教师",children:(0,M.jsx)("div",{className:u,children:1==(null==k?void 0:k.identity)?"负责教师":"合作教师"})}),Z&&(0,M.jsxs)("div",{className:f,children:[0!=I&&(0,M.jsx)(w.Z,{title:"上移",children:(0,M.jsx)("span",{className:"icon-shangyi_Hover ".concat(p),onClick:function(){(0,b.aT)({teacher_id:null==k?void 0:k.teacher_id,id:null==L?void 0:L.pathId}).then((function(e){0==(null==e?void 0:e.status)&&(S.ZP.success("上移成功"),E())}))}})}),I+1!=(null==T||null===(n=T.filter((function(e){return 2==e.identity})))||void 0===n?void 0:n.length)&&(0,M.jsx)(w.Z,{title:"下移",children:(0,M.jsx)("span",{className:"icon-xiayi_Hover ".concat(m),onClick:function(){(0,b.Nn)({teacher_id:null==k?void 0:k.teacher_id,id:null==L?void 0:L.pathId}).then((function(e){0==(null==e?void 0:e.status)&&(S.ZP.success("下移成功"),E())}))}})}),(0,M.jsx)(w.Z,{title:"编辑",children:(0,M.jsx)("span",{className:"icon-bianji_Hover ".concat(v),onClick:function(){var e,n;A(!0),P({teacher_id:null==k?void 0:k.teacher_id,teacher_url:null==k||null===(e=k.attachment)||void 0===e?void 0:e.url,teacher_attachment_id:null==k||null===(n=k.attachment)||void 0===n?void 0:n.id,teacher:null==k?void 0:k.name,career:null==k?void 0:k.career,school:null==k?void 0:k.school,identity:null==k?void 0:k.identity,description:null==k?void 0:k.description})}})}),(0,M.jsx)(w.Z,{title:"删除",children:(0,M.jsx)("span",{className:"icon-shanchu13 ".concat(_),onClick:function(){C.Z.confirm({centered:!0,okText:"确定",icon:null,cancelText:"取消",title:"提示",content:"确认要删除这位教师吗?",onOk:function(){(0,b.uk)({teacher_id:null==k?void 0:k.teacher_id}).then((function(e){0==(null==e?void 0:e.status)&&(S.ZP.success("删除成功"),E())}))}})}})})]})]})}),(0,M.jsxs)("div",{className:x,children:[(0,M.jsx)("div",{className:g,children:(0,M.jsx)("img",{src:null!=k&&null!==(i=k.attachment)&&void 0!==i&&i.url?null==k||null===(c=k.attachment)||void 0===c?void 0:c.url:t(66963),className:j})}),(0,M.jsx)("div",{className:y,ref:R,children:(0,M.jsx)("div",{className:N,style:{maxHeight:H&&200,overflow:"hidden"},children:null!=k&&k.description?null==k?void 0:k.description:(0,M.jsx)("span",{style:{marginLeft:"2rem"},children:"暂无数据"})})})]})]},I),z&&(0,M.jsxs)("div",{style:{textAlign:"right",color:"#237E61",cursor:"pointer",marginTop:"-0.3rem",marginBottom:"0.3rem",fontSize:".14rem",marginRight:".4rem"},onClick:function(e){e.stopPropagation(),B(!H)},children:[H?"查看全部 ":"收起全文 ",(0,M.jsx)("i",{className:"iconfont font14 ".concat(H?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})]})]})}},29114:function(e,n,t){t.d(n,{Z:function(){return N}});var i=t(82242),a=t.n(i),c=t(7557),l=t.n(c),s=t(41498),r=t.n(s),o=t(79800),u=t.n(o),d=t(59301),h={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},f=t(3113),p=t(22441),m=t(38288),v=t(6848),_=t(27876),x=t(43516),g=t(6638),j=t(71681),y=t(37712),N=function(e){var n,t,i,c,s,o,N,b=e.editOffice,w=void 0===b?"view":b,S=e.data,C=(e.theme,e.type),M=e.filename,k=e.monacoEditor,I=e.className,Z=e.style,L=e.close,E=e.onClose,A=e.hasMask,P=e.disabledDownload,T=e.onImgDimensions,R=e.showNodata,D=(0,d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),O=u()(D,2),z=(O[0],O[1],(0,d.useState)("")),V=u()(z,2),U=(V[0],V[1]),F=(0,d.useState)(),H=u()(F,2),B=H[0],W=H[1],Y="build"===window.ENV?"/react/build":"",G=location.host.startsWith("localhost")?j.Z.PROXY_SERVER:j.Z.API_SERVER,q=(0,d.useRef)();null!==(n=S)&&void 0!==n&&n.startsWith("/api")&&"txt"!==C&&(S=j.Z.API_SERVER+S),M&&(k.filename=M),(0,d.useEffect)((function(){var e,n=null===(e=document.cookie)||void 0===e||null===(e=e.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==n||n.map((function(e){var n=e.split("=");"_educoder_session"===n[0]&&U(n[1])}))}),[]),(0,d.useEffect)((function(){"office"===C&&J()}),[C,S]);var J=function(){var e=r()(l()().mark((function e(){var n,t,i;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=S,S.startsWith("http")||(n=location.origin+n),t=new URL(n).pathname.split("/").pop(),e.next=5,(0,x.gJ)({attachment_id:t});case 5:i=e.sent,W(i);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Q=function(){S.startsWith("http")||S.startsWith("blob:")?X():(0,_.Sv)(M||"educoder",S,M)},X=function(){(0,_.Nd)(M||"educoder",decodeURIComponent(S))};return(0,y.jsxs)("div",{style:a()({},Z||{}),className:"".concat(A&&h.bgBlack," ").concat(C?h.wrp:"hide"),children:[L&&(0,y.jsxs)("div",{className:h.close,ref:q,children:[!!T&&(0,y.jsx)(v.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return q.current},children:(0,y.jsx)("span",{onClick:function(){E(),T()},children:(0,y.jsx)("i",{className:"icon-yulanpizhu"})})}),!P&&(0,y.jsx)(v.Z,{title:"点击下载此文件",getPopupContainer:function(){return q.current},children:(0,y.jsx)("span",{onClick:X,children:(0,y.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,y.jsx)(v.Z,{title:"关闭",getPopupContainer:function(){return q.current},children:(0,y.jsx)("span",{className:"",onClick:E,children:(0,y.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,y.jsx)("div",{className:"".concat(h[I]," ").concat(I," ").concat(h.monaco," ").concat("txt"===C?"show":"hide"),children:"txt"===C&&(0,y.jsx)(m.ZP,a()({},k))}),"audio"===C&&(0,y.jsx)("audio",{src:(null===(t=S)||void 0===t?void 0:t.indexOf("http"))>-1||null!==(i=S)&&void 0!==i&&i.startsWith("/api")?S:"data:image/png;base64,".concat(S),autoPlay:!0}),"video"===C&&(0,y.jsx)(y.Fragment,{children:(null===(c=S)||void 0===c?void 0:c.indexOf("http"))>-1||null!==(s=S)&&void 0!==s&&s.startsWith("/api")?(0,y.jsx)("video",{controls:!0,src:"".concat(S),autoPlay:!0}):(0,y.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(S),autoPlay:!0})}),"office"===C&&B&&(0,y.jsx)("iframe",{src:"".concat(Y,"/office.html?key=").concat(B.key,"&url=").concat(G+B.url,"&callbackUrl=").concat(G+B.callbackUrl,"&fileType=").concat(B.fileType,"&title=").concat(B.title,"&model=").concat(w,"&officeServer=").concat(j.Z.ONLYOFFICE,"&disabledDownload=").concat(!!P)}),"html"===C&&(0,y.jsx)("iframe",{src:S+"&disposition=inline"}),"pdf"===C&&(0,y.jsx)("iframe",{src:"".concat(Y,"/js/pdfview/index.html?url=").concat(S,"&disabledDownload=").concat(!!P)}),"image"===C&&(0,y.jsx)("img",{src:(null===(o=S)||void 0===o?void 0:o.indexOf("http"))>-1||null!==(N=S)&&void 0!==N&&N.startsWith("/api")?S:"data:image/png;base64,".concat(S)}),("other"===C||"download"===C)&&(0,y.jsx)(y.Fragment,{children:R?(0,y.jsx)(g.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,y.jsx)(f.ZP,{icon:(0,y.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Q,children:"下载"})}):(0,y.jsxs)(f.ZP,{type:"primary",size:"middle",onClick:Q,children:[(0,y.jsx)(p.Z,{}),"点击下载"]})})]})}},4585:function(e,n,t){t.d(n,{Z:function(){return H}});var i=t(82242),a=t.n(i),c=t(37205),l=t.n(c),s=t(91232),r=t.n(s),o=t(79800),u=t.n(o),d=t(59301),h=(t(49040),t(32834)),f=t.n(h),p=t(11690);var m=[],v=["<ul>"],_=new(f().Renderer),x=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function g(){m.length=0,v=["<ul>"]}var j={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function y(e,n,t,i){if(n>=e.length||e[n].level<=t)return n;var a=e[n];i.push("<li><a href='#"+a.anchor+"'>"+a.text+"</a>");var c=[];return n=y(e,++n,a.level,c),c.length>0&&(i.push("<ul>"),c.forEach((function(e){i.push(e)})),i.push("</ul>")),i.push("</li>"),n=y(e,n,t,i)}function N(){return y(m,0,0,v),v.push("</ul>"),v.join("")}var b={heading:function(e){var n=x.exec(e);if(n)return{type:"heading",raw:n[0],depth:n[1].length,text:n[2]}},fences:function(e){var n=this.rules.block.fences.exec(e);if(n){var t=n[0],i=function(e,n){var t=e.match(/^(\s+)(?:```)/);if(null===t)return n;var i=t[1];return n.split("\n").map((function(e){var n=e.match(/^\s+/);return null===n?e:u()(n,1)[0].length>=i.length?e.slice(i.length):e})).join("\n")}(t,n[3]||""),a=n[2]?n[2].trim():n[2];if(["latex","katex","math"].indexOf(a)>=0){var c=C(),l=i;i=c,M[c]={type:"block",expression:l}}return{type:"code",raw:t,lang:a,text:i}}}},w=/(?:\${2})([^\n`]+?)(?:\${2})/gi,S=0,C=function(){return"__special_katext_id_".concat(S++,"__")},M={};function k(){return M}function I(){S=0,M={}}function Z(e){return e=e.replace(w,(function(e,n){var t=C();return M[t]={type:"inline",expression:n},t}))}var L=_.listitem;_.listitem=function(e){return L(Z(e))};var E=_.paragraph;_.paragraph=function(e){return E(Z(e))};var A=_.tablecell;_.tablecell=function(e,n){return A(Z(e),n)},_.code=function(e,n,t){var i=(n||"").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(n,'">').concat(t?e:(0,p.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(t?e:(0,p.escape)(e,!0))+"</code></pre>"},_.heading=function(e,n,t){var i=this.options.headerPrefix+t.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return m.push({anchor:i,level:n,text:e}),"<h"+n+' id="'+i+'">'+e+"</h"+n+">"},f().setOptions({silent:!0,gfm:!0,pedantic:!1}),f().use({tokenizer:b,renderer:_});var P=f(),T=(t(64018),t(6419)),R=t(71681),D=t(15342),O=t(1012),z=t(29114),V=t(37712),U="@▁@",F=/<pre[^>]*>/g;var H=function(e){var n=e.value,t=void 0===n?"":n,i=e.className,c=e.showTextOnly,s=e.showLines,o=e.style,h=void 0===o?{}:o,f=e.stylesPrev,p=void 0===f?{}:f,m=e.highlightKeywords,v=e.showProgramFill,_=(e.isProgramFill,e.disabledFill),x=void 0!==_&&_,y=e.programFillValue,b=e.onFillChange,w=void 0===b?function(e){}:b,S=e.onFillBlur,C=void 0===S?function(){}:S,M=String(t),Z=(0,d.useState)(""),L=u()(Z,2),E=L[0],A=L[1],H=(0,d.useState)("office"),B=u()(H,2),W=B[0],Y=B[1],G=(0,d.useState)([]),q=u()(G,2),J=q[0],Q=q[1],X=(0,d.useRef)("a"+(0,O.Z)()),K={},$=function(e){return e.replace(/<style.*?>([\s\S]+?)<\/style>/gim,(function(e,n){var t=n.replace(/(\n|\r)/g,"").split("}"),i=[];return t.map((function(e){""!=e&&i.push(".".concat(X.current," ").concat(e))})),"<style>".concat(i.join("}"),"</style>")}))},ee=(0,d.useMemo)((function(){try{M=M.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+R.Z.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+R.Z.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+R.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(v){var e=-1;return M=M.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,(function(n,t,i){return function(e,n){var t=document.createElement(e===U?"input":"textarea");t.style.width="100%",t.style.height=e===U?"40px":"151px",t.rows=5,t.spellcheck=!1,t.name="edu-program-fill",t.placeholder="请输入",t.dataset.id=n;var i=Object.keys(K).length;return K[i]=t,'<span class="edu-program-fill-wrap '.concat(e===U?"":"show",'" style="width:').concat(e===U?"200px":"100%",'"><span>').concat(t.outerHTML,'<span class="edu-program-fill-score"></span></span></span>')}(n,++e)})),'<pre style="background:#fff;padding:4px">'.concat($(M||""),"</pre>")}var n=P(M);n=$(n);var t=k();M.match(/\[TOC\]/)&&(n=n.replace("<p>[TOC]</p>",N()),g()),n=n.replace(/(__special_katext_id_\d+__)/g,(function(e,n){var i=t[n],a=i.type,c=i.expression;return(0,D.renderToString)(function(e){var n=document.createElement("div");return n.innerHTML=e,0===n.childNodes.length?"":n.childNodes[0].nodeValue}(c)||"",{displayMode:"block"===a,throwOnError:!1,output:"html"})})),n=n.replace(/▁/g,"▁▁▁"),I();var i=document.createElement("div");return i.innerHTML=n,m?(ie(i,m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),i.innerHTML):c?i.innerText:(setTimeout((function(){return le()}),500),i.innerHTML)}),[M,m]);(0,d.useEffect)((function(){ae.current&&ae.current.querySelectorAll(["input","textarea"]).forEach((function(e){e.oninput=ne,e.onblur=te}))}),[J]),(0,d.useEffect)((function(){if(null!=y&&y.length){var e,n=ae.current.querySelectorAll(".edu-program-fill-score"),t=ae.current.querySelectorAll('[name="edu-program-fill"]'),i=r()(t.entries());try{for(i.s();!(e=i.n()).done;){var a,c=u()(e.value,2),l=c[0],s=c[1];s.value=null===(a=y[l])||void 0===a?void 0:a.value,"warning"===y[l].type?s.className="program-fill-warning":"success"===y[l].type?s.className="program-fill-success":s.className=""}}catch(e){i.e(e)}finally{i.f()}var o,d=r()(n.entries());try{for(d.s();!(o=d.n()).done;){var h,f,p=u()(o.value,2),m=p[0];p[1].innerHTML=null!==(h=y[m])&&void 0!==h&&h.score?"".concat(null===(f=y[m])||void 0===f?void 0:f.score,"分"):""}}catch(e){d.e(e)}finally{d.f()}Q(y)}}),[y]);var ne=function(e){J[e.target.dataset.id]=J[e.target.dataset.id]||{},J[e.target.dataset.id].value=e.target.value,Q(l()(J)),w(J,e.target.dataset.id)},te=function(e){J[e.target.dataset.id]=J[e.target.dataset.id]||{},J[e.target.dataset.id].value=e.target.value,Q(l()(J)),C(J,e.target.dataset.id)};function ie(e,n){return e.childNodes.forEach((function(e){if(e.childNodes.length>0)ie(e,n);else if("IMG"!==e.nodeName)if(e.innerHTML){var t;e.innerHTML=null===(t=e.innerHTML)||void 0===t?void 0:t.replace(new RegExp(n,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>')}else{var i=document.createElement("span");i.innerHTML=e.textContent.replace(new RegExp(n,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),e.replaceWith(i)}}))}var ae=(0,d.useRef)();function ce(e){var n=e.target;if("A"===n.tagName.toUpperCase()){var t=n.getAttribute("href");if(t.indexOf("office")>-1)e.preventDefault(),A(t),Y("office");else if(t.indexOf("application/pdf")>-1)e.preventDefault(),A(t),Y("pdf");else if(t.indexOf("text/html")>-1)e.preventDefault(),A(t),Y("html");else if(t.startsWith("#")){e.preventDefault();var i=document.getElementById(t.replace("#",""));i&&i.scrollIntoView(!0)}}}j.WebkitLineClamp=s,s&&(h=a()(a()({},h),j));var le=function(){var e,n=null===(e=ae.current)||void 0===e?void 0:e.querySelectorAll("video");null==n||n.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(T.ZP.isSupported()){var n=new T.ZP;n.loadSource(e.src),n.attachMedia(e)}}))};return(0,d.useEffect)((function(){if(ae.current&&ee&&ee.match(F)&&window.PR.prettyPrint(),ae.current)return ae.current.addEventListener("click",ce),function(){var e;null===(e=ae.current)||void 0===e||e.removeEventListener("click",ce),I(),g()}}),[ee,ae.current,ce]),(0,V.jsxs)(V.Fragment,{children:[c&&(0,V.jsx)("div",{ref:ae,children:ee}),!c&&(0,V.jsx)("div",{ref:ae,style:a()({},h),className:"".concat(i||""," ").concat(x?"disabled-fill":""," markdown-body ").concat(X.current),dangerouslySetInnerHTML:{__html:ee}}),(0,V.jsx)(z.Z,{close:!0,data:E,type:null!=E&&E.length?W:"",style:a()({},p),onClose:function(){return A("")}})]})}},16726:function(e,n,t){t.d(n,{h:function(){return _}});var i=t(82242),a=t.n(i),c=t(79800),l=t.n(c),s=t(59301),r=t(57809),o=t(78241),u=t(3113),d=t(89780),h=t.n(d),f=(t(94527),t(66608),t(37712)),p=r.default.Option,m={labelCol:{span:4},wrapperCol:{span:20}},v={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};function _(e){var n=e.value,t=e.onChange,i=e.mode,c=e.options,r=void 0===c?{}:c,o=(0,s.useRef)(),u=(0,s.useState)(),d=l()(u,2),p=d[0],m=d[1];return(0,s.useEffect)((function(){if(p){var e=function(e){var n=e.getValue();t&&t(n)};return p.on("change",e),function(){p.off("change",e)}}}),[p,t]),(0,s.useEffect)((function(){p&&p.setOption("mode",i)}),[p,i]),(0,s.useEffect)((function(){p&&(n===p.getValue()&&""!==n||setTimeout((function(){p.setValue(n||"")}),300))}),[p,n]),(0,s.useEffect)((function(){if(o.current&&!p){var e=h().fromTextArea(o.current,a()({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},r));m(e)}}),[o.current,p]),(0,f.jsx)("div",{className:"my-codemirror-container",children:(0,f.jsx)("textarea",{ref:o})})}n.Z=function(e){var n=e.callback,t=e.onCancel,i=(0,s.useState)("python"),c=l()(i,2),d=c[0],h=c[1];return(0,f.jsxs)(o.Z,a()(a()({},m),{},{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){n(e)},children:[(0,f.jsx)(o.Z.Item,{label:"代码语言",name:"language",children:(0,f.jsx)(r.default,{getPopupContainer:function(e){return e.parentNode},onChange:function(e){h(v[e][1])},children:Object.keys(v).map((function(e){return(0,f.jsx)(p,{value:e,children:v[e][0]},e)}))})}),(0,f.jsx)(o.Z.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}],children:(0,f.jsx)(_,{mode:d})}),(0,f.jsxs)("div",{className:"flex-container flex-end",children:[(0,f.jsx)(u.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,f.jsx)(u.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))}},77036:function(e,n,t){t.d(n,{Z:function(){return re}});var i=t(91232),a=t.n(i),c=t(7557),l=t.n(c),s=t(41498),r=t.n(s),o=t(79800),u=t.n(o),d=t(85573),h=t.n(d),f=t(59301),p=t(89780),m=t.n(p),v=t(76374),_=(t(94527),t(6313),t(25717),t(99498),t(25419),t(67549),t(4585)),x=t(37712),g=function(e){var n=e.value,t=void 0===n?"":n,i=(e.className,e.showTextOnly,e.showLines,e.style,(0,f.useMemo)((function(){return""}),[t]));return(0,x.jsx)(x.Fragment,{children:(0,x.jsx)("div",{dangerouslySetInnerHTML:{__html:i}})})},j=t(82242),y=t.n(j),N=[{title:"粗体",icon:"icon-bold",actionName:"bold"},{title:"斜体",icon:"icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"icon-file-code",actionName:"code-block"},{title:"链接",icon:"icon-link",actionName:"link"},"|",{title:"行内公式",icon:"icon-sum",actionName:"inline-latex"},{title:"多行公式",icon:"icon-formula",actionName:"latex"},"|",{title:"添加图片",icon:"icon-picture",actionName:"upload-image"},{title:"表格",icon:"icon-table",actionName:"add-table"},"|",{title:"换行",icon:"icon-minus",actionName:"line-break"},{title:"清空",icon:"icon-eraser",actionName:"eraser"}];function b(e){var n=e.onActionCallback,t=e.title,i=e.icon,a=e.actionName,c=e.className,l=void 0===c?"":c,s=e.children;return(0,x.jsxs)("a",{title:t,className:l,onClick:function(){n(a)},children:[(0,x.jsx)("i",{className:"md-iconfont ".concat(i)}),s]})}var w=function(e){var n=e.watch,t=e.showNullButton,i=e.showNullProgramButton,a=e.onActionCallback,c=e.fullScreen,l=e.insertTemp,s=e.hidetoolBar,r=[].concat(N,[{title:"".concat(n?"关闭实时预览":"开启实时预览"),icon:"".concat(n?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return(0,x.jsxs)("ul",{className:"markdown-toolbar-container",children:[!s&&r.map((function(e,n){return(0,x.jsx)("li",{children:e.actionName?(0,x.jsx)(b,y()(y()({},e),{},{onActionCallback:a})):(0,x.jsx)("span",{className:"v-line"})},n)})),t?(0,x.jsx)("li",{children:(0,x.jsx)(b,{icon:"icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:a,children:(0,x.jsx)("span",{className:"fill-tip",children:"点击插入\b填空项"})})}):null,i?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("li",{children:(0,x.jsx)(b,{icon:"icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-signal",onActionCallback:a,children:(0,x.jsx)("span",{className:"fill-tip",children:"添加单行填空项"})})}),(0,x.jsx)("li",{children:(0,x.jsx)(b,{icon:"icon-uniE900 insert-blank",className:"btn-null",title:"增加填空",actionName:"add-multiple",onActionCallback:a,children:(0,x.jsx)("span",{className:"fill-tip",children:"添加多行填空项"})})})]}):null,l&&(0,x.jsx)("li",{children:(0,x.jsx)(b,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(l),onActionCallback:a,children:(0,x.jsx)("span",{className:"fill-tip",children:"插入模板"})})}),(0,x.jsx)("li",{className:"btn-full-screen",children:(0,x.jsx)(b,{icon:"".concat(c?"icon-shrink":"icon-enlarge"),title:c?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:a})})]})},S=t(74063),C=t(78241),M=t(24650),k=t(3113),I={labelCol:{span:4},wrapperCol:{span:20}},Z=function(e){var n=e.callback,t=e.onCancel;return(0,x.jsxs)(C.Z,y()(y()({},I),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){n(e)},children:[(0,x.jsx)(C.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,x.jsx)(M.Z,{})}),(0,x.jsx)(C.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,x.jsx)(M.Z,{})}),(0,x.jsxs)("div",{className:"flex-container flex-end",children:[(0,x.jsx)(k.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,x.jsx)(k.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))},L=t(16726),E=t(8591),A=t(10459),P=C.Z.useForm,T={width:280,marginRight:10},R={labelCol:{span:5},wrapperCol:{span:19}},D=function(e){var n=e.callback,t=e.onCancel,i=P(),a=u()(i,1)[0],c=(0,f.useRef)();function l(e,n){-1!==e.status?a.setFieldsValue({src:"/api/attachments/".concat(e.id),type:n.type}):E.ZP.error(e.message)}return(0,x.jsxs)(C.Z,y()(y()({form:a},R),{},{className:"upload-image-panel",onFinish:function(e){n(y()(y()({},e),{},{name:c.current}))},style:{width:470,overflow:"hidden"},children:[(0,x.jsx)(C.Z.Item,{label:"图片地址",required:!0,children:(0,x.jsxs)("div",{className:"flex-container",children:[(0,x.jsx)(C.Z.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}],children:(0,x.jsx)(M.Z,{style:T})}),(0,x.jsx)(O,{onFileChange:function(e){var n=e.target.files[0];c.current=n.name,z(n,l)}})]})}),(0,x.jsx)(C.Z.Item,{label:"图片描述",name:"alt",children:(0,x.jsx)(M.Z,{style:{width:264}})}),(0,x.jsxs)(C.Z.Item,{style:{textAlign:"right"},children:[(0,x.jsx)(k.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,x.jsx)(k.ZP,{type:"default",onClick:t,children:"取消"})]})]}))};function O(e){var n=e.onFileChange;return(0,x.jsxs)("label",{className:"upload-button",style:{cursor:"pointer"},children:["本地上传",(0,x.jsx)("input",{type:"file",onChange:n})]})}function z(e,n){if(!e)throw new String("没有文件");var t=new FormData;t.append("editormd-image-file",e),t.append("file_param_name","editormd-image-file"),t.append("byxhr","true");var i=new window.XMLHttpRequest;i.withCredentials=!0,i.addEventListener("load",(function(t){n(JSON.parse(t.target.responseText),e)}),!1),i.addEventListener("error",(function(e){console.error(e)}),!1),i.open("POST","".concat(A.KI,"/api/attachments.json")),i.send(t)}var V=t(5112),U=t(94001),F=V.ZP.Group,H={margin:"0 8px"},B=function(e){var n=e.callback,t=e.onCancel;return(0,x.jsxs)(C.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){n(e)},children:[(0,x.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,x.jsx)("span",{style:H,children:"单元格数:"}),(0,x.jsx)("span",{style:H,children:"行数"}),(0,x.jsx)(C.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,x.jsx)(U.Z,{})}),(0,x.jsx)("span",{style:H,children:"列数"}),(0,x.jsx)(C.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,x.jsx)(U.Z,{})})]}),(0,x.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,x.jsx)("span",{style:H,children:"对齐方式:"}),(0,x.jsx)(C.Z.Item,{name:"align",children:(0,x.jsxs)(F,{children:[(0,x.jsx)(V.ZP,{value:"default",children:(0,x.jsx)("i",{className:"fa fa-align-justify"})}),(0,x.jsx)(V.ZP,{value:"left",children:(0,x.jsx)("i",{className:"fa fa-align-left"})}),(0,x.jsx)(V.ZP,{value:"center",children:(0,x.jsx)("i",{className:"fa fa-align-center"})}),(0,x.jsx)(V.ZP,{value:"right",children:(0,x.jsx)("i",{className:"fa fa-align-right"})})]})})]}),(0,x.jsxs)("div",{className:"flex-container flex-end",children:[(0,x.jsx)(k.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,x.jsx)(k.ZP,{type:"ghost",onClick:t,children:"取消"})]})]})},W=t(71681),Y=t(49105),G=t(1012),q=t(43418),J="link",Q="upload-image",X="code-block",K="add-table",$="------------",ee={default:$,left:":".concat($),center:":".concat($,":"),right:"".concat($,":")},ne=t(46587);var te="@▁▁@";function ie(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var ae=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ce=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],le=h()(h()({},ae+"-B","bold"),ae+"-I","italic"),se=h()(h()(h()(h()({},J,"添加链接"),X,"添加代码块"),Q,"添加文件"),K,"添加表格"),re=function(e){var n=e.defaultValue,t=void 0===n?"":n,i=e.onChange,c=e.width,s=void 0===c?"100%":c,o=e.height,d=void 0===o?400:o,p=e.miniToolbar,j=void 0!==p&&p,y=e.isFocus,N=void 0!==y&&y,b=e.watch,C=e.insertTemp,M=e.mode,k=void 0===M?"markdown":M,I=e.id,A=void 0===I?"markdown-editor-id":I,P=e.showResizeBar,T=void 0!==P&&P,R=e.noStorage,O=void 0!==R&&R,V=e.showNullButton,U=void 0!==V&&V,F=e.showNullProgramButton,H=void 0!==F&&F,$=e.hidetoolBar,ae=void 0!==$&&$,re=e.fullScreen,oe=void 0!==re&&re,ue=e.onBlur,de=e.onCMBeforeChange,he=e.onFullScreen,fe=e.className,pe=void 0===fe?"":fe,me=e.disablePaste,ve=void 0!==me&&me,_e=e.disabled,xe=void 0!==_e&&_e,ge=e.disabledFill,je=void 0!==ge&&ge,ye=e.placeholder,Ne=void 0===ye?"":ye,be=e.values,we=void 0===be?"":be,Se=(0,f.useState)(null),Ce=u()(Se,2),Me=Ce[0],ke=Ce[1],Ie=(0,f.useState)(t),Ze=u()(Ie,2),Le=Ze[0],Ee=Ze[1],Ae=(0,f.useState)(b),Pe=u()(Ae,2),Te=Pe[0],Re=Pe[1],De=(0,f.useState)(oe),Oe=u()(De,2),ze=Oe[0],Ve=Oe[1],Ue=(0,f.useState)(""),Fe=u()(Ue,2),He=Fe[0],Be=Fe[1],We=(0,f.useState)(0),Ye=u()(We,2),Ge=Ye[0],qe=Ye[1],Je=(0,f.useState)(d),Qe=u()(Je,2),Xe=Qe[0],Ke=Qe[1],$e=(0,f.useState)(!1),en=u()($e,2),nn=(en[0],en[1]),tn=(0,f.useRef)((0,G.Z)()),an=(0,f.useRef)(!1),cn=(0,f.useRef)(),ln=(0,f.useRef)(),sn=(0,f.useRef)(),rn=(0,f.useRef)(),on=(0,f.useRef)(),un=function(){var e=r()(l()().mark((function e(){var n,t;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Y.ZP)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:tn.current}});case 2:null!=(t=e.sent)&&null!==(n=t.attachments)&&void 0!==n&&n.length&&(console.log("cm:",Me,ln),t.attachments.map((function(e){e.content_type.indexOf("image")>-1?Me.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):e.content_type.indexOf("video")>-1?Me.replaceSelection('<video width="100%" controls src="'.concat(W.Z.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):e.content_type.indexOf("pdf")>-1?Me.replaceSelection('<a href="'.concat(W.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,'&disposition=inline" target="_blank">').concat(e.name,"</a>")):Me.replaceSelection("[".concat(e.name,"](").concat(W.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")"))})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,f.useEffect)((function(){var e=window.scrollY||window.pageYOffset;Ee(we),null==Me||Me.setValue(we),window.scrollTo(0,e)}),[we]),(0,f.useEffect)((function(){null==he||he(ze)}),[ze]),(0,f.useEffect)((function(){if(ln.current){var e=function(e,t){if(!ve){var i=t.clipboardData;if(i){var a=i.types.toString(),c=i.items;if("Files"===a||i.types.indexOf("Files")>-1){if(t.preventDefault(),"stex"==k)return;try{var l,s=c[1];"file"===(null===(l=c[0])||void 0===l?void 0:l.kind)&&(s=c[0]);var r=s.getAsFile(),o=r.name.split(".").pop();z(r,(function(e){var t,i,a;e.id?(null==r||null===(t=r.type)||void 0===t?void 0:t.indexOf("image"))>-1?n.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==r||null===(i=r.type)||void 0===i?void 0:i.indexOf("video"))>-1?n.replaceSelection('<video width="100%" controls src="'.concat(W.Z.API_SERVER,"/api/attachments/").concat(e.id,'"></video>')):(null==r||null===(a=r.type)||void 0===a?void 0:a.indexOf("pdf"))>-1?n.replaceSelection('<a href="'.concat(W.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(r.type,'&disposition=inline" target="_blank">').concat(r.name,"</a>")):ce.includes(o)?n.replaceSelection('<a href="'.concat(W.Z.API_SERVER,"/api/attachments/").concat(e.id,'?type=office&disposition=inline" target="_blank">').concat(r.name,"</a>")):n.replaceSelection("[".concat(r.name,"](").concat(W.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))}catch(t){E.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}t.preventDefault()},n=m().fromTextArea(ln.current,{mode:k,lineNumbers:!j,lineWrapping:!0,value:t,autoCloseTags:!H,autoCloseBrackets:!0});return n.on("keyup",(function(e,t){8===t.keyCode&&(""==e.getValue()?n.setOption("placeholder",Ne):n.setOption("placeholder",null))})),n.on("keydown",(function(e,n){if(8===n.keyCode){var t=function(e,n){var t=e.getDoc(),i=t.getCursor(),a=t.getLine(i.line),c=a.charAt(i.ch-1),l=a.lastIndexOf("@▁@",i.ch),s=a.lastIndexOf("@▁▁@",i.ch),r=l>s?l:s,o=l>s?3:4;if(-1===te.indexOf(c))return null;if(console.log("change1:",n,e,a,i,r,l,s,c),r>=0&&i.ch-r<5){var u=r+o;return t.replaceRange("",{line:i.line,ch:r},{line:i.line,ch:u}),{line:i.line,ch:u}}return null}(e);t&&n.preventDefault()}})),N&&n.focus(),n.on("paste",e),n.on("dragleave",(function(e,n){sn.current.classList.remove("mouse-hover-md")})),n.on("dragover",(function(e,n){sn.current.classList.add("mouse-hover-md")})),n.on("drop",(function(e,t){var i;if(sn.current.classList.add("mouse-hover-md"),(i=t.dataTransfer.files).length>0){t.preventDefault(),t.stopPropagation();for(var a=function(){var e=i[c],t=e.name.split(".").pop();z(e,(function(i){var a,c,l;i.id?(null==e||null===(a=e.type)||void 0===a?void 0:a.indexOf("image"))>-1?n.replaceSelection("![,](/api/attachments/".concat(i.id,"?type=").concat(i.content_type,")")):(null==e||null===(c=e.type)||void 0===c?void 0:c.indexOf("video"))>-1?n.replaceSelection('<video width="100%" controls src="'.concat(W.Z.API_SERVER,"/api/attachments/").concat(i.id,'"></video>')):(null==e||null===(l=e.type)||void 0===l?void 0:l.indexOf("pdf"))>-1?n.replaceSelection('<a href="'.concat(W.Z.API_SERVER,"/api/attachments/").concat(i.id,"?type=").concat(e.type,'&disposition=inline" target="_blank">').concat(e.name,"</a>")):ce.includes(t)?n.replaceSelection('<a href="'.concat(W.Z.API_SERVER,"/api/attachments/").concat(i.id,'?type=office&disposition=inline" target="_blank">').concat(e.name,"</a>")):n.replaceSelection("[".concat(e.name,"](").concat(W.Z.API_SERVER,"/api/attachments/").concat(i.id,"?type=").concat(i.content_type,")")):401===(null==i?void 0:i.status)&&(document.location.href="/user/login")}))},c=0;c<i.length;c++)a()}})),xe&&n.on("beforeChange",(function(e,n){"paste"!==n.origin&&"+input"!==n.origin||n.cancel()})),ke(n),function(){n.off("paste",e)}}}),[]);var dn=(0,f.useCallback)((function(){sn.current}),[Xe,sn,ze]);(0,f.useEffect)((function(){if(Me){var e=function(){var e=new v.Z((function(e){var n,t=a()(e);try{for(t.s();!(n=t.n()).done;){var i=n.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&(dn(),Me.setSize("100%","100%"),Me.refresh())}}catch(e){t.e(e)}finally{t.f()}}));return e.observe(ln.current.parentElement),e}();return function(){var n,t;null!==(n=ln.current)&&void 0!==n&&n.parentElement&&e.unobserve(null===(t=ln.current)||void 0===t?void 0:t.parentElement)}}}),[Me,dn]),(0,f.useEffect)((function(){if(Me){for(var e=[],n=function(){var n=u()(i[t],2),a=n[0],c=n[1],l=h()({},a,(function(){hn(c)}));e.push(l),Me.addKeyMap(l)},t=0,i=Object.entries(le);t<i.length;t++)n();return cn.current=setInterval((function(){an.current&&un()}),4e3),function(){clearInterval(cn.current);for(var n=0,t=e;n<t.length;n++){var i=t[n];Me.removeKeyMap(i)}}}}),[Me]),(0,f.useEffect)((function(){oe!==ze&&Ve(oe)}),[oe]),(0,ne.Z)((function(){if(!O&&Ge>0){var e=(new Date).getTime(),n=window.sessionStorage.getItem(A);e>=Ge+1e4&&(!n||n!==Le)&&(window.sessionStorage.setItem(A,Le),nn(!0))}}),1e4),(0,f.useEffect)((function(){Re(b)}),[Me,b]),(0,f.useEffect)((function(){Me&&N&&Me.focus()}),[Me,N]),(0,f.useEffect)((function(){if(Te&&Me){var e=function(e){var n=e.target;if(on.current){var t=n.scrollTop/n.scrollHeight;on.current.scrollTop=on.current.scrollHeight*t}},n=Me.getScrollerElement();return n.addEventListener("scroll",e),function(){n.removeEventListener("scroll",e)}}}),[Me,Te]),(0,f.useEffect)((function(){if(Me&&de){var e=function(e,n){de(e,n)};return Me.on("beforeChange",e),function(){Me.off("beforeChange",e)}}}),[Me,de]),(0,f.useEffect)((function(){if(Me&&ue){var e=function(){ue(Me.getValue())};return Me.on("blur",e),function(){Me.off("blur",e)}}}),[Me,ue]),(0,f.useEffect)((function(){if(Me){var e=function(e,n){var t=e.getValue();Ee(t),qe((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),i&&(H?i(t,_n(t)):i(t))};return Me.on("change",e),function(){Me.off("change",e)}}}),[Me,i]),(0,f.useEffect)((function(){if(Me)if(null==t)Me.setValue(""),Ee("");else{var e=window.scrollY||window.pageYOffset;t!==Me.getValue()&&(Me.setValue(t),Ee(t),Me.setCursor(xe?1:Me.lineCount(),0),window.scrollTo(0,e))}}),[Me,t]);var hn=(0,f.useCallback)((function(e){var n=Me.getCursor(),t=Me.getSelection(),i=t.split("\n");switch(e){case"bold":return Me.replaceSelection("**"+t+"**"),""===t&&Me.setCursor(n.line,n.ch+2),Me.focus();case"italic":return Me.replaceSelection("*"+t+"*"),""===t&&Me.setCursor(n.line,n.ch+1),Me.focus();case"code":return Me.replaceSelection("`"+t+"`"),""===t&&Me.setCursor(n.line,n.ch+1),Me.focus();case"inline-latex":return Me.replaceSelection("`$$"+t+"$$`"),""===t&&Me.setCursor(n.line,n.ch+3),Me.focus();case"latex":return Me.replaceSelection("```latex\n"+t+"\n```"),Me.setCursor(n.line+1,t.length+1),Me.focus();case"line-break":return Me.replaceSelection("<br/>\n"),Me.focus();case"list-ul":return""===t?Me.replaceSelection("- "+t):Me.replaceSelection(i.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),Me.focus();case"list-ol":return""===t?Me.replaceSelection("1. "+t):Me.replaceSelection(i.map((function(e,n){return""===e?"":"".concat(n+1,". ").concat(e)})).join("\n")),Me.focus();case"add-null-ch":return""===t&&Me.setCursor(n.line,n.ch),Me.replaceSelection("▁"),Me.focus();case"add-signal":return""===t&&Me.setCursor(n.line,n.ch),Me.replaceSelection("@▁@"),Me.focus();case"add-multiple":return""===t&&Me.setCursor(n.line,n.ch),Me.replaceSelection(te),Me.focus();case"inster-template-1":return""===t&&Me.setCursor(n.line,n.ch),Me.replaceSelection("\n**模板标题**\n模板正文内容可输入文本内容和粘贴图片等操作"),Me.focus();case"eraser":return Me.setValue(""),Me.focus();case"trigger-watch":return Re(!Te),Me.focus();case"trigger-full-screen":return Ve(!ze),Me.focus();case J:return void Be(J);case X:return void Be(X);case Q:return void Be(Q);case K:return void Be(K);default:throw new Error}}),[Me,Te,ze]),fn=(0,f.useCallback)((function(e){switch(Be(""),He){case J:var n=e.title,t=e.link;return Me.replaceSelection("[".concat(n,"](").concat(t,")")),Me.focus();case X:var i=e.language,a=e.content;return Me.replaceSelection(["```"+i,a,"```"].join("\n")),Me.focus();case Q:var c=e.src,l=e.alt;return l?Me.replaceSelection("![ ".concat(l," ]( ").concat(c,' "').concat(l,'" )')):Me.replaceSelection("![,](".concat(c,")")),Me.focus();case K:for(var s=e.row,r=e.col,o=e.align,u="\n",d=0;d<s;d++){for(var h=[],f=[],p=0;p<r;p++)1===d&&f.push(ee[o]),h.push(" ");1===d&&(u+="| ".concat(f.join(" | ")," |\n")),u+="| ".concat(h.join(1===r?"":" | ")," |\n")}return Me.replaceSelection(u+"\n"),Me.focus();default:throw new Error}}),[Me,He]),pn=(0,f.useMemo)((function(){switch(He){case J:return(0,x.jsx)(Z,{callback:fn,onCancel:mn});case X:return(0,x.jsx)(L.Z,{callback:fn,onCancel:mn});case Q:return(0,x.jsx)(D,{callback:fn,onCancel:mn});case K:return(0,x.jsx)(B,{callback:fn,onCancel:mn});default:return null}}),[He]);function mn(){Be("")}(0,f.useEffect)((function(){if(rn.current){var e=function(e){a=!0,c=e.pageY},n=function(){a=!1},t=function(e){if(a){var n=e.pageY-c;n<0&&(n=0),n>300&&(n=300),Ke(d+n+"px")}},i=rn.current,a=!1,c=0;return i.addEventListener("mousedown",e),document.addEventListener("mousemove",t),document.addEventListener("mouseup",n),function(){i.removeEventListener("mousedown",e),document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n)}}}),[Me,rn]),(0,f.useEffect)((function(){Ke(d)}),[d]);var vn={width:ie(s),height:ie(Xe)},_n=((0,f.useMemo)((function(){if(Ge){var e=new Date(Ge),n=e.getHours(),t=e.getMinutes(),i=e.getSeconds();return t=t<10?"0"+t:t,i=i<10?"0"+i:i,"".concat(n=n<10?"0"+n:n,":").concat(t,":").concat(i)}return 0}),[Ge]),function(e){var n=[];if(H){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,t,i){n.push({multiLine:!("@▁@"===e)})}))}return n});return(0,x.jsxs)(f.Fragment,{children:[(0,x.jsx)("div",{className:"markdown-editor-wrapper",ref:sn,children:(0,x.jsxs)("div",{className:"markdown-editor-container ".concat(pe," ").concat(Te?"on-preview":""," ").concat(j?"mini":""," ").concat(ze?"full-screen":""),style:vn,children:[(0,x.jsx)(w,{insertTemp:C,watch:Te,fullScreen:ze,showNullButton:U,showNullProgramButton:H,onActionCallback:hn,hidetoolBar:ae,uuid:tn.current,setOpenPhones:function(){an.current=!0}}),(0,x.jsxs)("div",{className:"markdown-editor-body",children:[(0,x.jsx)("div",{className:"codemirror-container",children:(0,x.jsx)("textarea",{ref:ln,placeholder:Ne})}),Te?(0,x.jsxs)("div",{ref:on,className:"preview-container",children:["stex"===k&&(0,x.jsx)(g,{value:Le}),"stex"!==k&&(0,x.jsx)(_.Z,{disabledFill:je,showProgramFill:H,value:Le})]}):null]})]})}),T?(0,x.jsx)("a",{ref:rn,className:"editor-resize"}):null,(0,x.jsx)(S.Z,{children:se[He]?(0,x.jsx)(q.Z,{centered:!0,title:se[He],open:!0,onCancel:mn,footer:null,className:"markdown-popup-form",children:pn}):null})]})}},74063:function(e,n,t){t.d(n,{Z:function(){return f}});var i=t(82100),a=t.n(i),c=t(29186),l=t.n(c),s=t(80619),r=t.n(s),o=t(47074),u=t.n(o),d=t(59301),h=t(4676),f=function(e){r()(t,e);var n=u()(t);function t(e){var i;a()(this,t),i=n.call(this,e);var c=window.document;return i.node=c.createElement("div"),c.body.appendChild(i.node),i}return l()(t,[{key:"render",value:function(){var e=this.props.children;return(0,h.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),t}(d.Component)},21658:function(e,n,t){t.d(n,{Z:function(){return S}});var i=t(7557),a=t.n(i),c=t(41498),l=t.n(c),s=t(82242),r=t.n(s),o=t(79800),u=t.n(o),d=t(59301),h="shiyan_modal___g40Za",f="add_pilotPro_item___z1H0Q",p="option___vxHGu",m="add_and_del___jPolh",v="pilot_name___tTQSk",_="pilot_url___SuCpq",x="title___Q_VfA",g="record_count___IuDud",j=t(43418),y=t(8591),N=t(24650),b=t(41852),w=t(37712),S=function(e){var n,t=e.editInfo,i=e.addEditName,c=e.type,s=e.id,o=e.dialogvisible,S=e.setDialogvisible,C=e.getData,M=(0,d.useState)({container_type:"",container_id:null,cases:[{name:"",url:""}]}),k=u()(M,2),I=k[0],Z=k[1];return(0,d.useEffect)((function(){o&&(I.container_type=c,I.container_id=s,I.cases="编辑"==i?[t]:[{name:"",url:""}],Z(r()({},I)))}),[o]),(0,w.jsx)(j.Z,{centered:!0,maskClosable:!1,zIndex:200,width:"编辑"===i?1045:1128,bodyStyle:{maxHeight:553,overflowY:"auto"},title:"".concat(i,"应用案例"),visible:o,onCancel:function(){S(!1)},okText:"".concat("编辑"===i?"保存编辑":"确认新增"),onOk:l()(a()().mark((function e(){var n,t,c,l,s;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=new RegExp(/^[^\u4e00-\u9fa5]+$/),c=0,null==I||null===(n=I.cases)||void 0===n||n.forEach((function(e){var n,i;0==(null==e||null===(n=e.name)||void 0===n?void 0:n.length)||0==(null==e||null===(i=e.url)||void 0===i?void 0:i.length)?c=1:t.test(null==e?void 0:e.url)||(c=2)})),1!=c){e.next=8;break}return y.ZP.error("请填写名称或链接"),e.abrupt("return");case 8:if(2!=c){e.next=11;break}return y.ZP.error("链接中不能输入中文"),e.abrupt("return");case 11:if("编辑"!=i){e.next=18;break}return e.next=14,(0,b.q0)(I.cases[0]);case 14:0==(null==(l=e.sent)?void 0:l.status)&&(y.ZP.success("编辑成功"),S(!1),C()),e.next=23;break;case 18:if("新增"!=i){e.next=23;break}return e.next=21,(0,b.ns)(I);case 21:0==(null==(s=e.sent)?void 0:s.status)&&(y.ZP.success("新增成功"),S(!1),C());case 23:case"end":return e.stop()}}),e)}))),children:(0,w.jsx)("div",{className:h,children:null==I||null===(n=I.cases)||void 0===n?void 0:n.map((function(e,n){var t;return(0,w.jsxs)("div",{className:f,children:[(0,w.jsxs)("div",{children:[(0,w.jsxs)("div",{className:v,children:[(0,w.jsxs)("div",{className:x,children:[(0,w.jsx)("span",{style:{color:"#ff4d4f",marginRight:4},children:"*"}),"名称"]}),(0,w.jsx)(N.Z,{placeholder:"请输入名称",maxLength:100,value:null==e?void 0:e.name,onChange:function(e){I.cases[n].name=e.target.value,Z(r()({},I))}}),(0,w.jsxs)("span",{className:g,children:[(null==e||null===(t=e.name)||void 0===t?void 0:t.length)||0,"/100"]})]}),(0,w.jsxs)("div",{className:_,style:{marginBottom:0},children:[(0,w.jsxs)("div",{className:x,children:[(0,w.jsx)("span",{style:{color:"#ff4d4f",marginRight:4},children:"*"}),"链接"]}),(0,w.jsx)(N.Z,{placeholder:"请输入链接",suffix:"",value:null==e?void 0:e.url,onChange:function(e){I.cases[n].url=e.target.value,Z(r()({},I))}})]})]}),(0,w.jsxs)("div",{className:p,children:[n>0&&"新增"==i&&(0,w.jsx)("div",{className:m,onClick:function(){var e;null==I||null===(e=I.cases)||void 0===e||e.splice(n,1),Z(r()({},I))},children:(0,w.jsx)("i",{className:"iconfont icon-shanjian font14",style:{color:"#E30000"}})}),"新增"==i&&(0,w.jsx)("div",{className:m,onClick:function(){var e;null==I||null===(e=I.cases)||void 0===e||e.splice(n+1,0,{name:"",url:""}),Z(r()({},I))},children:(0,w.jsx)("i",{className:"iconfont icon-tianjiatimu font14",style:{color:"#2FA34F"}})})]})]},n)}))})})}},66207:function(e,n,t){t.d(n,{Z:function(){return N}});var i=t(7557),a=t.n(i),c=t(41498),l=t.n(c),s=t(82242),r=t.n(s),o=(t(59301),"main_com___dEAXh"),u="project_list____YzIW",d="case_item___pO64P",h="case_item_info___FkLB7",f="btn_up_de___Vchsk",p="btn_update___rYrOJ",m="btn_del___OzxGD",v=t(6848),_=t(43418),x=t(8591),g=t(41852),j=t(6638);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var y=t(37712),N=function(e){var n,t,i=e.type,c=e.detailInfo,s=e.showBtn,N=e.getData,b=e.showEdit;return(0,y.jsx)("div",{className:"".concat(o," ").concat(u),children:(null==c||null===(n=c.shixun_cases)||void 0===n?void 0:n.length)>0?null==c||null===(t=c.shixun_cases)||void 0===t?void 0:t.map((function(e,n){return(0,y.jsxs)("div",{className:d,children:[(0,y.jsxs)("div",{className:h,onClick:function(){window.open(e.url)},children:["path"==i&&(0,y.jsx)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSI1MCUiIHkxPSIwJSIgeDI9IjUwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjNDhBRTRGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzQwN0ZBQiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHBhdGggZD0iTTM5MC41IDk2N2MuODI1IDAgMS41LjY3NSAxLjUgMS41djljMCAuODI1LS42NzUgMS41LTEuNSAxLjVoLTljLS44MjUgMC0xLjUtLjY3NS0xLjUtMS41di05YzAtLjgyNS42NzUtMS41IDEuNS0xLjVoOVptLTYuMyA0LjVjLS4yMjUtLjIyNS0uNTI1LS4zLS43NS0uMDc1bC0xLjU3NSAxLjItLjA0NS4wNDVhLjM0OS4zNDkgMCAwIDAtLjEwNS4yNTV2LjY3NWwuMDEuMDgyYy4wMjMuMTAxLjA5NS4xNzMuMjE1LjI5M2wxLjU3NSAxLjEyNS4wNjIuMDVjLjE2LjA5OC40MDcuMDgxLjUzOC0uMDVsLjA3NS0uMDc1LjAzNy0uMDQzYS4zMTguMzE4IDAgMCAwIC4wMzgtLjMzMmMtLjA3NS0uMTUtLjA3NS0uMy0uMjI1LS4zNzVsLTEuMzUtLjk3NSAxLjQyNS0xLjEyNS4wNDUtLjA1M2EuNTMyLjUzMiAwIDAgMCAuMTA1LS4yNDdjMC0uMTUgMC0uMjI1LS4wNzUtLjM3NVptMy45NzUtLjIyNWMtLjE1IDAtLjIyNS4wNzUtLjMuMTUtLjE1LjIyNS0uMTUuNTI1LjA3NS42NzVsMS40MjUgMS4xMjUtMS40MjUgMS4wNS0uMDc0LjA2M2EuNTA0LjUwNCAwIDAgMC0uMDc2LjUzN2wuMDc1LjA3NS4wNTYuMDY3Yy4xNi4xNTYuNDE5LjE0MS42MTkuMDA4bDEuNTc1LTEuMTI1LjA3NS0uMDk1Yy4wNS0uMDcyLjEtLjE1NS4xNS0uMjA1di0uNjc1bC0uMDA4LS4wODJjLS4wMjItLjA5OC0uMDgyLS4xNTgtLjE0Mi0uMjE4bC0xLjU3NS0xLjItLjA5Mi0uMDU2Yy0uMTc0LS4wOTQtLjI5NC0uMDk0LS4zNTgtLjA5NFptLTEuMTI1LS4wMDFoLS4zNzVsLS4xLjA1N2MtLjA4OC4wNTYtLjE0NC4xMTItLjIuMTY5bC0xLjU3NSAyLjkyNS0uMDM2LjA4N2EuNDc4LjQ3OCAwIDAgMCAuMDM2LjM2M2MuMDc1LjE1LjIyNS4yMjUuNDUuMjI1LjE1IDAgLjMtLjA3NS4zNzUtLjIyNWwxLjU3NS0yLjkyNi4wMzctLjA1M2MuMDM4LS4wODIuMDM4LS4yMDIuMDM4LS4zMjIgMC0uMTUtLjE1LS4yMjUtLjIyNS0uM1oiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0zODAgLTk2NykiIGZpbGw9InVybCgjYSkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg=="}),"shixun"==i&&(0,y.jsx)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTMiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSI1MCUiIHkxPSIwJSIgeDI9IjUwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjNDhBRTRGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iIzQwN0ZBQiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHBhdGggZD0iTTEwLjg3NCAwYy42OTkgMCAxLjI2NS41NjYgMS4yNjUgMS4yNjR2MTIuMjg3YS4zOC4zOCAwIDAgMS0uNTQ4LjM0TDYuMDcgMTEuMTU5LjU0OCAxMy44OUEuMzguMzggMCAwIDEgMCAxMy41NVYxLjI2NEMwIC41NjYuNTY2IDAgMS4yNjQgMGg5LjYxWk02LjIzNyAyLjU0YS4zOC4zOCAwIDAgMC0uNTA4LjE3MmwtLjg0OSAxLjcyLTEuODk4LjI3NmEuMzguMzggMCAwIDAtLjIxLjY0OGwxLjM3MyAxLjMzOS0uMzI0IDEuODlhLjM4LjM4IDAgMCAwIC41NS40bDEuNjk4LS44OTMgMS42OTguODkzYS4zOC4zOCAwIDAgMCAuNTUtLjRsLS4zMjQtMS44OSAxLjM3NC0xLjM0YS4zOC4zOCAwIDAgMC0uMjEtLjY0N2wtMS44OTgtLjI3NS0uODUtMS43MmEuMzguMzggMCAwIDAtLjE3Mi0uMTczWiIgZmlsbD0idXJsKCNhKSIgZmlsbC1ydWxlPSJub256ZXJvIi8+PC9zdmc+"}),(0,y.jsx)("div",{children:null==e?void 0:e.name})]}),s&&(0,y.jsxs)("div",{className:f,children:[(0,y.jsx)("div",{onClick:function(){b(r()({},e))},children:(0,y.jsx)(v.Z,{title:"编辑",children:(0,y.jsx)("i",{className:"iconfont icon-bianji-moren ".concat(p)})})}),(0,y.jsx)("div",{onClick:function(n){var t;_.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:(0,y.jsx)("div",{children:"确认删除该条实验项目吗?"}),onOk:(t=l()(a()().mark((function n(){return a()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:(0,g.tP)(null==e?void 0:e.id).then((function(e){0==(null==e?void 0:e.status)&&(x.ZP.success("删除成功"),N())}));case 1:case"end":return n.stop()}}),n)}))),function(){return t.apply(this,arguments)})})},children:(0,y.jsx)(v.Z,{title:"删除",children:(0,y.jsx)("i",{className:"iconfont icon-shanchu13 ".concat(m)})})})]})]},n)})):(0,y.jsx)(j.Z,{customText:"暂无数据",styles:{padding:"50px 0"}})})}},46587:function(e,n,t){t.d(n,{Z:function(){return a}});var i=t(59301);function a(e,n){var t=(0,i.useRef)();(0,i.useEffect)((function(){t.current=e})),(0,i.useEffect)((function(){if(null!==n){var e=setInterval((function(){t.current()}),n);return function(){return clearInterval(e)}}}),[n])}},12604:function(e,n,t){t.r(n),t.d(n,{default:function(){return te}});var i=t(82242),a=t.n(i),c=t(7557),l=t.n(c),s=t(37205),r=t.n(s),o=t(41498),u=t.n(o),d=t(91232),h=t.n(d),f=t(79800),p=t.n(f),m=t(39647),v=t.n(m),_=t(59301),x=t(80608),g={flex_box_center:"flex_box_center___yLE9I",flex_space_between:"flex_space_between___oiROA",flex_box_vertical_center:"flex_box_vertical_center___EAVkE",flex_box_center_end:"flex_box_center_end___Y4sRU",flex_box_column:"flex_box_column___SSP3m",detailCon:"detailCon___gUBCl",con_left:"con_left___eG1g2",main_com:"main_com___yFSVY",header_com:"header_com___nGcn4",btn_update:"btn_update___pIzxH",iconUpdate:"iconUpdate___HSpjN",detail_title:"detail_title___dG8qo",con_right:"con_right___icewg",con_right_warp:"con_right_warp___atpDe",option:"option___TYyou",tech_tags:"tech_tags___WFfj6",btn_add:"btn_add___h2khW",teach_modal:"teach_modal___oltPV",users_style:"users_style___E2LVh",sc_warp:"sc_warp___R7R3l",add_icon:"add_icon___ZNVWi",wenan:"wenan___qLWb5",yaoqiu:"yaoqiu___gnE9b",users_style2:"users_style2___voRCl",active_img:"active_img___c3bd1",right_teacher_warp:"right_teacher_warp___zzlKc",hang:"hang___IdC0x",title:"title___tbcJU",input1:"input1___PPPRG",input2:"input2___yaKJf",MdEditor:"MdEditor___nELGf",input_search:"input_search___sxsk5",platform_list:"platform_list___ryrtg",platform_item:"platform_item___qCn7A",img_items:"img_items___vH8gw",select_img:"select_img___G6hmV",unit_list:"unit_list___ZOd3g",unit_item:"unit_item___MnVjy",shangyi_style:"shangyi_style___CsfHv",xiayi_style:"xiayi_style___f5pyR",teacherList:"teacherList___pZr6n",teacher_header:"teacher_header___c7N9s",teacher_name:"teacher_name___NVWq1",teacher_position:"teacher_position___bsHyu",teacher_school:"teacher_school___WTp0Q",teacher_type:"teacher_type___CQFsz",btn_list:"btn_list___X5KT0",sy:"sy___BUJSm",xy:"xy___UGE6b",bj:"bj___fRrh0",sc:"sc___qRleb",iconDetele:"iconDetele___H2Dyl",techer_content:"techer_content___PwqmN",img:"img___yfiVc",teacher_img:"teacher_img____d85k",content:"content___hFrYf",shuji_list:"shuji_list___Q7X81",shenhe_icon:"shenhe_icon___WlXAz",shuming:"shuming___lIDPi",shuji_jianjie:"shuji_jianjie___v7mFw",kuai:"kuai___d7Lw7",bg:"bg___UgpNC",input_add:"input_add___s3AnE",input_style:"input_style___CInpc",add_text:"add_text___uFPob"},j=t(71418),y=t(6848),N=t(8591),b=t(43418),w=t(53326),S=t(24650),C=t(57809),M=t(11680),k=t(33329),I=t(3634),Z="btn_update___C89PI",L="btn_del___Qdb0a",E="banner_bl___ZEviF",A="banner_br___n7S5V",P="banner_name___BiTJz",T="banner_school___X0u90",R="learing_btn___F_1Uv",D="Bg___myQEw",O="info___Sq4Uu",z="TitleStyle___Vjx9I",V=t(71681),U=t(95237),F=t(43604),H=t(78270),B=t(37712),W=function(e){var n,t,i=e.data,a=e.showBtn;return(0,B.jsx)("div",{className:"".concat(D),style:{background:"url('".concat(V.Z.IMG_SERVER+(null==i||null===(n=i.background_url)||void 0===n?void 0:n.url),"') no-repeat")},children:(0,B.jsxs)(U.Z,{style:{width:"12rem",height:"100%",margin:"0 auto",paddingTop:".63rem",position:"relative",color:"#fff"},align:"middle",justify:"center",children:[(0,B.jsx)(F.Z,{className:z,span:24,children:(0,B.jsx)(y.Z,{title:null==i?void 0:i.name,children:null==i?void 0:i.name})}),(0,B.jsxs)(F.Z,{className:O,children:[(0,B.jsxs)("div",{className:E,children:[(0,B.jsx)("img",{src:V.Z.IMG_SERVER+(null==i?void 0:i.avatar_url)}),(0,B.jsx)("div",{className:P,children:null==i?void 0:i.teacher}),(0,B.jsx)("div",{className:T,children:null==i||null===(t=i.school)||void 0===t?void 0:t.name})]}),(0,B.jsxs)("div",{className:A,children:[(null==i?void 0:i.company)&&(0,B.jsxs)("div",{style:{display:"flex"},children:[(0,B.jsx)("div",{style:{margin:"0 20px"},children:"实践平台"}),(0,B.jsx)(y.Z,{title:null==i?void 0:i.company,children:(0,B.jsx)("div",{style:{marginRight:20,maxWidth:"1rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:null==i?void 0:i.company})})]}),(null==i?void 0:i.url)&&(0,B.jsx)("div",{className:R,style:{marginLeft:"auto",cursor:"pointer"},onClick:function(){window.open(null==i?void 0:i.url)},children:"现在去学习"})]})]}),a&&(0,B.jsxs)(F.Z,{style:{position:"absolute",top:".4rem",right:"0px",display:"flex"},children:[(0,B.jsx)("div",{className:Z,onClick:function(){x.history.push("/shixuns/".concat(null==i?void 0:i.id,"/edit?comeFrom=info"))},children:(0,B.jsx)(y.Z,{title:"编辑",children:(0,B.jsx)("i",{className:"iconfont icon-bianji_Hover"})})}),(0,B.jsx)("div",{className:L,onClick:function(e){var n;b.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:(0,B.jsx)("div",{children:"确认删除该实践平台吗?"}),onOk:(n=u()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(0,H.m3)(null==i?void 0:i.id).then((function(e){0==(null==e?void 0:e.status)&&(N.ZP.success("删除成功"),x.history.push("/shixuns"))}));case 1:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})})},children:(0,B.jsx)(y.Z,{title:"删除",children:(0,B.jsx)("i",{className:"iconfont icon-shanchu13"})})})]})]})})},Y=t(6638),G=t(49105),q=t(77036),J=t(66207),Q=t(21658),X=t(4585),K=t(2753),$=t(42441),ee=(t(56047),t(92396)),ne=["user","shixunsDetail","globalSetting","loading","dispatch"],te=(0,x.connect)((function(e){var n=e.user,t=e.shixunsDetail,i=e.loading;return{user:n,shixunsDetail:t,globalSetting:e.globalSetting,loading:i.models.index}}))((function(e){var n,t,i,c,s,o=e.user,d=(e.shixunsDetail,e.globalSetting,e.loading,e.dispatch,v()(e,ne),(0,x.useParams)()),f=(0,_.useState)(),m=p()(f,2),Z=m[0],L=m[1],E=(0,_.useState)(!1),A=p()(E,2),P=A[0],T=A[1],R=(0,_.useState)(!1),D=p()(R,2),O=D[0],z=D[1],U=(0,_.useState)(!1),F=p()(U,2),H=F[0],te=F[1],ie=(0,_.useState)(!1),ae=p()(ie,2),ce=ae[0],le=ae[1],se=(0,_.useState)("新增"),re=p()(se,2),oe=re[0],ue=re[1],de=(0,_.useState)(null),he=p()(de,2),fe=he[0],pe=he[1],me=(0,_.useState)(!1),ve=p()(me,2),_e=ve[0],xe=ve[1],ge=(0,_.useState)(""),je=p()(ge,2),ye=je[0],Ne=je[1],be=(0,_.useRef)(),we=(0,_.useState)(),Se=p()(we,2),Ce=Se[0],Me=Se[1],ke=(0,_.useState)(!0),Ie=p()(ke,2),Ze=Ie[0],Le=Ie[1],Ee=(0,_.useState)(!1),Ae=p()(Ee,2),Pe=Ae[0],Te=Ae[1],Re=(0,_.useState)(!1),De=p()(Re,2),Oe=De[0],ze=De[1],Ve=(0,_.useState)(""),Ue=p()(Ve,2),Fe=Ue[0],He=Ue[1],Be=(0,_.useState)([]),We=p()(Be,2),Ye=We[0],Ge=We[1],qe=(0,_.useState)([]),Je=p()(qe,2),Qe=Je[0],Xe=Je[1],Ke=(0,_.useState)([]),$e=p()(Ke,2),en=$e[0],nn=$e[1],tn=(0,_.useState)([{name:"工作单位",type:"dw",count:0},{name:"研发机构",type:"jg",count:0}]),an=p()(tn,2),cn=(an[0],an[1],(0,_.useState)({teacher:"",career:"",school:"",description:"",teacher_url:"",teacher_attachment_id:"",identity:"2"})),ln=p()(cn,2),sn=ln[0],rn=ln[1];(0,_.useEffect)((function(){var e;null!=d&&d.id&&null!=o&&null!==(e=o.userInfo)&&void 0!==e&&e.user_id&&dn()}),[null==d?void 0:d.id,null==o?void 0:o.userInfo]),(0,_.useEffect)((function(){if(be.current){var e=function(){var e,n=new ResizeObserver((function(e){var n,t=h()(e);try{for(t.s();!(n=t.n()).done;){var i=n.value;Me(i.target.offsetHeight>=500)}}catch(e){t.e(e)}finally{t.f()}}));return n.observe(null===(e=be.current)||void 0===e?void 0:e.firstElementChild),n}();return function(){var n,t;(null===(n=be.current)||void 0===n?void 0:n.firstElementChild)&&e.unobserve(null===(t=be.current)||void 0===t?void 0:t.firstElementChild)}}}),[be.current]);var on,un,dn=function(){var e=u()(l()().mark((function e(){var n,t,i,a,c,s,u,h;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return z(!0),e.next=3,(0,k.SQ)({id:null==d?void 0:d.id});case 3:if(null!=(t=e.sent)&&null!==(n=t.case)&&void 0!==n&&n.id){e.next=7;break}return location.href="/404",e.abrupt("return");case 7:0==(null==t?void 0:t.status)&&(h=[1,2].includes(null==o||null===(i=o.userInfo)||void 0===i?void 0:i.role)||(null==t||null===(a=t.case)||void 0===a?void 0:a.user_id)==(null==o||null===(c=o.userInfo)||void 0===c?void 0:c.user_id),T(h),L(null==t?void 0:t.case),Ge(r()(null==t||null===(s=t.case)||void 0===s?void 0:s.tags)),z(!1),Xe(null==t||null===(u=t.case)||void 0===u?void 0:u.case_teachers));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),hn=function(e,n){sn["".concat(e)]=n,rn(a()({},sn))};return(0,B.jsxs)(j.Z,{spinning:O,children:[(0,B.jsx)(W,{data:Z,showBtn:null==o||null===(n=o.userInfo)||void 0===n?void 0:n.admin}),(0,B.jsx)("div",{style:{width:"100%",background:"#F3F9F7"},children:(0,B.jsxs)("div",{className:g.detailCon,children:[(0,B.jsxs)("div",{className:g.con_left,children:[(0,B.jsxs)("div",{className:g.bg,children:[(0,B.jsxs)("div",{className:g.header_com,children:[(0,B.jsxs)("div",{className:g.detail_title,children:[(0,B.jsx)("span",{className:g.kuai}),(0,B.jsx)("span",{children:"课程介绍"})]}),P&&(0,B.jsx)("div",{className:g.btn_update,onClick:function(){xe(!0)},children:(0,B.jsx)(y.Z,{title:"编辑",children:(0,B.jsx)("i",{className:"iconfont icon-bianji-moren ".concat(g.iconUpdate)})})})]}),null!=Z&&Z.description?(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)("div",{ref:be,className:"".concat(g.main_com," ").concat(g.course_con),style:{maxHeight:Ze&&500,overflow:"hidden"},children:(0,B.jsx)(X.Z,{value:(null==Z?void 0:Z.description)||""})}),Ce&&(0,B.jsxs)("div",{style:{textAlign:"center",color:"#1B8565",cursor:"pointer",position:"relative",top:"-0.1rem",fontSize:14},onClick:function(e){e.stopPropagation(),Le(!Ze)},children:[Ze?"查看全部 ":"收起全文 ",(0,B.jsx)("i",{className:"iconfont font14 ".concat(Ze?"icon-jiantou9":"icon-changyongtubiao-xianxingdaochu-zhuanqu-")})]})]}):(0,B.jsx)(Y.Z,{customText:"暂无数据",styles:{padding:"50px 0"}})]}),(0,B.jsxs)("div",{className:g.bg,children:[(0,B.jsxs)("div",{className:g.header_com,children:[(0,B.jsxs)("div",{className:g.detail_title,children:[(0,B.jsx)("span",{className:g.kuai}),(0,B.jsx)("span",{className:g.title,children:"应用案例"})]}),P&&(0,B.jsxs)("div",{className:g.btn_add,onClick:function(){le(!0)},children:[(0,B.jsx)("i",{className:"iconfont icon-icon_xinyong_xianxing_jijin-249",style:{marginRight:"0.05rem",fontSize:".16rem"}}),(0,B.jsx)("span",{children:"新增应用案例"})]})]}),(0,B.jsx)(J.Z,{type:"shixun",detailInfo:Z,showBtn:P,getData:function(){dn()},showEdit:function(){var e=u()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:pe(n),ue("编辑"),le(!0);case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()})]}),(0,B.jsxs)("div",{className:g.bg,children:[(0,B.jsxs)("div",{className:g.header_com,children:[(0,B.jsxs)("div",{className:g.detail_title,children:[(0,B.jsx)("span",{className:g.kuai}),(0,B.jsx)("span",{className:g.title,children:"平台负责人"})]}),P&&(0,B.jsxs)("div",{className:g.btn_add,style:{width:153},onClick:function(){te(!0),rn({teacher_url:"",teacher_attachment_id:"",teacher:"",career:"",identity:2,school:"",description:""})},children:[(0,B.jsx)("i",{className:"iconfont icon-icon_xinyong_xianxing_jijin-249",style:{marginRight:"0.05rem",fontSize:".16rem"}}),(0,B.jsx)("span",{children:"新增平台负责人"})]})]}),0==(null==Qe?void 0:Qe.length)&&(0,B.jsx)(Y.Z,{customText:"暂无数据",styles:{padding:"0.5rem 0"}}),null===(t=Qe.sort((function(e,n){return 1===e.identity?-1:1===n.identity?1:0})))||void 0===t?void 0:t.map((function(e,n){return(0,B.jsx)(M.Z,{v:e,k:n,showBtn:P,params:d,getData:dn,setDialogvisible:te,setTeacherForm:rn,teachers:Qe},n)}))]})]}),(0,B.jsxs)("div",{className:g.con_right,children:[(0,B.jsxs)("div",{className:g.con_right_warp,children:[(0,B.jsxs)("div",{className:g.header_com,children:[(0,B.jsxs)("div",{className:g.detail_title,children:[(0,B.jsx)("span",{className:g.kuai}),(0,B.jsx)("span",{className:g.title,children:"研发机构"})]}),P&&(0,B.jsx)("div",{className:g.btn_update,onClick:function(){He(""),Te(!0)},children:(0,B.jsx)(y.Z,{title:"编辑",children:(0,B.jsx)("i",{className:"iconfont icon-bianji-moren ".concat(g.iconUpdate)})})})]}),(0,B.jsx)("div",{className:g.main_com,children:(null==Z||null===(i=Z.schools_selected)||void 0===i?void 0:i.length)>0?null==Z||null===(c=Z.schools_selected)||void 0===c?void 0:c.map((function(e,n){var t;return(0,B.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%"},children:[(0,B.jsx)("a",{href:null==e?void 0:e.link_url,children:(0,B.jsx)("img",{src:V.Z.IMG_SERVER+(null==e?void 0:e.pic_url),style:{padding:"3px 8px"}})}),(0,B.jsxs)("div",{className:g.option,children:[0!=n&&P&&(0,B.jsx)(y.Z,{title:"上移",children:(0,B.jsx)("span",{className:"icon-shangyi_Hover ".concat(g.shangyi_style),onClick:function(){var e=null==Z?void 0:Z.schools_selected.map((function(e){return null==e?void 0:e.file_id})),t=[e[n],e[n-1]];e[n-1]=t[0],e[n]=t[1],(0,k.tM)({id:Number(null==d?void 0:d.id),file_ids:e}).then((function(e){0==e.status&&(N.ZP.success("上移成功"),Te(!1),dn())}))}})}),n+1!=(null==Z||null===(t=Z.schools_selected)||void 0===t?void 0:t.length)&&P&&(0,B.jsx)(y.Z,{title:"下移",children:(0,B.jsx)("span",{className:"icon-xiayi_Hover ".concat(g.xiayi_style),onClick:function(){var e=null==Z?void 0:Z.schools_selected.map((function(e){return null==e?void 0:e.file_id})),t=[e[n+1],e[n]];e[n]=t[0],e[n+1]=t[1],(0,k.tM)({id:Number(null==d?void 0:d.id),file_ids:e}).then((function(e){0==e.status&&(N.ZP.success("下移成功"),Te(!1),dn())}))}})})]})]},n)})):(0,B.jsx)(Y.Z,{customText:"暂无数据",styles:{padding:"50px 0"},imgStyles:{width:"150px",height:"100px"}})})]}),(0,B.jsxs)("div",{className:g.con_right_warp,children:[(0,B.jsxs)("div",{className:g.header_com,children:[(0,B.jsxs)("div",{className:g.detail_title,children:[(0,B.jsx)("span",{className:g.kuai}),(0,B.jsx)("span",{className:g.title,children:"技术标签"})]}),P&&(0,B.jsx)("div",{className:g.btn_update,onClick:function(){He(""),ze(!0)},children:(0,B.jsx)(y.Z,{title:"编辑",children:(0,B.jsx)("i",{className:"iconfont icon-bianji-moren ".concat(g.iconUpdate)})})})]}),(0,B.jsx)("div",{className:g.tech_tags,children:(null==Z||null===(s=Z.tags)||void 0===s?void 0:s.length)>0?(0,B.jsx)($.Z,{option:(un=new Image,un.src=ee.yt,{backgroundColor:"#fff",tooltip:{pointFormat:"{series.name}</b>"},series:[{type:"wordCloud",sizeRange:[10,30],rotationRange:[-90,90],rotationStep:45,gridSize:2,shape:"pentagon",maskImage:un,textStyle:{normal:{color:function(){return"rgb("+Math.round(255*Math.random())+", "+Math.round(255*Math.random())+", "+Math.round(255*Math.random())+")"}}},left:"center",top:"center",right:null,bottom:null,width:"100%",height:"100%",data:(null==Z||null===(on=Z.tags)||void 0===on?void 0:on.map((function(e,n){return{name:e,value:n}})))||[]}]}),style:{height:370},opts:{renderer:"svg"}}):(0,B.jsx)(Y.Z,{customText:"暂无数据",styles:{padding:"50px 0"},imgStyles:{width:"150px",height:"100px"}})})]})]})]})}),(0,B.jsx)(b.Z,{centered:!0,maskClosable:!1,zIndex:200,width:900,title:"编辑平台介绍",visible:_e,onCancel:function(){xe(!1)},onOk:u()(l()().mark((function e(){var n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,k.WU)({id:null==d?void 0:d.id,task:null==Z?void 0:Z.task,description:ye});case 2:0==(null==(n=e.sent)?void 0:n.status)&&(xe(!1),N.ZP.success("编辑成功"),dn());case 4:case"end":return e.stop()}}),e)}))),children:(0,B.jsx)(q.Z,{className:g.MdEditor,placeholder:"请输入课程介绍",width:850,height:450,defaultValue:null==Z?void 0:Z.description,onChange:function(e){Ne(e)}})}),(0,B.jsx)(Q.Z,{editInfo:fe,addEditName:oe,id:null==d?void 0:d.id,type:"case",dialogvisible:ce,setDialogvisible:function(e){le(e),e||ue("新增")},getData:function(){return dn()}}),(0,B.jsx)(b.Z,{centered:!0,maskClosable:!1,zIndex:200,width:1131,title:(null!=sn&&sn.teacher_id?"编辑":"新增")+"平台负责人资料",visible:H,onCancel:function(){te(!1)},onOk:u()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:null!=sn&&sn.teacher_id?(0,I.fK)({id:null==d?void 0:d.id,teacher_id:null==sn?void 0:sn.teacher_id,name:null==sn?void 0:sn.teacher,identity:null==sn?void 0:sn.identity,career:null==sn?void 0:sn.career,school:null==sn?void 0:sn.school,description:null==sn?void 0:sn.description,attachment_id:null==sn?void 0:sn.teacher_attachment_id}).then((function(e){0==(null==e?void 0:e.status)&&(te(!1),N.ZP.success("编辑成功"),dn())})):(0,I.ly)({id:null==d?void 0:d.id,name:null==sn?void 0:sn.teacher,identity:null==sn?void 0:sn.identity,career:null==sn?void 0:sn.career,school:null==sn?void 0:sn.school,description:null==sn?void 0:sn.description,attachment_id:null==sn?void 0:sn.teacher_attachment_id}).then((function(e){0==(null==e?void 0:e.status)&&(te(!1),N.ZP.success("新增成功"),dn())}));case 1:case"end":return e.stop()}}),e)}))),children:(0,B.jsxs)("div",{className:g.teach_modal,children:[(0,B.jsx)(w.Z,{action:"",accept:"image/*",withCredentials:!0,showUploadList:!1,customRequest:function(e){var n=new FormData;n.append("file",null==e?void 0:e.file),(0,G.ZP)("".concat(V.Z.API_SERVER,"/api/attachments.json"),{method:"post",body:n},!0).then((function(e){sn.teacher_attachment_id=e.id,sn.teacher_url=e.test,rn(a()({},sn))}))},children:(0,B.jsxs)("div",{className:"".concat(g.users_style," ").concat(null!=sn&&sn.teacher_url?g.users_style2:""),children:[(null==sn?void 0:sn.teacher_url)&&(0,B.jsx)("img",{src:V.Z.API_SERVER+(null==sn?void 0:sn.teacher_url),className:g.active_img}),(0,B.jsxs)("div",{className:g.sc_warp,children:[(0,B.jsx)("div",{className:g.add_icon,children:"+"}),(0,B.jsx)("div",{className:g.wenan,children:"上传教师照片"}),(0,B.jsx)("div",{className:g.yaoqiu,children:"尺寸220*295px大小200KB内"})]})]})}),(0,B.jsxs)("div",{className:g.right_teacher_warp,children:[(0,B.jsxs)("div",{className:g.hang,children:[(0,B.jsx)("span",{className:g.title,children:"姓名"}),(0,B.jsx)(S.Z,{className:g.input1,placeholder:"请输入姓名",suffix:"",style:{marginRight:73},value:null==sn?void 0:sn.teacher,onChange:function(e){hn("teacher",e.target.value)}}),(0,B.jsx)("span",{className:g.title,children:"职称"}),(0,B.jsx)(S.Z,{className:g.input1,placeholder:"请输入职称",suffix:"",value:null==sn?void 0:sn.career,onChange:function(e){hn("career",e.target.value)}})]}),(0,B.jsxs)("div",{className:g.hang,children:[(0,B.jsx)("span",{className:g.title,children:"身份"}),(0,B.jsxs)(C.default,{size:"large",className:g.input1,style:{marginRight:32},value:null==sn?void 0:sn.identity,onChange:function(e){sn.identity=e,rn(a()({},sn))},children:[(0,B.jsx)(C.default.Option,{value:1,children:"负责教师"}),(0,B.jsx)(C.default.Option,{value:2,children:"合作教师"})]}),(0,B.jsx)("span",{className:g.title,style:{marginLeft:8},children:"单位/院校"}),(0,B.jsx)(S.Z,{className:g.input1,placeholder:"请输入单位/院校",suffix:"",value:null==sn?void 0:sn.school,onChange:function(e){hn("school",e.target.value)}})]}),(0,B.jsxs)("div",{className:g.hang,style:{alignItems:"flex-start"},children:[(0,B.jsx)("span",{className:g.title,style:{marginTop:10},children:"简介"}),(0,B.jsx)(q.Z,{className:g.MdEditor,placeholder:"请输入平台负责人简介",width:749,height:176,defaultValue:null==sn?void 0:sn.description,onChange:function(e){hn("description",e)}})]})]})]})}),(0,B.jsxs)(b.Z,{centered:!0,maskClosable:!1,zIndex:200,width:1180,title:"研发机构管理",open:Pe,onCancel:function(){Te(!1)},onOk:u()(l()().mark((function e(){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(0!=(null==en?void 0:en.length)){e.next=3;break}return N.ZP.error("请上传实验平台"),e.abrupt("return",!1);case 3:return console.log(d),e.next=6,(0,k.tM)({id:null==d?void 0:d.id,file_ids:null==en?void 0:en.map((function(e){return null==e?void 0:e.id}))});case 6:0==e.sent.status&&(N.ZP.success("操作成功"),Te(!1),dn());case 8:case"end":return e.stop()}}),e)}))),children:[(0,B.jsx)(w.Z,{action:"",accept:"image/*",withCredentials:!0,showUploadList:!1,customRequest:function(e){var n=new FormData;n.append("file",null==e?void 0:e.file),(0,G.ZP)("".concat(V.Z.API_SERVER,"/api/attachments.json"),{method:"post",body:n},!0).then((function(e){null!=e&&e.id&&(en.push(e),nn(r()(en)))}))},children:(0,B.jsxs)("div",{style:{height:"40px",display:"flex",alignItems:"center"},children:[(0,B.jsx)(K.op,{style:{borderRadius:"2px"},icon:(0,B.jsx)("i",{className:"iconfont icon-shangchuanfujian"}),children:"上传图片"}),(0,B.jsx)("span",{style:{color:"#999999",pointerEvents:"none",marginLeft:20},children:"(建议上传尺寸为238*64的图片)"})]})}),(0,B.jsx)("div",{className:g.platform_list,children:null==en?void 0:en.map((function(e,n){return(0,B.jsxs)("div",{className:g.platform_item,children:[(0,B.jsx)("img",{className:g.img_items,src:V.Z.IMG_SERVER+(null==e?void 0:e.url)}),(0,B.jsx)("i",{className:"iconfont icon-tupianguanbi ".concat(g.select_img),onClick:function(){en.splice(n,1),nn(r()(en))}})]},n)}))})]}),(0,B.jsxs)(b.Z,{centered:!0,maskClosable:!1,zIndex:200,width:930,title:"技术标签管理",visible:Oe,onCancel:function(){ze(!1)},onOk:u()(l()().mark((function e(){var n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={id:Number(null==d?void 0:d.id),tags:Ye},e.next=3,(0,k._X)(n);case 3:0==e.sent.status&&(N.ZP.success("编辑成功"),ze(!1),dn());case 5:case"end":return e.stop()}}),e)}))),children:[(0,B.jsxs)("div",{className:g.input_add,children:[(0,B.jsx)(S.Z,{className:g.input_style,value:Fe,onChange:function(e){He(e.target.value)},onKeyDown:function(e){if("Enter"===e.key&&Fe.trim()){var n=r()(Ye);n.push(Fe),Ge(n),He("")}},placeholder:"请输入名称"}),(0,B.jsx)("div",{className:g.add_text,children:"回车添加标签"})]}),(0,B.jsx)("div",{className:g.line}),(null==Ye?void 0:Ye.length)>0?(0,B.jsx)("div",{className:g.unit_list,children:Ye.map((function(e,n){return(0,B.jsxs)("div",{className:g.unit_item,children:[e,(0,B.jsx)("i",{className:"iconfont icon-guanbi11 ml5",style:{fontSize:".12rem",cursor:"pointer"},onClick:function(){null==Ye||Ye.splice(n,1),Ge(r()(Ye))}})]},n)}))}):(0,B.jsx)(Y.Z,{customText:"暂无数据",styles:{padding:"0"}})]})]})}))},66963:function(e,n,t){e.exports=t.p+"static/userImg2.5ee3b9a4.png"}}]);