diff --git a/p__BookPlan__Index__index.async.js b/p__BookPlan__Index__index.async.js index 7ca10615ce..8ed6d194c3 100644 --- a/p__BookPlan__Index__index.async.js +++ b/p__BookPlan__Index__index.async.js @@ -1 +1 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2030],{68738:function(e,n,t){var a=t(7557),l=t.n(a),i=t(41498),s=t.n(i),o=t(79800),r=t.n(o),c=t(59301),u=t(13032),d=t(43418),m=t(8591),_=t(58181),p=t(96193),f=t(37712);n.Z=(0,u.connect)((function(e){return{user:e.user,classroomList:e.classroomList}}))((function(e){e.user;var n,t=e.dispatch,a=e.classroomList,i=e.getData,o=(0,c.useState)(!1),u=r()(o,2),x=u[0],v=u[1],h=(0,c.useState)(""),b=r()(h,2),g=b[0],j=b[1],y=function(){t({type:"classroomList/setActionTabs",payload:{}})},k={"教材规划":"core_material_description","主审专家":"judge","教材推荐":"textbook","师资培训":"core_teacher","课堂听课":"listening","教学论文":"paper"};return(0,f.jsx)(d.Z,{title:"规划说明",width:900,destroyOnClose:!0,maskClosable:!1,keyboard:!1,confirmLoading:x,open:"规划说明"===a.actionTabs.key,onCancel:y,onOk:s()(l()().mark((function e(){var n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v(!0),e.next=3,(0,_.ZP)("/api/core_materials/set_description.json",{method:"post",body:{name:k[a.actionTabs.params.name],content:g}});case 3:0==(null==(n=e.sent)?void 0:n.status)&&(m.ZP.success("保存成功"),y(),i()),v(!1);case 6:case"end":return e.stop()}}),e)}))),children:(0,f.jsx)(p.Z,{defaultvalue:null===(n=a.actionTabs.params)||void 0===n?void 0:n.content,onChange:function(e){j(e)}})})}))},96193:function(e,n,t){t.d(n,{Z:function(){return v}});var a=t(82242),l=t.n(a),i=t(7557),s=t.n(i),o=t(41498),r=t.n(o),c=t(79800),u=t.n(c),d=t(59301),m=t(84686),_=t(58181),p=t(13032),f=(t(93472),{editor_css:"editor_css___cm3Z8"}),x=t(37712),v=(0,p.connect)((function(e){return{user:e.user}}))((function(e){var n=e.defaultvalue,t=e.onChange,a=e.style,i=e.user,o=e.placeholder,c=2097152,p=(0,d.useRef)(null),v=(0,d.useState)(null),h=u()(v,2),b=h[0],g=h[1],j=(0,d.useState)(""),y=u()(j,2),k=y[0],Z=y[1];(0,d.useEffect)((function(){Z(n)}),[n]),(0,d.useEffect)((function(){t(k)}),[k]);var w={placeholder:o||"请输入内容...",MENU_CONF:{}};w.MENU_CONF.uploadImage={customUpload:function(e,n){return r()(s()().mark((function t(){var a,l;return s()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(a=new FormData).append("file",e),t.next=4,(0,_.ZP)("/api/attachments.json",{method:"post",body:a},!0);case 4:l=t.sent,n(null==l?void 0:l.url,"","");case 6:case"end":return t.stop()}}),t)})))()}},w.MENU_CONF.uploadVideo={customUpload:function(e,n){return r()(s()().mark((function t(){var a,l,o,r,u,d,m,f,x,v,h,b,g,j;return s()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=e.size,l=Math.ceil(a/c),t.prev=2,t.next=5,(0,_.ZP)("/api/attachments/multipart_upload_start",{method:"POST",body:{fileName:e.name,chunkCount:l,user_id:null==i||null===(o=i.userInfo)||void 0===o?void 0:o.user_id}});case 5:if(0===(null==(u=t.sent)?void 0:u.status)){t.next=8;break}throw new Error;case 8:d=u.upload_id,p.current=new AbortController,m=[],0,f=s()().mark((function n(){var t,l,i,o;return s()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:t=x*c,l=Math.min(t+c,a),i=e.slice(t,l),(o=new FormData).append("chunk",i),o.append("fileName",e.name),o.append("chunkIndex",(x+1).toString()),o.append("uploadId",d),m.push((function(){return(0,_.ZP)("/api/attachments/multipart_upload",{method:"POST",body:o,signal:p.current.signal},!0).then((function(e){}))}));case 9:case"end":return n.stop()}}),n)})),x=0;case 14:if(!(x0)){t.next=29;break}return t.next=27,Promise.all(g);case 27:t.sent,v+=h;case 29:t.next=22;break;case 31:return t.next=33,(0,_.ZP)("/api/attachments/multipart_upload_end",{method:"POST",body:{fileName:e.name,chunkCount:l,uploadId:d,user_id:null==i||null===(r=i.userInfo)||void 0===r?void 0:r.user_id}});case 33:j=t.sent,n(null==j?void 0:j.object,""),t.next=39;break;case 37:t.prev=37,t.t1=t.catch(2);case 39:case"end":return t.stop()}}),t,null,[[2,37]])})))()}};return(0,d.useEffect)((function(){return function(){null!=b&&(b.destroy(),g(null))}}),[b]),(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)("div",{className:null==f?void 0:f.editor_css,style:{border:"1px solid #ccc",zIndex:100},children:[(0,x.jsx)(m.o,{editor:b,defaultConfig:{},mode:"default",style:{borderBottom:"1px solid #ccc"}}),(0,x.jsx)(m.M,{defaultConfig:w,value:k,onCreated:g,onChange:function(e){var n;!function(e){return""==e||new RegExp("^[ ]+$").test(e)}((n=e.getHtml(),n.replace(/<[^

]+>/g,"").replace(/<[

$]+>/g,"").replace(/ /gi,"").replace(/<[^
]+>/g,"")))?Z(e.getHtml()):Z("")},mode:"default",style:l()({height:"500px",overflowY:"hidden"},a)})]})})}))},54199:function(e,n,t){t.r(n),t.d(n,{default:function(){return re}});var a=t(37205),l=t.n(a),i=t(82242),s=t.n(i),o=t(7557),r=t.n(o),c=t(41498),u=t.n(c),d=t(79800),m=t.n(d),_=t(59301),p=t(13032),f=t(8591),x=t(61621),v=t(36381),h=t(43418),b=t(6848),g="BannerStyle___aL9ER",j="BannerStyleContent___T4lYo",y="DivDownPlay___FnIc2",k="CustomInputStyle___kxJUd",Z="paramsStyle___J1ohe",w="type___I5GvG",C="typeName___dDP6_",S="type_item_active___ypljD",N="type_item___BN1Rc",I="contentList___Jimzg",P="list___fftB_",F="imgContent___mNKhf",E="pictrue___vHnb9",L="updateContent___kXbLn",M="iconUpdate___o2EFl",V="deleteContent___uPwYK",B="iconDetele___z9pM6",O="item_title___bHJvx",R="publisher___j3UtF",T="main_con___igQSJ",U="MenuStyle___yBR62",D="MenuItem___DgS7E",z="MenuItemActive___GLXFD",A=t(72226),q=t(17631),Y=t(58181),H=t(78241),G=t(88522),J=t(10249),K=t(5083),W=t(54580),Q=t(61186),X=t.n(Q),$={flex_box_center:"flex_box_center___qqWqs",flex_space_between:"flex_space_between___CVG8x",flex_box_vertical_center:"flex_box_vertical_center___vkccE",flex_box_center_end:"flex_box_center_end___f9Kvd",flex_box_column:"flex_box_column___wYzPi",form:"form___A3jJx",btn:"btn___fHAub",img:"img___iBUlt",myModal:"myModal___x_S_1"},ee=t(76895),ne=t(19248),te=t(46906),ae=t(37712),le=(0,p.connect)((function(e){return{dispatch:e.dispatch,coreCurriculum:e.coreCurriculum}}))((function(e){var n,t=e.visible,a=e.onOk,l=e.onCancel,i=e.title,o=void 0===i?"":i,c=e.coreCurriculum,d=(e.dispatch,c.CoreSubjects,H.Z.useForm()),p=m()(d,1)[0],x=(0,_.useState)(!1),v=m()(x,2),b=v[0],g=v[1],j=(0,_.useState)([]),y=m()(j,2),k=y[0],Z=y[1],w=(0,_.useState)(!1),C=m()(w,2),S=C[0],N=C[1],I=(0,_.useState)([]),P=m()(I,2),F=P[0],E=P[1],L=(0,_.useState)([]),M=m()(L,2),V=M[0],B=M[1];(0,_.useEffect)((function(){if(t&&R(),null!=t&&t.id){var e,n;p.setFieldsValue(s()(s()({},t),{},{attachment_id:null==t||null===(e=t.attachment)||void 0===e?void 0:e.id,publication_time:null!=t&&t.publication_time?X()(null==t?void 0:t.publication_time):""}));var a=[s()(s()({},null==t?void 0:t.attachment),{},{response:{id:null==t||null===(n=t.attachment)||void 0===n?void 0:n.id}})];Z(a)}}),[t]);var O,R=function(){var e=u()(r()().mark((function e(n){var t,a,l;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Y.ZP)("/api/core_materials/book_tag.json",{method:"get",params:{core_subject_name:n||null}});case 2:0==(null==(t=e.sent)?void 0:t.status)&&(E(null==t||null===(a=t.data)||void 0===a?void 0:a.core_subject_name),B(null==t||null===(l=t.data)||void 0===l?void 0:l.material_type_name));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(){var e=u()(r()().mark((function e(n){var t,l;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:g(!0),l=s()(s()({},n),{},{attachment_id:(null==k||null===(t=k[0])||void 0===t||null===(t=t.response)||void 0===t?void 0:t.id)||""}),a(l);case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,ae.jsx)(h.Z,{className:$.myModal,title:"".concat(null!=t&&t.id?"编辑":"新建").concat(o),open:t,onOk:function(){p.submit()},centered:!0,onCancel:function(){l()},confirmLoading:b,okButtonProps:{disabled:S},width:686,afterClose:function(){g(!1),Z([]),p.resetFields()},okText:"确认",cancelText:"取消",wrapClassName:ee.Z.CustomCss,children:(0,ae.jsxs)(H.Z,{form:p,colon:!1,labelCol:{span:4},wrapperCol:{span:18},onFinish:T,className:$.form,children:[(0,ae.jsx)(H.Z.Item,{label:"核心课程",name:"core_subject_name",rules:[{required:!0,message:"请选择核心课程"}],children:(0,ae.jsx)(G.Z,{options:null==F?void 0:F.map((function(e){return{value:e,label:e}})),filterOption:function(e,n){var t;return-1!==(null==n||null===(t=n.label)||void 0===t||null===(t=t.toUpperCase())||void 0===t?void 0:t.indexOf(null==e?void 0:e.toUpperCase()))},onSearch:function(e){e.length>20&&p.setFieldValue("core_subject_name",e.substring(0,20))},onBlur:function(e){R(e)}})}),(0,ae.jsx)(H.Z.Item,{label:"教材名称",name:"name",rules:[{required:!0,message:"请输入教材名称"},{whitespace:!0,message:"请输入教材名称"},{max:200,message:"只能输入200个字符"}],children:(0,ae.jsx)(J.Z,{maxLength:200,placeholder:"请输入教材名称"})}),(0,ae.jsx)(H.Z.Item,{label:"教材类型",name:"material_type_name",rules:[{required:!0,message:"请选择教材类型"}],children:(0,ae.jsx)(G.Z,{options:null==V?void 0:V.map((function(e){return{value:e,label:e}})),filterOption:function(e,n){var t;return-1!==(null==n||null===(t=n.label)||void 0===t||null===(t=t.toUpperCase())||void 0===t?void 0:t.indexOf(null==e?void 0:e.toUpperCase()))},onSearch:function(e){e.length>20&&p.setFieldValue("material_type_name",e.substring(0,20))}})}),(0,ae.jsx)(H.Z.Item,{label:"主编",name:"author",rules:[{required:!0,message:"请输入主编"},{whitespace:!0,message:"请输入主编"},{max:40,message:"只能输入40个字符"}],children:(0,ae.jsx)(J.Z,{maxLength:40,placeholder:"请输入主编"})}),(0,ae.jsx)(H.Z.Item,{label:"副主编",name:"associate_editor",rules:[{max:40,message:"只能输入40个字符"}],children:(0,ae.jsx)(J.Z,{maxLength:40,placeholder:"请输入副主编"})}),(0,ae.jsx)(H.Z.Item,{label:"出版社",name:"publisher",rules:[{whitespace:!0,message:"实践出版社"},{max:100,message:"只能输入100个字符"}],children:(0,ae.jsx)(J.Z,{maxLength:100,placeholder:"请输入出版社"})}),(0,ae.jsx)(H.Z.Item,{label:"出版时间",name:"publication_time",children:(0,ae.jsx)(K.default,{picker:"month",style:{width:"100%"},placeholder:"请选择出版时间",format:"YYYY-MM",allowClear:!0})}),(0,ae.jsx)(H.Z.Item,{label:"ISBN",name:"number",rules:[{whitespace:!0,message:"请输入ISBN"}],children:(0,ae.jsx)(J.Z,{maxLength:50,placeholder:"请输入ISBN"})}),(0,ae.jsx)(H.Z.Item,{label:"联系方式",name:"contact_info",children:(0,ae.jsx)(J.Z,{maxLength:30,placeholder:"可填写手机、邮箱、QQ等联系方式"})}),(0,ae.jsx)(H.Z.Item,{label:"阅读链接",name:"view_link",children:(0,ae.jsx)(J.Z,{placeholder:"请输入阅读链接"})}),(0,ae.jsx)(H.Z.Item,{label:"购买链接",name:"buy_link",children:(0,ae.jsx)(J.Z,{placeholder:"请输入购买链接"})}),(0,ae.jsx)(H.Z.Item,{name:"attachment_id",label:"封面图片",rules:[{required:!0,message:"请上传封面图片"}],children:(0,ae.jsx)("div",{className:$.upload,children:null!=k&&null!==(n=k[0])&&void 0!==n&&null!==(n=n.response)&&void 0!==n&&n.id?(0,ae.jsxs)("div",{className:$.img,children:[(0,ae.jsx)("img",{src:q.Z.API_SERVER+"/api/attachments/"+(null==k||null===(O=k[0])||void 0===O||null===(O=O.response)||void 0===O?void 0:O.id),alt:"avatar",style:{width:"100%"}}),(0,ae.jsx)("div",{children:(0,ae.jsx)(ne.Z,{onClick:function(){Z([]),p.setFieldsValue({attachment_id:""})},style:{fontSize:"16px",color:"red"}})})]}):(0,ae.jsx)(W.Z,{fileList:k,action:"".concat(q.Z.API_SERVER,"/api/attachments.json"),onChange:function(e){return n=e,p.setFieldsValue({attachment_id:""}),void(["uploading","done","removed"].includes(n.file.status)&&("uploading"===n.file.status&&N(!0),"done"===n.file.status&&N(!1),Z(n.fileList),p.setFieldsValue({attachment_id:null===(t=n.fileList)||void 0===t||null===(t=t[0])||void 0===t||null===(t=t.response)||void 0===t?void 0:t.id})));var n,t},onRemove:function(e){Z([])},beforeUpload:function(e){return"image/jpeg"===(n=e).type||"image/png"===n.type?n.size/1024/1024>2?(f.ZP.info("文件大小必须小于2MB"),Promise.reject()):(Z([]),!0):(f.ZP.error("请上传jpg或png的图片!"),Promise.reject());var n},withCredentials:!0,accept:"image/*",children:(0,ae.jsxs)(te.op,{style:{borderRadius:"2px",marginTop:3},children:[(0,ae.jsx)("i",{className:"iconfont icon-shangchuantupian2 mr5"}),"上传图片"]})})})})]})})})),ie=t(20731),se=t(69142),oe=t(68738),re=(0,p.connect)((function(e){var n=e.user,t=e.globalSetting,a=e.coreCurriculum;return{user:n,globalSetting:t,virtualSpaces:e.virtualSpaces,coreCurriculum:a,classroomList:e.classroomList}}))((function(e){e.coreCurriculum;var n,t,a,i,o,c,d,H=e.dispatch,G=(e.virtualSpaces,e.globalSetting),J=(e.classroomList,(0,_.useState)(!0)),K=m()(J,2),W=K[0],Q=K[1],X=(0,_.useState)(""),$=m()(X,2),ee=$[0],ne=$[1],re=(0,_.useState)(!1),ce=m()(re,2),ue=ce[0],de=ce[1],me=(0,_.useState)(!1),_e=m()(me,2),pe=_e[0],fe=_e[1],xe=(0,_.useState)(),ve=m()(xe,2),he=ve[0],be=ve[1],ge=(0,_.useState)({}),je=m()(ge,2),ye=je[0],ke=je[1],Ze=(0,_.useState)([]),we=m()(Ze,2),Ce=we[0],Se=we[1],Ne=(0,_.useState)("全部"),Ie=m()(Ne,2),Pe=Ie[0],Fe=Ie[1],Ee=(0,_.useState)([]),Le=m()(Ee,2),Me=Le[0],Ve=Le[1],Be=(0,_.useState)("全部"),Oe=m()(Be,2),Re=Oe[0],Te=Oe[1],Ue=(0,_.useState)("全部课程"),De=m()(Ue,2),ze=De[0],Ae=De[1];(0,_.useEffect)((function(){Ye()}),[]),(0,_.useEffect)((function(){qe()}),[Pe,Re,ee]),(0,_.useEffect)((function(){if("全部课程"!==ze){var e=document.getElementById(ze);e&&e.scrollIntoView({behavior:"smooth",block:"start"})}}),[ze]);var qe=function(){var e=u()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Q(!0),e.next=3,(0,Y.ZP)("/api/core_materials/books.json",{method:"get",params:{material_type_name:Re,keyword:ee,core_subject_name:Pe}});case 3:0==(null==(n=e.sent)?void 0:n.status)&&(fe(null==n?void 0:n.can_edit),be(null==n?void 0:n.data),ke(n)),Q(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ye=function(){var e=u()(r()().mark((function e(n){var t,a,l;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Q(!0),e.next=3,(0,Y.ZP)("/api/core_materials/book_tag.json",{method:"get",params:{core_subject_name:"全部"==n?null:n||null}});case 3:0==(null==(t=e.sent)?void 0:t.status)&&(Se(null==t||null===(a=t.data)||void 0===a?void 0:a.core_subject_name),Ve(null==t||null===(l=t.data)||void 0===l?void 0:l.material_type_name)),Q(!1);case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),He=function(){var e=u()(r()().mark((function e(n){var t,a;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==ue||!ue.id){e.next=7;break}return e.next=3,(0,Y.ZP)("/api/core_materials/".concat(null==ue?void 0:ue.id,".json"),{method:"put",body:s()(s()({},n),{},{book_type:2})});case 3:0==(null==(t=e.sent)?void 0:t.status)&&(f.ZP.success("".concat(null!=ue&&ue.id?"编辑":"添加","成功")),qe(),de(!1)),e.next=11;break;case 7:return e.next=9,(0,Y.ZP)("/api/core_materials.json",{method:"post",body:s()(s()({},n),{},{book_type:2})});case 9:0==(null==(a=e.sent)?void 0:a.status)&&(f.ZP.success("".concat(null!=ue&&ue.id?"编辑":"添加","成功")),qe(),de(!1));case 11:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,ae.jsxs)("section",{style:{paddingBottom:"3rem"},children:[(0,ae.jsx)("div",{className:g,style:{backgroundImage:"url(".concat(q.Z.IMG_SERVER,"/").concat(null==G||null===(n=G.setting)||void 0===n?void 0:n.news_banner_url,")")},children:(0,ae.jsxs)("div",{className:j,children:[(0,ae.jsxs)("div",{children:[(0,ae.jsx)("div",{style:{color:"#fff",fontSize:".34rem",letterSpacing:".05rem",fontWeight:600},children:(0,ie.Iz)("/bookplan",null==G||null===(t=G.setting)||void 0===t?void 0:t.navbar)}),(0,ae.jsxs)("div",{style:{display:"flex"},children:[pe&&(0,ae.jsxs)("div",{className:"".concat(y),style:{width:"1rem"},onClick:function(){de(!0)},children:[(0,ae.jsx)("i",{className:"iconfont icon-icon_xinyong_xianxing_jijin-249",style:{marginRight:"0.05rem",fontSize:".16rem"}}),"新建"]}),pe&&(null==ye?void 0:ye.description_permission)&&(0,ae.jsxs)("div",{className:"".concat(y),style:{marginLeft:".2rem"},onClick:function(){H({type:"classroomList/setActionTabs",payload:{key:"规划说明",params:{name:"教材规划",content:null==ye?void 0:ye.core_material_description}}})},children:[(0,ae.jsx)("i",{className:"iconfont icon-icon_xinyong_xianxing_jijin-249",style:{marginRight:"0.05rem",fontSize:".16rem"}}),"规划说明"]})]})]}),(0,ae.jsx)("div",{children:(0,ae.jsx)(te.t7,{placeholder:"请输入关键字进行搜索",className:k,value:ee,onChange:function(e){ne(e)}})})]})}),(null==ye?void 0:ye.core_material_description)&&(0,ae.jsx)(se.Z,{style:{width:"12rem",margin:".3rem auto .2rem auto"},value:null==ye?void 0:ye.core_material_description}),(0,ae.jsxs)("div",{className:T,children:[(0,ae.jsxs)("div",{className:Z,children:[(0,ae.jsxs)("div",{className:w,style:{borderBottom:"1px dashed #37AD83"},children:[(0,ae.jsx)("div",{className:C,children:"课程"}),(0,ae.jsx)("div",{style:{display:"flex",flexWrap:"wrap",flex:1},children:null===(a=["全部"].concat(l()(Ce)))||void 0===a?void 0:a.map((function(e,n){return(0,ae.jsx)("div",{className:Pe==e?S:N,onClick:function(){Fe(e),Ae(e),Ye(e)},children:e},n)}))})]}),(0,ae.jsxs)("div",{className:w,children:[(0,ae.jsx)("div",{className:C,children:"类型"}),(0,ae.jsx)("div",{style:{display:"flex",flexWrap:"wrap",flex:1},children:null===(i=["全部"].concat(l()(Me)))||void 0===i?void 0:i.map((function(e,n){return(0,ae.jsx)("div",{className:Re==e?S:N,onClick:function(){Te(e)},children:e},n)}))})]})]}),(0,ae.jsx)("div",{className:U,children:null===(o=["全部课程"].concat(l()(Ce)))||void 0===o?void 0:o.map((function(e,n){return(0,ae.jsx)("div",{onClick:function(){Fe(e),Ae(e),Ye(e)},className:"".concat(D," ").concat(Pe===e?z:""),children:e},n)}))}),(null==he||null===(c=he.list)||void 0===c?void 0:c.length)>0?(0,ae.jsx)(x.Z,{className:"mt20",loading:W,children:(0,ae.jsx)(v.Z,{accordion:!0,bordered:!1,activeKey:ze,onChange:function(e){Ae(e.length>0?e[0]:"全部课程")},expandIconPosition:"end",ghost:!0,items:null==he||null===(d=he.list)||void 0===d?void 0:d.map((function(e,n){var t,a,l,i,s;return{key:null==e||null===(t=e.table)||void 0===t?void 0:t.name,label:null==e||null===(a=e.table)||void 0===a?void 0:a.name,style:{marginBottom:"40px",background:"linear-gradient( 180deg, #F7F8FD 0%, rgba(247,248,252,0.3) 100%)",boxShadow:"0px 2px 4px 0px #F0F1F2",border:"1px solid #FFFFFF"},children:(0,ae.jsx)("div",{className:I,id:null==e||null===(l=e.table)||void 0===l?void 0:l.name,children:(null==e||null===(i=e.data)||void 0===i?void 0:i.length)>0?null==e||null===(s=e.data)||void 0===s?void 0:s.map((function(e){var n=e.name,t=e.id,a=e.attachment,l=e.publisher,i=(e.book_id,e.author);return(0,ae.jsxs)("div",{className:P,onClick:function(){p.history.push("/bookplan/detail/".concat(t,"?backUrl=/bookplan"))},children:[(0,ae.jsx)("img",{className:E,src:q.Z.API_SERVER+(null==a?void 0:a.url)}),pe&&(null==e?void 0:e.is_creator)&&(0,ae.jsxs)("div",{className:F,children:[(0,ae.jsxs)("span",{className:L,onClick:function(n){n.stopPropagation(),de(e)},children:[(0,ae.jsx)("i",{className:"iconfont icon-bianji-moren ".concat(M)}),"编辑"]}),(0,ae.jsxs)("span",{className:V,onClick:function(e){var n;e.stopPropagation(),h.Z.confirm({icon:null,title:"提示",centered:!0,content:"请确认是否删除",okText:"确定",cancelText:"取消",onOk:(n=u()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Y.ZP)("/api/core_materials/".concat(t,".json"),{method:"delete"});case 2:0===(null==(n=e.sent)?void 0:n.status)&&(f.ZP.info("删除成功"),qe());case 4:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})})},children:[(0,ae.jsx)("i",{className:"iconfont icon-shanchu13 ".concat(B)}),"删除"]})]}),(0,ae.jsx)("div",{style:{minHeight:"0.55rem"},children:(0,ae.jsx)(b.Z,{title:n,children:(0,ae.jsx)("div",{className:O,style:{marginTop:"-5px"},children:n})})}),(0,ae.jsx)(b.Z,{title:i,children:(0,ae.jsx)("div",{className:R,children:i||"--"})}),(0,ae.jsx)(b.Z,{title:l,children:(0,ae.jsx)("div",{className:R,style:{marginTop:"-10px"},children:l||"--"})})]},t)})):(0,ae.jsx)(A.Z,{})})}}))})}):(0,ae.jsx)(A.Z,{})]}),(0,ae.jsx)(le,{visible:ue,title:"教材",onCancel:function(){return de(!1)},onOk:He}),(0,ae.jsx)(oe.Z,{getData:qe})]})}))},76895:function(e,n){n.Z={flex_box_center:"flex_box_center___vG4eV",flex_space_between:"flex_space_between___qVVxe",flex_box_vertical_center:"flex_box_vertical_center___P8Z8s",flex_box_center_end:"flex_box_center_end___VMme3",flex_box_column:"flex_box_column___VMHwm",dropdownmenus:"dropdownmenus___oVzoj",popupClassNames:"popupClassNames___OcZq7",selectdown:"selectdown___mmcA8"}}}]); \ No newline at end of file +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[2030],{68738:function(e,n,t){var a=t(7557),l=t.n(a),i=t(41498),s=t.n(i),o=t(79800),r=t.n(o),c=t(59301),u=t(13032),d=t(43418),m=t(8591),_=t(58181),p=t(96193),f=t(37712);n.Z=(0,u.connect)((function(e){return{user:e.user,classroomList:e.classroomList}}))((function(e){e.user;var n,t=e.dispatch,a=e.classroomList,i=e.getData,o=(0,c.useState)(!1),u=r()(o,2),x=u[0],v=u[1],h=(0,c.useState)(""),b=r()(h,2),g=b[0],j=b[1],y=function(){t({type:"classroomList/setActionTabs",payload:{}})},k={"教材规划":"core_material_description","主审专家":"judge","教材推荐":"textbook","师资培训":"core_teacher","课堂听课":"listening","教学论文":"paper"};return(0,f.jsx)(d.Z,{title:"规划说明",width:900,destroyOnClose:!0,maskClosable:!1,keyboard:!1,confirmLoading:x,open:"规划说明"===a.actionTabs.key,onCancel:y,onOk:s()(l()().mark((function e(){var n;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return v(!0),e.next=3,(0,_.ZP)("/api/core_materials/set_description.json",{method:"post",body:{name:k[a.actionTabs.params.name],content:g}});case 3:0==(null==(n=e.sent)?void 0:n.status)&&(m.ZP.success("保存成功"),y(),i()),v(!1);case 6:case"end":return e.stop()}}),e)}))),children:(0,f.jsx)(p.Z,{defaultvalue:null===(n=a.actionTabs.params)||void 0===n?void 0:n.content,onChange:function(e){j(e)}})})}))},96193:function(e,n,t){t.d(n,{Z:function(){return v}});var a=t(82242),l=t.n(a),i=t(7557),s=t.n(i),o=t(41498),r=t.n(o),c=t(79800),u=t.n(c),d=t(59301),m=t(84686),_=t(58181),p=t(13032),f=(t(93472),{editor_css:"editor_css___cm3Z8"}),x=t(37712),v=(0,p.connect)((function(e){return{user:e.user}}))((function(e){var n=e.defaultvalue,t=e.onChange,a=e.style,i=e.user,o=e.placeholder,c=2097152,p=(0,d.useRef)(null),v=(0,d.useState)(null),h=u()(v,2),b=h[0],g=h[1],j=(0,d.useState)(""),y=u()(j,2),k=y[0],Z=y[1];(0,d.useEffect)((function(){Z(n)}),[n]),(0,d.useEffect)((function(){t(k)}),[k]);var w={placeholder:o||"请输入内容...",MENU_CONF:{}};w.MENU_CONF.uploadImage={customUpload:function(e,n){return r()(s()().mark((function t(){var a,l;return s()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(a=new FormData).append("file",e),t.next=4,(0,_.ZP)("/api/attachments.json",{method:"post",body:a},!0);case 4:l=t.sent,n(null==l?void 0:l.url,"","");case 6:case"end":return t.stop()}}),t)})))()}},w.MENU_CONF.uploadVideo={customUpload:function(e,n){return r()(s()().mark((function t(){var a,l,o,r,u,d,m,f,x,v,h,b,g,j;return s()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=e.size,l=Math.ceil(a/c),t.prev=2,t.next=5,(0,_.ZP)("/api/attachments/multipart_upload_start",{method:"POST",body:{fileName:e.name,chunkCount:l,user_id:null==i||null===(o=i.userInfo)||void 0===o?void 0:o.user_id}});case 5:if(0===(null==(u=t.sent)?void 0:u.status)){t.next=8;break}throw new Error;case 8:d=u.upload_id,p.current=new AbortController,m=[],0,f=s()().mark((function n(){var t,l,i,o;return s()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:t=x*c,l=Math.min(t+c,a),i=e.slice(t,l),(o=new FormData).append("chunk",i),o.append("fileName",e.name),o.append("chunkIndex",(x+1).toString()),o.append("uploadId",d),m.push((function(){return(0,_.ZP)("/api/attachments/multipart_upload",{method:"POST",body:o,signal:p.current.signal},!0).then((function(e){}))}));case 9:case"end":return n.stop()}}),n)})),x=0;case 14:if(!(x0)){t.next=29;break}return t.next=27,Promise.all(g);case 27:t.sent,v+=h;case 29:t.next=22;break;case 31:return t.next=33,(0,_.ZP)("/api/attachments/multipart_upload_end",{method:"POST",body:{fileName:e.name,chunkCount:l,uploadId:d,user_id:null==i||null===(r=i.userInfo)||void 0===r?void 0:r.user_id}});case 33:j=t.sent,n(null==j?void 0:j.object,""),t.next=39;break;case 37:t.prev=37,t.t1=t.catch(2);case 39:case"end":return t.stop()}}),t,null,[[2,37]])})))()}};return(0,d.useEffect)((function(){return function(){null!=b&&(b.destroy(),g(null))}}),[b]),(0,x.jsx)(x.Fragment,{children:(0,x.jsxs)("div",{className:null==f?void 0:f.editor_css,style:{border:"1px solid #ccc",zIndex:100},children:[(0,x.jsx)(m.o,{editor:b,defaultConfig:{},mode:"default",style:{borderBottom:"1px solid #ccc"}}),(0,x.jsx)(m.M,{defaultConfig:w,value:k,onCreated:g,onChange:function(e){var n;!function(e){return""==e||new RegExp("^[ ]+$").test(e)}((n=e.getHtml(),n.replace(/<[^

]+>/g,"").replace(/<[

$]+>/g,"").replace(/ /gi,"").replace(/<[^
]+>/g,"")))?Z(e.getHtml()):Z("")},mode:"default",style:l()({height:"500px",overflowY:"hidden"},a)})]})})}))},54199:function(e,n,t){t.r(n),t.d(n,{default:function(){return re}});var a=t(37205),l=t.n(a),i=t(82242),s=t.n(i),o=t(7557),r=t.n(o),c=t(41498),u=t.n(c),d=t(79800),m=t.n(d),_=t(59301),p=t(13032),f=t(8591),x=t(61621),v=t(36381),h=t(43418),b=t(6848),g="BannerStyle___aL9ER",j="BannerStyleContent___T4lYo",y="DivDownPlay___FnIc2",k="CustomInputStyle___kxJUd",Z="paramsStyle___J1ohe",w="type___I5GvG",C="typeName___dDP6_",S="type_item_active___ypljD",N="type_item___BN1Rc",I="contentList___Jimzg",P="list___fftB_",F="imgContent___mNKhf",E="pictrue___vHnb9",L="updateContent___kXbLn",M="iconUpdate___o2EFl",V="deleteContent___uPwYK",B="iconDetele___z9pM6",O="item_title___bHJvx",R="publisher___j3UtF",T="main_con___igQSJ",U="MenuStyle___yBR62",D="MenuItem___DgS7E",z="MenuItemActive___GLXFD",A=t(72226),q=t(17631),Y=t(58181),H=t(78241),G=t(88522),J=t(10249),K=t(5083),W=t(54580),Q=t(61186),X=t.n(Q),$={flex_box_center:"flex_box_center___qqWqs",flex_space_between:"flex_space_between___CVG8x",flex_box_vertical_center:"flex_box_vertical_center___vkccE",flex_box_center_end:"flex_box_center_end___f9Kvd",flex_box_column:"flex_box_column___wYzPi",form:"form___A3jJx",btn:"btn___fHAub",img:"img___iBUlt",myModal:"myModal___x_S_1"},ee=t(76895),ne=t(19248),te=t(46906),ae=t(37712),le=(0,p.connect)((function(e){return{dispatch:e.dispatch,coreCurriculum:e.coreCurriculum}}))((function(e){var n,t=e.visible,a=e.onOk,l=e.onCancel,i=e.title,o=void 0===i?"":i,c=e.coreCurriculum,d=(e.dispatch,c.CoreSubjects,H.Z.useForm()),p=m()(d,1)[0],x=(0,_.useState)(!1),v=m()(x,2),b=v[0],g=v[1],j=(0,_.useState)([]),y=m()(j,2),k=y[0],Z=y[1],w=(0,_.useState)(!1),C=m()(w,2),S=C[0],N=C[1],I=(0,_.useState)([]),P=m()(I,2),F=P[0],E=P[1],L=(0,_.useState)([]),M=m()(L,2),V=M[0],B=M[1];(0,_.useEffect)((function(){if(t&&R(),null!=t&&t.id){var e,n;p.setFieldsValue(s()(s()({},t),{},{attachment_id:null==t||null===(e=t.attachment)||void 0===e?void 0:e.id,publication_time:null!=t&&t.publication_time?X()(null==t?void 0:t.publication_time):""}));var a=[s()(s()({},null==t?void 0:t.attachment),{},{response:{id:null==t||null===(n=t.attachment)||void 0===n?void 0:n.id}})];Z(a)}}),[t]);var O,R=function(){var e=u()(r()().mark((function e(n){var t,a,l;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Y.ZP)("/api/core_materials/book_tag.json",{method:"get",params:{core_subject_name:n||null}});case 2:0==(null==(t=e.sent)?void 0:t.status)&&(E(null==t||null===(a=t.data)||void 0===a?void 0:a.core_subject_name),B(null==t||null===(l=t.data)||void 0===l?void 0:l.material_type_name));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),T=function(){var e=u()(r()().mark((function e(n){var t,l;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:g(!0),l=s()(s()({},n),{},{attachment_id:(null==k||null===(t=k[0])||void 0===t||null===(t=t.response)||void 0===t?void 0:t.id)||""}),a(l);case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,ae.jsx)(h.Z,{className:$.myModal,title:"".concat(null!=t&&t.id?"编辑":"新建").concat(o),open:t,onOk:function(){p.submit()},centered:!0,onCancel:function(){l()},confirmLoading:b,okButtonProps:{disabled:S},width:686,afterClose:function(){g(!1),Z([]),p.resetFields()},okText:"确认",cancelText:"取消",wrapClassName:ee.Z.CustomCss,children:(0,ae.jsxs)(H.Z,{form:p,colon:!1,labelCol:{span:4},wrapperCol:{span:18},onFinish:T,className:$.form,children:[(0,ae.jsx)(H.Z.Item,{label:"核心课程",name:"core_subject_name",rules:[{required:!0,message:"请选择核心课程"}],children:(0,ae.jsx)(G.Z,{options:null==F?void 0:F.map((function(e){return{value:e,label:e}})),filterOption:function(e,n){var t;return-1!==(null==n||null===(t=n.label)||void 0===t||null===(t=t.toUpperCase())||void 0===t?void 0:t.indexOf(null==e?void 0:e.toUpperCase()))},onSearch:function(e){e.length>20&&p.setFieldValue("core_subject_name",e.substring(0,20))},onBlur:function(e){R(e)}})}),(0,ae.jsx)(H.Z.Item,{label:"教材名称",name:"name",rules:[{required:!0,message:"请输入教材名称"},{whitespace:!0,message:"请输入教材名称"},{max:200,message:"只能输入200个字符"}],children:(0,ae.jsx)(J.Z,{maxLength:200,placeholder:"请输入教材名称"})}),(0,ae.jsx)(H.Z.Item,{label:"教材类型",name:"material_type_name",rules:[{required:!0,message:"请选择教材类型"}],children:(0,ae.jsx)(G.Z,{options:null==V?void 0:V.map((function(e){return{value:e,label:e}})),filterOption:function(e,n){var t;return-1!==(null==n||null===(t=n.label)||void 0===t||null===(t=t.toUpperCase())||void 0===t?void 0:t.indexOf(null==e?void 0:e.toUpperCase()))},onSearch:function(e){e.length>20&&p.setFieldValue("material_type_name",e.substring(0,20))}})}),(0,ae.jsx)(H.Z.Item,{label:"主编",name:"author",rules:[{required:!0,message:"请输入主编"},{whitespace:!0,message:"请输入主编"},{max:40,message:"只能输入40个字符"}],children:(0,ae.jsx)(J.Z,{maxLength:40,placeholder:"请输入主编"})}),(0,ae.jsx)(H.Z.Item,{label:"副主编",name:"associate_editor",rules:[{max:40,message:"只能输入40个字符"}],children:(0,ae.jsx)(J.Z,{maxLength:40,placeholder:"请输入副主编"})}),(0,ae.jsx)(H.Z.Item,{label:"出版社",name:"publisher",rules:[{whitespace:!0,message:"实践出版社"},{max:100,message:"只能输入100个字符"}],children:(0,ae.jsx)(J.Z,{maxLength:100,placeholder:"请输入出版社"})}),(0,ae.jsx)(H.Z.Item,{label:"出版时间",name:"publication_time",children:(0,ae.jsx)(K.default,{picker:"month",style:{width:"100%"},placeholder:"请选择出版时间",format:"YYYY-MM",allowClear:!0})}),(0,ae.jsx)(H.Z.Item,{label:"ISBN",name:"number",rules:[{whitespace:!0,message:"请输入ISBN"}],children:(0,ae.jsx)(J.Z,{maxLength:50,placeholder:"请输入ISBN"})}),(0,ae.jsx)(H.Z.Item,{label:"联系方式",name:"contact_info",children:(0,ae.jsx)(J.Z,{maxLength:30,placeholder:"可填写手机、邮箱、QQ等联系方式"})}),(0,ae.jsx)(H.Z.Item,{label:"阅读链接",name:"view_link",children:(0,ae.jsx)(J.Z,{placeholder:"请输入阅读链接"})}),(0,ae.jsx)(H.Z.Item,{label:"购买链接",name:"buy_link",children:(0,ae.jsx)(J.Z,{placeholder:"请输入购买链接"})}),(0,ae.jsx)(H.Z.Item,{name:"attachment_id",label:"封面图片",rules:[{required:!0,message:"请上传封面图片"}],children:(0,ae.jsx)("div",{className:$.upload,children:null!=k&&null!==(n=k[0])&&void 0!==n&&null!==(n=n.response)&&void 0!==n&&n.id?(0,ae.jsxs)("div",{className:$.img,children:[(0,ae.jsx)("img",{src:q.Z.API_SERVER+"/api/attachments/"+(null==k||null===(O=k[0])||void 0===O||null===(O=O.response)||void 0===O?void 0:O.id),alt:"avatar",style:{width:"100%"}}),(0,ae.jsx)("div",{children:(0,ae.jsx)(ne.Z,{onClick:function(){Z([]),p.setFieldsValue({attachment_id:""})},style:{fontSize:"16px",color:"red"}})})]}):(0,ae.jsx)(W.Z,{fileList:k,action:"".concat(q.Z.API_SERVER,"/api/attachments.json"),onChange:function(e){return n=e,p.setFieldsValue({attachment_id:""}),void(["uploading","done","removed"].includes(n.file.status)&&("uploading"===n.file.status&&N(!0),"done"===n.file.status&&N(!1),Z(n.fileList),p.setFieldsValue({attachment_id:null===(t=n.fileList)||void 0===t||null===(t=t[0])||void 0===t||null===(t=t.response)||void 0===t?void 0:t.id})));var n,t},onRemove:function(e){Z([])},beforeUpload:function(e){return"image/jpeg"===(n=e).type||"image/png"===n.type?n.size/1024/1024>2?(f.ZP.info("文件大小必须小于2MB"),Promise.reject()):(Z([]),!0):(f.ZP.error("请上传jpg或png的图片!"),Promise.reject());var n},withCredentials:!0,accept:"image/*",children:(0,ae.jsxs)(te.op,{style:{borderRadius:"2px",marginTop:3},children:[(0,ae.jsx)("i",{className:"iconfont icon-shangchuantupian2 mr5"}),"上传图片"]})})})})]})})})),ie=t(20731),se=t(69142),oe=t(68738),re=(0,p.connect)((function(e){var n=e.user,t=e.globalSetting,a=e.coreCurriculum;return{user:n,globalSetting:t,virtualSpaces:e.virtualSpaces,coreCurriculum:a,classroomList:e.classroomList}}))((function(e){e.coreCurriculum;var n,t,a,i,o,c,d,H=e.dispatch,G=(e.virtualSpaces,e.globalSetting),J=(e.classroomList,(0,_.useState)(!0)),K=m()(J,2),W=K[0],Q=K[1],X=(0,_.useState)(""),$=m()(X,2),ee=$[0],ne=$[1],re=(0,_.useState)(!1),ce=m()(re,2),ue=ce[0],de=ce[1],me=(0,_.useState)(!1),_e=m()(me,2),pe=_e[0],fe=_e[1],xe=(0,_.useState)(),ve=m()(xe,2),he=ve[0],be=ve[1],ge=(0,_.useState)({}),je=m()(ge,2),ye=je[0],ke=je[1],Ze=(0,_.useState)([]),we=m()(Ze,2),Ce=we[0],Se=we[1],Ne=(0,_.useState)("全部"),Ie=m()(Ne,2),Pe=Ie[0],Fe=Ie[1],Ee=(0,_.useState)([]),Le=m()(Ee,2),Me=Le[0],Ve=Le[1],Be=(0,_.useState)("全部"),Oe=m()(Be,2),Re=Oe[0],Te=Oe[1],Ue=(0,_.useState)("全部课程"),De=m()(Ue,2),ze=De[0],Ae=De[1];(0,_.useEffect)((function(){Ye()}),[]),(0,_.useEffect)((function(){qe()}),[Pe,Re,ee]),(0,_.useEffect)((function(){if("全部课程"!==ze){var e=document.getElementById(ze);e&&e.scrollIntoView({behavior:"smooth",block:"start"})}}),[ze]);var qe=function(){var e=u()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Q(!0),e.next=3,(0,Y.ZP)("/api/core_materials/books.json",{method:"get",params:{material_type_name:Re,keyword:ee,core_subject_name:Pe}});case 3:0==(null==(n=e.sent)?void 0:n.status)&&(fe(null==n?void 0:n.can_edit),be(null==n?void 0:n.data),ke(n)),Q(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ye=function(){var e=u()(r()().mark((function e(n){var t,a,l;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Q(!0),e.next=3,(0,Y.ZP)("/api/core_materials/book_tag.json",{method:"get",params:{core_subject_name:"全部"==n?null:n||null}});case 3:0==(null==(t=e.sent)?void 0:t.status)&&(Se(null==t||null===(a=t.data)||void 0===a?void 0:a.core_subject_name),Ve(null==t||null===(l=t.data)||void 0===l?void 0:l.material_type_name)),Q(!1);case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),He=function(){var e=u()(r()().mark((function e(n){var t,a;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==ue||!ue.id){e.next=7;break}return e.next=3,(0,Y.ZP)("/api/core_materials/".concat(null==ue?void 0:ue.id,".json"),{method:"put",body:s()(s()({},n),{},{book_type:2})});case 3:0==(null==(t=e.sent)?void 0:t.status)&&(f.ZP.success("".concat(null!=ue&&ue.id?"编辑":"添加","成功")),qe(),de(!1)),e.next=11;break;case 7:return e.next=9,(0,Y.ZP)("/api/core_materials.json",{method:"post",body:s()(s()({},n),{},{book_type:2})});case 9:0==(null==(a=e.sent)?void 0:a.status)&&(f.ZP.success("".concat(null!=ue&&ue.id?"编辑":"添加","成功")),qe(),de(!1));case 11:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,ae.jsxs)("section",{style:{paddingBottom:"3rem"},children:[(0,ae.jsx)("div",{className:g,style:{backgroundImage:"url(".concat(q.Z.IMG_SERVER,"/").concat(null==G||null===(n=G.setting)||void 0===n?void 0:n.news_banner_url,")")},children:(0,ae.jsxs)("div",{className:j,children:[(0,ae.jsxs)("div",{children:[(0,ae.jsx)("div",{style:{color:"#fff",fontSize:".34rem",letterSpacing:".05rem",fontWeight:600},children:(0,ie.Iz)("/bookplan",null==G||null===(t=G.setting)||void 0===t?void 0:t.navbar)}),(0,ae.jsxs)("div",{style:{display:"flex"},children:[pe&&(0,ae.jsxs)("div",{className:"".concat(y),style:{width:"1rem"},onClick:function(){de(!0)},children:[(0,ae.jsx)("i",{className:"iconfont icon-icon_xinyong_xianxing_jijin-249",style:{marginRight:"0.05rem",fontSize:".16rem"}}),"新建"]}),pe&&(null==ye?void 0:ye.description_permission)&&(0,ae.jsxs)("div",{className:"".concat(y),style:{marginLeft:".2rem"},onClick:function(){H({type:"classroomList/setActionTabs",payload:{key:"规划说明",params:{name:"教材规划",content:null==ye?void 0:ye.core_material_description}}})},children:[(0,ae.jsx)("i",{className:"iconfont icon-icon_xinyong_xianxing_jijin-249",style:{marginRight:"0.05rem",fontSize:".16rem"}}),"规划说明"]})]})]}),(0,ae.jsx)("div",{children:(0,ae.jsx)(te.t7,{placeholder:"请输入关键字进行搜索",className:k,value:ee,onChange:function(e){ne(e)}})})]})}),(null==ye?void 0:ye.core_material_description)&&(0,ae.jsx)(se.Z,{style:{width:"12rem",margin:".3rem auto .2rem auto"},value:null==ye?void 0:ye.core_material_description}),(0,ae.jsxs)("div",{className:T,children:[(0,ae.jsxs)("div",{className:Z,children:[(0,ae.jsxs)("div",{className:w,style:{borderBottom:"1px dashed #37AD83"},children:[(0,ae.jsx)("div",{className:C,children:"课程"}),(0,ae.jsx)("div",{style:{display:"flex",flexWrap:"wrap",flex:1},children:null===(a=["全部"].concat(l()(Ce)))||void 0===a?void 0:a.map((function(e,n){return(0,ae.jsx)("div",{className:Pe==e?S:N,onClick:function(){Fe(e),Ae(e),Ye(e)},children:e},n)}))})]}),(0,ae.jsxs)("div",{className:w,children:[(0,ae.jsx)("div",{className:C,children:"类型"}),(0,ae.jsx)("div",{style:{display:"flex",flexWrap:"wrap",flex:1},children:null===(i=["全部"].concat(l()(Me)))||void 0===i?void 0:i.map((function(e,n){return(0,ae.jsx)("div",{className:Re==e?S:N,onClick:function(){Te(e)},children:e},n)}))})]})]}),(0,ae.jsx)("div",{className:U,children:null===(o=["全部课程"].concat(l()(Ce)))||void 0===o?void 0:o.map((function(e,n){return(0,ae.jsx)("div",{onClick:function(){"全部课程"===e&&(e="全部"),Fe(e),Ae(e),Ye(e)},className:"".concat(D," ").concat(Pe===e||"全部"==Pe&&"全部课程"===e?z:""),children:e},n)}))}),(null==he||null===(c=he.list)||void 0===c?void 0:c.length)>0?(0,ae.jsx)(x.Z,{className:"mt20",loading:W,children:(0,ae.jsx)(v.Z,{accordion:!0,bordered:!1,activeKey:ze,onChange:function(e){Ae(e.length>0?e[0]:"全部课程")},expandIconPosition:"end",ghost:!0,items:null==he||null===(d=he.list)||void 0===d?void 0:d.map((function(e,n){var t,a,l,i,s;return{key:null==e||null===(t=e.table)||void 0===t?void 0:t.name,label:null==e||null===(a=e.table)||void 0===a?void 0:a.name,style:{marginBottom:"40px",background:"linear-gradient( 180deg, #F7F8FD 0%, rgba(247,248,252,0.3) 100%)",boxShadow:"0px 2px 4px 0px #F0F1F2",border:"1px solid #FFFFFF"},children:(0,ae.jsx)("div",{className:I,id:null==e||null===(l=e.table)||void 0===l?void 0:l.name,children:(null==e||null===(i=e.data)||void 0===i?void 0:i.length)>0?null==e||null===(s=e.data)||void 0===s?void 0:s.map((function(e){var n=e.name,t=e.id,a=e.attachment,l=e.publisher,i=(e.book_id,e.author);return(0,ae.jsxs)("div",{className:P,onClick:function(){p.history.push("/bookplan/detail/".concat(t,"?backUrl=/bookplan"))},children:[(0,ae.jsx)("img",{className:E,src:q.Z.API_SERVER+(null==a?void 0:a.url)}),pe&&(null==e?void 0:e.is_creator)&&(0,ae.jsxs)("div",{className:F,children:[(0,ae.jsxs)("span",{className:L,onClick:function(n){n.stopPropagation(),de(e)},children:[(0,ae.jsx)("i",{className:"iconfont icon-bianji-moren ".concat(M)}),"编辑"]}),(0,ae.jsxs)("span",{className:V,onClick:function(e){var n;e.stopPropagation(),h.Z.confirm({icon:null,title:"提示",centered:!0,content:"请确认是否删除",okText:"确定",cancelText:"取消",onOk:(n=u()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Y.ZP)("/api/core_materials/".concat(t,".json"),{method:"delete"});case 2:0===(null==(n=e.sent)?void 0:n.status)&&(f.ZP.info("删除成功"),qe());case 4:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})})},children:[(0,ae.jsx)("i",{className:"iconfont icon-shanchu13 ".concat(B)}),"删除"]})]}),(0,ae.jsx)("div",{style:{minHeight:"0.55rem"},children:(0,ae.jsx)(b.Z,{title:n,children:(0,ae.jsx)("div",{className:O,style:{marginTop:"-5px"},children:n})})}),(0,ae.jsx)(b.Z,{title:i,children:(0,ae.jsx)("div",{className:R,children:i||"--"})}),(0,ae.jsx)(b.Z,{title:l,children:(0,ae.jsx)("div",{className:R,style:{marginTop:"-10px"},children:l||"--"})})]},t)})):(0,ae.jsx)(A.Z,{})})}}))})}):(0,ae.jsx)(A.Z,{})]}),(0,ae.jsx)(le,{visible:ue,title:"教材",onCancel:function(){return de(!1)},onOk:He}),(0,ae.jsx)(oe.Z,{getData:qe})]})}))},76895:function(e,n){n.Z={flex_box_center:"flex_box_center___vG4eV",flex_space_between:"flex_space_between___qVVxe",flex_box_vertical_center:"flex_box_vertical_center___P8Z8s",flex_box_center_end:"flex_box_center_end___VMme3",flex_box_column:"flex_box_column___VMHwm",dropdownmenus:"dropdownmenus___oVzoj",popupClassNames:"popupClassNames___OcZq7",selectdown:"selectdown___mmcA8"}}}]); \ No newline at end of file diff --git a/p__History__index.async.js b/p__History__index.async.js index 58fd9bfa65..4e4988b4c5 100644 --- a/p__History__index.async.js +++ b/p__History__index.async.js @@ -1 +1 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9768],{3196:function(e,n,t){t.d(n,{Z:function(){return b}});var i=t(7557),s=t.n(i),l=t(41498),a=t.n(l),r=t(82242),o=t.n(r),c=t(79800),u=t.n(c),d=t(39647),m=t.n(d),h=t(59301),p=t(8591),v=t(54580),x=t(95237),f=t(17631),_=t(19248),j=t(46906),y="tip___bHEXo",g=t(37712),Z=["ButtonText","ButtonOptions","uploadProps","showTip","showText","showListening","imgWidth"],b=function(e){var n,t,i,l=e.ButtonText,r=e.ButtonOptions,c=e.uploadProps,d=e.showTip,b=e.showText,S=e.showListening,N=e.imgWidth,w=m()(e,Z),C=(0,h.useState)(null),k=u()(C,2),B=k[0],I=k[1],T=o()(o()({maxCount:1,accept:"image/*",withCredentials:!0,beforeUpload:function(e){if(!("image/jpeg"===e.type||"image/png"===e.type||"image/jpg"===e.type))return p.ZP.error("您上传的不是JPEG/PNG/JPG类型文件"),v.Z.LIST_IGNORE;var n=e.size/1024/1024;return 0==n?(p.ZP.error("".concat(e.name," 图片无法上传。").concat(0==n?"文件内容不能为空":"超过图片大小限制(2MB)")),v.Z.LIST_IGNORE):!(n>2)||(p.ZP.error("".concat(e.name," 图片无法上传。超过图片大小限制(2MB)")),v.Z.LIST_IGNORE)},onChange:function(e){var n;(["uploading","done","removed"].includes(e.file.status)&&I(e.file),"done"==e.file.status)&&(null==w||w.onChange(null===(n=e.file)||void 0===n||null===(n=n.response)||void 0===n?void 0:n.id))},action:"".concat(f.Z.API_SERVER,"/api/attachments.json")},c||{}),{},{onRemove:(t=a()(s()().mark((function e(n){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:P(),(null==c?void 0:c.onRemove)&&(null==c||c.onRemove(n));case 2:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}),P=function(){I(null),null==w||w.onChange()};return(0,h.useEffect)((function(){(null==w?void 0:w.value)&&I({response:{id:null==w?void 0:w.value}})}),[null==w?void 0:w.value]),(0,g.jsx)("div",{id:(null==w?void 0:w.scrollId)||"",children:null!=B&&null!==(n=B.response)&&void 0!==n&&n.id?(0,g.jsxs)(x.Z,{align:"middle",justify:"center",style:{position:"relative",width:N||400,backgroundColor:"#f4f3f4"},children:[(0,g.jsx)("img",{src:f.Z.API_SERVER+"/api/attachments/"+(null==B||null===(i=B.response)||void 0===i?void 0:i.id),alt:"avatar",style:{width:"100%",height:N?"177px":"auto"}}),(0,g.jsx)("div",{style:{position:"absolute",right:"-6px",top:"-6px",cursor:"pointer",width:16,height:16,borderRadius:"50%",backgroundColor:"#fff"},children:(0,g.jsx)(_.Z,{onClick:a()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:P();case 1:case"end":return e.stop()}}),e)}))),style:{fontSize:"16px",color:"red"}})})]}):(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(v.Z,o()(o()({},T),{},{children:(0,g.jsx)(j.op,o()(o()({style:o()({borderRadius:"2px"},null==r?void 0:r.style)},r),{},{children:l}))})),d&&(0,g.jsx)("span",{className:y,children:"(建议上传尺寸为472*266的图片)"}),b&&(0,g.jsx)("span",{className:y,style:{width:"4rem"},children:"(需上传尺寸为200*268的图片,大小不超过2MB)"}),S&&(0,g.jsx)("span",{className:y,style:{width:"4rem"},children:"(限制上传2MB内的图片,建议上传尺寸为283*177的图片)"})]})})}},64791:function(e,n,t){t.r(n),t.d(n,{default:function(){return I}});var i=t(37205),s=t.n(i),l=t(7557),a=t.n(l),r=t(41498),o=t.n(r),c=t(79800),u=t.n(c),d=t(59301),m=t(13032),h=t(6848),p=t(95237),v=t(43604),x=t(58421),f=t(43418),_=t(8591),j=t(3113),y={BannerStyle:"BannerStyle___XBzmQ",BannerStyleContent:"BannerStyleContent___TO_Pi",Onerow:"Onerow___JrVhJ",coreSty:"coreSty___QzTzE",paramsStyle:"paramsStyle___O9ZTj",type:"type___mSYrp",typeName:"typeName___Q91zp",type_item_active:"type_item_active___mS0M9",type_item:"type_item___SiCVO",itemBox:"itemBox___sqRkb",itemWrap:"itemWrap___nNJMu",itemTop:"itemTop___ACVhe",itemBottom:"itemBottom___SSXgM",title:"title___ZOk9v",subTitle:"subTitle___FqUXF",contWrap:"contWrap___VJHqV",left:"left___ixU3R",right:"right___YnpMt",actionWrap:"actionWrap___muwRR",actionBtn:"actionBtn___K9ZIC",labSty:"labSty___RNlhx",contSty:"contSty___Jn8PK",linkBtn:"linkBtn___nF2XL"},g=t(20731),Z=t(17631),b=t(46906),S=t(58181),N=t(72226),w=t(61186),C=t.n(w),k=t(78660),B=t(37712),I=(0,m.connect)((function(e){var n=e.user,t=e.loading,i=e.globalSetting,s=e.coreCurriculum;return{user:n,loading:t.effects,globalSetting:i,coreCurriculum:s}}))((function(e){e.coreCurriculum,e.dispatch,e.loading,e.user;var n,t,i,l,r=e.globalSetting,c=(0,d.useState)(!0),m=u()(c,2),w=(m[0],m[1]),I=(0,d.useState)(""),T=u()(I,2),P=T[0],Y=T[1],R=(0,d.useState)([]),M=u()(R,2),E=M[0],O=M[1],W=(0,d.useState)("全部"),L=u()(W,2),H=L[0],F=L[1],V=(0,d.useState)([{id:"-1",name:"全部"},{id:"0",name:"未开始"},{id:"1",name:"进行中"},{id:"2",name:"已结束"}]),q=u()(V,2),z=q[0],D=(q[1],(0,d.useState)("-1")),J=u()(D,2),G=J[0],U=J[1],X=(0,d.useState)([]),A=u()(X,2),Q=A[0],K=A[1],$=(0,d.useState)(!1),ee=u()($,2),ne=ee[0],te=ee[1],ie=(0,d.useState)({}),se=u()(ie,2),le=se[0],ae=se[1],re=(0,d.useState)(!1),oe=u()(re,2),ce=oe[0],ue=oe[1],de=(0,d.useState)(1),me=u()(de,2),he=me[0],pe=me[1],ve=(0,d.useState)(0),xe=u()(ve,2),fe=xe[0],_e=xe[1];(0,d.useEffect)((function(){je(),ye("全部","-1",P,he)}),[]);var je=function(){var e=o()(a()().mark((function e(n,t){var i;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(!0),e.next=3,(0,S.ZP)("/api/listening_activities/core_subject_tag.json",{method:"get",params:{message:n,status:t}});case 3:0==(null==(i=e.sent)?void 0:i.status)&&O(null==i?void 0:i.data),w(!1);case 6:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),ye=function(){var e=o()(a()().mark((function e(n,t,i,s){var l,r,o;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return w(!0),e.next=3,(0,S.ZP)("/api/listening_activities.json",{method:"get",params:{keyword:i||P,history:!0,page:"全部"==n?void 0:s||he,core_subject:encodeURIComponent(n),status:"-1"==t?void 0:t}});case 3:0===(l=e.sent).status&&(K(null==l||null===(r=l.data)||void 0===r?void 0:r.list),_e(null==l||null===(o=l.data)||void 0===o?void 0:o.size)),w(!1);case 6:case"end":return e.stop()}}),e)})));return function(n,t,i,s){return e.apply(this,arguments)}}();return(0,B.jsxs)("section",{children:[(0,B.jsx)("div",{className:y.BannerStyle,style:{backgroundImage:"url(".concat(Z.Z.IMG_SERVER,"/").concat(null==r||null===(n=r.setting)||void 0===n?void 0:n.news_banner_url,")")},children:(0,B.jsxs)("div",{className:y.BannerStyleContent,children:[(0,B.jsx)("div",{style:{color:"#fff",fontSize:".34rem",letterSpacing:".05rem",fontWeight:600},children:"历史听课活动"}),(0,B.jsx)("div",{children:(0,B.jsx)(b.t7,{placeholder:"请输入关键字进行搜索",className:y.CustomInputStyle,value:P,onChange:function(e){Y(e),ye(H,G,e)}})})]})}),(0,B.jsxs)("div",{className:y.coreSty,children:[(0,B.jsxs)("div",{className:y.paramsStyle,children:[(0,B.jsxs)("div",{className:y.type,style:{borderBottom:"1px dashed #37AD83"},children:[(0,B.jsx)("div",{className:y.typeName,children:"核心课程"}),(0,B.jsx)("div",{style:{display:"flex",flexWrap:"wrap",flex:1},children:null===(t=["全部"].concat(s()(E)))||void 0===t?void 0:t.map((function(e,n){return(0,B.jsx)("div",{className:H===e?y.type_item_active:y.type_item,onClick:function(){F(e),ye(e,G)},children:e},n)}))})]}),(0,B.jsxs)("div",{className:y.type,children:[(0,B.jsx)("div",{className:y.typeName,children:"状态"}),(0,B.jsx)("div",{style:{display:"flex",flexWrap:"wrap",flex:1},children:null==z?void 0:z.map((function(e,n){return(0,B.jsx)("div",{className:G==(null==e?void 0:e.id)?y.type_item_active:y.type_item,onClick:function(){U(null==e?void 0:e.id),ye(H,null==e?void 0:e.id)},children:null==e?void 0:e.name},n)}))})]})]}),(0,B.jsx)("div",{className:y.itemBox,children:null!=Q&&Q.length?null==Q?void 0:Q.map((function(e,n){var t;return(0,B.jsxs)("div",{className:y.itemWrap,children:[(0,B.jsx)("div",{className:y.itemTop,children:(0,B.jsx)("img",{src:null==e||null===(t=e.cover)||void 0===t?void 0:t.url})}),(0,B.jsxs)("div",{className:y.itemBottom,onClick:function(){ae(e),te(!0)},children:[(0,B.jsx)(h.Z,{title:null==e?void 0:e.name,children:(0,B.jsx)("div",{className:y.title,children:null==e?void 0:e.name})}),(0,B.jsx)(h.Z,{title:null==e?void 0:e.school_name,children:(0,B.jsx)("div",{className:y.subTitle,children:null==e?void 0:e.school_name})})]})]},null==e?void 0:e.id)})):(0,B.jsx)(N.Z,{})}),!!fe&&(0,B.jsxs)(p.Z,{wrap:!1,align:"middle",justify:"space-between",style:{width:"12rem",margin:".2rem auto 0.3rem"},children:[(0,B.jsxs)(v.Z,{children:["共 ",(0,B.jsx)("span",{style:{color:"#1B8565"},children:fe||0})," 条数据"]}),(0,B.jsx)(v.Z,{children:(0,B.jsx)(x.Z,{showSizeChanger:!1,showQuickJumper:!1,current:he,onChange:function(e,n){pe(e)},total:fe||0})})]})]}),(0,B.jsx)(k.Z,{visible:ce,isEdit:!0,item:le,handleCancel:function(){return ue(!1)},onOk:function(){ye(H,G,P,he)}}),(0,B.jsx)(f.Z,{title:"听课活动详情",visible:ne,centered:!0,onCancel:function(){te(!1)},width:1e3,maskClosable:!1,footer:null,children:(0,B.jsxs)("div",{className:y.contWrap,children:[(0,B.jsx)("div",{className:y.left,children:(0,B.jsx)("img",{src:null==le||null===(i=le.cover)||void 0===i?void 0:i.url})}),(0,B.jsxs)("div",{className:y.right,children:[(0,B.jsxs)("div",{className:y.actionWrap,children:[(0,B.jsx)("i",{className:"iconfont icon-bianji-moren current ".concat(y.actionBtn),onClick:function(){ue(!0),te(!1)}}),(0,B.jsx)("i",{className:"iconfont icon-shanchutimu ml20 current ".concat(y.actionBtn),onClick:function(){var e;f.Z.confirm({title:"删除课堂听课",content:"确认要删除课堂听课吗?",okText:"确认",icon:null,centered:!0,cancelText:"取消",onOk:(e=o()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,S.ZP)("/api/listening_activities/".concat(null==le?void 0:le.id,".json"),{method:"delete"});case 2:0===e.sent.status&&(_.ZP.success("删除成功!"),te(!1),ye());case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})}})]}),(0,B.jsxs)(p.Z,{className:"mb20",children:[(0,B.jsx)(v.Z,{className:y.labSty,children:"活动名称"}),(0,B.jsx)(v.Z,{className:y.contSty,children:null==le?void 0:le.name})]}),(0,B.jsxs)(p.Z,{className:"mb20",children:[(0,B.jsx)(v.Z,{className:y.labSty,children:"核心课程"}),(0,B.jsx)(v.Z,{className:y.contSty,children:null==le?void 0:le.core_subject})]}),(0,B.jsxs)(p.Z,{className:"mb20",children:[(0,B.jsx)(v.Z,{className:y.labSty,children:"主讲教师"}),(0,B.jsx)(v.Z,{className:y.contSty,children:null==le?void 0:le.teacher_name})]}),(0,B.jsxs)(p.Z,{className:"mb20",children:[(0,B.jsx)(v.Z,{className:y.labSty,children:"所属院校"}),(0,B.jsx)(v.Z,{className:y.contSty,children:null==le?void 0:le.school_name})]}),(0,B.jsxs)(p.Z,{className:"mb20",children:[(0,B.jsx)(v.Z,{className:y.labSty,children:"日期"}),(0,B.jsx)(v.Z,{children:null==le||null===(l=le.times)||void 0===l?void 0:l.map((function(e,n){var t,i;return(0,B.jsxs)(p.Z,{className:y.contSty,children:[null===(t=C()(null==e?void 0:e.start_time))||void 0===t?void 0:t.format("YYYY-MM-DD HH:mm")," ~ ",null===(i=C()(null==e?void 0:e.end_time))||void 0===i?void 0:i.format("YYYY-MM-DD HH:mm")]},n)}))})]}),(0,B.jsxs)(p.Z,{className:"mb20",children:[(0,B.jsx)(v.Z,{className:y.labSty,children:"地点"}),(0,B.jsx)(v.Z,{className:y.contSty,children:null==le?void 0:le.address})]}),(0,B.jsxs)(p.Z,{className:"mb20",children:[(0,B.jsx)(v.Z,{className:y.labSty,children:"链接"}),(0,B.jsx)(v.Z,{className:y.contSty,style:{cursor:"pointer"},children:null==le?void 0:le.link})]}),(0,B.jsx)(j.ZP,{className:y.linkBtn,onClick:function(){(0,g.xg)(null==le?void 0:le.link)},children:"前往链接"})]})]})})]})}))},78660:function(e,n,t){t.d(n,{Z:function(){return M}});var i=t(7557),s=t.n(i),l=t(41498),a=t.n(l),r=t(85573),o=t.n(r),c=t(82242),u=t.n(c),d=t(79800),m=t.n(d),h=t(59301),p=t(78241),v=t(8591),x=t(43418),f=t(10249),_=t(88522),j=t(95237),y=t(43604),g=t(5083),Z=t(6848),b=t(13032),S=t(58181),N="formSty___e1WFc",w="actionWrapper___Cr7h9",C="addIcon___Vdgtz",k="deleteIcon___I7ilg",B=t(3196),I=t(32134),T=t(12893),P=t(61186),Y=t.n(P),R=t(37712),M=(0,b.connect)((function(e){return{dispatch:e.dispatch,coreCurriculum:e.coreCurriculum}}))((function(e){var n=e.visible,t=(e.bookList,e.onOk),i=e.handleCancel,l=e.isEdit,r=void 0!==l&&l,c=e.item,d=void 0===c?{}:c,b=(e.dispatch,p.Z.useForm()),P=m()(b,1)[0],M=(0,h.useState)(!1),E=m()(M,2),O=E[0],W=E[1],L=(0,h.useState)(),H=m()(L,2),F=H[0],V=H[1];(0,h.useEffect)((function(){var e;n&&(q(),r&&P.setFieldsValue(u()(u()({},d),{},{times:null==d||null===(e=d.times)||void 0===e?void 0:e.map((function(e,n){return o()({},n,[Y()(null==e?void 0:e.start_time),Y()(null==e?void 0:e.end_time)])}))})))}),[n,r]);var q=function(){var e=a()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,S.ZP)("/api/listening_activities/core_subject_tag.json",{method:"get"});case 2:0===(null==(n=e.sent)?void 0:n.status)&&V(null==n?void 0:n.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(){var e=a()(s()().mark((function e(n){var l,a,o;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(W(!0),a=null==n||null===(l=n.times)||void 0===l?void 0:l.map((function(e,n){var t=m()(e[n],2),i=t[0],s=t[1];return{start_time:Y()(i).format("YYYY-MM-DD HH:mm"),end_time:Y()(s).format("YYYY-MM-DD HH:mm")}})),!r){e.next=8;break}return e.next=5,(0,S.ZP)("/api/listening_activities/".concat(null==d?void 0:d.id,".json"),{method:"put",body:u()(u()({},n),{},{times:a})});case 5:e.t0=e.sent,e.next=11;break;case 8:return e.next=10,(0,S.ZP)("/api/listening_activities.json",{method:"post",body:u()(u()({},n),{},{times:a})});case 10:e.t0=e.sent;case 11:0===(null==(o=e.t0)?void 0:o.status)&&(v.ZP.success("保存成功!"),i(),t()),W(!1);case 14:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,R.jsx)(x.Z,{title:r?"编辑听课活动":"新建听课活动",visible:n,onOk:function(){P.submit()},centered:!0,onCancel:i,confirmLoading:O,width:690,afterClose:function(){W(!1),P.resetFields()},okText:"确认",cancelText:"取消",maskClosable:!1,children:(0,R.jsxs)(p.Z,{form:P,colon:!1,onFinish:z,className:N,scrollToFirstError:!0,size:"large",initialValues:{times:[{0:""},{1:""}]},children:[(0,R.jsx)(p.Z.Item,{label:"活动名称",name:"name",rules:[{required:!0,message:"请输入名称"}],children:(0,R.jsx)(f.Z,{maxLength:40,showCount:!0,placeholder:"请输入名称"})}),(0,R.jsx)(p.Z.Item,{label:"核心课程",name:"core_subject",rules:[{required:!0,message:"请选择核心课程"}],children:(0,R.jsx)(_.Z,{placeholder:"请选择核心课程",options:null==F?void 0:F.map((function(e){return{value:e,label:e}})),filterOption:function(e,n){var t;return-1!==(null==n||null===(t=n.label)||void 0===t||null===(t=t.toUpperCase())||void 0===t?void 0:t.indexOf(null==e?void 0:e.toUpperCase()))},onSearch:function(e){e.length>40&&P.setFieldValue("core_subject",e.substring(0,40))},onBlur:function(){q()}})}),(0,R.jsx)(p.Z.Item,{label:"主讲教师",name:"teacher_name",rules:[{required:!0,message:"请输入主讲教师名称"}],children:(0,R.jsx)(f.Z,{maxLength:20,showCount:!0,placeholder:"请输入主讲教师名称"})}),(0,R.jsx)(p.Z.Item,{label:"所属院校",name:"school_name",rules:[{required:!0,message:"请输入所属院校名称"}],children:(0,R.jsx)(f.Z,{maxLength:50,showCount:!0,placeholder:"请输入所属院校名称"})}),(0,R.jsx)(p.Z.List,{name:"times",children:function(e,n){var t=n.add,i=n.remove;return(0,R.jsx)(R.Fragment,{children:e.map((function(e,n){return(0,R.jsxs)(j.Z,{wrap:!1,children:[(0,R.jsx)(y.Z,{style:{marginLeft:0==n?"0px":"80px"},children:(0,R.jsx)(p.Z.Item,u()(u()({},e),{},{label:0===n?"日期时间":"",name:[e.name,n],rules:[{required:!0,message:"请选择日期时间"}],children:(0,R.jsx)(g.default.RangePicker,{style:{width:"460px"},placeholder:["请选择开始时间","请选择结束时间"],showTime:{format:"HH:mm"},format:"YYYY-MM-DD HH:mm"})}))}),(0,R.jsxs)(y.Z,{className:w,children:[(0,R.jsx)(Z.Z,{title:"新增日期时间",children:(0,R.jsx)(I.Z,{className:C,onClick:function(){t()},style:{visibility:n<6?"visible":"hidden"}})}),(0,R.jsx)(Z.Z,{title:"删除",children:(0,R.jsx)(T.Z,{className:k,onClick:function(){i(e.name)},style:{visibility:n>=1?"visible":"hidden"}})})]})]})}))})}}),(0,R.jsx)(p.Z.Item,{label:"地点",name:"address",rules:[{required:!0,message:"请输入地点"}],children:(0,R.jsx)(f.Z,{maxLength:50,showCount:!0,placeholder:"请输入地点"})}),(0,R.jsx)(p.Z.Item,{label:"链接",name:"link",rules:[{required:!0,message:"请输入报名链接"}],children:(0,R.jsx)(f.Z,{maxLength:50,showCount:!0,placeholder:"请输入报名链接"})}),(0,R.jsx)(p.Z.Item,{label:"封面图片",name:"cover_id",rules:[{required:!0,message:"请输入报名链接"}],children:(0,R.jsx)(B.Z,{ButtonText:"上传图片"})})]})})}))}}]); \ No newline at end of file +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9768],{3196:function(e,n,t){t.d(n,{Z:function(){return b}});var i=t(7557),s=t.n(i),l=t(41498),a=t.n(l),r=t(82242),o=t.n(r),c=t(79800),u=t.n(c),d=t(39647),m=t.n(d),h=t(59301),v=t(8591),p=t(54580),x=t(95237),f=t(17631),_=t(19248),j=t(46906),g="tip___bHEXo",y=t(37712),Z=["ButtonText","ButtonOptions","uploadProps","showTip","showText","showListening","imgWidth"],b=function(e){var n,t,i,l=e.ButtonText,r=e.ButtonOptions,c=e.uploadProps,d=e.showTip,b=e.showText,S=e.showListening,N=e.imgWidth,w=m()(e,Z),C=(0,h.useState)(null),k=u()(C,2),B=k[0],I=k[1],T=o()(o()({maxCount:1,accept:"image/*",withCredentials:!0,beforeUpload:function(e){if(!("image/jpeg"===e.type||"image/png"===e.type||"image/jpg"===e.type))return v.ZP.error("您上传的不是JPEG/PNG/JPG类型文件"),p.Z.LIST_IGNORE;var n=e.size/1024/1024;return 0==n?(v.ZP.error("".concat(e.name," 图片无法上传。").concat(0==n?"文件内容不能为空":"超过图片大小限制(2MB)")),p.Z.LIST_IGNORE):!(n>2)||(v.ZP.error("".concat(e.name," 图片无法上传。超过图片大小限制(2MB)")),p.Z.LIST_IGNORE)},onChange:function(e){var n;(["uploading","done","removed"].includes(e.file.status)&&I(e.file),"done"==e.file.status)&&(null==w||w.onChange(null===(n=e.file)||void 0===n||null===(n=n.response)||void 0===n?void 0:n.id))},action:"".concat(f.Z.API_SERVER,"/api/attachments.json")},c||{}),{},{onRemove:(t=a()(s()().mark((function e(n){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Y(),(null==c?void 0:c.onRemove)&&(null==c||c.onRemove(n));case 2:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}),Y=function(){I(null),null==w||w.onChange()};return(0,h.useEffect)((function(){(null==w?void 0:w.value)&&I({response:{id:null==w?void 0:w.value}})}),[null==w?void 0:w.value]),(0,y.jsx)("div",{id:(null==w?void 0:w.scrollId)||"",children:null!=B&&null!==(n=B.response)&&void 0!==n&&n.id?(0,y.jsxs)(x.Z,{align:"middle",justify:"center",style:{position:"relative",width:N||400,backgroundColor:"#f4f3f4"},children:[(0,y.jsx)("img",{src:f.Z.API_SERVER+"/api/attachments/"+(null==B||null===(i=B.response)||void 0===i?void 0:i.id),alt:"avatar",style:{width:"100%",height:N?"177px":"auto"}}),(0,y.jsx)("div",{style:{position:"absolute",right:"-6px",top:"-6px",cursor:"pointer",width:16,height:16,borderRadius:"50%",backgroundColor:"#fff"},children:(0,y.jsx)(_.Z,{onClick:a()(s()().mark((function e(){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Y();case 1:case"end":return e.stop()}}),e)}))),style:{fontSize:"16px",color:"red"}})})]}):(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(p.Z,o()(o()({},T),{},{children:(0,y.jsx)(j.op,o()(o()({style:o()({borderRadius:"2px"},null==r?void 0:r.style)},r),{},{children:l}))})),d&&(0,y.jsx)("span",{className:g,children:"(建议上传尺寸为472*266的图片)"}),b&&(0,y.jsx)("span",{className:g,style:{width:"4rem"},children:"(需上传尺寸为200*268的图片,大小不超过2MB)"}),S&&(0,y.jsx)("span",{className:g,style:{width:"4rem"},children:"(限制上传2MB内的图片,建议上传尺寸为283*177的图片)"})]})})}},64791:function(e,n,t){t.r(n),t.d(n,{default:function(){return B}});var i=t(37205),s=t.n(i),l=t(7557),a=t.n(l),r=t(41498),o=t.n(r),c=t(79800),u=t.n(c),d=t(59301),m=t(13032),h=t(6848),v=t(95237),p=t(43604),x=t(58421),f=t(43418),_=t(8591),j={BannerStyle:"BannerStyle___XBzmQ",BannerStyleContent:"BannerStyleContent___TO_Pi",Onerow:"Onerow___JrVhJ",coreSty:"coreSty___QzTzE",paramsStyle:"paramsStyle___O9ZTj",type:"type___mSYrp",typeName:"typeName___Q91zp",type_item_active:"type_item_active___mS0M9",type_item:"type_item___SiCVO",itemBox:"itemBox___sqRkb",itemWrap:"itemWrap___nNJMu",itemTop:"itemTop___ACVhe",itemBottom:"itemBottom___SSXgM",title:"title___ZOk9v",subTitle:"subTitle___FqUXF",contWrap:"contWrap___VJHqV",left:"left___ixU3R",right:"right___YnpMt",actionWrap:"actionWrap___muwRR",actionBtn:"actionBtn___K9ZIC",labSty:"labSty___RNlhx",contSty:"contSty___Jn8PK",linkBtn:"linkBtn___nF2XL"},g=t(20731),y=t(17631),Z=t(46906),b=t(58181),S=t(72226),N=t(61186),w=t.n(N),C=t(78660),k=t(37712),B=(0,m.connect)((function(e){var n=e.user,t=e.loading,i=e.globalSetting,s=e.coreCurriculum;return{user:n,loading:t.effects,globalSetting:i,coreCurriculum:s}}))((function(e){e.coreCurriculum,e.dispatch,e.loading,e.user;var n,t,i,l,r=e.globalSetting,c=(0,d.useState)(!0),m=u()(c,2),N=(m[0],m[1]),B=(0,d.useState)(""),I=u()(B,2),T=I[0],Y=I[1],P=(0,d.useState)([]),R=u()(P,2),M=R[0],E=R[1],O=(0,d.useState)("全部"),W=u()(O,2),L=W[0],H=W[1],z=(0,d.useState)([{id:"-1",name:"全部"},{id:"0",name:"未开始"},{id:"1",name:"进行中"},{id:"2",name:"已结束"}]),F=u()(z,2),V=F[0],q=(F[1],(0,d.useState)("-1")),D=u()(q,2),J=D[0],G=D[1],U=(0,d.useState)([]),X=u()(U,2),A=X[0],Q=X[1],K=(0,d.useState)(!1),$=u()(K,2),ee=$[0],ne=$[1],te=(0,d.useState)({}),ie=u()(te,2),se=ie[0],le=ie[1],ae=(0,d.useState)(!1),re=u()(ae,2),oe=re[0],ce=re[1],ue=(0,d.useState)(1),de=u()(ue,2),me=de[0],he=de[1],ve=(0,d.useState)(0),pe=u()(ve,2),xe=pe[0],fe=pe[1],_e=(0,d.useState)({}),je=u()(_e,2),ge=je[0];je[1];(0,d.useEffect)((function(){ye(),Ze("全部","-1",T,me)}),[]);var ye=function(){var e=o()(a()().mark((function e(n,t){var i;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N(!0),e.next=3,(0,b.ZP)("/api/listening_activities/core_subject_tag.json",{method:"get",params:{message:n,status:t}});case 3:0==(null==(i=e.sent)?void 0:i.status)&&E(null==i?void 0:i.data),N(!1);case 6:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),Ze=function(){var e=o()(a()().mark((function e(n,t,i,s){var l,r,o;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N(!0),e.next=3,(0,b.ZP)("/api/listening_activities.json",{method:"get",params:{keyword:i||T,history:!0,page:"全部"==n?void 0:s||me,core_subject:encodeURIComponent(n),status:"-1"==t?void 0:t}});case 3:0===(l=e.sent).status&&(Q(null==l||null===(r=l.data)||void 0===r?void 0:r.list),fe(null==l||null===(o=l.data)||void 0===o?void 0:o.size)),N(!1);case 6:case"end":return e.stop()}}),e)})));return function(n,t,i,s){return e.apply(this,arguments)}}();return(0,k.jsxs)("section",{children:[(0,k.jsx)("div",{className:j.BannerStyle,style:{backgroundImage:"url(".concat(y.Z.IMG_SERVER,"/").concat(null==r||null===(n=r.setting)||void 0===n?void 0:n.news_banner_url,")")},children:(0,k.jsxs)("div",{className:j.BannerStyleContent,children:[(0,k.jsx)("div",{style:{color:"#fff",fontSize:".34rem",letterSpacing:".05rem",fontWeight:600},children:"历史听课活动"}),(0,k.jsx)("div",{children:(0,k.jsx)(Z.t7,{placeholder:"请输入关键字进行搜索",className:j.CustomInputStyle,value:T,onChange:function(e){Y(e),Ze(L,J,e)}})})]})}),(0,k.jsxs)("div",{className:j.coreSty,children:[(0,k.jsxs)("div",{className:j.paramsStyle,children:[(0,k.jsxs)("div",{className:j.type,style:{borderBottom:"1px dashed #37AD83"},children:[(0,k.jsx)("div",{className:j.typeName,children:"核心课程"}),(0,k.jsx)("div",{style:{display:"flex",flexWrap:"wrap",flex:1},children:null===(t=["全部"].concat(s()(M)))||void 0===t?void 0:t.map((function(e,n){return(0,k.jsx)("div",{className:L===e?j.type_item_active:j.type_item,onClick:function(){H(e),Ze(e,J)},children:e},n)}))})]}),(0,k.jsxs)("div",{className:j.type,children:[(0,k.jsx)("div",{className:j.typeName,children:"状态"}),(0,k.jsx)("div",{style:{display:"flex",flexWrap:"wrap",flex:1},children:null==V?void 0:V.map((function(e,n){return(0,k.jsx)("div",{className:J==(null==e?void 0:e.id)?j.type_item_active:j.type_item,onClick:function(){G(null==e?void 0:e.id),Ze(L,null==e?void 0:e.id)},children:null==e?void 0:e.name},n)}))})]})]}),(0,k.jsx)("div",{className:j.itemBox,children:null!=A&&A.length?null==A?void 0:A.map((function(e,n){var t;return(0,k.jsxs)("div",{className:j.itemWrap,children:[(0,k.jsx)("div",{className:j.itemTop,children:(0,k.jsx)("img",{src:null==e||null===(t=e.cover)||void 0===t?void 0:t.url})}),(0,k.jsxs)("div",{className:j.itemBottom,onClick:function(){le(e),ne(!0)},children:[(0,k.jsx)(h.Z,{title:null==e?void 0:e.name,children:(0,k.jsx)("div",{className:j.title,children:null==e?void 0:e.name})}),(0,k.jsx)(h.Z,{title:null==e?void 0:e.school_name,children:(0,k.jsx)("div",{className:j.subTitle,children:null==e?void 0:e.school_name})})]})]},null==e?void 0:e.id)})):(0,k.jsx)(S.Z,{})}),!!xe&&(0,k.jsxs)(v.Z,{wrap:!1,align:"middle",justify:"space-between",style:{width:"12rem",margin:".2rem auto 0.3rem"},children:[(0,k.jsxs)(p.Z,{children:["共 ",(0,k.jsx)("span",{style:{color:"#1B8565"},children:xe||0})," 条数据"]}),(0,k.jsx)(p.Z,{children:(0,k.jsx)(x.Z,{showSizeChanger:!1,showQuickJumper:!1,current:me,pageSize:10,onChange:function(e,n){he(e)},total:xe||0})})]})]}),(0,k.jsx)(C.Z,{visible:oe,isEdit:!0,item:se,handleCancel:function(){return ce(!1)},onOk:function(){Ze(L,J,T,me)}}),(0,k.jsx)(f.Z,{title:"听课活动详情",visible:ee,centered:!0,onCancel:function(){ne(!1)},width:1e3,maskClosable:!1,footer:null,children:(0,k.jsxs)("div",{className:j.contWrap,children:[(0,k.jsx)("div",{className:j.left,children:(0,k.jsx)("img",{src:null==se||null===(i=se.cover)||void 0===i?void 0:i.url})}),(0,k.jsxs)("div",{className:j.right,children:[(null==ge?void 0:ge.edit_image)&&(0,k.jsxs)("div",{className:j.actionWrap,children:[(0,k.jsx)(h.Z,{title:"编辑",children:(0,k.jsx)("i",{className:"iconfont icon-bianji-moren current ".concat(j.actionBtn),onClick:function(){ce(!0),ne(!1)}})}),(0,k.jsx)(h.Z,{title:"删除",children:(0,k.jsx)("i",{className:"iconfont icon-shanchutimu ml20 current ".concat(j.actionBtn),onClick:function(){var e;f.Z.confirm({title:"删除课堂听课",content:"确认要删除课堂听课吗?",okText:"确认",icon:null,centered:!0,cancelText:"取消",onOk:(e=o()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,b.ZP)("/api/listening_activities/".concat(null==se?void 0:se.id,".json"),{method:"delete"});case 2:0===e.sent.status&&(_.ZP.success("删除成功!"),ne(!1),Ze());case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})}})})]}),(0,k.jsxs)(v.Z,{className:"mb20",children:[(0,k.jsx)(p.Z,{className:j.labSty,children:"活动名称"}),(0,k.jsx)(p.Z,{className:j.contSty,children:null==se?void 0:se.name})]}),(0,k.jsxs)(v.Z,{className:"mb20",children:[(0,k.jsx)(p.Z,{className:j.labSty,children:"核心课程"}),(0,k.jsx)(p.Z,{className:j.contSty,children:null==se?void 0:se.core_subject})]}),(0,k.jsxs)(v.Z,{className:"mb20",children:[(0,k.jsx)(p.Z,{className:j.labSty,children:"主讲教师"}),(0,k.jsx)(p.Z,{className:j.contSty,children:null==se?void 0:se.teacher_name})]}),(0,k.jsxs)(v.Z,{className:"mb20",children:[(0,k.jsx)(p.Z,{className:j.labSty,children:"所属院校"}),(0,k.jsx)(p.Z,{className:j.contSty,children:null==se?void 0:se.school_name})]}),(0,k.jsxs)(v.Z,{className:"mb20",children:[(0,k.jsx)(p.Z,{className:j.labSty,children:"日期"}),(0,k.jsx)(p.Z,{children:null==se||null===(l=se.times)||void 0===l?void 0:l.map((function(e,n){var t,i;return(0,k.jsxs)(v.Z,{className:j.contSty,children:[null===(t=w()(null==e?void 0:e.start_time))||void 0===t?void 0:t.format("YYYY-MM-DD HH:mm")," ~ ",null===(i=w()(null==e?void 0:e.end_time))||void 0===i?void 0:i.format("YYYY-MM-DD HH:mm")]},n)}))})]}),(0,k.jsxs)(v.Z,{className:"mb20",children:[(0,k.jsx)(p.Z,{className:j.labSty,children:"地点"}),(0,k.jsx)(p.Z,{className:j.contSty,children:null==se?void 0:se.address})]}),(0,k.jsxs)(v.Z,{className:"mb20",children:[(0,k.jsx)(p.Z,{className:j.labSty,children:"链接"}),(0,k.jsx)(p.Z,{className:j.contSty,style:{cursor:"pointer"},children:null==se?void 0:se.link})]}),(0,k.jsx)("div",{className:j.linkBtn,onClick:function(){(0,g.xg)(null==se?void 0:se.link)},children:"前往链接"})]})]})})]})}))},78660:function(e,n,t){t.d(n,{Z:function(){return M}});var i=t(7557),s=t.n(i),l=t(41498),a=t.n(l),r=t(85573),o=t.n(r),c=t(82242),u=t.n(c),d=t(79800),m=t.n(d),h=t(59301),v=t(78241),p=t(8591),x=t(43418),f=t(10249),_=t(88522),j=t(95237),g=t(43604),y=t(5083),Z=t(6848),b=t(13032),S=t(58181),N="formSty___e1WFc",w="actionWrapper___Cr7h9",C="addIcon___Vdgtz",k="deleteIcon___I7ilg",B=t(3196),I=t(32134),T=t(12893),Y=t(61186),P=t.n(Y),R=t(37712),M=(0,b.connect)((function(e){return{dispatch:e.dispatch,coreCurriculum:e.coreCurriculum}}))((function(e){var n=e.visible,t=(e.bookList,e.onOk),i=e.handleCancel,l=e.isEdit,r=void 0!==l&&l,c=e.item,d=void 0===c?{}:c,b=(e.dispatch,v.Z.useForm()),Y=m()(b,1)[0],M=(0,h.useState)(!1),E=m()(M,2),O=E[0],W=E[1],L=(0,h.useState)(),H=m()(L,2),z=H[0],F=H[1];(0,h.useEffect)((function(){var e;n&&(V(),r&&Y.setFieldsValue(u()(u()({},d),{},{times:null==d||null===(e=d.times)||void 0===e?void 0:e.map((function(e,n){return o()({},n,[P()(null==e?void 0:e.start_time),P()(null==e?void 0:e.end_time)])}))})))}),[n,r]);var V=function(){var e=a()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,S.ZP)("/api/listening_activities/core_subject_tag.json",{method:"get"});case 2:0===(null==(n=e.sent)?void 0:n.status)&&F(null==n?void 0:n.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=function(){var e=a()(s()().mark((function e(n){var l,a,o;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(W(!0),a=null==n||null===(l=n.times)||void 0===l?void 0:l.map((function(e,n){var t=m()(e[n],2),i=t[0],s=t[1];return{start_time:P()(i).format("YYYY-MM-DD HH:mm"),end_time:P()(s).format("YYYY-MM-DD HH:mm")}})),!r){e.next=8;break}return e.next=5,(0,S.ZP)("/api/listening_activities/".concat(null==d?void 0:d.id,".json"),{method:"put",body:u()(u()({},n),{},{times:a})});case 5:e.t0=e.sent,e.next=11;break;case 8:return e.next=10,(0,S.ZP)("/api/listening_activities.json",{method:"post",body:u()(u()({},n),{},{times:a})});case 10:e.t0=e.sent;case 11:0===(null==(o=e.t0)?void 0:o.status)&&(p.ZP.success("保存成功!"),i(),t()),W(!1);case 14:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,R.jsx)(x.Z,{title:r?"编辑听课活动":"新建听课活动",visible:n,onOk:function(){Y.submit()},centered:!0,onCancel:i,confirmLoading:O,width:690,afterClose:function(){W(!1),Y.resetFields()},okText:"确认",cancelText:"取消",maskClosable:!1,children:(0,R.jsxs)(v.Z,{form:Y,colon:!1,onFinish:q,className:N,scrollToFirstError:!0,size:"large",initialValues:{times:[{0:""},{1:""}]},children:[(0,R.jsx)(v.Z.Item,{label:"活动名称",name:"name",rules:[{required:!0,message:"请输入名称"}],children:(0,R.jsx)(f.Z,{maxLength:40,showCount:!0,placeholder:"请输入名称"})}),(0,R.jsx)(v.Z.Item,{label:"核心课程",name:"core_subject",rules:[{required:!0,message:"请选择核心课程"}],children:(0,R.jsx)(_.Z,{placeholder:"请选择核心课程",options:null==z?void 0:z.map((function(e){return{value:e,label:e}})),filterOption:function(e,n){var t;return-1!==(null==n||null===(t=n.label)||void 0===t||null===(t=t.toUpperCase())||void 0===t?void 0:t.indexOf(null==e?void 0:e.toUpperCase()))},onSearch:function(e){e.length>40&&Y.setFieldValue("core_subject",e.substring(0,40))},onBlur:function(){V()}})}),(0,R.jsx)(v.Z.Item,{label:"主讲教师",name:"teacher_name",rules:[{required:!0,message:"请输入主讲教师名称"}],children:(0,R.jsx)(f.Z,{maxLength:20,showCount:!0,placeholder:"请输入主讲教师名称"})}),(0,R.jsx)(v.Z.Item,{label:"所属院校",name:"school_name",rules:[{required:!0,message:"请输入所属院校名称"}],children:(0,R.jsx)(f.Z,{maxLength:50,showCount:!0,placeholder:"请输入所属院校名称"})}),(0,R.jsx)(v.Z.List,{name:"times",children:function(e,n){var t=n.add,i=n.remove;return(0,R.jsx)(R.Fragment,{children:e.map((function(e,n){return(0,R.jsxs)(j.Z,{wrap:!1,children:[(0,R.jsx)(g.Z,{style:{marginLeft:0==n?"0px":"80px"},children:(0,R.jsx)(v.Z.Item,u()(u()({},e),{},{label:0===n?"日期时间":"",name:[e.name,n],rules:[{required:!0,message:"请选择日期时间"}],children:(0,R.jsx)(y.default.RangePicker,{style:{width:"460px"},placeholder:["请选择开始时间","请选择结束时间"],showTime:{format:"HH:mm"},format:"YYYY-MM-DD HH:mm"})}))}),(0,R.jsxs)(g.Z,{className:w,children:[(0,R.jsx)(Z.Z,{title:"新增日期时间",children:(0,R.jsx)(I.Z,{className:C,onClick:function(){t()},style:{visibility:n<6?"visible":"hidden"}})}),(0,R.jsx)(Z.Z,{title:"删除",children:(0,R.jsx)(T.Z,{className:k,onClick:function(){i(e.name)},style:{visibility:n>=1?"visible":"hidden"}})})]})]})}))})}}),(0,R.jsx)(v.Z.Item,{label:"地点",name:"address",rules:[{required:!0,message:"请输入地点"}],children:(0,R.jsx)(f.Z,{maxLength:50,showCount:!0,placeholder:"请输入地点"})}),(0,R.jsx)(v.Z.Item,{label:"链接",name:"link",rules:[{required:!0,message:"请输入报名链接"}],children:(0,R.jsx)(f.Z,{maxLength:50,showCount:!0,placeholder:"请输入报名链接"})}),(0,R.jsx)(v.Z.Item,{label:"封面图片",name:"cover_id",rules:[{required:!0,message:"请输入报名链接"}],children:(0,R.jsx)(B.Z,{ButtonText:"上传图片"})})]})})}))}}]); \ No newline at end of file diff --git a/p__History__index.chunk.css b/p__History__index.chunk.css index ca276b1230..751dfabbf5 100644 --- a/p__History__index.chunk.css +++ b/p__History__index.chunk.css @@ -1 +1 @@ -.BannerStyle___XBzmQ{align-items:center;background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;height:1.8rem;justify-content:center;width:100%}.BannerStyleContent___TO_Pi{align-items:center;display:flex;height:100%;justify-content:space-between;width:12rem}.Onerow___JrVhJ{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.coreSty___QzTzE{margin:0 auto;padding-bottom:20px;width:1200px}.coreSty___QzTzE .paramsStyle___O9ZTj{background:linear-gradient(180deg,#f7f8fd,#f7f8fc);border:1px solid #fff;border-radius:4px;box-shadow:0 2px 4px 0 #f0f1f2;margin-bottom:.3rem;margin-top:20px}.coreSty___QzTzE .paramsStyle___O9ZTj .type___mSYrp{color:#9096a3;display:flex;font-family:PingFangSC-Regular,PingFang SC;font-size:14px;font-weight:400;margin:20px 20px 0}.coreSty___QzTzE .paramsStyle___O9ZTj .type___mSYrp .typeName___Q91zp{color:#9096a3;font-family:PingFangSC,PingFang SC;font-size:14px;font-style:normal;font-weight:400;height:32px;line-height:32px;margin-right:20px;text-align:left}.coreSty___QzTzE .paramsStyle___O9ZTj .type___mSYrp .type_item_active___mS0M9{background:#37ad83;border-radius:4px;box-shadow:0 5px 10px 0 rgba(223,227,246,.5);color:#fff;cursor:pointer;font-family:PingFangSC,PingFang SC;font-size:14px;font-style:normal;font-weight:400;height:32px;line-height:32px;margin-bottom:20px;margin-right:20px;padding:0 15px;text-align:left}.coreSty___QzTzE .paramsStyle___O9ZTj .type___mSYrp .type_item___SiCVO:hover{color:#37ad83}.coreSty___QzTzE .paramsStyle___O9ZTj .type___mSYrp .type_item___SiCVO{background:#fff;border-radius:4px;box-shadow:0 5px 10px 0 rgba(223,227,246,.5);color:#9096a3;cursor:pointer;font-family:PingFangSC,PingFang SC;font-size:14px;font-style:normal;font-weight:400;height:32px;line-height:32px;margin-bottom:20px;margin-right:20px;padding:0 15px;text-align:left}.coreSty___QzTzE .itemBox___sqRkb{column-gap:25px;display:flex;flex-wrap:wrap;row-gap:30px}.coreSty___QzTzE .itemBox___sqRkb .itemWrap___nNJMu{background:#fff;border-radius:12px;box-shadow:0 2px 4px 0 #d6dae1;cursor:pointer;height:416px;width:220px}.coreSty___QzTzE .itemBox___sqRkb .itemWrap___nNJMu .itemTop___ACVhe{border-top-left-radius:12px;border-top-right-radius:12px;height:330px;width:220px}.coreSty___QzTzE .itemBox___sqRkb .itemWrap___nNJMu .itemTop___ACVhe img{border-top-left-radius:12px;border-top-right-radius:12px;height:100%;width:100%}.coreSty___QzTzE .itemBox___sqRkb .itemWrap___nNJMu .itemBottom___SSXgM .title___ZOk9v{color:#232b40;font-size:16px;font-weight:600;overflow:hidden;padding:16px 10px 0;text-overflow:ellipsis;white-space:nowrap;width:220px;word-break:break-all}.coreSty___QzTzE .itemBox___sqRkb .itemWrap___nNJMu .itemBottom___SSXgM .subTitle___FqUXF{color:#666;font-size:14px;overflow:hidden;padding:0 10px;text-overflow:ellipsis;white-space:nowrap;width:220px;word-break:break-all}.contWrap___VJHqV{align-items:center;display:flex;padding-bottom:10px}.contWrap___VJHqV .left___ixU3R{border-radius:4px;height:541px;width:361px}.contWrap___VJHqV .left___ixU3R img{border-radius:4px;height:100%;width:100%}.contWrap___VJHqV .right___YnpMt{background:#f6f7f9;border-radius:4px;height:537px;margin-left:20px;padding:32px 20px 20px;position:relative;width:569px}.contWrap___VJHqV .right___YnpMt .actionWrap___muwRR{position:absolute;right:20px;top:12px}.contWrap___VJHqV .right___YnpMt .actionWrap___muwRR .actionBtn___K9ZIC{color:#8fb0a6}.contWrap___VJHqV .right___YnpMt .actionWrap___muwRR .actionBtn___K9ZIC:hover{color:#1b8565}.contWrap___VJHqV .right___YnpMt .labSty___RNlhx{color:#5f6368;font-family:PingFangSC,PingFang SC;font-size:14px;font-weight:400;margin-right:12px;text-align:right;width:60px}.contWrap___VJHqV .right___YnpMt .contSty___Jn8PK{color:#232b40;flex:1 1;font-family:PingFangSC,PingFang SC;font-size:14px;font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.contWrap___VJHqV .right___YnpMt .linkBtn___nF2XL{background:linear-gradient(90deg,#49b04d,#3f7cb2),#3f9372;border-radius:2px;color:#fff;margin-left:30px}.formSty___e1WFc{max-height:560px;overflow-y:auto;padding-right:5px}.formSty___e1WFc [class~=ant-form-item]{margin-bottom:20px}.formSty___e1WFc label{color:#5f6368;font-size:14px}.formSty___e1WFc div[class~=ant-form-item-label]{text-align:right;width:80px}.formSty___e1WFc .actionWrapper___Cr7h9{align-items:center;display:flex;justify-content:flex-end;margin:-20px 0 0 20px}.formSty___e1WFc .actionWrapper___Cr7h9 .addIcon___Vdgtz{color:#00b187;font-size:20px;margin-left:10px}.formSty___e1WFc .actionWrapper___Cr7h9 .deleteIcon___I7ilg{color:#e30000;font-size:20px;margin-left:20px}.tip___bHEXo{color:#9096a3;font-family:PingFangSC,PingFang SC;font-size:.14rem;font-style:normal;font-weight:400;height:.2rem;left:1.15rem;line-height:.2rem;position:absolute;text-align:left;top:.1rem;width:2.25rem} \ No newline at end of file +.BannerStyle___XBzmQ{align-items:center;background-position:50%;background-repeat:no-repeat;background-size:cover;display:flex;height:1.8rem;justify-content:center;width:100%}.BannerStyleContent___TO_Pi{align-items:center;display:flex;height:100%;justify-content:space-between;width:12rem}.Onerow___JrVhJ{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.coreSty___QzTzE{margin:0 auto;padding-bottom:20px;width:1200px}.coreSty___QzTzE .paramsStyle___O9ZTj{background:linear-gradient(180deg,#f7f8fd,#f7f8fc);border:1px solid #fff;border-radius:4px;box-shadow:0 2px 4px 0 #f0f1f2;margin-bottom:.3rem;margin-top:20px}.coreSty___QzTzE .paramsStyle___O9ZTj .type___mSYrp{color:#9096a3;display:flex;font-family:PingFangSC-Regular,PingFang SC;font-size:14px;font-weight:400;margin:20px 20px 0}.coreSty___QzTzE .paramsStyle___O9ZTj .type___mSYrp .typeName___Q91zp{color:#9096a3;font-family:PingFangSC,PingFang SC;font-size:14px;font-style:normal;font-weight:400;height:32px;line-height:32px;margin-right:20px;text-align:left}.coreSty___QzTzE .paramsStyle___O9ZTj .type___mSYrp .type_item_active___mS0M9{background:#37ad83;border-radius:4px;box-shadow:0 5px 10px 0 rgba(223,227,246,.5);color:#fff;cursor:pointer;font-family:PingFangSC,PingFang SC;font-size:14px;font-style:normal;font-weight:400;height:32px;line-height:32px;margin-bottom:20px;margin-right:20px;padding:0 15px;text-align:left}.coreSty___QzTzE .paramsStyle___O9ZTj .type___mSYrp .type_item___SiCVO:hover{color:#37ad83}.coreSty___QzTzE .paramsStyle___O9ZTj .type___mSYrp .type_item___SiCVO{background:#fff;border-radius:4px;box-shadow:0 5px 10px 0 rgba(223,227,246,.5);color:#9096a3;cursor:pointer;font-family:PingFangSC,PingFang SC;font-size:14px;font-style:normal;font-weight:400;height:32px;line-height:32px;margin-bottom:20px;margin-right:20px;padding:0 15px;text-align:left}.coreSty___QzTzE .itemBox___sqRkb{column-gap:25px;display:flex;flex-wrap:wrap;height:450px;row-gap:30px}.coreSty___QzTzE .itemBox___sqRkb overflow:hidden .itemWrap___nNJMu{background:#fff;border-radius:12px;box-shadow:0 2px 4px 0 #d6dae1;cursor:pointer;height:416px;width:220px}.coreSty___QzTzE .itemBox___sqRkb overflow:hidden .itemWrap___nNJMu .itemTop___ACVhe{border-top-left-radius:12px;border-top-right-radius:12px;height:330px;width:220px}.coreSty___QzTzE .itemBox___sqRkb overflow:hidden .itemWrap___nNJMu .itemTop___ACVhe img{border-top-left-radius:12px;border-top-right-radius:12px;height:100%;width:100%}.coreSty___QzTzE .itemBox___sqRkb overflow:hidden .itemWrap___nNJMu .itemBottom___SSXgM .title___ZOk9v{color:#232b40;font-size:16px;font-weight:600;overflow:hidden;padding:16px 10px 0;text-overflow:ellipsis;white-space:nowrap;width:220px;word-break:break-all}.coreSty___QzTzE .itemBox___sqRkb overflow:hidden .itemWrap___nNJMu .itemBottom___SSXgM .subTitle___FqUXF{color:#666;font-size:14px;overflow:hidden;padding:0 10px;text-overflow:ellipsis;white-space:nowrap;width:220px;word-break:break-all}.contWrap___VJHqV{align-items:center;display:flex;padding-bottom:10px}.contWrap___VJHqV .left___ixU3R{border-radius:4px;height:541px;width:361px}.contWrap___VJHqV .left___ixU3R img{border-radius:4px;height:100%;width:100%}.contWrap___VJHqV .right___YnpMt{background:#f6f7f9;border-radius:4px;height:537px;margin-left:20px;padding:32px 20px 20px;position:relative;width:569px}.contWrap___VJHqV .right___YnpMt .actionWrap___muwRR{position:absolute;right:20px;top:12px}.contWrap___VJHqV .right___YnpMt .actionWrap___muwRR .actionBtn___K9ZIC{color:#8fb0a6}.contWrap___VJHqV .right___YnpMt .actionWrap___muwRR .actionBtn___K9ZIC:hover{color:#1b8565}.contWrap___VJHqV .right___YnpMt .labSty___RNlhx{color:#5f6368;font-family:PingFangSC,PingFang SC;font-size:14px;font-weight:400;margin-right:12px;text-align:right;width:60px}.contWrap___VJHqV .right___YnpMt .contSty___Jn8PK{color:#232b40;flex:1 1;font-family:PingFangSC,PingFang SC;font-size:14px;font-weight:400;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;word-break:break-all}.contWrap___VJHqV .right___YnpMt .linkBtn___nF2XL{background:linear-gradient(90deg,#49b04d,#3f7cb2),#3f9372;border-radius:2px;color:#fff;cursor:pointer;margin-left:30px;padding:4px 15px;width:-webkit-max-content;width:-moz-max-content;width:max-content}.formSty___e1WFc{max-height:560px;overflow-y:auto;padding-right:5px}.formSty___e1WFc [class~=ant-form-item]{margin-bottom:20px}.formSty___e1WFc label{color:#5f6368;font-size:14px}.formSty___e1WFc div[class~=ant-form-item-label]{text-align:right;width:80px}.formSty___e1WFc .actionWrapper___Cr7h9{align-items:center;display:flex;justify-content:flex-end;margin:-20px 0 0 20px}.formSty___e1WFc .actionWrapper___Cr7h9 .addIcon___Vdgtz{color:#00b187;font-size:20px;margin-left:10px}.formSty___e1WFc .actionWrapper___Cr7h9 .deleteIcon___I7ilg{color:#e30000;font-size:20px;margin-left:20px}.tip___bHEXo{color:#9096a3;font-family:PingFangSC,PingFang SC;font-size:.14rem;font-style:normal;font-weight:400;height:.2rem;left:1.15rem;line-height:.2rem;position:absolute;text-align:left;top:.1rem;width:2.25rem} \ No newline at end of file diff --git a/p__Listening__Index__index.async.js b/p__Listening__Index__index.async.js index 3d4f4c7edf..ae1d54b3d8 100644 --- a/p__Listening__Index__index.async.js +++ b/p__Listening__Index__index.async.js @@ -1 +1 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[32975,46906,69142,52772],{12893:function(e,n,t){t.d(n,{Z:function(){return l}});var i=t(72308),a=t(59301),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"minus-circle",theme:"outlined"},c=t(7657),r=function(e,n){return a.createElement(c.Z,(0,i.Z)({},e,{ref:n,icon:s}))};var l=a.forwardRef(r)},32134:function(e,n,t){t.d(n,{Z:function(){return l}});var i=t(72308),a=t(59301),s={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M696 480H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"plus-circle",theme:"outlined"},c=t(7657),r=function(e,n){return a.createElement(c.Z,(0,i.Z)({},e,{ref:n,icon:s}))};var l=a.forwardRef(r)},31718: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;i2)||(f.ZP.error("".concat(e.name," 图片无法上传。超过图片大小限制(2MB)")),x.Z.LIST_IGNORE)},onChange:function(e){var n;(["uploading","done","removed"].includes(e.file.status)&&I(e.file),"done"==e.file.status)&&(null==b||b.onChange(null===(n=e.file)||void 0===n||null===(n=n.response)||void 0===n?void 0:n.id))},action:"".concat(h.Z.API_SERVER,"/api/attachments.json")},o||{}),{},{onRemove:(t=c()(a()().mark((function e(n){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:E(),(null==o?void 0:o.onRemove)&&(null==o||o.onRemove(n));case 2:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}),E=function(){I(null),null==b||b.onChange()};return(0,p.useEffect)((function(){(null==b?void 0:b.value)&&I({response:{id:null==b?void 0:b.value}})}),[null==b?void 0:b.value]),(0,k.jsx)("div",{id:(null==b?void 0:b.scrollId)||"",children:null!=D&&null!==(n=D.response)&&void 0!==n&&n.id?(0,k.jsxs)(g.Z,{align:"middle",justify:"center",style:{position:"relative",width:N||400,backgroundColor:"#f4f3f4"},children:[(0,k.jsx)("img",{src:h.Z.API_SERVER+"/api/attachments/"+(null==D||null===(i=D.response)||void 0===i?void 0:i.id),alt:"avatar",style:{width:"100%",height:N?"177px":"auto"}}),(0,k.jsx)("div",{style:{position:"absolute",right:"-6px",top:"-6px",cursor:"pointer",width:16,height:16,borderRadius:"50%",backgroundColor:"#fff"},children:(0,k.jsx)(A.Z,{onClick:c()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:E();case 1:case"end":return e.stop()}}),e)}))),style:{fontSize:"16px",color:"red"}})})]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(x.Z,l()(l()({},Z),{},{children:(0,k.jsx)(v.op,l()(l()({style:l()({borderRadius:"2px"},null==r?void 0:r.style)},r),{},{children:s}))})),d&&(0,k.jsx)("span",{className:j,children:"(建议上传尺寸为472*266的图片)"}),S&&(0,k.jsx)("span",{className:j,style:{width:"4rem"},children:"(需上传尺寸为200*268的图片,大小不超过2MB)"}),w&&(0,k.jsx)("span",{className:j,style:{width:"4rem"},children:"(限制上传2MB内的图片,建议上传尺寸为283*177的图片)"})]})})}},68738:function(e,n,t){var i=t(7557),a=t.n(i),s=t(41498),c=t.n(s),r=t(79800),l=t.n(r),o=t(59301),u=t(13032),d=t(43418),m=t(8591),p=t(58181),f=t(96193),x=t(37712);n.Z=(0,u.connect)((function(e){return{user:e.user,classroomList:e.classroomList}}))((function(e){e.user;var n,t=e.dispatch,i=e.classroomList,s=e.getData,r=(0,o.useState)(!1),u=l()(r,2),g=u[0],h=u[1],A=(0,o.useState)(""),v=l()(A,2),j=v[0],k=v[1],y=function(){t({type:"classroomList/setActionTabs",payload:{}})},S={"教材规划":"core_material_description","主审专家":"judge","教材推荐":"textbook","师资培训":"core_teacher","课堂听课":"listening","教学论文":"paper"};return(0,x.jsx)(d.Z,{title:"规划说明",width:900,destroyOnClose:!0,maskClosable:!1,keyboard:!1,confirmLoading:g,open:"规划说明"===i.actionTabs.key,onCancel:y,onOk:c()(a()().mark((function e(){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(!0),e.next=3,(0,p.ZP)("/api/core_materials/set_description.json",{method:"post",body:{name:S[i.actionTabs.params.name],content:j}});case 3:0==(null==(n=e.sent)?void 0:n.status)&&(m.ZP.success("保存成功"),y(),s()),h(!1);case 6:case"end":return e.stop()}}),e)}))),children:(0,x.jsx)(f.Z,{defaultvalue:null===(n=i.actionTabs.params)||void 0===n?void 0:n.content,onChange:function(e){k(e)}})})}))},21248:function(e,n,t){t.d(n,{Z:function(){return y}});var i=t(82242),a=t.n(i),s=t(7557),c=t.n(s),r=t(41498),l=t.n(r),o=t(79800),u=t.n(o),d=t(59301),m={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},p=t(3113),f=t(70557),x=t(72355),g=t(6848),h=t(20731),A=t(39996),v=t(72226),j=t(17631),k=t(37712),y=function(e){var n,t,i,s,r,o,y,S=e.editOffice,w=void 0===S?"view":S,N=e.data,b=(e.theme,e.type),B=e.filename,C=e.monacoEditor,D=e.className,I=e.style,Z=e.close,E=e.onClose,H=e.hasMask,F=e.disabledDownload,R=e.onImgDimensions,O=e.showNodata,J=(0,d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),P=u()(J,2),Q=(P[0],P[1],(0,d.useState)("")),M=u()(Q,2),G=(M[0],M[1]),L=(0,d.useState)(),z=u()(L,2),U=z[0],Y=z[1],V="build"===window.ENV?"/react/build":"",K=location.host.startsWith("localhost")?j.Z.PROXY_SERVER:j.Z.API_SERVER,W=(0,d.useRef)();null!==(n=N)&&void 0!==n&&n.startsWith("/api")&&"txt"!==b&&(N=j.Z.API_SERVER+N),B&&(C.filename=B),(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]&&G(n[1])}))}),[]),(0,d.useEffect)((function(){"office"===b&&T()}),[b,N]);var T=function(){var e=l()(c()().mark((function e(){var n,t,i;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=N,N.startsWith("http")||(n=location.origin+n),t=new URL(n).pathname.split("/").pop(),e.next=5,(0,A.gJ)({attachment_id:t});case 5:i=e.sent,Y(i);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=function(){X()},X=function(){(0,h.Nd)(B||"educoder",decodeURIComponent(N))};return(0,k.jsxs)("div",{style:a()({},I||{}),className:"".concat(H&&m.bgBlack," ").concat(b?m.wrp:"hide"),children:[Z&&(0,k.jsxs)("div",{className:m.close,ref:W,children:[!!R&&(0,k.jsx)(g.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return W.current},children:(0,k.jsx)("span",{onClick:function(){E(),R()},children:(0,k.jsx)("i",{className:"icon-yulanpizhu"})})}),!F&&(0,k.jsx)(g.Z,{title:"点击下载此文件",getPopupContainer:function(){return W.current},children:(0,k.jsx)("span",{onClick:X,children:(0,k.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,k.jsx)(g.Z,{title:"关闭",getPopupContainer:function(){return W.current},children:(0,k.jsx)("span",{className:"",onClick:E,children:(0,k.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,k.jsx)("div",{className:"".concat(m[D]," ").concat(D," ").concat(m.monaco," ").concat("txt"===b?"show":"hide"),children:"txt"===b&&(0,k.jsx)(x.ZP,a()({},C))}),"audio"===b&&(0,k.jsx)("audio",{src:(null===(t=N)||void 0===t?void 0:t.indexOf("http"))>-1||null!==(i=N)&&void 0!==i&&i.startsWith("/api")?N:"data:image/png;base64,".concat(N),autoPlay:!0}),"video"===b&&(0,k.jsx)(k.Fragment,{children:(null===(s=N)||void 0===s?void 0:s.indexOf("http"))>-1||null!==(r=N)&&void 0!==r&&r.startsWith("/api")?(0,k.jsx)("video",{controls:!0,src:"".concat(N),autoPlay:!0}):(0,k.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(N),autoPlay:!0})}),"office"===b&&U&&(0,k.jsx)("iframe",{src:"".concat(V,"/office.html?key=").concat(U.key,"&url=").concat(K+U.url,"&callbackUrl=").concat(K+U.callbackUrl,"&fileType=").concat(U.fileType,"&title=").concat(U.title,"&model=").concat(w,"&officeServer=").concat(j.Z.ONLYOFFICE,"&disabledDownload=").concat(!!F)}),"html"===b&&(0,k.jsx)("iframe",{src:N+"&disposition=inline"}),"pdf"===b&&(0,k.jsx)("iframe",{src:"".concat(V,"/js/pdfview/index.html?url=").concat(N,"&disabledDownload=").concat(!!F)}),"image"===b&&(0,k.jsx)("img",{src:(null===(o=N)||void 0===o?void 0:o.indexOf("http"))>-1||null!==(y=N)&&void 0!==y&&y.startsWith("/api")?N:"data:image/png;base64,".concat(N)}),("other"===b||"download"===b)&&(0,k.jsx)(k.Fragment,{children:O?(0,k.jsx)(v.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,k.jsx)(p.ZP,{icon:(0,k.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:q,children:"下载"})}):(0,k.jsxs)(p.ZP,{type:"primary",size:"middle",onClick:q,children:[(0,k.jsx)(f.Z,{}),"点击下载"]})})]})}},69142:function(e,n,t){t.d(n,{Z:function(){return z}});var i=t(82242),a=t.n(i),s=t(37205),c=t.n(s),r=t(91232),l=t.n(r),o=t(79800),u=t.n(o),d=t(59301),m=(t(50304),t(32834)),p=t.n(m),f=t(11690);var x=[],g=["