(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[15303],{85483:function(j,b,t){"use strict";t.d(b,{Z:function(){return _}});var L=t(28991),h=t(67294),C={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32z"}}]},name:"folder",theme:"filled"},S=C,F=t(27029),O=function(I,U){return h.createElement(F.Z,(0,L.Z)((0,L.Z)({},I),{},{ref:U,icon:S}))};O.displayName="FolderFilled";var _=h.forwardRef(O)},84391:function(j,b,t){"use strict";t.d(b,{Z:function(){return _}});var L=t(28991),h=t(67294),C={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 00-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"upload",theme:"outlined"},S=C,F=t(27029),O=function(I,U){return h.createElement(F.Z,(0,L.Z)((0,L.Z)({},I),{},{ref:U,icon:S}))};O.displayName="UploadOutlined";var _=h.forwardRef(O)},51695:function(j){j.exports={upLoadBox:"upLoadBox___3dYrI"}},66615:function(j){j.exports={root:"root___ub1Qj",colorWeak:"colorWeak___3ghT2","ant-layout":"ant-layout___2ppjB",globalSpin:"globalSpin___U9pij","ant-table":"ant-table___1eKs1","ant-table-thead":"ant-table-thead___2wyQl","ant-table-tbody":"ant-table-tbody___1sYv6",formBox:"formBox___2a4mN",hrefModal:"hrefModal___3Jgpk",shop:"shop___1aagd",headBox:"headBox___8dqG4"}},81262:function(){},99267:function(j,b,t){"use strict";t.d(b,{Z:function(){return Z}});var L=t(34792),h=t(48086),C=t(11849),S=t(67294),F=t(80129),O=t.n(F),_=t(51695),B=t.n(_),I=t(94301),U=t.n(I),K=t(85893),z=R=>{var n=parseInt(R),p=1024*1024*1024*1024,f=1024*1024*1024,m=1024*1024,D=1024;if(n>p)return(n/p).toFixed(2)+"T";if(n>f)return(n/f).toFixed(2)+"G";if(n>m)return(n/m).toFixed(2)+"M";if(n>D)return(n/D).toFixed(2)+"kb"};function W(R){for(var n=document.cookie,p=n.split("; "),f=0;f{WebUploader.Uploader.register({"before-send":"beforeSend"},{beforeSend:function(p){var f=WebUploader.Deferred(),m=p.file.chunkList||[],D={};m.forEach(M=>{D[M+""]=!0});var A=p.chunk,l=p.chunks;return D[A+""]?f.reject():f.resolve(),f.promise()}})},this.uploadCheckFile=(n,p)=>{var f=this.props,m=f.busType,D=f.directoryId,A=D===void 0?void 0:D,l=f.userId,M=l===void 0?void 0:l,N=f.directoryName,c=N===void 0?void 0:N,i={busType:m,directoryId:A,userId:M,checksum:n.checksum,fileName:n.name,size:n.size};U()("/api/disk/upload/checkFile?".concat((0,F.stringify)(i)),{credentials:"include",headers:{token:k}}).then(e=>e.status==200?e.json():{success:!1}).then(e=>{p(e,A,M,c)})},this.uploadInit=()=>{var n=this,p=this.props,f=p.options,m=p.events,D=p.busType,A=p.cancelFile,l=p.isreplace,M=p.directoryId,N=M===void 0?void 0:M,c=p.userId,i=c===void 0?void 0:c,e=p.directoryName,a=e===void 0?void 0:e,r=p.coursewareType,g=1,v="jpg,doc,docx,ppt,flv,mp4,mp3,jpeg,png,gif,xls,xlsx,pdf,pptx,avi,swf,mov,pps,wmv,mpg,rmvb,doc, docx, ppt, pptx, pdf, xls, xlsx, pps, wps, txt, rar, zip, arj, gz, z, ta";f.pick&&(f.pick=(0,C.Z)((0,C.Z)({},f.pick),{},{id:".picker"}));var y=(0,C.Z)((0,C.Z)({},{auto:!1,swf:"/design/designstatic/aroom/common/js/Uploader.swf",server:"/api/disk/upload?projectid=45",pick:{id:".picker",multiple:!1},resize:!1,disableGlobalDnd:!0,compress:!1,prepareNextFile:!0,timeout:6e4*5,chunked:!0,chunkSize:2*1024*1024,chunkRetry:3,threads:5,formData:{},fileNumLimit:20,fileSizeLimit:200*1024*1024*1024,fileSingleSizeLimit:2*1024*1024*1024,duplicate:!1,accept:{title:"\u5927\u6587\u4EF6\u4E0A\u4F20",extensions:v}}),f);v=y.accept.extensions;var d=WebUploader.create(y);d.option("accept",[this.props.accept]),this.uploader=d;var x="\u8BF7\u9009\u62E9\u6B63\u786E\u6587\u4EF6\u7C7B\u578B:".concat(v);d.on("error",function(s,u){switch(s){case"Q_EXCEED_NUM_LIMIT":h.ZP.error("\u53EA\u5141\u8BB8\u4E0A\u4F20".concat(y.fileNumLimit,"\u4E2A\u6587\u4EF6"));break;case"Q_EXCEED_SIZE_LIMIT":h.ZP.error("\u6587\u4EF6\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7".concat(z(y.fileSizeLimit)));break;case"Q_TYPE_DENIED":h.ZP.error(x);break;case"F_EXCEED_SIZE":h.ZP.error("\u6587\u4EF6\u603B\u5927\u5C0F\u4E0D\u80FD\u8D85\u8FC7".concat(z(y.fileSingleSizeLimit)));break;default:h.ZP.error("\u6587\u4EF6\u5DF2\u5B58\u5728\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002");break}}),d.on("beforeFileQueued",function(s){if(l&&(s.name=s.name.replace(/\^/g,"")),n.props.accept){var u=n.props.accept.extensions;if(u.indexOf(s.ext)<0)return h.ZP.error("\u8BF7\u9009\u62E9\u6B63\u786E\u6587\u4EF6\u7C7B\u578B:".concat(u)),!1}if(m&&m.beforeFileQueued)return m.beforeFileQueued(s);if(s.type.indexOf("image")>-1&&s.size>2*1024*1024)return h.ZP.error("\u5355\u4E2A\u56FE\u7247\u6700\u5927\u4E0D\u8D85\u8FC72MB"),!1;if(s.size>2*1024*1024*1024)return h.ZP.error("\u5355\u4E2A\u8BFE\u4EF6\u6700\u5927\u4E0D\u8D85\u8FC72G"),!1}),d.on("fileQueued",function(s){m&&m.fileQueued&&d.makeThumb(s,function(u,E){if(u){m.fileQueued(s);return}s.imgUrl=E,m.fileQueued(s)},1,1),s.uploadStatus=0,s.extImg=n.extImg(s.type.split("/")[1]),n.getFiles(),d.md5File(s).progress(function(u){s.md5Progress=u,n.getFiles()}).then(function(u){s.checksum=u,n.uploadCheckFile(s,(E,o,P,Q)=>{if(s.uploadStatus==4)return!1;s.userId=P,s.directoryId=o,s.directoryName=Q||"",E.success?E.data.fileExists?(s.uploadStatus=2,s.uploadProgress=1,s.sourceId=E.data.sourceId,m&&m.uploadSuccess&&m.uploadSuccess(s,E,d),d.skipFile(s)):(s.chunkList=E.data.chunkList,s.uploadStatus=0,d.upload(s)):(h.ZP.warning("\u79D2\u4F20\u9A8C\u8BC1\u63A5\u53E3\u5F02\u5E38, \u5DF2\u5207\u6362\u5230\u6B63\u5E38\u4E0A\u4F20\u901A\u9053"),d.upload(s)),n.getFiles()}),n.getFiles()})}),d.on("uploadStart",function(s,u){s.uploadStatus=1,n.getFiles()}),d.on("uploadBeforeSend",function(s,u,E){var o=s.file||{};E.token=k,u.busType=D,u.directoryId=o.directoryId,u.userId=o.userId,u.checksum=s.file.checksum,u.chunk=s.chunk,u.chunkSize=s.end-s.start,u.chunks=s.chunks}),d.on("uploadProgress",function(s,u){s.uploadProgress=u,n.getFiles()}),d.on("uploadSuccess",function(s,u){s.uploadStatus=2,u.success?s.sourceId=u.data.commonSourceId:(s.uploadStatus=3,h.ZP.error("\u4E0A\u4F20\u5931\u8D25\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20")),m&&m.uploadSuccess&&m.uploadSuccess(s,u,d),n.getFiles()}),d.on("uploadError",function(s){s.uploadStatus=3,n.getFiles()}),d.on("fileDequeued",function(s){s.uploadStatus=4,n.getFiles()})},this.getFiles=()=>{var n=this.props.onChange,p=this.uploader.getFiles();n&&n(p,this.uploader)},this.extImg=n=>{switch(n.toLowerCase()){case"avi":return"/design/designstatic/chatroom/img/dialog_avi.png";case"bmp":return"/design/designstatic/chatroom/img/dialog_bmp.png";case"bt":return"/design/designstatic/chatroom/img/dialog_bt.png";case"camera":return"/design/designstatic/chatroom/img/dialog_camera.png";case"course":return"/design/designstatic/chatroom/img/dialog_course.png";case"doc":return"/design/designstatic/chatroom/img/dialog_doc.png";case"docx":return"/design/designstatic/chatroom/img/dialog_doc.png";case"exam":return"/design/designstatic/chatroom/img/dialog_exam.png";case"flv":return"/design/designstatic/chatroom/img/dialog_flv.png";case"gif":return"/design/designstatic/chatroom/img/dialog_gif.png";case"html":return"/design/designstatic/chatroom/img/dialog_html.png";case"jpeg":return"/design/designstatic/chatroom/img/dialog_jpeg.png";case"jpg":return"/design/designstatic/chatroom/img/dialog_jpg.png";case"mov":return"/design/designstatic/chatroom/img/dialog_mov.png";case"mp3":return"/design/designstatic/chatroom/img/dialog_mp3.png";case"mp4":return"/design/designstatic/chatroom/img/dialog_mp4.png";case"mpg":return"/design/designstatic/chatroom/img/dialog_mpg.png";case"pdf":return"/design/designstatic/chatroom/img/dialog_pdf.png";case"png":return"/design/designstatic/chatroom/img/dialog_png.png";case"ppt":return"/design/designstatic/chatroom/img/dialog_ppt.png";case"pptx":return"/design/designstatic/chatroom/img/dialog_ppt.png";case"pps":return"/design/designstatic/chatroom/img/dialog_ppt.png";case"rar":return"/design/designstatic/chatroom/img/dialog_rar.png";case"rmvb":return"/design/designstatic/chatroom/img/dialog_rmvb.png";case"survey":return"/design/designstatic/chatroom/img/dialog_survey.png";case"swf":return"/design/designstatic/chatroom/img/dialog_swf.png";case"txt":return"/design/designstatic/chatroom/img/dialog_txt.png";case"wmv":return"/design/designstatic/chatroom/img/dialog_wmv.png";case"xls":return"/design/designstatic/chatroom/img/dialog_xls.png";case"xlsx":return"/design/designstatic/chatroom/img/dialog_xls.png";case"zip":return"/design/designstatic/chatroom/img/dialog_zip.png"}}}componentDidMount(){this.uloadRegister(),this.uploadInit()}componentWillUnmount(){var n=this.props.dispatch}render(){var n=this.props,p=n.children,f=n.disabled,m=f===void 0?!1:f;return(0,K.jsxs)("div",{style:{display:"inline-block"},children:[(0,K.jsx)("div",{style:{display:m?"inline-block":"none",opacity:.5,cursor:"not-allowed"},children:p}),(0,K.jsx)("div",{style:{display:m?"none":"inline-block"},className:B().upLoadBox+" picker",children:p})]})}}Z.defaultProps={options:{},events:{},busType:"doc",isreplace:!1,onChange:()=>{}}},15303:function(j,b,t){"use strict";t.r(b),t.d(b,{default:function(){return c}});var L=t(71194),h=t(50146),C=t(30887),S=t(28682),F=t(57663),O=t(71577),_=t(34792),B=t(48086),I=t(11849),U=t(14781),K=t(23492),z=t(13254),W=t(14277),k=t(36017),Z=t(35247),R=t(67294),n=t(28216),p=t(99267),f=t(85483),m=t(84391),D=t(66615),A=t.n(D),l=t(85893),M,N,c=(M=(0,n.$j)(i=>{var e=i.commondesign,a=i.share;return{commondesign:e,share:a}}),M(N=class extends R.PureComponent{constructor(){super(...arguments);this.state={visible:!1,activeKey:"course",type:"all",forumList:[],forumValue:"",fileList:[],fileBreadArr:[{directoryName:"\u5168\u90E8",directoryId:"0"}],audioList:[],loading:!1},this.directoryData={},this.fileCurrentPage=1,this.filePageSize=50,this.fileTotal=0,this.filesData={},this.show=e=>{var a=this;e&&(a.callback=e),a.setState({visible:!0})},this.restSetState=()=>{var e=this,a=this.showType;this.setState({activeKey:a.resource?"resource":"course",openMode:"_blank",classifySelect:[],classifyExpandedKeys:e.arrdata,infoSelect:[],infoExpandedKeys:[],pageSelect:[],pageExpandedKeys:["module"],visitorType:!1,auditionType:!1,videoModal:"0",infoValue:"1",selectedCouponRowKeys:[],goBuyCar:"1"})},this.restSelectSetState=()=>{this.setState({shopSelect:[],pageSelect:[],infoSelect:[],questionValue:[],classifySelect:[]})},this.cancelEvent=()=>{var e=this,a=this.props.dispatch;a({type:"commondesign/setState",payload:{Resource:{visible:!1,callback:()=>{},callClose:()=>{}}}})}}componentDidMount(){var e=this,a=e.props,r=a.dispatch,g=a.commondesign,v=g.Resource.callback;e.currentPage=1,e.pageSize=100,e.getDirectoryList(0),this.show(v)}getDirectoryList(e){var a=this,r=this.props.dispatch;a.directoryId=e,a.directoryData[e]?(r({type:"share/saveDirectoryList",payload:a.directoryData[e]}),a.getFiles(e)):r({type:"share/getDirectoryList",payload:{directoryId:e},callback:g=>{g.success&&(a.directoryData[e]=g.data,a.getFiles(e))}})}getFiles(e,a){var r=this,g=this.props.dispatch,v=r.filesData[e];v&&v[r.fileCurrentPage]?(r.fileTotal=v.total,this.setState({fileList:v[r.fileCurrentPage]})):g({type:"share/getFiles",payload:{directoryId:e,suffix:"mp3",currentPage:r.fileCurrentPage,pageSize:r.filePageSize},callback:y=>{if(y.success){var d=y.data;r.filesData[e]||(r.filesData[e]={}),r.filesData[e].total=d.total,r.filesData[e][r.fileCurrentPage]=d.list,r.fileTotal=d.total,this.setState({fileList:d.list||d.fileList}),a&&a()}}})}renderResource(){var e=this,a=this.props.share,r=this.state,g=r.fileList,v=r.fileBreadArr,y=r.value,d=a.directoryList,x=o=>{e.fileCurrentPage=1,e.filePageSize=50,v.push(o),this.setState({fileBreadArr:[...v]}),e.getDirectoryList(o.directoryId)},s={style:{float:"right"},current:this.fileCurrentPage?this.fileCurrentPage:1,pageSize:this.filePageSize,hideOnSinglePage:!0,total:this.fileTotal,onChange:(o,P)=>{this.fileCurrentPage=o}},u=(o,P)=>{this.setState({fileBreadArr:v.slice(0,P+1)}),e.getDirectoryList(o.directoryId)},E=o=>{this.setState({value:o.fileId,valueItem:{data:o,hrefType:"resource"}})};return(0,l.jsx)("div",{className:"tabsContent",children:(0,l.jsxs)("div",{className:"contentBox",children:[(0,l.jsx)(Z.Z,{style:{textAlign:"left"},children:v.map((o,P)=>(0,l.jsx)(Z.Z.Item,{onClick:()=>u(o,P),children:o.directoryName},o.directoryId))}),(0,l.jsxs)("div",{className:"pictureBox",style:{height:410,marginBottom:10,overflow:"auto"},children:[d.map(o=>(0,l.jsxs)("div",{className:"folderLi",onClick:()=>x(o),children:[(0,l.jsx)(f.Z,{}),(0,l.jsx)("p",{title:o.directoryName,children:o.directoryName})]},o.directoryId)),g.map(o=>(0,l.jsx)("div",{className:"folderLi",onClick:()=>E(o),children:(0,l.jsxs)("div",{className:y==o.fileId?"picBox on":"",style:{height:99},children:[(0,l.jsx)("div",{className:"musicImg"}),(0,l.jsx)("p",{title:o.fileName,children:o.fileName})]})},o.fileId)),g.length<0&&d.length<0?(0,l.jsx)(W.Z,{image:W.Z.PRESENTED_IMAGE_SIMPLE,style:{marginTop:180}}):""]}),(0,l.jsx)("div",{className:"footerBtnBox",style:{textAlign:"left"},children:(0,l.jsx)(K.Z,(0,I.Z)({},s))})]})})}renderFooter(){var e=this,a=this.props.dispatch,r=this.state,g=r.value,v=r.valueItem,y=r.loading,d=s=>{e.cancelEvent()},x=s=>{v?(this.callback((0,I.Z)({},v)),this.cancelEvent()):B.ZP.info("\u8BF7\u9009\u62E9\u6587\u4EF6")};return(0,l.jsxs)("div",{className:"footer",children:[(0,l.jsx)(O.Z,{onClick:x,type:"primary",loading:y,children:"\u786E\u5B9A"}),(0,l.jsx)(O.Z,{onClick:d,children:"\u53D6\u6D88"})]})}render(){var e=this,a=this.props.dispatch,r=this.state,g=r.activeKey,v=r.visible,y=r.type,d=r.audioList,x=r.loading,s=o=>{},u=o=>{this.setState({visible:!1,valueItem:"",value:""})},E={busType:"cloud",directoryId:e.directoryId||0,options:{chunkSize:2*1024*1024,pick:{multiple:!0},accept:{mimeTypes:"audio/mp3,.mp3",extensions:"mp3"}},events:{beforeFileQueued:o=>{},fileQueued:o=>{B.ZP.loading("\u6B63\u5728\u4E0A\u4F20...",0)},uploadSuccess:o=>{console.log("uploadSuccess"),e.filesData[e.directoryId]=void 0,e.getFiles(e.directoryId||0,()=>{B.ZP.destroy(),B.ZP.success("\u4E0A\u4F20\u6210\u529F!",2)})}},onChange:(o,P)=>{console.log("onChange",o,P)},accept:{mimeTypes:"audio/mp3,.mp3",extensions:"mp3"}};return(0,l.jsxs)(h.Z,{title:"\u97F3\u4E50",visible:v,width:1e3,onCancel:u,maskClosable:!1,className:A().hrefModal,zIndex:1001,footer:null,children:[(0,l.jsxs)("div",{className:"left",children:[(0,l.jsx)(S.Z,{onClick:s,style:{width:170},selectedKeys:["resource"],mode:"inline",children:(0,l.jsx)(S.Z.Item,{children:"\u6587\u4EF6"},"resource")}),(0,l.jsx)("div",{className:"bottomUpload",children:(0,l.jsx)(p.Z,(0,I.Z)((0,I.Z)({},E),{},{children:(0,l.jsx)(O.Z,{icon:(0,l.jsx)(m.Z,{}),loading:x,children:"\u9009\u62E9\u6587\u4EF6"})}))})]}),(0,l.jsx)("div",{className:"right",children:this.renderResource()}),this.renderFooter()]})}})||N)},35247:function(j,b,t){"use strict";t.d(b,{Z:function(){return N}});var L=t(96156),h=t(22122),C=t(85061),S=t(94184),F=t.n(S),O=t(50344),_=t(67294),B=t(53124),I=t(28682),U=t(96159),K=t(57254),z=t(81555),W=function(c,i){var e={};for(var a in c)Object.prototype.hasOwnProperty.call(c,a)&&i.indexOf(a)<0&&(e[a]=c[a]);if(c!=null&&typeof Object.getOwnPropertySymbols=="function")for(var r=0,a=Object.getOwnPropertySymbols(c);r0){var X=[];H=y.map(function(T){var $=D(T.path,E);$&&X.push($);var Y;T.children&&T.children.length&&(Y=_.createElement(I.Z,{items:T.children.map(function(G){return{key:G.path||G.breadcrumbName,label:s(G,E,y,A(X,G.path,E))}})}));var w={separator:r};return Y&&(w.overlay=Y),_.createElement(Z,(0,h.Z)({},w,{key:$||T.breadcrumbName}),s(T,E,y,X))})}else d&&(H=(0,O.Z)(d).map(function(T,$){return T&&(0,U.Tm)(T,{separator:r,key:$})}));var q=F()(J,(0,L.Z)({},"".concat(J,"-rtl"),V==="rtl"),v);return _.createElement("nav",(0,h.Z)({className:q,style:g},o),_.createElement("ol",null,H))};l.Item=Z,l.Separator=n;var M=l,N=M},36017:function(j,b,t){"use strict";var L=t(38663),h=t.n(L),C=t(81262),S=t.n(C),F=t(59250),O=t(30887)}}]);