You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/9859.async.js

1 line
14 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9859],{47247:function(e,n,t){t.d(n,{Z:function(){return C}});var s=t(7557),l=t.n(s),a=t(41498),i=t.n(a),r=t(82242),o=t.n(r),u=t(79800),c=t.n(u),d=t(39647),p=t.n(d),m=t(59301),h=t(8591),f=t(53326),x=t(95237),g=t(98242),v=t(21884),b=t(22102),j="tip___bHEXo",y=t(37712),_=["ButtonText","ButtonOptions","uploadProps","showTip"],C=function(e){var n,t,s,a=e.ButtonText,r=e.ButtonOptions,u=e.uploadProps,d=e.showTip,C=p()(e,_),Z=(0,m.useState)(null),w=c()(Z,2),k=w[0],I=w[1],Y=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 h.ZP.error("您上传的不是JPEG/PNG/JPG类型文件"),f.Z.LIST_IGNORE;var n=e.size/1024/1024;return 0!=n||(h.ZP.error("".concat(e.name," 图片无法上传。").concat(0==n?"文件内容不能为空":"超过图片大小限制(2MB)")),f.Z.LIST_IGNORE)},onChange:function(e){var n;(["uploading","done","removed"].includes(e.file.status)&&I(e.file),"done"==e.file.status)&&(null==C||C.onChange(null===(n=e.file)||void 0===n||null===(n=n.response)||void 0===n?void 0:n.id))},action:"".concat(g.Z.API_SERVER,"/api/attachments.json")},u||{}),{},{onRemove:(t=i()(l()().mark((function e(n){return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:E(),(null==u?void 0:u.onRemove)&&(null==u||u.onRemove(n));case 2:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})}),E=function(){I(null),null==C||C.onChange()};return(0,m.useEffect)((function(){(null==C?void 0:C.value)&&I({response:{id:null==C?void 0:C.value}})}),[null==C?void 0:C.value]),(0,y.jsx)("div",{id:(null==C?void 0:C.scrollId)||"",children:null!=k&&null!==(n=k.response)&&void 0!==n&&n.id?(0,y.jsxs)(x.Z,{align:"middle",justify:"center",style:{position:"relative",width:400,backgroundColor:"#f4f3f4"},children:[(0,y.jsx)("img",{src:g.Z.API_SERVER+"/api/attachments/"+(null==k||null===(s=k.response)||void 0===s?void 0:s.id),alt:"avatar",style:{width:"100%"}}),(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)(v.Z,{onClick:i()(l()().mark((function e(){return l()().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,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(f.Z,o()(o()({},Y),{},{children:(0,y.jsx)(b.op,o()(o()({style:o()({borderRadius:"2px"},null==r?void 0:r.style)},r),{},{children:a}))})),d&&(0,y.jsx)("span",{className:j,children:"建议上传尺寸为472*266的图片"})]})})}},73120:function(e,n,t){t.d(n,{Z:function(){return g}});var s=t(82242),l=t.n(s),a=t(7557),i=t.n(a),r=t(41498),o=t.n(r),u=t(79800),c=t.n(u),d=t(59301),p=t(84686),m=t(25600),h=t(58228),f=(t(82317),{editor_css:"editor_css___cm3Z8"}),x=t(37712),g=(0,h.connect)((function(e){return{user:e.user}}))((function(e){var n=e.defaultvalue,t=e.onChange,s=e.style,a=e.user,r=e.placeholder,u=2097152,h=(0,d.useRef)(null),g=(0,d.useState)(null),v=c()(g,2),b=v[0],j=v[1],y=(0,d.useState)(""),_=c()(y,2),C=_[0],Z=_[1];(0,d.useEffect)((function(){Z(n)}),[n]),(0,d.useEffect)((function(){t(C)}),[C]);var w={placeholder:r||"请输入内容...",MENU_CONF:{}};w.MENU_CONF.uploadImage={customUpload:function(e,n){return o()(i()().mark((function t(){var s,l;return i()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return(s=new FormData).append("file",e),t.next=4,(0,m.ZP)("/api/attachments.json",{method:"post",body:s},!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 o()(i()().mark((function t(){var s,l,r,o,c,d,p,f,x,g,v,b,j,y;return i()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return s=e.size,l=Math.ceil(s/u),t.prev=2,t.next=5,(0,m.ZP)("/api/attachments/multipart_upload_start",{method:"POST",body:{fileName:e.name,chunkCount:l,user_id:null==a||null===(r=a.userInfo)||void 0===r?void 0:r.user_id}});case 5:if(0===(null==(c=t.sent)?void 0:c.status)){t.next=8;break}throw new Error;case 8:d=c.upload_id,h.current=new AbortController,p=[],0,f=i()().mark((function n(){var t,l,a,r;return i()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:t=x*u,l=Math.min(t+u,s),a=e.slice(t,l),(r=new FormData).append("chunk",a),r.append("fileName",e.name),r.append("chunkIndex",(x+1).toString()),r.append("uploadId",d),p.push((function(){return(0,m.ZP)("/api/attachments/multipart_upload",{method:"POST",body:r,signal:h.current.signal},!0).then((function(e){}))}));case 9:case"end":return n.stop()}}),n)})),x=0;case 14:if(!(x<l)){t.next=19;break}return t.delegateYield(f(),"t0",16);case 16:x++,t.next=14;break;case 19:g=0,v=4,console.log(p,"promises");case 22:if(!(g<p.length)){t.next=31;break}if(!((j=null===(b=p.slice(g,g+v))||void 0===b?void 0:b.map((function(e){return e()}))).length>0)){t.next=29;break}return t.next=27,Promise.all(j);case 27:t.sent,g+=v;case 29:t.next=22;break;case 31:return t.next=33,(0,m.ZP)("/api/attachments/multipart_upload_end",{method:"POST",body:{fileName:e.name,chunkCount:l,uploadId:d,user_id:null==a||null===(o=a.userInfo)||void 0===o?void 0:o.user_id}});case 33:y=t.sent,n(null==y?void 0:y.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(),j(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)(p.o,{editor:b,defaultConfig:{},mode:"default",style:{borderBottom:"1px solid #ccc"}}),(0,x.jsx)(p.M,{defaultConfig:w,value:C,onCreated:j,onChange:function(e){var n;!function(e){return""==e||new RegExp("^[ ]+$").test(e)}((n=e.getHtml(),n.replace(/<[^<p>]+>/g,"").replace(/<[</p>$]+>/g,"").replace(/&nbsp;/gi,"").replace(/<[^<br/>]+>/g,"")))?Z(e.getHtml()):Z("")},mode:"default",style:l()({height:"500px",overflowY:"hidden"},s)})]})})}))},9859:function(e,n,t){t.d(n,{Z:function(){return F}});var s=t(82242),l=t.n(s),a=t(79800),i=t.n(a),r=t(39647),o=t.n(r),u=t(59301),c=t(30518),d=t(8591),p=t(43418),m=t(78241),h=t(24650),f=t(53326),x=t(81327),g=t(47247),v="form___Ca7CG",b=t(58228),j=t(73120),y=t(98242),_=t(22102),C=t(97810),Z=t(65547),w=t(61186),k=t.n(w),I=t(37712),Y=["handleFinish","form","content","dispatch","user","coreCurriculum","isRequest"],E=["key","name"],P=c.default.RangePicker,F=(0,b.connect)((function(e){return{dispatch:e.dispatch,coreCurriculum:e.coreCurriculum,user:e.user}}))((function(e){var n=e.handleFinish,t=e.form,s=e.content,a=e.dispatch,r=(e.user,e.coreCurriculum),c=e.isRequest,b=o()(e,Y),w=(r.CoreSubjects,(0,u.useState)("")),F=i()(w,2),R=(F[0],F[1]);(0,u.useEffect)((function(){a({type:"coreCurriculum/getCoreSubjects",payload:{page:1,limit:12}})}),[]),(0,u.useEffect)((function(){var e;if(null!==(e=b.visible)&&void 0!==e&&e.id){var n,s,a,i,r,o,u,c,d,p,m=[null!==(n=b.visible)&&void 0!==n&&n.enroll_start_time?k()(null===(s=b.visible)||void 0===s?void 0:s.enroll_start_time,"YYYY-MM-DD HH:mm"):null,null!==(a=b.visible)&&void 0!==a&&a.enroll_end_time?k()(null===(i=b.visible)||void 0===i?void 0:i.enroll_end_time,"YYYY-MM-DD HH:mm"):null],h=[null!==(r=b.visible)&&void 0!==r&&r.meeting_start_time?k()(null===(o=b.visible)||void 0===o?void 0:o.meeting_start_time,"YYYY-MM-DD HH:mm"):null,null!==(u=b.visible)&&void 0!==u&&u.meeting_end_time?k()(null===(c=b.visible)||void 0===c?void 0:c.meeting_end_time,"YYYY-MM-DD HH:mm"):null];t.setFieldValue("enroll_time",m),t.setFieldValue("meeting_time",h),t.setFieldValue("invitation_id",null===(d=[l()({},null===(p=b.visible)||void 0===p?void 0:p.invitation)])||void 0===d?void 0:d.map((function(e){return{uid:e.id,name:e.title,status:"down",response:{id:e.id}}})))}}),[b.visible]);var H={beforeUpload:function(e){var n=e.size/1024/1024;return 0==n?(d.ZP.error("".concat(e.name," 无法上传。").concat(0==n?"文件内容不能为空":"超过图片大小限制(2MB)")),Promise.reject()):Promise.resolve()},action:"".concat(y.Z.API_SERVER,"/api/attachments.json")};return(0,I.jsx)(p.Z,l()(l()({},b),{},{destroyOnClose:!0,centered:!0,width:1200,okText:"确认",afterClose:function(){return R("")},bodyStyle:{maxHeight:530},children:(0,I.jsxs)(m.Z,{form:t,size:"large",initialValues:{},layout:"horizontal",labelCol:{span:2},className:v,onValuesChange:function(e){console.log(e),console.log(s)},colon:!1,onFinish:n,children:[(0,I.jsx)(m.Z.Item,{htmlFor:null,name:"name",label:"名称",rules:[{required:!0,message:"请输入名称"}],children:(0,I.jsx)(h.Z,{placeholder:"请输入名称",maxLength:80,showCount:!0})}),(0,I.jsxs)("div",{style:{display:"flex",justifyContent:"space-around",marginLeft:"-9px"},children:[(0,I.jsx)(m.Z.Item,{label:"会议地点",name:"location",labelCol:{span:4},rules:[{required:!0,message:"请输入会议地点"},{whitespace:!0,message:"请输入会议地点"}],children:(0,I.jsx)(h.Z,{maxLength:20,placeholder:"请输入会议地点",style:{width:475},showCount:!0})}),(0,I.jsx)(m.Z.Item,{label:"会议规模",name:"scale",labelCol:{span:4},rules:[{required:!0,message:"请输入会议规模"}],children:(0,I.jsx)(h.Z,{maxLength:20,placeholder:"请输入会议规模",style:{width:475},showCount:!0})})]}),(0,I.jsxs)("div",{style:{display:"flex",justifyContent:"space-around",marginLeft:"-9px"},children:[(0,I.jsx)(m.Z.Item,{label:"报名时间",name:"enroll_time",labelCol:{span:4},rules:[{required:!0,message:"请选择报名时间"}],children:(0,I.jsx)(P,{style:{width:475},format:"YYYY-MM-DD HH:mm",placeholder:["请选择开始时间","请选择结束时间"],showTime:{format:"HH:mm"}})}),(0,I.jsx)(m.Z.Item,{label:"会议时间",name:"meeting_time",labelCol:{span:4},rules:[{required:!0,message:"请选择会议时间"}],children:(0,I.jsx)(P,{style:{width:475},format:"YYYY-MM-DD HH:mm",placeholder:["请选择开始时间","请选择结束时间"],showTime:{format:"HH:mm"}})})]}),(0,I.jsx)(m.Z.Item,{label:"报名链接",name:"enroll_url",rules:[{message:"请输入报名链接"}],children:(0,I.jsx)(h.Z,{maxLength:500,placeholder:"请输入报名链接",showCount:!0})}),(0,I.jsx)("div",{style:{position:"relative"},children:(0,I.jsx)(m.Z.Item,{name:"cover_id",label:"封面图片",rules:[{required:!0,message:"请上传封面图片"}],style:{position:"relative"},children:(0,I.jsx)(g.Z,{ButtonText:(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)("i",{className:"iconfont icon-shangchuanfujian r5 font14"}),(0,I.jsx)("span",{className:"ml5",children:"上传图片"})]}),showTip:!0})})}),(0,I.jsx)(m.Z.Item,{name:"invitation_id",label:"会议邀请函",valuePropName:"fileList",normalize:function(e){return null!=e&&e.at(-1)?[null==e?void 0:e.at(-1)]:[]},getValueFromEvent:function(e){return Array.isArray(e)?e:null==e?void 0:e.fileList},children:(0,I.jsx)(f.Z,l()(l()({},H),{},{children:(0,I.jsx)(_.op,{style:{borderRadius:"2px"},icon:(0,I.jsx)("i",{className:"iconfont icon-shangchuanfujian"}),children:"上传文件"})}))}),(0,I.jsx)(m.Z.Item,{label:"会议通知",name:"notice",rules:[{required:!0,message:"请输入会议通知"}],labelCol:{span:2},children:(0,I.jsx)(j.Z,{defaultvalue:"<p><br></p>"==s?'<p><br></p><p><img src="/api/attachments/170544" alt="" data-href="" style=""/><span style="font-size: 24px;"><strong>参会对象</strong></span></p><p><span style="font-size: 19px;">(在此处填写参会对象,本行可以删除……)</span></p><p><br></p><p><img src="/api/attachments/170544" alt="" data-href="" style=""/><span style="font-size: 24px;"><strong>会议内容</strong></span></p><p><span style="font-size: 19px;">(在此处填写会议内容,本行可以删除……)</span></p><p><br></p><p><img src="/api/attachments/170544" alt="" data-href="" style="width: 28.00px;height: 28.00px;"/><span style="font-size: 24px;"><strong>会议时间</strong></span></p><p><span style="font-size: 19px;">(在此处填写会议时间,本行可以删除……)</span></p><p><br></p><p><img src="/api/attachments/170544" alt="" data-href="" style=""/><span style="font-size: 24px;"><strong>培训费用</strong></span></p><p><span style="font-size: 19px;">(在此处填写培训费用,本行可以删除……)</span></p><p><br></p><p><img src="/api/attachments/170544" alt="" data-href="" style=""/><span style="font-size: 24px;"><strong>会议注册及联系人</strong></span></p><p><span style="font-size: 19px;">(在此处填写会议注册及联系人,本行可以删除……)</span></p>':s,style:{height:"220px"}})}),(0,I.jsx)(m.Z.Item,{label:"会议费用信息",name:"publisher",rules:[{required:!1,message:"请填写会议费用信息"}],style:{marginBottom:0},children:(0,I.jsx)(m.Z.List,{name:"fee_infos",children:function(e,n){var t=n.add,s=n.remove;return(0,I.jsxs)(I.Fragment,{children:[e.map((function(e){var n=e.key,a=e.name,i=o()(e,E);return(0,I.jsxs)(x.Z,{style:{display:"flex",marginBottom:8,background:"#F6F9F9",borderRadius:"2px",padding:20,paddingBottom:"0px"},align:"baseline",children:[(0,I.jsx)(m.Z.Item,l()(l()({},i),{},{name:[a,"name"],label:"费用名称",rules:[{required:!0,message:"请输入费用名称"}],children:(0,I.jsx)(h.Z,{placeholder:"请输入费用名称",style:{width:520},maxLength:50,showCount:!0})})),(0,I.jsx)(m.Z.Item,l()(l()({},i),{},{name:[a,"fee"],label:"费用",rules:[{required:!0,message:"请输入费用"}],className:"ml40",children:(0,I.jsx)(h.Z,{placeholder:"请输入费用",style:{width:220},maxLength:20,showCount:!0})})),(0,I.jsx)(C.Z,{onClick:function(){return s(a)},style:{color:"#E30000",marginLeft:20}}),(0,I.jsx)(Z.Z,{onClick:function(){return t()},style:{color:"#00B187",marginLeft:20}})]},n)})),(0,I.jsx)(m.Z.Item,{children:(0,I.jsx)(_.op,{style:{borderRadius:"2px",marginLeft:0,marginTop:3},onClick:function(){return t()},children:"添加"})})]})}})}),c&&(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)("div",{style:{border:"1px dashed #D0DEDC",marginBottom:30}}),(0,I.jsxs)("div",{style:{display:"flex",justifyContent:"space-around",marginLeft:"-9px"},children:[(0,I.jsx)(m.Z.Item,{label:"会议联系人",name:"meeting_contact",labelCol:{span:4},rules:[{required:!0,message:"请输入会议联系人"}],children:(0,I.jsx)(h.Z,{placeholder:"请输入会议联系人",maxLength:20,showCount:!0,style:{width:470}})}),(0,I.jsx)(m.Z.Item,{label:"联系方式",name:"meeting_contact_phone",labelCol:{span:4},rules:[{required:!0,message:"请输入联系方式"}],children:(0,I.jsx)(h.Z,{placeholder:"请输入联系方式",style:{width:470}})})]}),(0,I.jsx)(m.Z.Item,{label:"举办单位",name:"meeting_sponsor",rules:[{required:!0,message:"请输入会议举办单位"}],children:(0,I.jsx)(h.Z,{placeholder:"请输入会议举办单位",style:{width:470}})})]})]})}))}))}}]);