From 4d2b57ba526ddb08c8b8fd20bd886b5f7b9126ee Mon Sep 17 00:00:00 2001 From: eduauto Date: Wed, 26 Mar 2025 09:22:40 +0800 Subject: [PATCH] autoUpdataFile --- p__BookPlan__Index__index.async.js | 2 +- p__History__index.async.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/p__BookPlan__Index__index.async.js b/p__BookPlan__Index__index.async.js index 0427b88c55..7ca10615ce 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 ie}});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",P="contentList___Jimzg",I="list___fftB_",F="imgContent___mNKhf",E="pictrue___vHnb9",L="updateContent___kXbLn",V="iconUpdate___o2EFl",O="deleteContent___uPwYK",B="iconDetele___z9pM6",M="item_title___bHJvx",R="publisher___j3UtF",T="main_con___igQSJ",U=t(72226),z=t(17631),D=t(58181),q=t(78241),A=t(88522),Y=t(10249),H=t(5083),J=t(54580),G=t(61186),K=t.n(G),W={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"},Q=t(76895),$=t(19248),X=t(46906),ee=t(37712),ne=(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,q.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],P=(0,_.useState)([]),I=m()(P,2),F=I[0],E=I[1],L=(0,_.useState)([]),V=m()(L,2),O=V[0],B=V[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?K()(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 M,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,D.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,ee.jsx)(h.Z,{className:W.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:Q.Z.CustomCss,children:(0,ee.jsxs)(q.Z,{form:p,colon:!1,labelCol:{span:4},wrapperCol:{span:18},onFinish:T,className:W.form,children:[(0,ee.jsx)(q.Z.Item,{label:"核心课程",name:"core_subject_name",rules:[{required:!0,message:"请选择核心课程"}],children:(0,ee.jsx)(A.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,ee.jsx)(q.Z.Item,{label:"教材名称",name:"name",rules:[{required:!0,message:"请输入教材名称"},{whitespace:!0,message:"请输入教材名称"},{max:200,message:"只能输入200个字符"}],children:(0,ee.jsx)(Y.Z,{maxLength:200,placeholder:"请输入教材名称"})}),(0,ee.jsx)(q.Z.Item,{label:"教材类型",name:"material_type_name",rules:[{required:!0,message:"请选择教材类型"}],children:(0,ee.jsx)(A.Z,{options:null==O?void 0:O.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,ee.jsx)(q.Z.Item,{label:"主编",name:"author",rules:[{required:!0,message:"请输入主编"},{whitespace:!0,message:"请输入主编"},{max:40,message:"只能输入40个字符"}],children:(0,ee.jsx)(Y.Z,{maxLength:40,placeholder:"请输入主编"})}),(0,ee.jsx)(q.Z.Item,{label:"副主编",name:"associate_editor",rules:[{max:40,message:"只能输入40个字符"}],children:(0,ee.jsx)(Y.Z,{maxLength:40,placeholder:"请输入副主编"})}),(0,ee.jsx)(q.Z.Item,{label:"出版社",name:"publisher",rules:[{whitespace:!0,message:"实践出版社"},{max:100,message:"只能输入100个字符"}],children:(0,ee.jsx)(Y.Z,{maxLength:100,placeholder:"请输入出版社"})}),(0,ee.jsx)(q.Z.Item,{label:"出版时间",name:"publication_time",children:(0,ee.jsx)(H.default,{picker:"month",style:{width:"100%"},placeholder:"请选择出版时间",format:"YYYY-MM",allowClear:!0})}),(0,ee.jsx)(q.Z.Item,{label:"ISBN",name:"number",rules:[{whitespace:!0,message:"请输入ISBN"}],children:(0,ee.jsx)(Y.Z,{maxLength:50,placeholder:"请输入ISBN"})}),(0,ee.jsx)(q.Z.Item,{label:"联系方式",name:"contact_info",children:(0,ee.jsx)(Y.Z,{maxLength:30,placeholder:"可填写手机、邮箱、QQ等联系方式"})}),(0,ee.jsx)(q.Z.Item,{label:"阅读链接",name:"view_link",children:(0,ee.jsx)(Y.Z,{placeholder:"请输入阅读链接"})}),(0,ee.jsx)(q.Z.Item,{label:"购买链接",name:"buy_link",children:(0,ee.jsx)(Y.Z,{placeholder:"请输入购买链接"})}),(0,ee.jsx)(q.Z.Item,{name:"attachment_id",label:"封面图片",rules:[{required:!0,message:"请上传封面图片"}],children:(0,ee.jsx)("div",{className:W.upload,children:null!=k&&null!==(n=k[0])&&void 0!==n&&null!==(n=n.response)&&void 0!==n&&n.id?(0,ee.jsxs)("div",{className:W.img,children:[(0,ee.jsx)("img",{src:z.Z.API_SERVER+"/api/attachments/"+(null==k||null===(M=k[0])||void 0===M||null===(M=M.response)||void 0===M?void 0:M.id),alt:"avatar",style:{width:"100%"}}),(0,ee.jsx)("div",{children:(0,ee.jsx)($.Z,{onClick:function(){Z([]),p.setFieldsValue({attachment_id:""})},style:{fontSize:"16px",color:"red"}})})]}):(0,ee.jsx)(J.Z,{fileList:k,action:"".concat(z.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,ee.jsxs)(X.op,{style:{borderRadius:"2px",marginTop:3},children:[(0,ee.jsx)("i",{className:"iconfont icon-shangchuantupian2 mr5"}),"上传图片"]})})})})]})})})),te=t(20731),ae=t(69142),le=t(68738),ie=(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=e.dispatch,q=(e.virtualSpaces,e.globalSetting),A=(e.classroomList,(0,_.useState)(!0)),Y=m()(A,2),H=Y[0],J=Y[1],G=(0,_.useState)(""),K=m()(G,2),W=K[0],Q=K[1],$=(0,_.useState)(!1),ie=m()($,2),se=ie[0],oe=ie[1],re=(0,_.useState)(!1),ce=m()(re,2),ue=ce[0],de=ce[1],me=(0,_.useState)(),_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)([]),Pe=m()(Ne,2),Ie=Pe[0],Fe=Pe[1],Ee=(0,_.useState)("全部"),Le=m()(Ee,2),Ve=Le[0],Oe=Le[1],Be=(0,_.useState)("全部课程"),Me=m()(Be,2),Re=Me[0],Te=Me[1];(0,_.useEffect)((function(){ze()}),[]),(0,_.useEffect)((function(){Ue()}),[Ce,Ve,W]),(0,_.useEffect)((function(){if("全部课程"!==Re){var e=document.getElementById(Re);e&&e.scrollIntoView({behavior:"smooth",block:"start"})}}),[Re]);var Ue=function(){var e=u()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return J(!0),e.next=3,(0,D.ZP)("/api/core_materials/books.json",{method:"get",params:{material_type_name:Ve,keyword:W,core_subject_name:Ce}});case 3:0==(null==(n=e.sent)?void 0:n.status)&&(de(null==n?void 0:n.can_edit),fe(null==n?void 0:n.data),be(n)),J(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ze=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 J(!0),e.next=3,(0,D.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)&&(ke(null==t||null===(a=t.data)||void 0===a?void 0:a.core_subject_name),Fe(null==t||null===(l=t.data)||void 0===l?void 0:l.material_type_name)),J(!1);case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),De=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==se||!se.id){e.next=7;break}return e.next=3,(0,D.ZP)("/api/core_materials/".concat(null==se?void 0:se.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!=se&&se.id?"编辑":"添加","成功")),Ue(),oe(!1)),e.next=11;break;case 7:return e.next=9,(0,D.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!=se&&se.id?"编辑":"添加","成功")),Ue(),oe(!1));case 11:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,ee.jsxs)("section",{style:{paddingBottom:"3rem"},children:[(0,ee.jsx)("div",{className:g,style:{backgroundImage:"url(".concat(z.Z.IMG_SERVER,"/").concat(null==q||null===(n=q.setting)||void 0===n?void 0:n.news_banner_url,")")},children:(0,ee.jsxs)("div",{className:j,children:[(0,ee.jsxs)("div",{children:[(0,ee.jsx)("div",{style:{color:"#fff",fontSize:".34rem",letterSpacing:".05rem",fontWeight:600},children:(0,te.Iz)("/bookplan",null==q||null===(t=q.setting)||void 0===t?void 0:t.navbar)}),(0,ee.jsxs)("div",{style:{display:"flex"},children:[ue&&(0,ee.jsxs)("div",{className:"".concat(y),style:{width:"1rem"},onClick:function(){oe(!0)},children:[(0,ee.jsx)("i",{className:"iconfont icon-icon_xinyong_xianxing_jijin-249",style:{marginRight:"0.05rem",fontSize:".16rem"}}),"新建"]}),ue&&(null==he?void 0:he.description_permission)&&(0,ee.jsxs)("div",{className:"".concat(y),style:{marginLeft:".2rem"},onClick:function(){d({type:"classroomList/setActionTabs",payload:{key:"规划说明",params:{name:"教材规划",content:null==he?void 0:he.core_material_description}}})},children:[(0,ee.jsx)("i",{className:"iconfont icon-icon_xinyong_xianxing_jijin-249",style:{marginRight:"0.05rem",fontSize:".16rem"}}),"规划说明"]})]})]}),(0,ee.jsx)("div",{children:(0,ee.jsx)(X.t7,{placeholder:"请输入关键字进行搜索",className:k,value:W,onChange:function(e){Q(e)}})})]})}),(null==he?void 0:he.core_material_description)&&(0,ee.jsx)(ae.Z,{style:{width:"12rem",margin:".3rem auto .2rem auto"},value:null==he?void 0:he.core_material_description}),(0,ee.jsxs)("div",{className:T,children:[(0,ee.jsxs)("div",{className:Z,children:[(0,ee.jsxs)("div",{className:w,style:{borderBottom:"1px dashed #37AD83"},children:[(0,ee.jsx)("div",{className:C,children:"课程"}),(0,ee.jsx)("div",{style:{display:"flex",flexWrap:"wrap",flex:1},children:null===(a=["全部"].concat(l()(ye)))||void 0===a?void 0:a.map((function(e,n){return(0,ee.jsx)("div",{className:Ce==e?S:N,onClick:function(){Se(e),Te(e),ze(e)},children:e},n)}))})]}),(0,ee.jsxs)("div",{className:w,children:[(0,ee.jsx)("div",{className:C,children:"类型"}),(0,ee.jsx)("div",{style:{display:"flex",flexWrap:"wrap",flex:1},children:null===(i=["全部"].concat(l()(Ie)))||void 0===i?void 0:i.map((function(e,n){return(0,ee.jsx)("div",{className:Ve==e?S:N,onClick:function(){Oe(e)},children:e},n)}))})]})]}),(null==pe||null===(o=pe.list)||void 0===o?void 0:o.length)>0?(0,ee.jsx)(x.Z,{className:"mt20",loading:H,children:(0,ee.jsx)(v.Z,{accordion:!0,bordered:!1,activeKey:Re,onChange:function(e){Te(e.length>0?e[0]:"全部课程")},expandIconPosition:"end",ghost:!0,items:null==pe||null===(c=pe.list)||void 0===c?void 0:c.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,ee.jsx)("div",{className:P,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,ee.jsxs)("div",{className:I,onClick:function(){p.history.push("/bookplan/detail/".concat(t,"?backUrl=/bookplan"))},children:[(0,ee.jsx)("img",{className:E,src:z.Z.API_SERVER+(null==a?void 0:a.url)}),ue&&(null==e?void 0:e.is_creator)&&(0,ee.jsxs)("div",{className:F,children:[(0,ee.jsxs)("span",{className:L,onClick:function(n){n.stopPropagation(),oe(e)},children:[(0,ee.jsx)("i",{className:"iconfont icon-bianji-moren ".concat(V)}),"编辑"]}),(0,ee.jsxs)("span",{className:O,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,D.ZP)("/api/core_materials/".concat(t,".json"),{method:"delete"});case 2:0===(null==(n=e.sent)?void 0:n.status)&&(f.ZP.info("删除成功"),Ue());case 4:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})})},children:[(0,ee.jsx)("i",{className:"iconfont icon-shanchu13 ".concat(B)}),"删除"]})]}),(0,ee.jsx)("div",{style:{minHeight:"0.55rem"},children:(0,ee.jsx)(b.Z,{title:n,children:(0,ee.jsx)("div",{className:M,style:{marginTop:"-5px"},children:n})})}),(0,ee.jsx)(b.Z,{title:i,children:(0,ee.jsx)("div",{className:R,children:i||"--"})}),(0,ee.jsx)(b.Z,{title:l,children:(0,ee.jsx)("div",{className:R,style:{marginTop:"-10px"},children:l||"--"})})]},t)})):(0,ee.jsx)(U.Z,{})})}}))})}):(0,ee.jsx)(U.Z,{})]}),(0,ee.jsx)(ne,{visible:se,title:"教材",onCancel:function(){return oe(!1)},onOk:De}),(0,ee.jsx)(le.Z,{getData:Ue})]})}))},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(){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 diff --git a/p__History__index.async.js b/p__History__index.async.js index 0a18c9fc33..58fd9bfa65 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),F=L[0],H=L[1],D=(0,d.useState)([{id:"-1",name:"全部"},{id:"0",name:"未开始"},{id:"1",name:"进行中"},{id:"2",name:"已结束"}]),V=u()(D,2),q=V[0],z=(V[1],(0,d.useState)("-1")),J=u()(z,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(F,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:F===e?y.type_item_active:y.type_item,onClick:function(){H(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==q?void 0:q.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(F,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:"#165DFF"},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(F,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)(),F=m()(L,2),H=F[0],D=F[1];(0,h.useEffect)((function(){var e;n&&(V(),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 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)&&D(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: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:q,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==H?void 0:H.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(){V()}})}),(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),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