diff --git a/p__Shixuns__Detail__id.async.js b/p__Shixuns__Detail__id.async.js index 3dfe0bc03c..dc53617a75 100644 --- a/p__Shixuns__Detail__id.async.js +++ b/p__Shixuns__Detail__id.async.js @@ -1 +1 @@ -"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;t1&&void 0!==arguments[1]?arguments[1]:"",t=[],i=0;i=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==l?void 0:l.name,children:(0,M.jsx)("div",{className:r,children:null==l?void 0:l.name})}),(0,M.jsx)(w.Z,{title:null==l?void 0:l.career,children:(0,M.jsx)("div",{className:o,children:null==l?void 0:l.career})}),(0,M.jsx)(w.Z,{title:null==l?void 0:l.school,children:(0,M.jsx)("div",{className:o,children:null==l?void 0:l.school})}),(0,M.jsx)(w.Z,{title:1==(null==l?void 0:l.identity)?"负责教师":"合作教师",children:(0,M.jsx)("div",{className:u,children:1==(null==l?void 0:l.identity)?"负责教师":"合作教师"})}),I&&(0,M.jsxs)("div",{className:f,children:[0!=k&&(0,M.jsx)(w.Z,{title:"上移",children:(0,M.jsx)("span",{className:"icon-shangyi_Hover ".concat(p),onClick:function(){("paths"==T?b.aT:b.Zd)({teacher_id:null==l?void 0:l.teacher_id,id:"paths"==T?null==Z?void 0:Z.pathId:null==Z?void 0:Z.id}).then((function(e){0==(null==e?void 0:e.status)&&(S.ZP.success("上移成功"),L())}))}})}),k+1!=(null==P?void 0:P.length)&&(0,M.jsx)(w.Z,{title:"下移",children:(0,M.jsx)("span",{className:"icon-xiayi_Hover ".concat(m),onClick:function(){("paths"==T?b.Nn:b.bb)({teacher_id:null==l?void 0:l.teacher_id,id:"paths"==T?null==Z?void 0:Z.pathId:null==Z?void 0:Z.id}).then((function(e){0==(null==e?void 0:e.status)&&(S.ZP.success("下移成功"),L())}))}})}),(0,M.jsx)(w.Z,{title:"编辑",children:(0,M.jsx)("span",{className:"icon-bianji_Hover ".concat(v),onClick:function(){var e,n;E(!0),A({teacher_id:null==l?void 0:l.teacher_id,teacher_url:null==l||null===(e=l.attachment)||void 0===e?void 0:e.url,teacher_attachment_id:null==l||null===(n=l.attachment)||void 0===n?void 0:n.id,teacher:null==l?void 0:l.name,career:null==l?void 0:l.career,school:null==l?void 0:l.school,identity:null==l?void 0:l.identity,description:null==l?void 0:l.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(){("paths"==T?b.uk:b.x2)({teacher_id:null==l?void 0:l.teacher_id}).then((function(e){0==(null==e?void 0:e.status)&&(S.ZP.success("删除成功"),L())}))}})}})})]})]})}),(0,M.jsxs)("div",{className:x,children:[(0,M.jsx)("div",{className:g,children:(0,M.jsx)("img",{src:null!=l&&null!==(n=l.attachment)&&void 0!==n&&n.url?null==l||null===(i=l.attachment)||void 0===i?void 0:i.url:t(66963),className:j})}),(0,M.jsx)("div",{className:y,ref:R,children:null!=l&&l.description?(0,M.jsx)("div",{className:N,style:{maxHeight:H&&200,overflow:"hidden"},children:null==l?void 0:l.description}):(0,M.jsx)("div",{style:{marginTop:".7rem",textAlign:"center",color:"#666666"},children:"暂无数据"})})]})]},k),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),l=t(7557),c=t.n(l),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,l,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()(c()().mark((function e(){var n,t,i;return c()().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===(l=S)||void 0===l?void 0:l.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),l=t(37205),c=t.n(l),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=["