diff --git a/p__Judge__Index__index.async.js b/p__Judge__Index__index.async.js index 72f2185353..a8c29656af 100644 --- a/p__Judge__Index__index.async.js +++ b/p__Judge__Index__index.async.js @@ -1 +1 @@ -"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[54846],{3196:function(e,n,t){t.d(n,{Z:function(){return b}});var i=t(7557),s=t.n(i),l=t(41498),o=t.n(l),a=t(82242),r=t.n(a),c=t(79800),u=t.n(c),d=t(39647),h=t.n(d),m=t(59301),p=t(8591),v=t(54580),f=t(95237),_=t(17631),x=t(19248),g=t(46906),j="tip___bHEXo",w=t(37712),y=["ButtonText","ButtonOptions","uploadProps","showTip","showText","showListening","imgWidth"],b=function(e){var n,t,i,l=e.ButtonText,a=e.ButtonOptions,c=e.uploadProps,d=e.showTip,b=e.showText,k=e.showListening,Z=e.imgWidth,C=h()(e,y),S=(0,m.useState)(null),N=u()(S,2),R=N[0],E=N[1],F=r()(r()({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)&&E(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(_.Z.API_SERVER,"/api/attachments.json")},c||{}),{},{onRemove:(t=o()(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(){E(null),null==C||C.onChange()};return(0,m.useEffect)((function(){(null==C?void 0:C.value)&&E({response:{id:null==C?void 0:C.value}})}),[null==C?void 0:C.value]),(0,w.jsx)("div",{id:(null==C?void 0:C.scrollId)||"",children:null!=R&&null!==(n=R.response)&&void 0!==n&&n.id?(0,w.jsxs)(f.Z,{align:"middle",justify:"center",style:{position:"relative",width:Z||400,backgroundColor:"#f4f3f4"},children:[(0,w.jsx)("img",{src:_.Z.API_SERVER+"/api/attachments/"+(null==R||null===(i=R.response)||void 0===i?void 0:i.id),alt:"avatar",style:{width:"100%",height:Z?"177px":"auto"}}),(0,w.jsx)("div",{style:{position:"absolute",right:"-6px",top:"-6px",cursor:"pointer",width:16,height:16,borderRadius:"50%",backgroundColor:"#fff"},children:(0,w.jsx)(x.Z,{onClick:o()(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,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(v.Z,r()(r()({},F),{},{children:(0,w.jsx)(g.op,r()(r()({style:r()({borderRadius:"2px"},null==a?void 0:a.style)},a),{},{children:l}))})),d&&(0,w.jsx)("span",{className:j,children:"(建议上传尺寸为472*266的图片)"}),b&&(0,w.jsx)("span",{className:j,style:{width:"4rem"},children:"(需上传尺寸为200*268的图片,大小不超过2MB)"}),k&&(0,w.jsx)("span",{className:j,style:{width:"4rem"},children:"(限制上传2MB内的图片,建议上传尺寸为283*177的图片)"})]})})}},81878:function(e,n,t){t.r(n),t.d(n,{default:function(){return pe}});var i=t(82242),s=t.n(i),l=t(7557),o=t.n(l),a=t(41498),r=t.n(a),c=t(37205),u=t.n(c),d=t(79800),h=t.n(d),m=t(59301),p=t(8591),v=t(6848),f=t(43418),_=t(95237),x=t(43604),g=t(58421),j=t(13032),w="BannerStyle___nBur1",y="BannerStyleContent___BWJw0",b="DivDownPlay___UxEQf",k="CustomInputStyle___hlhUc",Z="teacherList___su0_a",C="top_bg_img___cmYFQ",S="techer_content___bgSA5",N="img___LchtM",R="teacher_img___l8Tb6",E="content___sMnqv",F="shuji_list___FhkLj",P="shuji_list_warp___cIMiD",I="ellipsis___CyQwV",L="shenhe_icon___cRhss",B="shuming___W1km7",T="shuji_jianjie___X7_wI",O="teacher_header___MrKe6",z="teacher_name___rAJpd",M="teacher_school___nvAEr",G="iconUpdate___Gab4k",q="iconDetele___xyhpb",A="expansion___zOJvl",D="expansion2___Du6w4",J=t(17631),V=(t(56349),t(58181)),U=t(46906),W=t(72226),H=t(39647),Q=t.n(H),X=t(78241),K=t(10249),Y=t(81327),$=t(57809),ee=t(61186),ne=t.n(ee),te="form___Fxxn8",ie=(t(19248),t(12893)),se=t(32134),le=t(3196),oe=t(37712),ae=["key","name"],re=(0,j.connect)((function(e){return{dispatch:e.dispatch,coreCurriculum:e.coreCurriculum}}))((function(e){var n=e.visible,t=e.bookList,i=e.onOk,l=e.onCancel,a=e.title,c=void 0===a?"":a,u=e.coreCurriculum,d=e.dispatch,p=(u.CoreSubjects,X.Z.useForm()),v=h()(p,1)[0],_=(0,m.useState)(!1),x=h()(_,2),g=x[0],j=x[1],w=(0,m.useState)([]),y=h()(w,2),b=(y[0],y[1]),k=(0,m.useState)(!1),Z=h()(k,2),C=Z[0];Z[1];(0,m.useEffect)((function(){if(d({type:"coreCurriculum/getCoreSubjects",payload:{page:1,limit:12}}),null!=n&&n.id){var e,t,i;v.setFieldsValue(s()(s()({},n),{},{attachment_id:null==n||null===(e=n.attachment)||void 0===e?void 0:e.id,publication_time:ne()(null==n?void 0:n.publication_time),material_type:null==n||null===(t=n.material_type)||void 0===t?void 0:t.toString()}));var l=[s()(s()({},null==n?void 0:n.attachment),{},{response:{id:null==n||null===(i=n.attachment)||void 0===i?void 0:i.id}})];b(l)}}),[n]);var S=function(){var e=r()(o()().mark((function e(n){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:j(!0),t=s()({},n),i(t);case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,oe.jsx)(f.Z,{title:"".concat(null!=n&&n.id?"编辑":"新建").concat(c),visible:n,onOk:function(){v.submit()},centered:!0,onCancel:function(){l()},confirmLoading:g,okButtonProps:{disabled:C},width:720,afterClose:function(){j(!1),b([]),v.resetFields()},okText:"确认",cancelText:"取消",children:(0,oe.jsxs)(X.Z,{form:v,colon:!1,labelCol:{span:3},onFinish:S,className:te,children:[(0,oe.jsx)(X.Z.Item,{label:"姓名",name:"name",rules:[{required:!0,message:"请输入主审专家姓名"},{whitespace:!0,message:"请输入主审专家姓名"},{max:50,message:"只能输入50个字符"}],children:(0,oe.jsx)(K.Z,{maxLength:50,placeholder:"请输入主审专家姓名"})}),(0,oe.jsx)(X.Z.Item,{label:"职称",name:"title",rules:[{required:!0,message:"请输入职称"},{whitespace:!0,message:"请输入职称"},{max:100,message:"只能输入100个字符"}],children:(0,oe.jsx)(K.Z,{maxLength:100,placeholder:"请输入职称"})}),(0,oe.jsx)(X.Z.Item,{label:"简介",name:"profile",rules:[{required:!0,message:"请输入简介"}],children:(0,oe.jsx)(K.Z.TextArea,{rows:4,placeholder:"请输入简介",maxLength:300})}),(0,oe.jsx)(X.Z.Item,{name:"cover_id",label:"照片",rules:[{required:!0,message:"请上传照片"}],children:(0,oe.jsx)(le.Z,{showText:!0,ButtonText:(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)("i",{className:"iconfont icon-shangchuanfujian r5 font14"}),(0,oe.jsx)("span",{className:"ml5",children:"上传照片"})]})})}),(0,oe.jsx)(X.Z.Item,{label:"审核教材",name:"publisher",rules:[{required:!1,message:"请输入简介"}],children:(0,oe.jsx)(X.Z.List,{name:"data",children:function(e,n){var i=n.add,l=n.remove;return(0,oe.jsxs)(oe.Fragment,{children:[e.map((function(e){var n=e.key,o=e.name,a=Q()(e,ae);return(0,oe.jsxs)(Y.Z,{style:{display:"flex",alignItems:"center",marginBottom:8,background:"#F6F7F9",borderRadius:"2px",padding:20,paddingBottom:"5px"},align:"baseline",children:[(0,oe.jsxs)("div",{children:[(0,oe.jsx)(X.Z.Item,s()(s()({},a),{},{name:[o,"name"],label:"教材名称",labelCol:{span:4},rules:[{required:!0,message:"请输入教材名称"}],children:(0,oe.jsx)(K.Z,{placeholder:"请输入教材名称",style:{width:400}})})),(0,oe.jsx)(X.Z.Item,s()(s()({},a),{},{name:[o,"book_id"],label:"关联",labelCol:{span:4},rules:[{required:!1,message:"请选择"}],children:(0,oe.jsx)($.default,{placeholder:"请选择",style:{width:400},getPopupContainer:function(e){return e.parentElement},children:null==t?void 0:t.map((function(e,n){return(0,oe.jsx)($.default.Option,{value:null==e?void 0:e.id,children:null==e?void 0:e.name},n)}))})}))]}),(0,oe.jsxs)("div",{style:{marginLeft:8},children:[(0,oe.jsx)(ie.Z,{onClick:function(){return l(o)},style:{color:"#00B187",marginRight:20}}),(0,oe.jsx)(se.Z,{onClick:function(){return i()},style:{color:"#E30000"}})]})]},n)})),(0,oe.jsx)(X.Z.Item,{children:(0,oe.jsx)(U.op,{style:{borderRadius:"2px",marginLeft:0,marginTop:3},onClick:function(){return i()},children:"增加审核教材"})})]})}})})]})})})),ce=t(20731),ue=t(68738),de=t(69142),he=t(48815),me=t(5531),pe=(0,j.connect)((function(e){var n=e.homePage,t=e.loading,i=e.globalSetting,s=e.user;return{homePage:n,globalSetting:i,loading:t.models.homePage,user:s}}))((function(e){e.homePage;var n,t,i=e.globalSetting,l=(e.user,e.dispatch),a=(0,m.useState)([]),c=h()(a,2),d=c[0],H=c[1],Q=(0,m.useState)(!1),X=h()(Q,2),K=X[0],Y=X[1],$=(0,m.useState)(!1),ee=h()($,2),ne=ee[0],te=ee[1],ie=(0,m.useState)({page:1,limit:10,keyword:""}),se=h()(ie,2),le=se[0],ae=se[1],pe=(0,m.useState)(!1),ve=h()(pe,2),fe=(ve[0],ve[1]),_e=(0,m.useState)(0),xe=h()(_e,2),ge=xe[0],je=xe[1],we=(0,m.useState)([]),ye=h()(we,2),be=ye[0],ke=ye[1],Ze=(0,m.useState)(0),Ce=h()(Ze,2),Se=Ce[0],Ne=Ce[1],Re=(0,m.useRef)(null),Ee=(0,m.useState)(""),Fe=h()(Ee,2),Pe=Fe[0],Ie=Fe[1],Le=(0,m.useState)(!1),Be=h()(Le,2),Te=Be[0],Oe=Be[1];(0,m.useEffect)((function(){ze()}),[]),(0,m.useEffect)((function(){Me(!0)}),[le]),(0,m.useEffect)((function(){if(Re.current&&be.length>0){var e=be.map((function(e,n){var t=document.getElementsByClassName("item_books_".concat(n))[0];if(t){var i=t.clientHeight,s=window.getComputedStyle(t).minHeight,l=i>parseFloat(s);e.books_showEllipsis=l,e.books_showReadFull=l}return e}));ke(u()(e))}}),[Se]);var ze=function(){var e=r()(o()().mark((function e(){var n,t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,V.ZP)("/api/core_materials/list.json",{method:"get"});case 2:-1!==(null==(n=e.sent)?void 0:n.status)&&H(null==n||null===(t=n.data)||void 0===t?void 0:t.list);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Me=function(){var e=r()(o()().mark((function e(){var n,t,i,l,a=arguments;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.length>0&&void 0!==a[0]&&a[0],fe(!0),e.next=4,(0,V.ZP)("/api/specialist_infos.json",{method:"get",params:s()({},le)});case 4:0==(null==(n=e.sent)?void 0:n.status)&&(Y(null==n?void 0:n.can_edit),Oe(null==n?void 0:n.description_permissionicture),Ie(null==n?void 0:n.description),l=null==n||null===(t=n.data)||void 0===t?void 0:t.list.map((function(e,n){var t,i=JSON.parse(JSON.stringify({profile:null==e?void 0:e.profile}));return null!=e&&e.profile&&(null==e||null===(t=e.profile)||void 0===t?void 0:t.length)>85?(e.profileCopy=(null==i?void 0:i.profile.slice(0,85))+"...",e.snapshot_showEllipsis=!0,e.snapshot_showReadFull=!0):(e.snapshot_showEllipsis=!1,e.snapshot_showReadFull=!1),e.books_showEllipsis=!1,e.books_showReadFull=!1,e})),ke(l||[]),Ne(Se+1),je(null==n||null===(i=n.data)||void 0===i?void 0:i.total)),fe(!1);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ge=function(){var e=r()(o()().mark((function e(n){var t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==ne||!ne.id){e.next=7;break}return e.next=3,(0,V.ZP)("/api/specialist_infos/".concat(null==ne?void 0:ne.id,".json"),{method:"put",body:s()({},n)});case 3:0==(null==(t=e.sent)?void 0:t.status)&&(p.ZP.success("".concat(null!=ne&&ne.id?"编辑":"添加","成功")),te(!1),Me()),e.next=11;break;case 7:return e.next=9,(0,V.ZP)("/api/specialist_infos.json",{method:"post",body:s()({},n)});case 9:0==(null==(i=e.sent)?void 0:i.status)&&(p.ZP.success("添加成功"),te(!1),Me());case 11:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,oe.jsxs)("section",{style:{paddingBottom:"3rem"},children:[(0,oe.jsx)("div",{className:w,style:{backgroundImage:"url(".concat(J.Z.IMG_SERVER,"/").concat(null==i||null===(n=i.setting)||void 0===n?void 0:n.news_banner_url,")")},children:(0,oe.jsxs)("div",{className:y,children:[(0,oe.jsxs)("div",{children:[(0,oe.jsx)("div",{style:{color:"#fff",fontSize:".34rem",letterSpacing:".05rem",fontWeight:600},children:(0,ce.Iz)("/judge",null==i||null===(t=i.setting)||void 0===t?void 0:t.navbar)}),K&&(0,oe.jsxs)("div",{style:{display:"flex"},children:[(0,oe.jsxs)("div",{className:"".concat(b),style:{width:"1rem"},onClick:function(){return te(!0)},children:[(0,oe.jsx)("i",{className:"iconfont icon-icon_xinyong_xianxing_jijin-249",style:{marginRight:"0.05rem",fontSize:".16rem"}}),"新建"]}),(0,oe.jsxs)("div",{className:"".concat(b),style:{marginLeft:".2rem",width:"1.5rem"},onClick:function(){l({type:"classroomList/setActionTabs",payload:{key:"批量调整顺序",params:{name:"主审专家",data:be}}})},children:[(0,oe.jsx)(me.Z,{style:{marginRight:"0.05rem",fontSize:".16rem"}}),"批量调整顺序"]})]}),Te&&(0,oe.jsxs)("div",{className:"".concat(b),style:{marginLeft:".2rem",width:"1.2rem"},onClick:function(){l({type:"classroomList/setActionTabs",payload:{key:"规划说明",params:{name:"主审专家",content:Pe}}})},children:[(0,oe.jsx)("i",{className:"iconfont icon-icon_xinyong_xianxing_jijin-249",style:{marginRight:"0.05rem",fontSize:".16rem"}}),"规划说明"]})]}),(0,oe.jsx)("div",{children:(0,oe.jsx)(U.t7,{placeholder:"请输入关键字进行搜索",className:k,value:le.keyword,onChange:function(e){ae(s()(s()({},le),{},{keyword:e}))}})})]})}),Pe&&(0,oe.jsx)(de.Z,{style:{width:"12rem",margin:" .2rem auto",paddingBottom:"0.2rem"},value:Pe}),(0,oe.jsx)("div",{ref:Re,children:null==be?void 0:be.map((function(e,n){var t,i,l;return(0,oe.jsxs)("div",{className:Z,children:[(0,oe.jsx)("div",{className:C,style:{width:"12rem",height:"0.2rem"}}),(0,oe.jsxs)("div",{className:S,children:[(0,oe.jsx)("div",{className:N,children:(0,oe.jsx)("img",{src:J.Z.IMG_SERVER+(null==e||null===(t=e.cover)||void 0===t?void 0:t.url),className:R})}),(0,oe.jsxs)("div",{className:E,children:[(0,oe.jsxs)("div",{className:O,children:[(0,oe.jsx)(v.Z,{title:null==e?void 0:e.name,children:(0,oe.jsx)("div",{className:z,children:null==e?void 0:e.name})}),(0,oe.jsx)(v.Z,{title:null==e?void 0:e.title,children:(0,oe.jsx)("div",{className:M,children:null==e?void 0:e.title})}),K&&(null==e?void 0:e.is_creator)&&(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(v.Z,{title:"编辑",children:(0,oe.jsx)("i",{className:"iconfont icon-bianji-moren ".concat(G),onClick:function(){te(e)}})}),(0,oe.jsx)(v.Z,{title:"删除",children:(0,oe.jsx)("i",{className:"iconfont icon-shanchu13 ".concat(q),onClick:function(){var n;f.Z.confirm({icon:null,title:"提示",centered:!0,content:"请确认是否删除",okText:"确定",cancelText:"取消",onOk:(n=r()(o()().mark((function n(){var t;return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,V.ZP)("/api/specialist_infos/".concat(null==e?void 0:e.id,".json"),{method:"delete"});case 2:0===(null==(t=n.sent)?void 0:t.status)&&(p.ZP.info("删除成功"),Me());case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})}})})]})]}),(0,oe.jsxs)("div",{className:"".concat(T," item_snapshot_").concat(n),children:["简介:",null!=e&&e.snapshot_showReadFull?null==e?void 0:e.profileCopy:null==e?void 0:e.profile,(null==e?void 0:e.snapshot_showEllipsis)&&(0,oe.jsx)("span",{className:A,onClick:function(t){t.stopPropagation(),be[n]=s()(s()({},e),{},{snapshot_showReadFull:!(null!=e&&e.snapshot_showReadFull)}),ke(u()(be))},children:null!=e&&e.snapshot_showReadFull?"展开 ":"收起"})]}),(null==e||null===(i=e.data)||void 0===i?void 0:i.length)>0&&(0,oe.jsxs)("div",{className:F,children:[(0,oe.jsxs)("div",{className:"".concat(P," item_books_").concat(n),style:{maxHeight:(null==e?void 0:e.books_showReadFull)&&"0.4rem",paddingRight:(null==e?void 0:e.books_showReadFull)&&"0.5rem"},children:[null==e||null===(l=e.data)||void 0===l?void 0:l.map((function(e,n){return(0,oe.jsxs)("div",{onClick:function(){null!=e&&e.book_id?j.history.push("/textbook/detail/".concat(null==e?void 0:e.book_id,"?backUrl=/judge")):p.ZP.warning("该书籍未关联内容")},className:B,children:["《",null==e?void 0:e.name,"》"]},n)})),(null==e?void 0:e.books_showEllipsis)&&(0,oe.jsx)("div",{className:I,children:(null==e?void 0:e.books_showEllipsis)&&(0,oe.jsx)("div",{className:D,style:{marginRight:0},onClick:function(t){t.stopPropagation(),be[n]=s()(s()({},e),{},{books_showReadFull:!(null!=e&&e.books_showReadFull)}),ke(u()(be))},children:null!=e&&e.books_showReadFull?"展开 ":"收起"})})]}),(0,oe.jsx)("div",{className:L})]})]})]})]},n)}))}),0==(null==be?void 0:be.length)&&(0,oe.jsx)(W.Z,{}),(null==be?void 0:be.length)>0&&(0,oe.jsxs)(_.Z,{wrap:!1,align:"middle",justify:"space-between",style:{width:"12rem",margin:".2rem auto",padding:"0 .2rem"},children:[(0,oe.jsxs)(x.Z,{children:["共 ",(0,oe.jsx)("span",{style:{color:"#165DFF"},children:ge||0})," 条数据"]}),(0,oe.jsx)(x.Z,{children:(0,oe.jsx)(g.Z,{showSizeChanger:!1,showQuickJumper:!0,current:le.page,pageSize:le.limit,onChange:function(e,n){le.page=e,ae(s()({},le)),Me()},total:ge||0})})]}),(0,oe.jsx)(re,{visible:ne,title:"主审专家",onCancel:function(){return te(!1)},onOk:Ge,bookList:d}),(0,oe.jsx)(ue.Z,{getData:Me}),(0,oe.jsx)(he.Z,{getData:Me})]})}))}}]); \ No newline at end of file +"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[54846],{3196:function(e,n,t){t.d(n,{Z:function(){return b}});var i=t(7557),s=t.n(i),l=t(41498),o=t.n(l),a=t(82242),r=t.n(a),c=t(79800),u=t.n(c),d=t(39647),h=t.n(d),m=t(59301),p=t(8591),v=t(54580),f=t(95237),_=t(17631),x=t(19248),g=t(46906),j="tip___bHEXo",w=t(37712),y=["ButtonText","ButtonOptions","uploadProps","showTip","showText","showListening","imgWidth"],b=function(e){var n,t,i,l=e.ButtonText,a=e.ButtonOptions,c=e.uploadProps,d=e.showTip,b=e.showText,k=e.showListening,Z=e.imgWidth,C=h()(e,y),S=(0,m.useState)(null),N=u()(S,2),R=N[0],E=N[1],F=r()(r()({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)&&E(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(_.Z.API_SERVER,"/api/attachments.json")},c||{}),{},{onRemove:(t=o()(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(){E(null),null==C||C.onChange()};return(0,m.useEffect)((function(){(null==C?void 0:C.value)&&E({response:{id:null==C?void 0:C.value}})}),[null==C?void 0:C.value]),(0,w.jsx)("div",{id:(null==C?void 0:C.scrollId)||"",children:null!=R&&null!==(n=R.response)&&void 0!==n&&n.id?(0,w.jsxs)(f.Z,{align:"middle",justify:"center",style:{position:"relative",width:Z||400,backgroundColor:"#f4f3f4"},children:[(0,w.jsx)("img",{src:_.Z.API_SERVER+"/api/attachments/"+(null==R||null===(i=R.response)||void 0===i?void 0:i.id),alt:"avatar",style:{width:"100%",height:Z?"177px":"auto"}}),(0,w.jsx)("div",{style:{position:"absolute",right:"-6px",top:"-6px",cursor:"pointer",width:16,height:16,borderRadius:"50%",backgroundColor:"#fff"},children:(0,w.jsx)(x.Z,{onClick:o()(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,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(v.Z,r()(r()({},F),{},{children:(0,w.jsx)(g.op,r()(r()({style:r()({borderRadius:"2px"},null==a?void 0:a.style)},a),{},{children:l}))})),d&&(0,w.jsx)("span",{className:j,children:"(建议上传尺寸为472*266的图片)"}),b&&(0,w.jsx)("span",{className:j,style:{width:"4rem"},children:"(需上传尺寸为200*268的图片,大小不超过2MB)"}),k&&(0,w.jsx)("span",{className:j,style:{width:"4rem"},children:"(限制上传2MB内的图片,建议上传尺寸为283*177的图片)"})]})})}},81878:function(e,n,t){t.r(n),t.d(n,{default:function(){return pe}});var i=t(82242),s=t.n(i),l=t(7557),o=t.n(l),a=t(41498),r=t.n(a),c=t(37205),u=t.n(c),d=t(79800),h=t.n(d),m=t(59301),p=t(8591),v=t(6848),f=t(43418),_=t(95237),x=t(43604),g=t(58421),j=t(13032),w="BannerStyle___nBur1",y="BannerStyleContent___BWJw0",b="DivDownPlay___UxEQf",k="CustomInputStyle___hlhUc",Z="teacherList___su0_a",C="top_bg_img___cmYFQ",S="techer_content___bgSA5",N="img___LchtM",R="teacher_img___l8Tb6",E="content___sMnqv",F="shuji_list___FhkLj",P="shuji_list_warp___cIMiD",I="ellipsis___CyQwV",L="shenhe_icon___cRhss",B="shuming___W1km7",T="shuji_jianjie___X7_wI",O="teacher_header___MrKe6",z="teacher_name___rAJpd",M="teacher_school___nvAEr",G="iconUpdate___Gab4k",q="iconDetele___xyhpb",A="expansion___zOJvl",D="expansion2___Du6w4",J=t(17631),V=(t(56349),t(58181)),U=t(46906),W=t(72226),H=t(39647),Q=t.n(H),X=t(78241),K=t(10249),Y=t(81327),$=t(57809),ee=t(61186),ne=t.n(ee),te="form___Fxxn8",ie=(t(19248),t(12893)),se=t(32134),le=t(3196),oe=t(37712),ae=["key","name"],re=(0,j.connect)((function(e){return{dispatch:e.dispatch,coreCurriculum:e.coreCurriculum}}))((function(e){var n=e.visible,t=e.bookList,i=e.onOk,l=e.onCancel,a=e.title,c=void 0===a?"":a,u=e.coreCurriculum,d=e.dispatch,p=(u.CoreSubjects,X.Z.useForm()),v=h()(p,1)[0],_=(0,m.useState)(!1),x=h()(_,2),g=x[0],j=x[1],w=(0,m.useState)([]),y=h()(w,2),b=(y[0],y[1]),k=(0,m.useState)(!1),Z=h()(k,2),C=Z[0];Z[1];(0,m.useEffect)((function(){if(d({type:"coreCurriculum/getCoreSubjects",payload:{page:1,limit:12}}),null!=n&&n.id){var e,t,i;v.setFieldsValue(s()(s()({},n),{},{attachment_id:null==n||null===(e=n.attachment)||void 0===e?void 0:e.id,publication_time:ne()(null==n?void 0:n.publication_time),material_type:null==n||null===(t=n.material_type)||void 0===t?void 0:t.toString()}));var l=[s()(s()({},null==n?void 0:n.attachment),{},{response:{id:null==n||null===(i=n.attachment)||void 0===i?void 0:i.id}})];b(l)}}),[n]);var S=function(){var e=r()(o()().mark((function e(n){var t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:j(!0),t=s()({},n),i(t);case 3:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,oe.jsx)(f.Z,{title:"".concat(null!=n&&n.id?"编辑":"新建").concat(c),visible:n,onOk:function(){v.submit()},centered:!0,onCancel:function(){l()},confirmLoading:g,okButtonProps:{disabled:C},width:720,afterClose:function(){j(!1),b([]),v.resetFields()},okText:"确认",cancelText:"取消",children:(0,oe.jsxs)(X.Z,{form:v,colon:!1,labelCol:{span:3},onFinish:S,className:te,children:[(0,oe.jsx)(X.Z.Item,{label:"姓名",name:"name",rules:[{required:!0,message:"请输入主审专家姓名"},{whitespace:!0,message:"请输入主审专家姓名"},{max:50,message:"只能输入50个字符"}],children:(0,oe.jsx)(K.Z,{maxLength:50,placeholder:"请输入主审专家姓名"})}),(0,oe.jsx)(X.Z.Item,{label:"职称",name:"title",rules:[{required:!0,message:"请输入职称"},{whitespace:!0,message:"请输入职称"},{max:100,message:"只能输入100个字符"}],children:(0,oe.jsx)(K.Z,{maxLength:100,placeholder:"请输入职称"})}),(0,oe.jsx)(X.Z.Item,{label:"简介",name:"profile",rules:[{required:!0,message:"请输入简介"}],children:(0,oe.jsx)(K.Z.TextArea,{rows:4,placeholder:"请输入简介",maxLength:300})}),(0,oe.jsx)(X.Z.Item,{name:"cover_id",label:"照片",rules:[{required:!0,message:"请上传照片"}],children:(0,oe.jsx)(le.Z,{showText:!0,ButtonText:(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)("i",{className:"iconfont icon-shangchuanfujian r5 font14"}),(0,oe.jsx)("span",{className:"ml5",children:"上传照片"})]})})}),(0,oe.jsx)(X.Z.Item,{label:"审核教材",name:"publisher",rules:[{required:!1,message:"请输入简介"}],children:(0,oe.jsx)(X.Z.List,{name:"data",children:function(e,n){var i=n.add,l=n.remove;return(0,oe.jsxs)(oe.Fragment,{children:[e.map((function(e){var n=e.key,o=e.name,a=Q()(e,ae);return(0,oe.jsxs)(Y.Z,{style:{display:"flex",alignItems:"center",marginBottom:8,background:"#F6F7F9",borderRadius:"2px",padding:20,paddingBottom:"5px"},align:"baseline",children:[(0,oe.jsxs)("div",{children:[(0,oe.jsx)(X.Z.Item,s()(s()({},a),{},{name:[o,"name"],label:"教材名称",labelCol:{span:4},rules:[{required:!0,message:"请输入教材名称"}],children:(0,oe.jsx)(K.Z,{placeholder:"请输入教材名称",style:{width:400}})})),(0,oe.jsx)(X.Z.Item,s()(s()({},a),{},{name:[o,"book_id"],label:"关联",labelCol:{span:4},rules:[{required:!1,message:"请选择"}],children:(0,oe.jsx)($.default,{placeholder:"请选择",style:{width:400},getPopupContainer:function(e){return e.parentElement},children:null==t?void 0:t.map((function(e,n){return(0,oe.jsx)($.default.Option,{value:null==e?void 0:e.id,children:null==e?void 0:e.name},n)}))})}))]}),(0,oe.jsxs)("div",{style:{marginLeft:8},children:[(0,oe.jsx)(ie.Z,{onClick:function(){return l(o)},style:{color:"#00B187",marginRight:20}}),(0,oe.jsx)(se.Z,{onClick:function(){return i()},style:{color:"#E30000"}})]})]},n)})),(0,oe.jsx)(X.Z.Item,{children:(0,oe.jsx)(U.op,{style:{borderRadius:"2px",marginLeft:0,marginTop:3},onClick:function(){return i()},children:"增加审核教材"})})]})}})})]})})})),ce=t(20731),ue=t(68738),de=t(69142),he=t(48815),me=t(5531),pe=(0,j.connect)((function(e){var n=e.homePage,t=e.loading,i=e.globalSetting,s=e.user;return{homePage:n,globalSetting:i,loading:t.models.homePage,user:s}}))((function(e){e.homePage;var n,t,i=e.globalSetting,l=(e.user,e.dispatch),a=(0,m.useState)([]),c=h()(a,2),d=c[0],H=c[1],Q=(0,m.useState)(!1),X=h()(Q,2),K=X[0],Y=X[1],$=(0,m.useState)(!1),ee=h()($,2),ne=ee[0],te=ee[1],ie=(0,m.useState)({page:1,limit:10,keyword:""}),se=h()(ie,2),le=se[0],ae=se[1],pe=(0,m.useState)(!1),ve=h()(pe,2),fe=(ve[0],ve[1]),_e=(0,m.useState)(0),xe=h()(_e,2),ge=xe[0],je=xe[1],we=(0,m.useState)([]),ye=h()(we,2),be=ye[0],ke=ye[1],Ze=(0,m.useState)(0),Ce=h()(Ze,2),Se=Ce[0],Ne=Ce[1],Re=(0,m.useRef)(null),Ee=(0,m.useState)(""),Fe=h()(Ee,2),Pe=Fe[0],Ie=Fe[1],Le=(0,m.useState)(!1),Be=h()(Le,2),Te=Be[0],Oe=Be[1];(0,m.useEffect)((function(){ze()}),[]),(0,m.useEffect)((function(){Me(!0)}),[le]),(0,m.useEffect)((function(){if(Re.current&&be.length>0){var e=be.map((function(e,n){var t=document.getElementsByClassName("item_books_".concat(n))[0];if(t){var i=t.clientHeight,s=window.getComputedStyle(t).minHeight,l=i>parseFloat(s);e.books_showEllipsis=l,e.books_showReadFull=l}return e}));ke(u()(e))}}),[Se]);var ze=function(){var e=r()(o()().mark((function e(){var n,t;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,V.ZP)("/api/core_materials/list.json",{method:"get"});case 2:-1!==(null==(n=e.sent)?void 0:n.status)&&H(null==n||null===(t=n.data)||void 0===t?void 0:t.list);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Me=function(){var e=r()(o()().mark((function e(){var n,t,i,l,a,r,c=arguments;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=c.length>0&&void 0!==c[0]&&c[0],fe(!0),t=n?{}:s()({},le),e.next=5,(0,V.ZP)("/api/specialist_infos.json",{method:"get",params:s()({},t)});case 5:0==(null==(i=e.sent)?void 0:i.status)&&(Y(null==i?void 0:i.can_edit),Oe(null==i?void 0:i.description_permissionicture),Ie(null==i?void 0:i.description),r=null==i||null===(l=i.data)||void 0===l?void 0:l.list.map((function(e,n){var t,i=JSON.parse(JSON.stringify({profile:null==e?void 0:e.profile}));return null!=e&&e.profile&&(null==e||null===(t=e.profile)||void 0===t?void 0:t.length)>85?(e.profileCopy=(null==i?void 0:i.profile.slice(0,85))+"...",e.snapshot_showEllipsis=!0,e.snapshot_showReadFull=!0):(e.snapshot_showEllipsis=!1,e.snapshot_showReadFull=!1),e.books_showEllipsis=!1,e.books_showReadFull=!1,e})),ke(r||[]),Ne(Se+1),je(null==i||null===(a=i.data)||void 0===a?void 0:a.total)),fe(!1);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ge=function(){var e=r()(o()().mark((function e(n){var t,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null==ne||!ne.id){e.next=7;break}return e.next=3,(0,V.ZP)("/api/specialist_infos/".concat(null==ne?void 0:ne.id,".json"),{method:"put",body:s()({},n)});case 3:0==(null==(t=e.sent)?void 0:t.status)&&(p.ZP.success("".concat(null!=ne&&ne.id?"编辑":"添加","成功")),te(!1),Me()),e.next=11;break;case 7:return e.next=9,(0,V.ZP)("/api/specialist_infos.json",{method:"post",body:s()({},n)});case 9:0==(null==(i=e.sent)?void 0:i.status)&&(p.ZP.success("添加成功"),te(!1),Me());case 11:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,oe.jsxs)("section",{style:{paddingBottom:"3rem"},children:[(0,oe.jsx)("div",{className:w,style:{backgroundImage:"url(".concat(J.Z.IMG_SERVER,"/").concat(null==i||null===(n=i.setting)||void 0===n?void 0:n.news_banner_url,")")},children:(0,oe.jsxs)("div",{className:y,children:[(0,oe.jsxs)("div",{children:[(0,oe.jsx)("div",{style:{color:"#fff",fontSize:".34rem",letterSpacing:".05rem",fontWeight:600},children:(0,ce.Iz)("/judge",null==i||null===(t=i.setting)||void 0===t?void 0:t.navbar)}),K&&(0,oe.jsxs)("div",{style:{display:"flex"},children:[(0,oe.jsxs)("div",{className:"".concat(b),style:{width:"1rem"},onClick:function(){return te(!0)},children:[(0,oe.jsx)("i",{className:"iconfont icon-icon_xinyong_xianxing_jijin-249",style:{marginRight:"0.05rem",fontSize:".16rem"}}),"新建"]}),(0,oe.jsxs)("div",{className:"".concat(b),style:{marginLeft:".2rem",width:"1.5rem"},onClick:r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Me(!0);case 2:l({type:"classroomList/setActionTabs",payload:{key:"批量调整顺序",params:{name:"主审专家",data:be}}});case 3:case"end":return e.stop()}}),e)}))),children:[(0,oe.jsx)(me.Z,{style:{marginRight:"0.05rem",fontSize:".16rem"}}),"批量调整顺序"]})]}),Te&&(0,oe.jsxs)("div",{className:"".concat(b),style:{marginLeft:".2rem",width:"1.2rem"},onClick:r()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:l({type:"classroomList/setActionTabs",payload:{key:"规划说明",params:{name:"主审专家",content:Pe}}});case 1:case"end":return e.stop()}}),e)}))),children:[(0,oe.jsx)("i",{className:"iconfont icon-icon_xinyong_xianxing_jijin-249",style:{marginRight:"0.05rem",fontSize:".16rem"}}),"规划说明"]})]}),(0,oe.jsx)("div",{children:(0,oe.jsx)(U.t7,{placeholder:"请输入关键字进行搜索",className:k,value:le.keyword,onChange:function(e){ae(s()(s()({},le),{},{keyword:e}))}})})]})}),Pe&&(0,oe.jsx)(de.Z,{style:{width:"12rem",margin:" .2rem auto",paddingBottom:"0.2rem"},value:Pe}),(0,oe.jsx)("div",{ref:Re,children:null==be?void 0:be.map((function(e,n){var t,i,l;return(0,oe.jsxs)("div",{className:Z,children:[(0,oe.jsx)("div",{className:C,style:{width:"12rem",height:"0.2rem"}}),(0,oe.jsxs)("div",{className:S,children:[(0,oe.jsx)("div",{className:N,children:(0,oe.jsx)("img",{src:J.Z.IMG_SERVER+(null==e||null===(t=e.cover)||void 0===t?void 0:t.url),className:R})}),(0,oe.jsxs)("div",{className:E,children:[(0,oe.jsxs)("div",{className:O,children:[(0,oe.jsx)(v.Z,{title:null==e?void 0:e.name,children:(0,oe.jsx)("div",{className:z,children:null==e?void 0:e.name})}),(0,oe.jsx)(v.Z,{title:null==e?void 0:e.title,children:(0,oe.jsx)("div",{className:M,children:null==e?void 0:e.title})}),K&&(null==e?void 0:e.is_creator)&&(0,oe.jsxs)(oe.Fragment,{children:[(0,oe.jsx)(v.Z,{title:"编辑",children:(0,oe.jsx)("i",{className:"iconfont icon-bianji-moren ".concat(G),onClick:function(){te(e)}})}),(0,oe.jsx)(v.Z,{title:"删除",children:(0,oe.jsx)("i",{className:"iconfont icon-shanchu13 ".concat(q),onClick:function(){var n;f.Z.confirm({icon:null,title:"提示",centered:!0,content:"请确认是否删除",okText:"确定",cancelText:"取消",onOk:(n=r()(o()().mark((function n(){var t;return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,V.ZP)("/api/specialist_infos/".concat(null==e?void 0:e.id,".json"),{method:"delete"});case 2:0===(null==(t=n.sent)?void 0:t.status)&&(p.ZP.info("删除成功"),Me());case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})})}})})]})]}),(0,oe.jsxs)("div",{className:"".concat(T," item_snapshot_").concat(n),children:["简介:",null!=e&&e.snapshot_showReadFull?null==e?void 0:e.profileCopy:null==e?void 0:e.profile,(null==e?void 0:e.snapshot_showEllipsis)&&(0,oe.jsx)("span",{className:A,onClick:function(t){t.stopPropagation(),be[n]=s()(s()({},e),{},{snapshot_showReadFull:!(null!=e&&e.snapshot_showReadFull)}),ke(u()(be))},children:null!=e&&e.snapshot_showReadFull?"展开 ":"收起"})]}),(null==e||null===(i=e.data)||void 0===i?void 0:i.length)>0&&(0,oe.jsxs)("div",{className:F,children:[(0,oe.jsxs)("div",{className:"".concat(P," item_books_").concat(n),style:{maxHeight:(null==e?void 0:e.books_showReadFull)&&"0.4rem",paddingRight:(null==e?void 0:e.books_showReadFull)&&"0.5rem"},children:[null==e||null===(l=e.data)||void 0===l?void 0:l.map((function(e,n){return(0,oe.jsxs)("div",{onClick:function(){null!=e&&e.book_id?j.history.push("/textbook/detail/".concat(null==e?void 0:e.book_id,"?backUrl=/judge")):p.ZP.warning("该书籍未关联内容")},className:B,children:["《",null==e?void 0:e.name,"》"]},n)})),(null==e?void 0:e.books_showEllipsis)&&(0,oe.jsx)("div",{className:I,children:(null==e?void 0:e.books_showEllipsis)&&(0,oe.jsx)("div",{className:D,style:{marginRight:0},onClick:function(t){t.stopPropagation(),be[n]=s()(s()({},e),{},{books_showReadFull:!(null!=e&&e.books_showReadFull)}),ke(u()(be))},children:null!=e&&e.books_showReadFull?"展开 ":"收起"})})]}),(0,oe.jsx)("div",{className:L})]})]})]})]},n)}))}),0==(null==be?void 0:be.length)&&(0,oe.jsx)(W.Z,{}),(null==be?void 0:be.length)>0&&(0,oe.jsxs)(_.Z,{wrap:!1,align:"middle",justify:"space-between",style:{width:"12rem",margin:".2rem auto",padding:"0 .2rem"},children:[(0,oe.jsxs)(x.Z,{children:["共 ",(0,oe.jsx)("span",{style:{color:"#165DFF"},children:ge||0})," 条数据"]}),(0,oe.jsx)(x.Z,{children:(0,oe.jsx)(g.Z,{showSizeChanger:!1,showQuickJumper:!0,current:le.page,pageSize:le.limit,onChange:function(e,n){le.page=e,ae(s()({},le)),Me()},total:ge||0})})]}),(0,oe.jsx)(re,{visible:ne,title:"主审专家",onCancel:function(){return te(!1)},onOk:Ge,bookList:d}),(0,oe.jsx)(ue.Z,{getData:Me}),(0,oe.jsx)(he.Z,{getData:Me})]})}))}}]); \ No newline at end of file diff --git a/p__Listening__Index__index.async.js b/p__Listening__Index__index.async.js index 3b9917b7aa..ba33b7d804 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 r}});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),l=function(e,n){return a.createElement(c.Z,(0,i.Z)({},e,{ref:n,icon:s}))};var r=a.forwardRef(l)},32134:function(e,n,t){t.d(n,{Z:function(){return r}});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),l=function(e,n){return a.createElement(c.Z,(0,i.Z)({},e,{ref:n,icon:s}))};var r=a.forwardRef(l)},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:Z(),(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)})}),Z=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)(v.Z,{onClick:c()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Z();case 1:case"end":return e.stop()}}),e)}))),style:{fontSize:"16px",color:"red"}})})]}):(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(x.Z,r()(r()({},H),{},{children:(0,k.jsx)(A.op,r()(r()({style:r()({borderRadius:"2px"},null==l?void 0:l.style)},l),{},{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),l=t(79800),r=t.n(l),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,l=(0,o.useState)(!1),u=r()(l,2),g=u[0],h=u[1],v=(0,o.useState)(""),A=r()(v,2),j=A[0],k=A[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),l=t(41498),r=t.n(l),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),v=t(39996),A=t(72226),j=t(17631),k=t(37712),y=function(e){var n,t,i,s,l,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,H=e.close,Z=e.onClose,E=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)(),U=u()(L,2),z=U[0],Y=U[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=r()(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,v.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(E&&m.bgBlack," ").concat(b?m.wrp:"hide"),children:[H&&(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(){Z(),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:Z,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!==(l=N)&&void 0!==l&&l.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&&z&&(0,k.jsx)("iframe",{src:"".concat(V,"/office.html?key=").concat(z.key,"&url=").concat(K+z.url,"&callbackUrl=").concat(K+z.callbackUrl,"&fileType=").concat(z.fileType,"&title=").concat(z.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)(A.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 U}});var i=t(82242),a=t.n(i),s=t(37205),c=t.n(s),l=t(91232),r=t.n(l),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=["