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/p__Engineering__Lists__Curs...

2 lines
97 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[9391],{57931:function(Pt,et,B){var e=B(59301),c=B(93314),Ie=B(3113),S=Object.defineProperty,Ee=Object.defineProperties,W=Object.getOwnPropertyDescriptors,U=Object.getOwnPropertySymbols,tt=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable,oe=(G,O,z)=>O in G?S(G,O,{enumerable:!0,configurable:!0,writable:!0,value:z}):G[O]=z,H=(G,O)=>{for(var z in O||(O={}))tt.call(O,z)&&oe(G,z,O[z]);if(U)for(var z of U(O))ne.call(O,z)&&oe(G,z,O[z]);return G},F=(G,O)=>Ee(G,W(O));const fe=({img:G,buttonProps:O={},styles:z={},customText:ze,ButtonText:Me,ButtonClick:lt,Buttonclass:nt,ButtonTwo:q,imgStyles:m,loading:N=!1})=>e.createElement("section",{className:"tc animated fadeIn",style:H(H({},{color:"#999",margin:"100px auto",visibility:N?"hidden":"visible"}),z)},e.createElement("img",{src:G||c,style:F(H({},m),{pointerEvents:"none",userSelect:"none"})}),e.createElement("p",{className:"mt20 font14"},ze||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),Me&&e.createElement(Ie.ZP,H({className:nt,onClick:lt},O),Me),q&&q);et.Z=fe},66322:function(Pt,et,B){B.d(et,{Z:function(){return nt}});var e=B(59301),c={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ie=B(3113),S=B(24758),Ee=B(3840),W=B(95435),U=B(13330),tt=B(38100),ne=B(57931),oe=B(71848),H=B(32463),F=B(59301),fe=Object.defineProperty,G=Object.getOwnPropertySymbols,O=Object.prototype.hasOwnProperty,z=Object.prototype.propertyIsEnumerable,ze=(q,m,N)=>m in q?fe(q,m,{enumerable:!0,configurable:!0,writable:!0,value:N}):q[m]=N,Me=(q,m)=>{for(var N in m||(m={}))O.call(m,N)&&ze(q,N,m[N]);if(G)for(var N of G(m))z.call(m,N)&&ze(q,N,m[N]);return q},lt=(q,m,N)=>new Promise((Y,ve)=>{var Ve=he=>{try{Re(N.next(he))}catch(Ze){ve(Ze)}},ut=he=>{try{Re(N.throw(he))}catch(Ze){ve(Ze)}},Re=he=>he.done?Y(he.value):Promise.resolve(he.value).then(Ve,ut);Re((N=N.apply(q,m)).next())}),nt=({editOffice:q="view",data:m,theme:N,type:Y,filename:ve,monacoEditor:Ve,className:ut,style:Re,close:he,onClose:Ze,hasMask:mt,disabledDownload:T,onImgDimensions:We,showNodata:Je,recordInfo:Qe})=>{const[It,bt]=(0,e.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[gt,at]=(0,e.useState)(""),[Ne,ft]=(0,e.useState)(),xt=window.ENV==="build"?"/react/build":"",st=location.host.startsWith("localhost")?oe.Z.PROXY_SERVER:oe.Z.API_SERVER,Zt=10*(1024*1024),it=(0,e.useRef)();m!=null&&m.startsWith("/api")&&Y!=="txt"&&(m=oe.Z.API_SERVER+m);const yt=M=>M.substring(M.lastIndexOf("/")+1).split(".").pop();ve&&Ve&&(Ve.filename=ve),(0,e.useEffect)(()=>{var M,xe;const D=(xe=(M=document.cookie)==null?void 0:M.replace(/\s/g,""))==null?void 0:xe.split(";");D==null||D.map(At=>{let Bt=At.split("=");Bt[0]==="_educoder_session"&&at(Bt[1])})},[]),(0,e.useEffect)(()=>{Y==="office"&&(m.indexOf("bigfilescdn.")>-1||m.indexOf("bigfiles1")>-1?ft({url:m,fileType:yt(m),model:m.indexOf("model=edit")?"edit":"view"}):wt())},[Y,m]);const wt=()=>lt(void 0,null,function*(){console.log("data:",m);let M=m;m.startsWith("http")||(M=location.origin+M);let xe=new URL(M).pathname.split("/").pop();const D=yield(0,tt.gJ)({attachment_id:xe});D.url=st+D.url,ft(D)}),_t=()=>{if(m.startsWith("http")||m.startsWith("blob:")){ct();return}(0,U.Sv)(ve||"educoder",m,ve)},ct=()=>{Qe&&(0,H.fc)({id:Qe==null?void 0:Qe.id,watch_type:1,course_id:Qe==null?void 0:Qe.course_id}),(0,U.Nd)(ve||"educoder",decodeURIComponent(m))};return F.createElement("div",{style:Me({},Re||{}),className:`${mt&&c.bgBlack} ${Y?c.wrp:"hide"}`},he&&F.createElement("div",{className:c.close,ref:it},!!We&&F.createElement(W.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>it.current},F.createElement("span",{onClick:()=>{Ze(),We()}},F.createElement("i",{className:"icon-yulanpizhu"}))),!T&&F.createElement(W.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>it.current},F.createElement("span",{onClick:ct},F.createElement("i",{className:"icon-quxiaozhiding"}))),F.createElement(W.Z,{title:"\u5173\u95ED",getPopupContainer:()=>it.current},F.createElement("span",{className:"",onClick:Ze},F.createElement("i",{className:"icon-guanbi1"})))),F.createElement("div",{className:`${c[ut]} ${ut} ${c.monaco} ${Y==="txt"?"show":"hide"}`},Y==="txt"&&F.createElement(F.Fragment,null,F.createElement(Ee.ZP,Me({},Ve)))),Y==="audio"&&F.createElement("audio",{src:`${(m==null?void 0:m.indexOf("http://"))>-1||(m==null?void 0:m.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${m}`,autoPlay:!0}),Y==="video"&&F.createElement(F.Fragment,null,(m==null?void 0:m.indexOf("http"))>-1?F.createElement("video",{controls:!0,src:`${m}`,autoPlay:!0}):F.createElement("video",{controls:!0,src:`data:video/mp4;base64,${m}`,autoPlay:!0})),Y==="office"&&Ne&&F.createElement("iframe",{src:`${xt}/office.html?key=${Ne.key}&url=${btoa(Ne.url)}&callbackUrl=${st+Ne.callbackUrl}&fileType=${Ne.fileType}&title=${Ne.title}&model=${q}&officeServer=${oe.Z.ONLYOFFICE}&disabledDownload=${!!T}`}),Y==="html"&&F.createElement("iframe",{src:m+"&disposition=inline"}),Y==="pdf"&&F.createElement("iframe",{src:`${xt}/js/pdfview/index.html?filename=${ve||"educoder.pdf"}&url=${encodeURIComponent(m)}&disabledDownload=${!!T}`}),Y==="image"&&F.createElement("img",{src:`${(m==null?void 0:m.indexOf("http://"))>-1||(m==null?void 0:m.indexOf("https://"))>-1?"":"data:image/png;base64,"}${m}`}),(Y==="other"||Y==="download")&&F.createElement(F.Fragment,null,Je?F.createElement(ne.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:F.createElement(Ie.ZP,{icon:F.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:_t,disabled:T},"\u4E0B\u8F7D")}):F.createElement(Ie.ZP,{type:"primary",size:"middle",onClick:_t,disabled:T},F.createElement(S.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},43703:function(Pt,et,B){B.r(et),B.d(et,{default:function(){return Bt}});var e=B(59301),c={flex_box_center:"flex_box_center___EE2m_",flex_space_between:"flex_space_between___Kx6gd",flex_box_vertical_center:"flex_box_vertical_center___HpACx",flex_box_center_end:"flex_box_center_end___wbVo8",flex_box_column:"flex_box_column___m87JY",wrap:"wrap___Pt66y",title:"title___dGCnl",standardTableWrap:"standardTableWrap___nFf7g",targetTableWrap:"targetTableWrap___dHw3L",waysTableWrap:"waysTableWrap___bdq6I",green:"green___IznFa",box:"box___GqhHB",padding:"padding___nFfG0",control:"control___ODG9O",label:"label___bq9qV",customTable:"customTable___Yp8nh",tagWrap:"tagWrap___RoLwt",tag:"tag___Lhqqj",line:"line___j6OTt",textwidth:"textwidth___S4C7M",modalWrapContainer:"modalWrapContainer___bNs_c",inputWrap:"inputWrap___eHeJs",addCourseTabsContainer:"addCourseTabsContainer___J8THT",textone:"textone___cOB6b"},Ie=B(41167),S=B(68335),Ee=B(78700),W=B(8591),U=B(57809),tt=B(5157),ne=B(3113),oe=B(53504),H=B(95435),F=B(43418),fe=B(73755),G=B(92832),O=B(36537),z=B(62061),ze=B(98554),Me=B(95237),lt=B(43604),nt=B(71848),q=B(58982),m=B(66322),N=B(59263),Y=B(45413),ve=Object.defineProperty,Ve=Object.defineProperties,ut=Object.getOwnPropertyDescriptors,Re=Object.getOwnPropertySymbols,he=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,mt=(_,C,v)=>C in _?ve(_,C,{enumerable:!0,configurable:!0,writable:!0,value:v}):_[C]=v,T=(_,C)=>{for(var v in C||(C={}))he.call(C,v)&&mt(_,v,C[v]);if(Re)for(var v of Re(C))Ze.call(C,v)&&mt(_,v,C[v]);return _},We=(_,C)=>Ve(_,ut(C)),Je=(_,C,v)=>new Promise(($,ee)=>{var ie=A=>{try{s(v.next(A))}catch(Q){ee(Q)}},ue=A=>{try{s(v.throw(A))}catch(Q){ee(Q)}},s=A=>A.done?$(A.value):Promise.resolve(A.value).then(ie,ue);s((v=v.apply(_,C)).next())});function Qe({isshow:_,setishow:C,modalparams:v,courseId:$,getcourse_evaluations:ee,getevaluations:ie,items:ue,points:s}){var A;const Q={page:1,per_page:20,total:0,name:""},[se,Fe]=(0,e.useState)(0);let[X,re]=(0,e.useState)(Q);const[pt,Xe]=(0,e.useState)([]),[de,Ke]=(0,e.useState)($?(A=ue==null?void 0:ue.contents)==null?void 0:A.map(i=>i.course_id):[]);let[b,K]=(0,e.useState)([]),[k,f]=(0,e.useState)([]);const[me,ye]=(0,e.useState)("1"),[Ce,be]=(0,e.useState)(!1);(0,e.useEffect)(()=>{var i;_&&(Ke($?(i=ue==null?void 0:ue.contents)==null?void 0:i.map(g=>g.course_id):[]),He(X))},[_]);function He(i){return Je(this,null,function*(){let g=yield(0,S.ZP)("/api/ec_courses/1/course_evaluations/search_courses.json",{method:"get",params:i});g!=null&&g.courses&&(X.total=g==null?void 0:g.count,re(T({},X)),Xe(g==null?void 0:g.courses))})}const Ge=(i,g,Z)=>{X.page=i==null?void 0:i.current,X.per_page=i==null?void 0:i.pageSize,Z!=null&&Z.order?(X.sort_by=Z==null?void 0:Z.field,X.direction=(Z==null?void 0:Z.order)==="ascend"?"asc":"desc"):(X.sort_by=null,X.direction=null),re(T({},X)),He(X)},we={selectedRowKeys:de,columnWidth:40,onChange:i=>Ke(i),getCheckboxProps:i=>({disabled:i.is_manager})},Ae=i=>{let g=i;return g=isNaN(g)?"":g,g[0]==="."&&(g=""),g},Ye=()=>e.createElement("div",{style:{padding:"0 40px",color:"#464F66"}},e.createElement("div",{style:{marginBottom:10}},"\u7EC4\u5408\u8BA1\u7B97\u8BF4\u660E\uFF1A"),e.createElement("div",null,"1.\u5F53\u9700\u8981\u5B8C\u6210\u540C\u4E00\u77E5\u8BC6\u70B9\u5B66\u4E60/\u80FD\u529B\u8BAD\u7EC3\u7684\u5B66\u751F\u5206\u6563\u5728\u591A\u4E2A\u6559\u5B66\u8BFE\u5802\uFF0C\u6216\u8005\u5206\u6563\u5728\u4E00\u4E2A\u8BFE\u5802\u4E0B\u7684\u591A\u4E2A\u5206\u73ED\u65F6\uFF0C\u9700\u8981\u8FDB\u884C\u201C\u7EC4\u5408\u8BA1\u7B97\u201D\u8BBE\u7F6E\uFF1B"),e.createElement("div",null,"2.\u5C06\u9700\u8981\u7EC4\u5408\u8BA1\u7B97\u7684\u8003\u6838\u5185\u5BB9\u8F93\u5165\u76F8\u540C\u7684\u3010\u6570\u5B57\u3011\u5373\u53EF\uFF0C\u5982\uFF1A\u201C\u81EA\u5B9A\u4E49\u51FD\u6570\u201D\u548C\u201C\u51FD\u6570\u201D\u9700\u8981\u7EC4\u5408\u8BA1\u7B97\u7684\u65F6\u5019\uFF0C\u5219\u9700\u8981\u5728\u8FD9\u4E24\u4E2A\u5B9E\u8BAD\u4F5C\u4E1A\u540E\u9762\u8F93\u5165\u76F8\u540C\u7684\u6570\u5B57\uFF1B"),e.createElement("div",null,"3.\u7EC4\u5408\u8BA1\u7B97\u65F6\uFF0C\u4F1A\u4EE5\u8BE5\u8BA4\u8BC1\u5C4A\u522B\u4E0B\u4E13\u4E1A\u8BA4\u8BC1\u7684\u5B66\u751F\u603B\u6570\u4E3A\u57FA\u51C6\u8BA1\u7B97\u5B9E\u8BAD\u4F5C\u4E1A\u5E73\u5747\u5206\u3002")),Oe=i=>{var g,Z,j,R,h,E;return e.createElement("div",null,e.createElement("div",{style:{display:"flex",height:"38px",background:"#F5F5F5",alignItems:"center",textAlign:"center",marginTop:"20px"}},e.createElement("span",{style:{width:93}},"\u8003\u6838\u65B9\u5F0F"),e.createElement("span",{style:{width:194}},"\u6559\u5B66\u8BFE\u5802"),e.createElement("span",{style:{width:324}},e.createElement(N.default,{checked:k.length===(i==null?void 0:i.shixun_count),onChange:t=>{var u,a;if((u=i==null?void 0:i.courses)==null||u.map(n=>{var r;(r=n==null?void 0:n.shixun_models)==null||r.map(o=>{o.checked=t.target.checked})}),K(T({},i)),t.target.checked){let n=(a=b==null?void 0:b.courses)==null?void 0:a.map(o=>{var p;return(p=o==null?void 0:o.shixun_models)==null?void 0:p.map(P=>P)}),r=[];n.map(o=>{o.length>0&&(o==null||o.map(p=>{r.push(p)}))}),f([...r])}else f([])}})," \u8003\u6838\u5185\u5BB9"),e.createElement("span",{style:{width:277}},"\u5206\u73ED"),e.createElement("span",{style:{width:214}},"\u8003\u6838\u77E5\u8BC6\u70B9"),e.createElement("span",{style:{width:87}},"\u6EE1\u5206\u503C"),e.createElement("span",{style:{width:93}},"\u7EC4\u5408\u8BA1\u7B97")),e.createElement("div",{style:{display:"flex",alignItems:"center",textAlign:"center",border:"1px solid #f0f0f0",maxHeight:"552px",overflow:"auto"}},e.createElement("span",{style:{width:93}},i.name),e.createElement("span",{style:{width:194,maxHeight:"552px"}},(g=i==null?void 0:i.courses)==null?void 0:g.map(t=>{var u,a,n,r;return e.createElement("div",{className:c.textwidth,style:{height:((u=t==null?void 0:t.shixun_models)==null?void 0:u.length)===0?40:((a=t==null?void 0:t.shixun_models)==null?void 0:a.length)*40,lineHeight:((n=t==null?void 0:t.shixun_models)==null?void 0:n.length)===0?"40px":((r=t==null?void 0:t.shixun_models)==null?void 0:r.length)*40+"px"}},t.name)})),e.createElement("span",{style:{width:324,maxHeight:"552px",textAlign:"left"}},e.createElement(N.default.Group,{onChange:t=>{var u;let a=(u=b==null?void 0:b.courses)==null?void 0:u.map(o=>{var p;return(p=o==null?void 0:o.shixun_models)==null?void 0:p.map(P=>P)}),n=[];a.map(o=>{o.length>0&&(o==null||o.map(p=>{n.push(p)}))});let r=n.filter(o=>t.includes(o.id));f(r)},style:{width:"100%"},value:k==null?void 0:k.map(t=>t==null?void 0:t.id)},(Z=i==null?void 0:i.courses)==null?void 0:Z.map(t=>{var u,a;return((u=t==null?void 0:t.shixun_models)==null?void 0:u.length)===0?e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},"--"):(a=t==null?void 0:t.shixun_models)==null?void 0:a.map(n=>e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},e.createElement(N.default,{onChange:r=>{n.checked=r.target.checked,K(T({},i))},value:n==null?void 0:n.id},n.name)))}))),e.createElement("span",{style:{width:277,maxHeight:"552px"}},(j=i==null?void 0:i.courses)==null?void 0:j.map(t=>{var u,a;return((u=t==null?void 0:t.shixun_models)==null?void 0:u.length)===0?e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},"--"):(a=t==null?void 0:t.shixun_models)==null?void 0:a.map(n=>e.createElement(H.Z,{title:n.groups},e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},n.groups)))})),e.createElement("span",{style:{width:214,maxHeight:"552px"}},(R=i==null?void 0:i.courses)==null?void 0:R.map(t=>{var u,a;return((u=t==null?void 0:t.shixun_models)==null?void 0:u.length)===0?e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},"--"):(a=t==null?void 0:t.shixun_models)==null?void 0:a.map(n=>e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},e.createElement(U.default,{value:n.ec_point_ids,onChange:r=>{n.ec_point_ids=r,K(T({},i))},mode:"multiple",style:{width:200}},s.map((r,o)=>e.createElement(U.default.Option,{key:o,value:r.id},`\u77E5\u8BC6\u70B9${o+1}\uFF1A`,r.name)))))})),e.createElement("span",{style:{width:87,maxHeight:"552px"}},(h=i==null?void 0:i.courses)==null?void 0:h.map(t=>{var u,a;return((u=t==null?void 0:t.shixun_models)==null?void 0:u.length)===0?e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},"--"):(a=t==null?void 0:t.shixun_models)==null?void 0:a.map(n=>e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},n.total_score))})),e.createElement("span",{style:{width:93,maxHeight:"552px"}},(E=i==null?void 0:i.courses)==null?void 0:E.map(t=>{var u,a;return((u=t==null?void 0:t.shixun_models)==null?void 0:u.length)===0?e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},e.createElement(O.Z,{disabled:!0})):(a=t==null?void 0:t.shixun_models)==null?void 0:a.map(n=>e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},e.createElement(O.Z,{min:1,step:.1,parser:Ae,value:n==null?void 0:n.position,onChange:r=>{n.position=r,K(T({},i))}})))}))))},ae=i=>{var g,Z,j,R,h,E;return e.createElement("div",null,e.createElement("div",{style:{display:"flex",height:"38px",background:"#F5F5F5",alignItems:"center",textAlign:"center",marginTop:"20px"}},e.createElement("span",{style:{width:93}},"\u8003\u6838\u65B9\u5F0F"),e.createElement("span",{style:{width:194}},"\u6559\u5B66\u8BFE\u5802"),e.createElement("span",{style:{width:324}},e.createElement(N.default,{checked:k.length===(i==null?void 0:i.exercise_count),onChange:t=>{var u,a;if((u=i==null?void 0:i.courses)==null||u.map(n=>{var r;(r=n==null?void 0:n.exercise_models)==null||r.map(o=>{o.checked=t.target.checked})}),K(T({},b)),t.target.checked){let n=(a=b==null?void 0:b.courses)==null?void 0:a.map(o=>{var p;return(p=o==null?void 0:o.exercise_models)==null?void 0:p.map(P=>P)}),r=[];n.map(o=>{o.length>0&&(o==null||o.map(p=>{r.push(p)}))}),f([...r])}else f([])}})," \u8003\u6838\u5185\u5BB9"),e.createElement("span",{style:{width:277}},"\u5206\u73ED"),e.createElement("span",{style:{width:214}},"\u8003\u6838\u77E5\u8BC6\u70B9"),e.createElement("span",{style:{width:87}},"\u6EE1\u5206\u503C"),e.createElement("span",{style:{width:93}},"\u7EC4\u5408\u8BA1\u7B97")),e.createElement("div",{style:{display:"flex",alignItems:"center",textAlign:"center",border:"1px solid #f0f0f0",maxHeight:"552px",overflow:"auto"}},e.createElement("span",{style:{width:93}},i.name),e.createElement("span",{style:{width:194,maxHeight:"552px"}},(g=i==null?void 0:i.courses)==null?void 0:g.map(t=>{var u,a,n,r;return e.createElement("div",{className:c.textwidth,style:{height:((u=t==null?void 0:t.exercise_models)==null?void 0:u.length)===0?40:((a=t==null?void 0:t.exercise_models)==null?void 0:a.length)*40,lineHeight:((n=t==null?void 0:t.exercise_models)==null?void 0:n.length)===0?"40px":((r=t==null?void 0:t.exercise_models)==null?void 0:r.length)*40+"px"}},t.name)})),e.createElement("span",{style:{width:324,maxHeight:"552px",textAlign:"left"}},e.createElement(N.default.Group,{onChange:t=>{var u;let a=(u=b==null?void 0:b.courses)==null?void 0:u.map(o=>{var p;return(p=o==null?void 0:o.exercise_models)==null?void 0:p.map(P=>P)}),n=[];a.map(o=>{o.length>0&&(o==null||o.map(p=>{n.push(p)}))});let r=n.filter(o=>t.includes(o.id));f(r)},style:{width:"100%"},value:k==null?void 0:k.map(t=>t==null?void 0:t.id)},(Z=i==null?void 0:i.courses)==null?void 0:Z.map(t=>{var u,a;return((u=t==null?void 0:t.exercise_models)==null?void 0:u.length)===0?e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},"--"):(a=t==null?void 0:t.exercise_models)==null?void 0:a.map(n=>e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},e.createElement(N.default,{onChange:r=>{n.checked=r.target.checked,K(T({},i))},value:n==null?void 0:n.id},n.name)))}))),e.createElement("span",{style:{width:277,maxHeight:"552px"}},(j=i==null?void 0:i.courses)==null?void 0:j.map(t=>{var u,a;return((u=t==null?void 0:t.exercise_models)==null?void 0:u.length)===0?e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},"--"):(a=t==null?void 0:t.exercise_models)==null?void 0:a.map(n=>e.createElement(H.Z,{title:n.groups},e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},n.groups)))})),e.createElement("span",{style:{width:214,maxHeight:"552px"}},(R=i==null?void 0:i.courses)==null?void 0:R.map(t=>{var u,a;return((u=t==null?void 0:t.exercise_models)==null?void 0:u.length)===0?e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},"--"):(a=t==null?void 0:t.exercise_models)==null?void 0:a.map(n=>e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},e.createElement(U.default,{value:n.ec_point_ids,onChange:r=>{n.ec_point_ids=r,K(T({},i))},mode:"multiple",style:{width:200}},s.map((r,o)=>e.createElement(U.default.Option,{key:o,value:r.id},`\u77E5\u8BC6\u70B9${o+1}\uFF1A`,r.name)))))})),e.createElement("span",{style:{width:87,maxHeight:"552px"}},(h=i==null?void 0:i.courses)==null?void 0:h.map(t=>{var u,a;return((u=t==null?void 0:t.exercise_models)==null?void 0:u.length)===0?e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},"--"):(a=t==null?void 0:t.exercise_models)==null?void 0:a.map(n=>e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},n.total_score))})),e.createElement("span",{style:{width:93,maxHeight:"552px"}},(E=i==null?void 0:i.courses)==null?void 0:E.map(t=>{var u,a;return((u=t==null?void 0:t.exercise_models)==null?void 0:u.length)===0?e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},e.createElement(O.Z,{disabled:!0})):(a=t==null?void 0:t.exercise_models)==null?void 0:a.map(n=>e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},e.createElement(O.Z,{min:1,step:.1,parser:Ae,value:n==null?void 0:n.position,onChange:r=>{n.position=r,K(T({},i))}})))}))))},$e=i=>{var g,Z,j,R,h,E;return e.createElement("div",null,e.createElement("div",{style:{display:"flex",height:"38px",background:"#F5F5F5",alignItems:"center",textAlign:"center",marginTop:"20px"}},e.createElement("span",{style:{width:93}},"\u8003\u6838\u65B9\u5F0F"),e.createElement("span",{style:{width:194}},"\u6559\u5B66\u8BFE\u5802"),e.createElement("span",{style:{width:324}},e.createElement(N.default,{checked:k.length===(i==null?void 0:i.common_count),onChange:t=>{var u,a;if((u=i==null?void 0:i.courses)==null||u.map(n=>{var r;(r=n==null?void 0:n.common_models)==null||r.map(o=>{o.checked=t.target.checked})}),K(T({},b)),t.target.checked){let n=(a=b==null?void 0:b.courses)==null?void 0:a.map(o=>{var p;return(p=o==null?void 0:o.common_models)==null?void 0:p.map(P=>P)}),r=[];n.map(o=>{o.length>0&&(o==null||o.map(p=>{r.push(p)}))}),f([...r])}else f([])}})," \u8003\u6838\u5185\u5BB9"),e.createElement("span",{style:{width:277}},"\u5206\u73ED"),e.createElement("span",{style:{width:214}},"\u8003\u6838\u77E5\u8BC6\u70B9"),e.createElement("span",{style:{width:87}},"\u6EE1\u5206\u503C"),e.createElement("span",{style:{width:93}},"\u7EC4\u5408\u8BA1\u7B97")),e.createElement("div",{style:{display:"flex",alignItems:"center",textAlign:"center",border:"1px solid #f0f0f0",maxHeight:"552px",overflow:"auto"}},e.createElement("span",{style:{width:93}},i.name),e.createElement("span",{style:{width:194,maxHeight:"552px"}},(g=i==null?void 0:i.courses)==null?void 0:g.map(t=>{var u,a,n,r;return e.createElement("div",{className:c.textwidth,style:{height:((u=t==null?void 0:t.common_models)==null?void 0:u.length)===0?40:((a=t==null?void 0:t.common_models)==null?void 0:a.length)*40,lineHeight:((n=t==null?void 0:t.common_models)==null?void 0:n.length)===0?"40px":((r=t==null?void 0:t.common_models)==null?void 0:r.length)*40+"px"}},t.name)})),e.createElement("span",{style:{width:324,maxHeight:"552px",textAlign:"left"}},e.createElement(N.default.Group,{onChange:t=>{var u;let a=(u=b==null?void 0:b.courses)==null?void 0:u.map(o=>{var p;return(p=o==null?void 0:o.common_models)==null?void 0:p.map(P=>P)}),n=[];a.map(o=>{o.length>0&&(o==null||o.map(p=>{n.push(p)}))});let r=n.filter(o=>t.includes(o.id));f(r)},style:{width:"100%"},value:k==null?void 0:k.map(t=>t==null?void 0:t.id)},(Z=i==null?void 0:i.courses)==null?void 0:Z.map(t=>{var u,a;return((u=t==null?void 0:t.common_models)==null?void 0:u.length)===0?e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},"--"):(a=t==null?void 0:t.common_models)==null?void 0:a.map(n=>e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},e.createElement(N.default,{onChange:r=>{n.checked=r.target.checked,K(T({},i))},value:n==null?void 0:n.id},n.name)))}))),e.createElement("span",{style:{width:277,maxHeight:"552px"}},(j=i==null?void 0:i.courses)==null?void 0:j.map(t=>{var u,a;return((u=t==null?void 0:t.common_models)==null?void 0:u.length)===0?e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},"--"):(a=t==null?void 0:t.common_models)==null?void 0:a.map(n=>e.createElement(H.Z,{title:n.groups},e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},n.groups)))})),e.createElement("span",{style:{width:214,maxHeight:"552px"}},(R=i==null?void 0:i.courses)==null?void 0:R.map(t=>{var u,a;return((u=t==null?void 0:t.common_models)==null?void 0:u.length)===0?e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},"--"):(a=t==null?void 0:t.common_models)==null?void 0:a.map(n=>e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},e.createElement(U.default,{value:n.ec_point_ids,onChange:r=>{n.ec_point_ids=r,K(T({},i))},mode:"multiple",style:{width:200}},s.map((r,o)=>e.createElement(U.default.Option,{key:o,value:r.id},`\u77E5\u8BC6\u70B9${o+1}\uFF1A`,r.name)))))})),e.createElement("span",{style:{width:87,maxHeight:"552px"}},(h=i==null?void 0:i.courses)==null?void 0:h.map(t=>{var u,a;return((u=t==null?void 0:t.common_models)==null?void 0:u.length)===0?e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},"--"):(a=t==null?void 0:t.common_models)==null?void 0:a.map(n=>e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},n.total_score))})),e.createElement("span",{style:{width:93,maxHeight:"552px"}},(E=i==null?void 0:i.courses)==null?void 0:E.map(t=>{var u,a;return((u=t==null?void 0:t.common_models)==null?void 0:u.length)===0?e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},e.createElement(O.Z,{disabled:!0})):(a=t==null?void 0:t.common_models)==null?void 0:a.map(n=>e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},e.createElement(O.Z,{min:1,step:.1,parser:Ae,value:n==null?void 0:n.position,onChange:r=>{n.position=r,K(T({},i))}})))}))))},ce=i=>{var g,Z,j,R,h,E;return e.createElement("div",null,e.createElement("div",{style:{display:"flex",height:"38px",background:"#F5F5F5",alignItems:"center",textAlign:"center",marginTop:"20px"}},e.createElement("span",{style:{width:93}},"\u8003\u6838\u65B9\u5F0F"),e.createElement("span",{style:{width:194}},"\u6559\u5B66\u8BFE\u5802"),e.createElement("span",{style:{width:324}},e.createElement(N.default,{checked:k.length===(i==null?void 0:i.group_count),onChange:t=>{var u,a;if((u=i==null?void 0:i.courses)==null||u.map(n=>{var r;(r=n==null?void 0:n.group_models)==null||r.map(o=>{o.checked=t.target.checked})}),K(T({},b)),t.target.checked){let n=(a=b==null?void 0:b.courses)==null?void 0:a.map(o=>{var p;return(p=o==null?void 0:o.group_models)==null?void 0:p.map(P=>P)}),r=[];n.map(o=>{o.length>0&&(o==null||o.map(p=>{r.push(p)}))}),f([...r])}else f([])}})," \u8003\u6838\u5185\u5BB9"),e.createElement("span",{style:{width:277}},"\u5206\u73ED"),e.createElement("span",{style:{width:214}},"\u8003\u6838\u77E5\u8BC6\u70B9"),e.createElement("span",{style:{width:87}},"\u6EE1\u5206\u503C"),e.createElement("span",{style:{width:93}},"\u7EC4\u5408\u8BA1\u7B97")),e.createElement("div",{style:{display:"flex",alignItems:"center",textAlign:"center",border:"1px solid #f0f0f0",maxHeight:"552px",overflow:"auto"}},e.createElement("span",{style:{width:93}},i.name),e.createElement("span",{style:{width:194,maxHeight:"552px"}},(g=i==null?void 0:i.courses)==null?void 0:g.map(t=>{var u,a,n,r;return e.createElement("div",{className:c.textwidth,style:{height:((u=t==null?void 0:t.group_models)==null?void 0:u.length)===0?40:((a=t==null?void 0:t.group_models)==null?void 0:a.length)*40,lineHeight:((n=t==null?void 0:t.group_models)==null?void 0:n.length)===0?"40px":((r=t==null?void 0:t.group_models)==null?void 0:r.length)*40+"px"}},t.name)})),e.createElement("span",{style:{width:324,maxHeight:"552px",textAlign:"left"}},e.createElement(N.default.Group,{onChange:t=>{var u;let a=(u=b==null?void 0:b.courses)==null?void 0:u.map(o=>{var p;return(p=o==null?void 0:o.group_models)==null?void 0:p.map(P=>P)}),n=[];a.map(o=>{o.length>0&&(o==null||o.map(p=>{n.push(p)}))});let r=n.filter(o=>t.includes(o.id));f(r)},style:{width:"100%"},value:k==null?void 0:k.map(t=>t==null?void 0:t.id)},(Z=i==null?void 0:i.courses)==null?void 0:Z.map(t=>{var u,a;return((u=t==null?void 0:t.group_models)==null?void 0:u.length)===0?e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},"--"):(a=t==null?void 0:t.group_models)==null?void 0:a.map(n=>e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},e.createElement(N.default,{onChange:r=>{n.checked=r.target.checked,K(T({},i))},value:n==null?void 0:n.id},n.name)))}))),e.createElement("span",{style:{width:277,maxHeight:"552px"}},(j=i==null?void 0:i.courses)==null?void 0:j.map(t=>{var u,a;return((u=t==null?void 0:t.group_models)==null?void 0:u.length)===0?e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},"--"):(a=t==null?void 0:t.group_models)==null?void 0:a.map(n=>e.createElement(H.Z,{title:n.groups},e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},n.groups)))})),e.createElement("span",{style:{width:214,maxHeight:"552px"}},(R=i==null?void 0:i.courses)==null?void 0:R.map(t=>{var u,a;return((u=t==null?void 0:t.group_models)==null?void 0:u.length)===0?e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},"--"):(a=t==null?void 0:t.group_models)==null?void 0:a.map(n=>e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},e.createElement(U.default,{value:n.ec_point_ids,onChange:r=>{n.ec_point_ids=r,K(T({},i))},mode:"multiple",style:{width:200}},s.map((r,o)=>e.createElement(U.default.Option,{key:o,value:r.id},`\u77E5\u8BC6\u70B9${o+1}\uFF1A`,r.name)))))})),e.createElement("span",{style:{width:87,maxHeight:"552px"}},(h=i==null?void 0:i.courses)==null?void 0:h.map(t=>{var u,a;return((u=t==null?void 0:t.group_models)==null?void 0:u.length)===0?e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},"--"):(a=t==null?void 0:t.group_models)==null?void 0:a.map(n=>e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},n.total_score))})),e.createElement("span",{style:{width:93,maxHeight:"552px"}},(E=i==null?void 0:i.courses)==null?void 0:E.map(t=>{var u,a;return((u=t==null?void 0:t.group_models)==null?void 0:u.length)===0?e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},e.createElement(O.Z,{disabled:!0})):(a=t==null?void 0:t.group_models)==null?void 0:a.map(n=>e.createElement("div",{className:c.textwidth,style:{height:40,lineHeight:"40px"}},e.createElement(O.Z,{min:1,step:.1,parser:Ae,value:n==null?void 0:n.position,onChange:r=>{n.position=r,K(T({},i))}})))}))))};return e.createElement(F.default,{title:"\u6DFB\u52A0\u8BFE\u5802\u6570\u636E",wrapClassName:c.modalWrapContainer,open:_,width:se<2?740:1100,footer:e.createElement("div",null,se<2&&e.createElement(ne.ZP,{type:"primary",onClick:()=>Je(this,null,function*(){var i;if(!de||de==""){W.ZP.warning("\u8BF7\u9009\u62E9\u8BFE\u5802");return}let g=yield(0,S.ZP)(`/api/ec_courses/${v==null?void 0:v.id}/course_evaluations/search_works.json`,{method:"get",params:{course_ids:de,list_id:$||""}});K(g);let Z=(i=g==null?void 0:g.courses)==null?void 0:i.map(R=>{var h;return(h=R==null?void 0:R.shixun_models)==null?void 0:h.map(E=>E)}),j=[];Z.map(R=>{R.length>0&&(R==null||R.map(h=>{h.checked&&j.push(h)}))}),f([...j]),ye("1"),Fe(2)})},"\u4E0B\u4E00\u6B65"),se>=2&&e.createElement("div",null,e.createElement(ne.ZP,{type:"primary",onClick:()=>Je(this,null,function*(){C(!1),Fe(0)})},"\u53D6\u6D88"),e.createElement(ne.ZP,{type:"primary",loading:Ce,onClick:()=>Je(this,null,function*(){var i,g,Z,j;let R=(i=b==null?void 0:b.courses)==null?void 0:i.map(o=>{var p;return(p=o==null?void 0:o.common_models)==null?void 0:p.map(P=>P)}),h=[];R.map(o=>{o.length>0&&(o==null||o.map(p=>{p.checked&&h.push(p)}))});let E=(g=b==null?void 0:b.courses)==null?void 0:g.map(o=>{var p;return(p=o==null?void 0:o.group_models)==null?void 0:p.map(P=>P)}),t=[];E.map(o=>{o.length>0&&(o==null||o.map(p=>{p.checked&&t.push(p)}))});let u=(Z=b==null?void 0:b.courses)==null?void 0:Z.map(o=>{var p;return(p=o==null?void 0:o.exercise_models)==null?void 0:p.map(P=>P)}),a=[];u.map(o=>{o.length>0&&(o==null||o.map(p=>{p.checked&&a.push(p)}))});let n=(j=b==null?void 0:b.courses)==null?void 0:j.map(o=>{var p;return(p=o==null?void 0:o.shixun_models)==null?void 0:p.map(P=>P)}),r=[];if(n.map(o=>{o.length>0&&(o==null||o.map(p=>{p.checked&&r.push(p)}))}),me==="1"?r=k:me==="2"?h=k:me==="3"?t=k:a=k,be(!0),(r==null?void 0:r.length)<=0&&(h==null?void 0:h.length)<=0&&(t==null?void 0:t.length)<=0&&(a==null?void 0:a.length)<=0){W.ZP.info("\u8BF7\u9009\u62E9\u8003\u6838\u5185\u5BB9"),be(!1);return}$?(yield(0,S.ZP)(`/api/ec_courses/${v==null?void 0:v.id}/course_evaluations/update_online`,{method:"put",body:{id:$,course_ids:de,shixun_works:r,common_works:h,group_works:t,exercise_works:a}}))&&(C(!1),ee(v),ie(v)):(yield(0,S.ZP)(`/api/ec_courses/${v==null?void 0:v.id}/course_evaluations/create_online`,{method:"post",body:{course_ids:de,shixun_works:r,common_works:h,group_works:t,exercise_works:a}}))&&(C(!1),ee(v),ie(v)),be(!1),Fe(0)})},"\u4FDD\u5B58"))),onCancel:()=>{Fe(0),C(!1)}},e.createElement("div",{style:{width:"calc(100% - 184px)",margin:"0 auto"}},e.createElement(Y.default,{current:se},e.createElement(Y.default.Step,{style:{cursor:"pointer"},onClick:()=>{Fe(1)},key:1,title:"\u5173\u8054\u8BFE\u5802"}),e.createElement(Y.default.Step,{style:{cursor:"pointer"},onClick:()=>Je(this,null,function*(){var i;if(de.length<=0){W.ZP.info("\u8BF7\u9009\u62E9\u8BFE\u5802");return}let g=yield(0,S.ZP)(`/api/ec_courses/${v==null?void 0:v.id}/course_evaluations/search_works.json`,{method:"get",params:{course_ids:de,list_id:$||""}});K(g);let Z=(i=g==null?void 0:g.courses)==null?void 0:i.map(R=>{var h;return(h=R==null?void 0:R.shixun_models)==null?void 0:h.map(E=>E)}),j=[];Z.map(R=>{R.length>0&&(R==null||R.map(h=>{h.checked&&j.push(h)}))}),f([...j]),ye("1"),Fe(2)}),key:2,title:"\u914D\u7F6E\u8003\u6838\u65B9\u5F0F\u4E0E\u5185\u5BB9"}))),se<2&&e.createElement("div",null,e.createElement("div",{style:{display:"flex",alignItems:"center",marginTop:30,padding:"0 40px"}},e.createElement("div",{style:{flex:1},className:c.title},"\u5173\u8054\u8BFE\u5802"),e.createElement(G.default.Search,{className:c.inputWrap,style:{width:"342px",height:"auto"},onSearch:i=>{X.page=1,X.name=i,re(T({},X)),He(X)},placeholder:"\u8BF7\u8F93\u5165\u8BFE\u5802\u540D\u79F0"})),e.createElement("div",null,e.createElement(oe.default,{style:{marginTop:"10px"},dataSource:pt,rowKey:"id",scroll:{y:300},rowSelection:we,onChange:Ge,columns:[{title:"\u8BFE\u5802\u540D\u79F0",dataIndex:"name"},{title:"\u521B\u5EFA\u8005",dataIndex:"creator_name",width:110},{title:"\u521B\u5EFA\u65F6\u95F4",dataIndex:"created_at",width:133},{title:"\u7ED3\u675F\u65F6\u95F4",dataIndex:"end_time",width:133,render:(i,g,Z)=>i||"- -"}],pagination:{pageSize:X.per_page,total:X.total,current:X.page,showQuickJumper:!0,hideOnSinglePage:!1,showSizeChanger:!0,position:["bottomCenter"],showTotal:i=>e.createElement("span",{className:"mr10"},"\u5171",e.createElement("span",{className:"c-orange"},i),"\u6761\u6570\u636E")}}))),se===2&&e.createElement("div",{className:c.addCourseTabsContainer},e.createElement(z.default,{defaultActiveKey:"1",activeKey:me,onChange:i=>{var g,Z,j,R;if(ye(i),i==="1"){let h=(g=b==null?void 0:b.courses)==null?void 0:g.map(t=>{var u;return(u=t==null?void 0:t.shixun_models)==null?void 0:u.map(a=>a)}),E=[];h.map(t=>{t.length>0&&(t==null||t.map(u=>{u.checked&&E.push(u)}))}),f([...E])}else if(i==="2"){let h=(Z=b==null?void 0:b.courses)==null?void 0:Z.map(t=>{var u;return(u=t==null?void 0:t.common_models)==null?void 0:u.map(a=>a)}),E=[];h.map(t=>{t.length>0&&(t==null||t.map(u=>{u.checked&&E.push(u)}))}),f([...E])}else if(i==="3"){let h=(j=b==null?void 0:b.courses)==null?void 0:j.map(t=>{var u;return(u=t==null?void 0:t.group_models)==null?void 0:u.map(a=>a)}),E=[];h.map(t=>{t.length>0&&(t==null||t.map(u=>{u.checked&&E.push(u)}))}),f([...E])}else{let h=(R=b==null?void 0:b.courses)==null?void 0:R.map(t=>{var u;return(u=t==null?void 0:t.exercise_models)==null?void 0:u.map(a=>a)}),E=[];h.map(t=>{t.length>0&&(t==null||t.map(u=>{u.checked&&E.push(u)}))}),f([...E])}}},e.createElement(z.default.TabPane,{tab:"\u5B9E\u8BAD\u4F5C\u4E1A",key:1},Ye(),Oe(We(T({},b),{name:"\u5B9E\u8BAD\u4F5C\u4E1A"}))),e.createElement(z.default.TabPane,{tab:"\u666E\u901A\u4F5C\u4E1A",key:2},Ye(),$e(We(T({},b),{name:"\u666E\u901A\u4F5C\u4E1A"}))),e.createElement(z.default.TabPane,{tab:"\u5206\u7EC4\u4F5C\u4E1A",key:3},Ye(),ce(We(T({},b),{name:"\u5206\u7EC4\u4F5C\u4E1A"}))),e.createElement(z.default.TabPane,{tab:"\u5728\u7EBF\u8003\u8BD5",key:4},Ye(),ae(We(T({},b),{name:"\u5728\u7EBF\u8003\u8BD5"}))))))}var It=Qe,bt=B(89392),gt=B(57931),at=(_,C,v)=>new Promise(($,ee)=>{var ie=A=>{try{s(v.next(A))}catch(Q){ee(Q)}},ue=A=>{try{s(v.throw(A))}catch(Q){ee(Q)}},s=A=>A.done?$(A.value):Promise.resolve(A.value).then(ie,ue);s((v=v.apply(_,C)).next())});function Ne({isshow:_,setishow:C,modalparams:v,getcourse_evaluations:$}){var ee,ie,ue,s,A,Q;const se={page:1,per_page:20,total:0,name:""},[Fe,X]=(0,e.useState)(0);let[re,pt]=(0,e.useState)(se);const[Xe,de]=(0,e.useState)([]),[Ke,b]=(0,e.useState)([]),[K,k]=(0,e.useState)([]);let[f,me]=(0,e.useState)({});const[ye,Ce]=(0,e.useState)(),[be,He]=(0,e.useState)(!1),[Ge,we]=(0,e.useState)("1"),Ae=(0,e.useRef)(se),[Ye,Oe]=(0,e.useState)(null),ae=(0,e.useRef)(null),$e=(0,e.useRef)(""),ce=(0,e.useRef)([]);(0,e.useEffect)(()=>{_&&(Z(re),we("1"))},[_]);const i=E=>{Oe(E),ae.current=E,h((0,bt.cloneDeep)(ce.current))},g=E=>{let t=E;return t=isNaN(t)?"":t,t[0]==="."&&(t=""),t};function Z(E){return at(this,null,function*(){var t;let u=yield(0,S.ZP)(`/api/ec_courses/${v.id}/evaluations/evaluation_settings.json`,{method:"get",params:E});de(u),Ce(((t=u==null?void 0:u.ec_course_targets)==null?void 0:t.length)*75+227+240+32);let a=u==null?void 0:u.ec_course_targets;a==null||a.unshift({content:"11"}),ce.current=a,h(a)})}function j(E){return at(this,null,function*(){var t;let u=yield(0,S.ZP)(`/api/ec_courses/${v.id}/evaluations/evaluation_settings_subitems.json`,{method:"get",params:E}),a=[];u.evaluations.map(n=>{var r;(r=n==null?void 0:n.subitems)==null||r.map(o=>{a.push(o)})}),Ce(((t=u==null?void 0:u.ec_course_targets)==null?void 0:t.length)*75+227+240+32),me({}),me(u),k(a)})}const R=E=>at(this,null,function*(){var t,u,a;Oe(null);const n=ae.current;ae.current=null;let r=E?`/api/ec_courses/${v.id}/evaluations/update_evaluation_settings`:`/api/ec_courses/${v.id}/evaluations/update_evaluation_setting_subitem`;(yield(0,S.ZP)(r,{method:"post",body:{random_number:(t=n==null?void 0:n.split("-"))==null?void 0:t[1],ec_course_target_id:(u=n==null?void 0:n.split("-"))==null?void 0:u[0],weight:$e.current,ec_course_evaluation_subitem_ids:E?null:[(a=n==null?void 0:n.split("-"))==null?void 0:a[2]]}})).status===0&&(W.ZP.success("\u4FDD\u5B58\u6210\u529F"),E?(Z(re),$(v)):(j(re),$(v)))}),h=E=>{let t=(0,bt.cloneDeep)(E);t[0].title=e.createElement("div",{className:c.line},e.createElement("span",null,"\u8BFE\u7A0B\u76EE\u6807"),e.createElement("span",null,"\u8003\u6838\u65B9\u5F0F")),t[0].dataIndex="work_name",t[0].width=180,t[0].fixed="left",t[0].render=(a,n)=>e.createElement("div",{className:c.omit},e.createElement("span",{title:a},a),n.warning&&e.createElement(H.Z,{title:"\u8BE5\u8003\u6838\u65B9\u5F0F\u5BF9\u5E94\u76EE\u6807\u5360\u6BD4\u4E4B\u548C\u4E3A0\uFF0C\u53EF\u80FD\u5BFC\u81F4\u8BA1\u7B97\u7ED3\u679C\u4E0D\u51C6\u786E"},e.createElement("i",{style:{color:"#FF9D18"},className:"iconfont icon-hongsejingshi ml5"})));const u=(a,n,r,o)=>{var p,P;let ot="",qe="";a&&(ot=a.split("-")[0],qe=a.split("-")[1]);let _e=((p=Ae.current)==null?void 0:p.tab)==="1"?ot:qe,ke=(P=n==null?void 0:n.relation[o-1])==null?void 0:P.weight;return e.createElement("span",null,ae.current===`${r}-${n.random_number}`?e.createElement(O.Z,{key:`${r}-${n.random_number}`,autoFocus:!0,defaultValue:ke,onBlur:()=>R(!0),onFocus:()=>{$e.current=ke},step:.1,parser:g,onChange:Be=>$e.current=Be,style:{width:100}}):e.createElement(e.Fragment,{key:`${r}-${n.random_number}`},e.createElement("span",{className:c.tbl,onClick:()=>i(`${r}-${n.random_number}`),style:{color:_e==="H"?"#0152D9":_e==="M"?"#07C160":_e==="L"?"#FF9D18":"#0152d9"}},ke?e.createElement("span",null,ke):"\u8F93\u5165\u6570\u5B57")))};t=t.map((a,n)=>n?{title:e.createElement("span",{key:Math.random()},e.createElement(H.Z,{title:a.content},e.createElement("span",null,"\u76EE\u6807"+n)),a.warning&&e.createElement(H.Z,{title:"\u8BE5\u76EE\u6807\u4E0B\u8003\u6838\u65B9\u5F0F\u5360\u6BD4\u4E4B\u548C\u4E0D\u7B49\u4E8E1 \uFF0C\u53EF\u80FD\u5BFC\u81F4\u8BA1\u7B97\u7ED3\u679C\u4E0D\u51C6\u786E\uFF01"},e.createElement("i",{style:{color:"#FF9D18"},className:"iconfont icon-hongsejingshi ml5"}))),dataIndex:"content",width:120,fixed:n===t.length-1?"right":"",render:(r,o)=>u(r,o,a.id,n)}:a),b(t||[])};return e.createElement(F.default,{title:"\u8BBE\u7F6E\u8003\u6838\u5360\u6BD4",open:_,width:ye>1060?1060:ye,footer:null,centered:!0,onCancel:()=>{C(!1)}},e.createElement(z.default,{activeKey:Ge,onChange:E=>{we(E),E==="1"?Z(re):j(re)}},e.createElement(z.default.TabPane,{tab:"\u8BBE\u7F6E\u8003\u6838\u65B9\u5F0F\u5360\u6BD4",key:1},e.createElement("div",{style:{marginTop:"10px",color:"#464F66",fontSize:"14px"}},e.createElement("p",null,"\u8BF4\u660E\uFF1A"),e.createElement("p",null,"\u6BCF\u4E00\u4E2A\u8BFE\u7A0B\u76EE\u6807\u4E0B\u7684\u8003\u6838\u65B9\u5F0F\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E1\u3002")),e.createElement(oe.default,{columns:Ke,bordered:!0,scroll:{x:((ee=ce.current)==null?void 0:ee.length)*120+180>ye||((ie=ce.current)==null?void 0:ie.length)*120+180>1060?((ue=ce.current)==null?void 0:ue.length)*120+180:"max-content"},dataSource:Xe==null?void 0:Xe.evaluations,pagination:!1})),e.createElement(z.default.TabPane,{tab:"\u8BBE\u7F6E\u8003\u6838\u5185\u5BB9\u5360\u6BD4",key:2},e.createElement("div",{style:{marginTop:"10px",color:"#464F66",fontSize:"14px"}},e.createElement("p",null,"\u8BF4\u660E\uFF1A"),e.createElement("p",null,"\u6BCF\u4E00\u4E2A\u8003\u6838\u65B9\u5F0F\u4E0B\u7684\u8003\u6838\u5185\u5BB9\u5360\u6BD4\u4E4B\u548C\u5FC5\u987B\u7B49\u4E8E1\u3002")),e.createElement("div",{style:{overflow:"auto",width:"100%"}},e.createElement("div",{style:{display:"flex",background:"#F5F5F5",height:"78px"}},e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",borderLeft:"1px solid #E0E2EC",borderTop:"1px solid #E0E2EC",width:"240px",paddingLeft:"30px",lineHeight:"78px",flexShrink:0}},"\u8003\u6838\u65B9\u5F0F"),e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",borderTop:"1px solid #E0E2EC",width:"227px",lineHeight:"78px",textAlign:"center",flexShrink:0}},"\u8003\u6838\u5185\u5BB9"),(s=f==null?void 0:f.ec_course_targets)==null?void 0:s.map((E,t)=>{var u;return e.createElement("div",{style:{borderRight:t!=((u=f==null?void 0:f.ec_course_targets)==null?void 0:u.length)-1&&"1px solid #E0E2EC",width:"75px",lineHeight:"78px",textAlign:"center",flexShrink:0,background:"#F5F5F5",borderTop:"1px solid #E0E2EC"}},e.createElement(H.Z,{title:E.content},e.createElement("span",null,"\u76EE\u6807"+(t+1))),E.warning&&e.createElement(H.Z,{title:"\u8BE5\u76EE\u6807\u4E0B\u6709\u8003\u6838\u65B9\u5F0F\u7684\u8003\u6838\u5185\u5BB9\u5360\u6BD4\u4E4B\u548C\u4E0D\u7B49\u4E8E1 \uFF0C\u53EF\u80FD\u5BFC\u81F4\u8BA1\u7B97\u7ED3\u679C\u4E0D\u51C6\u786E\uFF01"},e.createElement("i",{style:{color:"#FF9D18"},className:"iconfont icon-hongsejingshi ml5"})))})),e.createElement("div",null,e.createElement("div",{style:{maxHeight:"550px"}},((A=f==null?void 0:f.evaluations)==null?void 0:A.length)<=0&&e.createElement(gt.Z,{customText:"\u5F53\u524D\u6682\u65E0\u6570\u636E"}),(Q=f==null?void 0:f.evaluations)==null?void 0:Q.map((E,t)=>{var u,a;return e.createElement("div",{style:{height:"100%",display:"flex",borderLeft:"1px solid #E0E2EC"}},e.createElement("div",{style:{width:"240px",borderRight:"1px solid #E0E2EC",borderBottom:"1px solid #E0E2EC",marginTop:-1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},E.work_name),e.createElement("div",{style:{display:"flex",flexDirection:"column",borderRight:"1px solid #E0E2EC",width:"227px",flexShrink:0}},(u=E==null?void 0:E.subitems)==null?void 0:u.map((n,r)=>e.createElement("div",{style:{borderBottom:"1px solid #E0E2EC",paddingLeft:8,paddingRight:12,display:"flex",alignItems:"center"}},e.createElement(H.Z,{title:n==null?void 0:n.name},e.createElement("div",{className:c.textone,style:{height:"42px",lineHeight:"42px"}},n==null?void 0:n.name)),n.warning&&e.createElement(H.Z,{title:"\u8BE5\u8003\u6838\u5185\u5BB9\u5BF9\u5E94\u76EE\u6807\u5360\u6BD4\u4E4B\u548C\u4E3A0\uFF0C\u53EF\u80FD\u5BFC\u81F4\u8BA1\u7B97\u7ED3\u679C\u4E0D\u51C6\u786E"},e.createElement("i",{style:{color:"#FF9D18"},className:"iconfont icon-hongsejingshi ml5"}))))),(a=f==null?void 0:f.ec_course_targets)==null?void 0:a.map((n,r)=>{var o,p;return e.createElement("div",{style:{display:"flex",flexDirection:"column",borderRight:"1px solid #E0E2EC",width:r!=((o=f==null?void 0:f.ec_course_targets)==null?void 0:o.length)-1?"75px":"74px",flexShrink:0}},(p=E==null?void 0:E.subitems)==null?void 0:p.map((P,ot)=>{var qe,_e,ke;return e.createElement(O.Z,{key:`${r}-${ot}`,parser:g,step:.1,disabled:be,onBlur:Be=>at(this,null,function*(){He(!0);let Et=yield(0,S.ZP)(`/api/ec_courses/${v.id}/evaluations/update_evaluation_setting_subitem`,{method:"post",body:{random_number:P==null?void 0:P.random_number,ec_course_target_id:n==null?void 0:n.id,weight:Be.target.value,ec_course_evaluation_subitem_ids:P==null?void 0:P.ec_course_evaluation_subitem_ids}});He(!1),Et&&(j(re),$(v))}),defaultValue:(_e=(qe=P==null?void 0:P.relation)==null?void 0:qe[r])==null?void 0:_e.weight,style:{height:43,lineHeight:"43px",width:r!=((ke=f==null?void 0:f.ec_course_targets)==null?void 0:ke.length)-1?"75px":"74px"}})}))}))})))))))}var ft=Ne,xt="data:image/png;base64,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",st=B(3526),Rt=Object.defineProperty,Zt=Object.defineProperties,it=Object.getOwnPropertyDescriptors,yt=Object.getOwnPropertySymbols,wt=Object.prototype.hasOwnProperty,_t=Object.prototype.propertyIsEnumerable,ct=(_,C,v)=>C in _?Rt(_,C,{enumerable:!0,configurable:!0,writable:!0,value:v}):_[C]=v,M=(_,C)=>{for(var v in C||(C={}))wt.call(C,v)&&ct(_,v,C[v]);if(yt)for(var v of yt(C))_t.call(C,v)&&ct(_,v,C[v]);return _},xe=(_,C)=>Zt(_,it(C)),D=(_,C,v)=>new Promise(($,ee)=>{var ie=A=>{try{s(v.next(A))}catch(Q){ee(Q)}},ue=A=>{try{s(v.throw(A))}catch(Q){ee(Q)}},s=A=>A.done?$(A.value):Promise.resolve(A.value).then(ie,ue);s((v=v.apply(_,C)).next())});const At=({user:_})=>{var C,v,$,ee,ie;const ue={page:1,per_page:20,total:0,ec_major_school_id:null,ec_year_id:null,sort_by:null,direction:null,id:null};let[s,A]=(0,e.useState)(ue);const[Q]=(0,Ie.useSearchParams)(),[se,Fe]=(0,e.useState)([]),[X,re]=(0,e.useState)([]),[pt,Xe]=(0,e.useState)([]),[de,Ke]=(0,e.useState)([]),[b,K]=(0,e.useState)([]);let[k,f]=(0,e.useState)(),[me,ye]=(0,e.useState)();const[Ce,be]=(0,e.useState)([]),[He,Ge]=(0,e.useState)(!1),[we,Ae]=(0,e.useState)([]),[Ye,Oe]=(0,e.useState)(!1),ae=(0,e.useRef)(),[$e,ce]=(0,e.useState)(!1),[i,g]=(0,e.useState)([]),Z=(0,Ie.useLocation)(),[j,R]=(0,e.useState)(!1),[h,E]=(0,e.useState)(!1),[t,u]=(0,e.useState)([]),[a,n]=(0,e.useState)(""),[r,o]=(0,e.useState)(!1);let[p,P]=(0,e.useState)({});const[ot,qe]=(0,e.useState)([]),[_e,ke]=(0,e.useState)("1"),[Be,Et]=(0,e.useState)({filename:"",editOffice:"view",type:"",className:"",data:"",close:!0,hasMask:!0,style:{position:"fixed",zIndex:9999,background:"rgba(0,0,0,.7)"},monacoEditor:{value:"",language:"",theme:"vs",options:{readOnly:!0}}}),[Yt,$t]=(0,e.useState)({}),[Ut,Nt]=(0,e.useState)(!1),[Te,Ht]=(0,e.useState)(),[vt]=Ee.default.useForm(),[zt,Ft]=(0,e.useState)(!1),[Mt,Ot]=(0,e.useState)(!1);(0,e.useEffect)(()=>{var l;(l=_==null?void 0:_.userInfo)!=null&&l.school_id&&Xt()},[(C=_==null?void 0:_.userInfo)==null?void 0:C.school_id]);const rt=l=>D(void 0,null,function*(){var d;st.U.setItem((d=_==null?void 0:_.userInfo)==null?void 0:d.login,[l==null?void 0:l.ec_major_school_id,l==null?void 0:l.ec_year_id]),Jt(l),Tt(l),Ct(l),kt(l),dt(l),Wt(l),Dt(l)});function Vt(){Ke([]),K([]),ye([]),f([]),Ae([]),Ht([]),be([])}const Wt=l=>D(void 0,null,function*(){const d=yield(0,S.ZP)(`/api/ec_years/${l.ec_year_id}/graduation_subitems.json`,{method:"get"});be((d==null?void 0:d.graduation_subitems)||[])}),Jt=l=>D(void 0,null,function*(){const d=yield(0,S.ZP)(`/api/ec_years/${l.ec_year_id}/ec_courses/get_course_teachers.json`,{method:"get",params:l});Ke(d==null?void 0:d.data)}),Tt=l=>D(void 0,null,function*(){const d=yield(0,S.ZP)(`/api/ec_courses/${l.id}/ec_course_standards.json`,{method:"get",params:{ec_course_id:l==null?void 0:l.id}});K(d==null?void 0:d.data)}),Ct=l=>D(void 0,null,function*(){const d=yield(0,S.ZP)(`/api/ec_courses/${l.id}/course_targets.json`,{method:"get",params:{ec_course_id:l==null?void 0:l.id}});ye(d==null?void 0:d.course_targets),f(d==null?void 0:d.course_targets)}),Qt={onRemove:()=>{g([])},beforeUpload:l=>{if(console.log(l),(l==null?void 0:l.size)>1024*1024*50)return W.ZP.info("\u6587\u4EF6\u8D85\u8FC750M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;let d=[];return d.push(l),g([...d]),!1},fileList:i,accept:".xls,.xlsx"},kt=l=>D(void 0,null,function*(){const d=yield(0,S.ZP)(`/api/ec_courses/${l==null?void 0:l.id}/course_evaluations.json`,{method:"get",params:{ec_course_id:l==null?void 0:l.id}});Ae(d==null?void 0:d.course_evaluation_tops)}),dt=l=>D(void 0,null,function*(){const d=yield(0,S.ZP)(`/api/ec_courses/${l==null?void 0:l.id}/evaluations.json`,{method:"get",params:{ec_course_id:l==null?void 0:l.id}});Ht(d==null?void 0:d.data)}),Xt=()=>D(void 0,null,function*(){var l,d,x,I,J,L,V,w,y,De,ge;const pe=yield(0,S.ZP)(`/api/schools/${(l=_==null?void 0:_.userInfo)==null?void 0:l.school_id}/ec_majors/get_major_list.json`,{method:"get"});if(((d=pe==null?void 0:pe.data)==null?void 0:d.length)<=0){E(!0),A(M({},s));return}Fe((pe==null?void 0:pe.data)||[]);const je=st.U.getItem((x=_==null?void 0:_.userInfo)==null?void 0:x.login),Se=Q.get("ec_major_school_id")?Number(Q.get("ec_major_school_id")):je[0]||((J=(I=pe==null?void 0:pe.data)==null?void 0:I[0])==null?void 0:J.ec_major_school_id),te=yield(0,S.ZP)(`/api/ec_major_schools/${Se}/ec_years/get_year_list.json`,{method:"get"});if(((L=te==null?void 0:te.data)==null?void 0:L.length)<=0){E(!0),s.ec_year_id="",A(M({},s));return}re((te==null?void 0:te.data)||[]);const Le=Q.get("ec_year_id")?Number(Q.get("ec_year_id")):je[1]||((w=(V=te==null?void 0:te.data)==null?void 0:V[0])==null?void 0:w.ec_year_id),Pe=yield(0,S.ZP)(`/api/ec_years/${Le}/ec_courses/get_courses.json`,{method:"get"});Xe((Pe==null?void 0:Pe.data)||[]);const le=yield(0,S.ZP)(`/api/ec_years/${Le}/graduation_subitems.json`,{method:"get"});if(s.ec_major_school_id=Se,s.ec_year_id=Le,s.id=Q.get("course")?Number(Q.get("course")):(De=(y=Pe==null?void 0:Pe.data)==null?void 0:y[0])==null?void 0:De.id,((ge=Pe==null?void 0:Pe.data)==null?void 0:ge.length)<=0){E(!0);return}else E(!1);be((le==null?void 0:le.graduation_subitems)||[]),A(s),rt(s),console.log("ec_major_school_id",Se)}),Kt=l=>D(void 0,null,function*(){var d,x,I,J,L;const V=yield(0,S.ZP)(`/api/ec_major_schools/${l}/ec_years/get_year_list.json`,{method:"get"});if(((d=V==null?void 0:V.data)==null?void 0:d.length)<=0){E(!0),s.ec_year_id="",A(M({},s));return}else E(!1);s.ec_major_school_id=l,s.ec_year_id=(I=(x=V==null?void 0:V.data)==null?void 0:x[0])==null?void 0:I.ec_year_id,re((V==null?void 0:V.data)||[]),A(s),jt((L=(J=V==null?void 0:V.data)==null?void 0:J[0])==null?void 0:L.ec_year_id)}),jt=l=>D(void 0,null,function*(){var d,x,I;const J=yield(0,S.ZP)(`/api/ec_years/${l}/ec_courses/get_courses.json`,{method:"get"});if(((d=J==null?void 0:J.data)==null?void 0:d.length)<=0){E(!0),s.id="",A(M({},s)),Vt();return}else E(!1);s.ec_year_id=l,s.id=(I=(x=J==null?void 0:J.data)==null?void 0:x[0])==null?void 0:I.id,Xe((J==null?void 0:J.data)||[]),A(s),rt(s)}),Lt=l=>D(void 0,null,function*(){const d=yield(0,S.ZP)("/api/ec_years/1/ec_courses/get_formulas.json",{method:"get",params:{ec_course_id:l}});A(s),P(d)}),Dt=l=>D(void 0,null,function*(){const d=yield(0,S.ZP)(`/api/ec_courses/${l==null?void 0:l.id}/ec_points.json`,{method:"get",params:{ec_course_id:l==null?void 0:l.id}});A(s),u(d==null?void 0:d.data)}),St=(l,d)=>{if(s.page=1,s[d]=l,d==="ec_major_school_id"){Kt(l);return}d==="ec_year_id"&&(A(M({},s)),jt(l)),d==="id"&&(A(M({},s)),rt(s))},Gt={beforeUpload:l=>D(void 0,null,function*(){if(console.log(l),(l==null?void 0:l.size)>1024*1024*50)return W.ZP.info("\u6587\u4EF6\u8D85\u8FC750M\uFF0C\u4E0D\u7B26\u5408\u4E0A\u4F20\u8981\u6C42"),!1;const d=new FormData;d.append("file",l);let x=yield(0,S.ZP)(`/api/ec_courses/${s==null?void 0:s.id}/ec_course_standards.json`,{method:"post",body:d},!0);return Tt(s),dt(s),!1}),fileList:[]};return e.createElement("div",{className:c.wrap},e.createElement("div",{className:c.title},"\u8BFE\u7A0B\u8BBE\u7F6E"),e.createElement("div",{style:{clear:"both",marginTop:"40px"}}),e.createElement("div",{className:c.control},e.createElement("div",{className:c.label},"\u8BA4\u8BC1\u4E13\u4E1A"),e.createElement(U.default,{style:{width:240},placeholder:"\u8BF7\u9009\u62E9\u8BA4\u8BC1\u4E13\u4E1A",value:s==null?void 0:s.ec_major_school_id,onChange:l=>St(l,"ec_major_school_id")},se==null?void 0:se.map(l=>e.createElement(U.default.Option,{value:l.ec_major_school_id},l.name))),e.createElement("div",{className:c.label},"\u8BA4\u8BC1\u5C4A\u522B"),e.createElement(U.default,{disabled:h&&X.length<=0,style:{width:140},placeholder:"\u8BF7\u9009\u62E9\u5C4A\u522B",value:s==null?void 0:s.ec_year_id,onChange:l=>St(l,"ec_year_id")},X==null?void 0:X.map(l=>e.createElement(U.default.Option,{value:l.ec_year_id},l.year))),e.createElement("div",{className:c.label},"\u8BFE\u7A0B"),e.createElement(U.default,{disabled:h,style:{width:140},placeholder:"\u8BF7\u9009\u62E9\u8BFE\u7A0B",value:s==null?void 0:s.id,onChange:l=>St(l,"id")},pt==null?void 0:pt.map(l=>e.createElement(U.default.Option,{value:l.id},l.name)))),e.createElement("div",{className:c.title},"\u8BFE\u7A0B\u6559\u5E08"),e.createElement("div",{className:c.teachcount,style:{display:"flex",marginTop:20,marginBottom:16}},de==null?void 0:de.map((l,d)=>e.createElement("div",{style:{display:"flex",marginLeft:d===0?"20px":"47px"}},e.createElement("img",{src:xt,style:{width:"50px",height:"50px",borderRadius:"50%",zIndex:0}}),e.createElement("div",{style:{marginLeft:"8px"}},e.createElement("p",{style:{marginBottom:"0px"}},l.name),e.createElement("p",{style:{marginTop:"10px",height:"22px",borderRadius:"0px 12px 12px 0px",background:"#DFEAFF",marginLeft:"-30px",lineHeight:"22px",paddingLeft:32,display:"inline-block",paddingRight:16,color:"#0152D9"}},l.pro))))),e.createElement("div",{style:{height:"20px",background:"#fafafa"}}),e.createElement("div",{className:c.title,style:{display:"flex",justifyContent:"space-between"}},"\u8BFE\u7A0B\u6807\u51C6",e.createElement("span",null,e.createElement(tt.default,M({},Gt),e.createElement(ne.ZP,{disabled:h,type:"primary",style:{marginRight:"20px"},onClick:()=>{}},e.createElement("i",{style:{marginRight:"8px"},className:"iconfont icon-shangchuan3"})," \u4E0A\u4F20\u8BFE\u7A0B\u6807\u51C6")))),e.createElement("div",{className:c.teachcount},e.createElement(oe.default,{style:{marginTop:"20px",marginBottom:20,padding:"0px 20px"},dataSource:b,pagination:!1,columns:[{title:"\u5E8F\u53F7",dataIndex:"name",key:"name",render:(l,d,x)=>s.per_page*(s.page-1)+x+1},{title:"\u6587\u4EF6\u540D\u79F0",dataIndex:"name",width:"50%",key:"name"},{title:"\u4E0A\u4F20\u65F6\u95F4",dataIndex:"created_at",key:"created_at"},{title:"\u64CD\u4F5C",dataIndex:"id",key:"id",render:(l,d,x)=>e.createElement("div",null,e.createElement("i",{onClick:()=>{if(console.log(l,d,x),!["office","pdf","image","other","video","audio","download"].includes(d.file_type)){W.ZP.info("\u5F53\u524D\u7C7B\u578B\u6682\u4E0D\u652F\u6301\u9884\u89C8");return}Be.editOffice="view",Et(xe(M({},Be),{type:d.file_type,data:`/api/attachments/${d.attachment_id}`}))},style:{marginRight:"5px",color:"#0152d9",cursor:"pointer"},className:"iconfont icon-chakansvg"}),e.createElement(H.Z,{title:"\u5728\u7EBF\u7F16\u8F91"},e.createElement("i",{onClick:()=>D(void 0,null,function*(){if(["xlsx","docx","pptx"].includes(d==null?void 0:d.type))Be.editOffice="edit",Et(xe(M({},Be),{type:d.file_type,data:`/api/attachments/${d.attachment_id}`}));else{W.ZP.info("\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u7F16\u8F91");return}}),style:{cursor:"pointer",color:"#0152d9",marginLeft:"5px"},className:"iconfont icon-bianji10"})),e.createElement("i",{onClick:()=>{F.default.confirm({title:"\u786E\u8BA4\u662F\u5426\u5220\u9664\uFF1F",icon:e.createElement(q.Z,null),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>D(void 0,null,function*(){(yield(0,S.ZP)(`/api/ec_courses/${s==null?void 0:s.id}/ec_course_standards/${l}`,{method:"delete"}))&&(W.ZP.info("\u5220\u9664\u6210\u529F"),rt(s))}),onCancel(){}})},style:{marginRight:"5px",color:"#0152d9",cursor:"pointer"},className:"iconfont icon-shanchu9 pl10"}))}]})),e.createElement("div",{style:{height:"20px",background:"#fafafa"}}),e.createElement("div",{className:c.title,style:{display:"flex",justifyContent:"space-between"}},"\u8BFE\u7A0B\u76EE\u6807",e.createElement("span",null,e.createElement(ne.ZP,{disabled:h,type:"primary",style:{marginRight:"20px"},onClick:()=>D(void 0,null,function*(){if(yield Ct(s),(k==null?void 0:k.length)<=0){let l={id:0,content:"",weight:"",standard_grade:"",graduation_subitem_ids:[""]};k.push(l),f([...k])}Ge(!0)})},e.createElement("i",{style:{marginRight:"8px"},className:"iconfont icon-bianji7"})," \u7F16\u8F91\u8BFE\u7A0B\u76EE\u6807"))),e.createElement("div",{className:c.teachcount},e.createElement(oe.default,{style:{marginTop:"20px",marginBottom:20,padding:"0px 20px"},dataSource:me,bordered:!0,pagination:!1,columns:[{title:"\u5206\u9879",dataIndex:"name",key:"name",width:"5%",render:(l,d,x)=>s.per_page*(s.page-1)+x+1},{title:"\u8BFE\u7A0B\u76EE\u6807",dataIndex:"content",width:"45%",key:"content"},{title:"\u6743\u91CD",dataIndex:"weight",key:"weight",width:"5%"},{title:"\u8FBE\u6210\u5206\u503C",dataIndex:"standard_grade",key:"standard_grade",width:"5%"},{title:"\u5BF9\u5E94\u6BD5\u4E1A\u8981\u6C42\u6307\u6807\u70B9",dataIndex:"graduation_subitem",width:"40%",key:"graduation_subitem",render:(l,d,x)=>e.createElement("div",null,e.createElement(fe.Z,{itemLayout:"horizontal",dataSource:l,renderItem:I=>e.createElement(fe.Z.Item,null,e.createElement(fe.Z.Item.Meta,{style:{fontSize:14},description:"\u6307\u6807\u70B9"+(I==null?void 0:I.index)+"\uFF1A"+(I==null?void 0:I.content)}))}))}]})),e.createElement("div",{style:{height:"20px",background:"#fafafa"}}),e.createElement("div",{className:c.title,style:{display:"flex",justifyContent:"space-between"}},"\u8BFE\u7A0B\u77E5\u8BC6\u70B9\u4E0E\u6559\u5B66\u5185\u5BB9",e.createElement("span",null,e.createElement(ne.ZP,{disabled:h,type:"primary",style:{marginRight:"20px"},onClick:()=>{Ft(!0),n("")}},e.createElement("i",{style:{marginRight:"8px"},className:"iconfont icon-tianjiatimu"})," \u65B0\u589E\u77E5\u8BC6\u70B9"))),e.createElement(oe.default,{style:{marginTop:"20px",marginBottom:20,padding:"0px 20px"},dataSource:t,bordered:!0,pagination:!1,columns:[{title:"\u5E8F\u53F7",dataIndex:"name",key:"name",width:"5%",render:(l,d,x)=>s.per_page*(s.page-1)+x+1},{title:"\u77E5\u8BC6\u70B9",dataIndex:"name",width:"15%",key:"name"},{title:"\u6559\u5B66\u76EE\u7684",dataIndex:"target",key:"target"},{title:"\u6559\u5B66\u5185\u5BB9",dataIndex:"content",key:"content"},{title:"\u91CD\u70B9\u96BE\u70B9",dataIndex:"problem",key:"problem"},{title:"\u652F\u6491\u7684\u8BFE\u7A0B\u76EE\u6807",dataIndex:"ec_course_targets",width:"10%",key:"ec_course_targets",render:(l,d,x)=>e.createElement("div",null,e.createElement(fe.Z,{itemLayout:"horizontal",dataSource:l,renderItem:I=>e.createElement(fe.Z.Item,null,e.createElement(fe.Z.Item.Meta,{style:{fontSize:14},description:I==null?void 0:I.name}))}))},{title:"\u64CD\u4F5C",dataIndex:"id",width:"8%",key:"id",render:(l,d,x)=>e.createElement("div",null,e.createElement("a",{onClick:()=>{F.default.confirm({title:"\u63D0\u793A",content:"\u662F\u5426\u786E\u8BA4\u5220\u9664",okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>D(void 0,null,function*(){(yield(0,S.ZP)(`/api/ec_courses/${s==null?void 0:s.id}/ec_points/${l}.json`,{method:"delete"})).status===0&&(W.ZP.info("\u5220\u9664\u6210\u529F"),Dt(s))})})},style:{marginRight:5}},"\u5220\u9664"),e.createElement("a",{onClick:()=>{Ft(!0),n(l),vt.setFieldsValue({name:d.name,target:d.target,content:d.content,problem:d.problem,ec_course_target_ids:d.ec_course_targets.map(I=>I.id)})}},"\u7F16\u8F91"))}]}),e.createElement("div",{style:{height:"20px",background:"#fafafa"}}),e.createElement("div",{className:c.title,style:{display:"flex",justifyContent:"space-between"}},"\u8003\u6838\u65B9\u5F0F\u4E0E\u6570\u636E\u6765\u6E90",e.createElement("span",null,e.createElement(ne.ZP,{disabled:h,type:"primary",style:{marginRight:"20px"},onClick:()=>{ae.current="",Oe(!0)}},e.createElement("i",{style:{marginRight:"8px"},className:"iconfont icon-tianjiatimu"})," \u6DFB\u52A0\u8BFE\u5802\u6570\u636E"),e.createElement(ne.ZP,{disabled:h,style:{marginRight:"20px"},onClick:()=>{ae.current="",ce(!0)}},e.createElement("i",{style:{marginRight:"8px"},className:"iconfont icon-piliangdaoru"})," \u5BFC\u5165\u6570\u636E"))),e.createElement("div",{className:c.teachcount},!we&&e.createElement(gt.Z,null),we&&e.createElement("div",{style:{padding:"0px 20px",marginBottom:"20px",fontSize:"14px"}},e.createElement("div",{style:{display:"flex",background:"#F5F5F5",height:"58px",border:"1px solid #E0E2EC",marginTop:"20px"}},e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"8%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},"\u6570\u636E\u6765\u6E90"),e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"10%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},"\u6559\u5B66\u8BFE\u5802/\u6570\u636E\u6587\u4EF6"),e.createElement("div",{style:{height:"100%",width:"61%",display:"flex",flexShrink:0,borderRight:"1px solid #E0E2EC"}},e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"15%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},"\u8003\u6838\u65B9\u5F0F"),e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"55%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},"\u8003\u6838\u5185\u5BB9"),e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"20%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},"\u8003\u6838\u77E5\u8BC6\u70B9"),e.createElement("div",{style:{width:"10%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},"\u6EE1\u5206\u503C")),e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"6%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},"\u72B6\u6001"),e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"10%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},"\u540C\u6B65/\u5BFC\u5165\u65F6\u95F4"),e.createElement("div",{style:{width:"5%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},"\u64CD\u4F5C")),e.createElement("div",{style:{border:"1px solid #E0E2EC",marginTop:-1}},we==null?void 0:we.map(l=>{var d,x,I,J,L,V,w;return e.createElement("div",{style:{display:"flex",width:"100%",borderBottom:"1px solid #E0E2EC"}},e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"8%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},l==null?void 0:l.name),e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"10%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"}},(l==null?void 0:l.name)==="\u5BFC\u5165\u6570\u636E"&&e.createElement("a",{href:nt.Z.API_SERVER+`/api/ec_courses/1/course_evaluations/download?id=${(x=(d=l==null?void 0:l.contents)==null?void 0:d[0])==null?void 0:x.attachment_id}`},(J=(I=l==null?void 0:l.contents)==null?void 0:I[0])==null?void 0:J.content),(l==null?void 0:l.name)==="\u5173\u8054\u8BFE\u5802"&&((L=l==null?void 0:l.contents)==null?void 0:L.map((y,De)=>{var ge;return e.createElement("a",{style:{display:"flex"},href:y==null?void 0:y.first_category_url,target:"_blank"},y==null?void 0:y.content,((ge=l==null?void 0:l.contents)==null?void 0:ge.length)>1&&",")}))),e.createElement("div",{style:{height:"100%",width:"61%",display:"flex",flexShrink:0,borderRight:"1px solid #E0E2EC",flexDirection:"column"}},((V=l==null?void 0:l.evaluation_methods)==null?void 0:V.length)<=0&&e.createElement("div",{style:{height:"100%",width:"42%",display:"flex",flexShrink:0,borderRight:"1px solid #E0E2EC"}},e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"15%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},"--"),e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"75%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},"--"),e.createElement("div",{style:{width:"10%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},"--")),(w=l==null?void 0:l.evaluation_methods)==null?void 0:w.map((y,De)=>{var ge,pe,je,Se,te,Le,Pe;return e.createElement("div",{style:{width:"100%",display:"flex",flexShrink:0}},e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"15%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",borderBottom:De!==((ge=l==null?void 0:l.evaluation_methods)==null?void 0:ge.length)-1&&"1px solid #E0E2EC"}},y==null?void 0:y.work_name),e.createElement("div",{style:{width:"55%"}},((pe=y==null?void 0:y.subitems)==null?void 0:pe.length)<=0&&e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",borderBottom:"1px solid #E0E2EC",marginTop:-1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,flexDirection:"column",height:30}},"--"),(je=y==null?void 0:y.evaluation_method_contents)==null?void 0:je.map((le,ht)=>{var Ue;return e.createElement(H.Z,{title:le==null?void 0:le.name},e.createElement("div",{className:c.textone,style:{borderRight:"1px solid #E0E2EC",borderBottom:!(De===((Ue=l==null?void 0:l.evaluation_methods)==null?void 0:Ue.length)-1&&ht===(y==null?void 0:y.evaluation_method_contents.length)-1)&&"1px solid #E0E2EC",marginTop:-1,lineHeight:"30px",alignItems:"center",justifyContent:"center",flexShrink:0,flexDirection:"column",height:30,paddingLeft:"5px"}},le==null?void 0:le.name))})),e.createElement("div",{style:{width:"20%"}},((Se=y==null?void 0:y.subitems)==null?void 0:Se.length)<=0&&e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",borderBottom:"1px solid #E0E2EC",marginTop:-1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,flexDirection:"column",height:30}},"--"),(te=y==null?void 0:y.evaluation_method_contents)==null?void 0:te.map((le,ht)=>{var Ue;return e.createElement(H.Z,{title:le==null?void 0:le.ec_points},e.createElement("div",{className:c.textone,style:{borderRight:"1px solid #E0E2EC",borderBottom:!(De===((Ue=l==null?void 0:l.evaluation_methods)==null?void 0:Ue.length)-1&&ht===(y==null?void 0:y.evaluation_method_contents.length)-1)&&"1px solid #E0E2EC",marginTop:-1,lineHeight:"30px",alignItems:"center",justifyContent:"center",flexShrink:0,flexDirection:"column",height:30,paddingLeft:"5px"}},(le==null?void 0:le.ec_points)||"- -"))})),e.createElement("div",{style:{width:"10%"}},((Le=y==null?void 0:y.subitems)==null?void 0:Le.length)<=0&&e.createElement("div",{style:{borderBottom:"1px solid #E0E2EC",marginTop:-1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,flexDirection:"column",height:30}},"--"),(Pe=y==null?void 0:y.evaluation_method_contents)==null?void 0:Pe.map((le,ht)=>{var Ue;return e.createElement(H.Z,{title:le==null?void 0:le.score},e.createElement("div",{className:c.textone,style:{borderBottom:!(De===((Ue=l==null?void 0:l.evaluation_methods)==null?void 0:Ue.length)-1&&ht===(y==null?void 0:y.evaluation_method_contents.length)-1)&&"1px solid #E0E2EC",marginTop:-1,lineHeight:"30px",alignItems:"center",justifyContent:"center",flexShrink:0,flexDirection:"column",height:30,paddingLeft:"5px"}},le==null?void 0:le.score))})))})),e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"6%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",color:"#07C160"}},l==null?void 0:l.status),e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"10%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},l==null?void 0:l.update_at),e.createElement("div",{style:{width:"5%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",flexDirection:"column"}},(l==null?void 0:l.status)!="\u5DF2\u5BFC\u5165"&&e.createElement("i",{onClick:()=>D(void 0,null,function*(){(yield(0,S.ZP)(`/api/ec_courses/${s.id}/course_evaluations/update_online_data.json`,{method:"get",params:{id:l.id}}))&&(W.ZP.info("\u540C\u6B65\u6210\u529F"),rt(s))}),style:{color:"#0152d9",cursor:"pointer"},className:"iconfont icon-tongbushuju"}),e.createElement("i",{onClick:()=>{F.default.confirm({title:"\u786E\u8BA4\u662F\u5426\u5220\u9664\uFF1F",icon:e.createElement(q.Z,null),okText:"\u786E\u8BA4",cancelText:"\u53D6\u6D88",onOk:()=>D(void 0,null,function*(){(yield(0,S.ZP)(`/api/ec_courses/${s.id}/course_evaluations/deletes.json`,{method:"delete",body:{id:l.id}}))&&(W.ZP.info("\u5220\u9664\u6210\u529F"),rt(s))}),onCancel(){}})},style:{color:"#0152d9",cursor:"pointer",margin:"10px 0px"},className:"iconfont icon-shanchu9"}),e.createElement("i",{onClick:()=>{ae.current=l.id,(l==null?void 0:l.status)!="\u5DF2\u5BFC\u5165"?(qe(l),Oe(!0)):ce(!0)},style:{color:"#0152d9",cursor:"pointer"},className:"iconfont icon-bianji8"})))})))),e.createElement("div",{style:{height:"20px",background:"#fafafa"}}),e.createElement("div",{className:c.title,style:{display:"flex",justifyContent:"space-between"}},"\u8BFE\u7A0B\u76EE\u6807\u8FBE\u6210\u5EA6",e.createElement("span",null,e.createElement(ne.ZP,{disabled:h,style:{marginRight:"20px"},onClick:()=>{Nt(!0)}},e.createElement("i",{style:{marginRight:"8px"},className:"iconfont icon-kechengshezhi"})," \u8BBE\u7F6E\u8003\u6838\u5360\u6BD4"),e.createElement(ne.ZP,{disabled:h,style:{marginRight:"20px"},onClick:()=>{Lt(s.id),o(!0)}},e.createElement("i",{style:{marginRight:"8px"},className:"iconfont icon-jisuangongshi"})," \u8BBE\u7F6E\u8BA1\u7B97\u516C\u5F0F"),e.createElement(ne.ZP,{type:"primary",disabled:h,style:{marginRight:"20px"},onClick:()=>D(void 0,null,function*(){(yield(0,S.ZP)(`/api/ec_courses/${s.id}/evaluations/evaluation_data.json`,{method:"post"}))&&(W.ZP.info("\u8BA1\u7B97\u5B8C\u6210"),dt(s))})},e.createElement("i",{style:{marginRight:"8px"},className:"iconfont icon-jisuan"})," \u8BA1\u7B97"))),e.createElement("div",{style:{padding:"0px 20px"},className:c.teachcount},!Te&&e.createElement(gt.Z,null),Te&&e.createElement("div",{style:{fontSize:"14px"}},e.createElement("div",{style:{display:"flex",background:"#F5F5F5",height:"58px",border:"1px solid #E0E2EC",marginTop:"20px"}},e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"4%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},"\u5206\u9879"),e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"15%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},"\u8BFE\u7A0B\u76EE\u6807"),e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"3%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},"\u6743\u91CD"),e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"9%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},"\u5BF9\u5E94\u6BD5\u4E1A\u8981\u6C42\u6307\u6807\u70B9"),e.createElement("div",{style:{height:"100%",width:"40%",display:"flex",flexDirection:"column",flexShrink:0,borderRight:"1px solid #E0E2EC"}},e.createElement("div",{style:{width:"100%",display:"flex",flexShrink:0,height:"100%"}},e.createElement("div",{style:{width:"30%",borderRight:"1px solid #E0E2EC",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,flexDirection:"column"}},"\u8003\u6838\u65B9\u5F0F"),e.createElement("div",{style:{width:"12.5%",borderRight:"1px solid #E0E2EC",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,flexDirection:"column",textAlign:"center"}},"\u8003\u6838\u65B9\u5F0F\u5360\u6BD4"),e.createElement("div",{style:{width:"45%",height:"100%"}},e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,flexDirection:"column",height:"100%"}},"\u8003\u6838\u5185\u5BB9")),e.createElement("div",{style:{width:"12.5%",height:"100%"}},e.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,flexDirection:"column",height:"100%",textAlign:"center"}},"\u8003\u6838\u5185\u5BB9\u5360\u6BD4")))),e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"7%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",textAlignLast:"center"}},"\u8FBE\u6210\u5206\u503C\uFF08\u767E\u5206\u5236\uFF09"),e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"7%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center",textAlignLast:"center"}},"\u5B9E\u9645\u5206\u503C\uFF08\u767E\u5206\u5236\uFF09"),e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"6%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},"\u8BC4\u4EF7\u7ED3\u679C"),e.createElement("div",{style:{width:"8%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},"\u8BA1\u7B97\u65F6\u95F4")),e.createElement("div",{style:{borderLeft:"1px solid #E0E2EC"}},(v=Te==null?void 0:Te.ec_course_target)==null?void 0:v.map((l,d)=>{var x,I,J,L,V,w;return e.createElement("div",{style:{height:"100%",display:"flex"}},e.createElement("div",{style:{width:"4%",borderRight:"1px solid #E0E2EC",borderBottom:"1px solid #E0E2EC",marginTop:-1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},d+1),e.createElement("div",{className:c.textone,style:{width:"15%",borderRight:"1px solid #E0E2EC",borderBottom:"1px solid #E0E2EC",marginTop:-1,alignItems:"center",justifyContent:"center",flexShrink:0,maxHeight:((x=l==null?void 0:l.evaluation)==null?void 0:x.length)<=0&&43,lineHeight:((I=l==null?void 0:l.evaluation)==null?void 0:I.length)<=0&&"43px",display:((J=l==null?void 0:l.evaluation)==null?void 0:J.length)!=0&&"flex",paddingLeft:10}},e.createElement(H.Z,{title:l.content},l.content)),e.createElement("div",{style:{width:"3%",borderRight:"1px solid #E0E2EC",borderBottom:"1px solid #E0E2EC",marginTop:-1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},l.weights),e.createElement("div",{style:{width:"9%",borderRight:"1px solid #E0E2EC",borderBottom:"1px solid #E0E2EC",marginTop:-1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},(L=l==null?void 0:l.graduation_subitem)==null?void 0:L.map(y=>y.name).toString()),e.createElement("div",{style:{height:"100%",width:"40%",display:"flex",flexDirection:"column",flexShrink:0,borderRight:"1px solid #E0E2EC"}},((V=l==null?void 0:l.evaluation)==null?void 0:V.length)<=0&&e.createElement("div",{style:{width:"100%",display:"flex",flexShrink:0}},e.createElement("div",{style:{width:"30%",borderRight:"1px solid #E0E2EC",borderBottom:"1px solid #E0E2EC",marginTop:-1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,flexDirection:"column"}},"--"),e.createElement("div",{style:{width:"12.6%",borderRight:"1px solid #E0E2EC",borderBottom:"1px solid #E0E2EC",marginTop:-1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,flexDirection:"column"}},"--"),e.createElement("div",{style:{width:"45.3%"}},e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",borderBottom:"1px solid #E0E2EC",marginTop:-1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,flexDirection:"column",height:43}},"--")),e.createElement("div",{style:{width:"12.5%"}},e.createElement("div",{style:{borderBottom:"1px solid #E0E2EC",marginTop:-1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,flexDirection:"column",height:43}},"--"))),(w=l==null?void 0:l.evaluation)==null?void 0:w.map((y,De)=>{var ge,pe,je,Se;return e.createElement("div",{style:{width:"100%",display:"flex",flexShrink:0}},e.createElement("div",{style:{width:"30%",borderRight:"1px solid #E0E2EC",borderBottom:"1px solid #E0E2EC",marginTop:-1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},(y==null?void 0:y.work_name)||"--"),e.createElement("div",{style:{width:"12.5%",borderRight:"1px solid #E0E2EC",borderBottom:"1px solid #E0E2EC",marginTop:-1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},(y==null?void 0:y.weight)||"--"),e.createElement("div",{style:{width:"45%"}},((ge=y==null?void 0:y.subitems)==null?void 0:ge.length)<=0&&e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",borderBottom:"1px solid #E0E2EC",marginTop:-1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,height:43}},"--"),(pe=y==null?void 0:y.subitems)==null?void 0:pe.map((te,Le)=>e.createElement(H.Z,{title:te==null?void 0:te.name},e.createElement("div",{className:c.textone,style:{borderRight:"1px solid #E0E2EC",borderBottom:"1px solid #E0E2EC",marginTop:-1,lineHeight:"43px",alignItems:"center",justifyContent:"center",flexShrink:0,flexDirection:"column",height:43,paddingLeft:"5px"}},te==null?void 0:te.name)))),e.createElement("div",{style:{width:"12.5%"}},((je=y==null?void 0:y.subitems)==null?void 0:je.length)<=0&&e.createElement("div",{style:{borderBottom:"1px solid #E0E2EC",marginTop:-1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,flexDirection:"column",height:43}},"--"),(Se=y==null?void 0:y.subitems)==null?void 0:Se.map((te,Le)=>e.createElement("div",{style:{borderBottom:"1px solid #E0E2EC",marginTop:-1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,flexDirection:"column",height:43}},te==null?void 0:te.weight))))})),e.createElement("div",{style:{width:"7%",borderRight:"1px solid #E0E2EC",borderBottom:"1px solid #E0E2EC",marginTop:-1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},l==null?void 0:l.standard_grade),e.createElement("div",{style:{width:"7%",borderRight:"1px solid #E0E2EC",borderBottom:"1px solid #E0E2EC",marginTop:-1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},l==null?void 0:l.actual_grade),e.createElement("div",{style:{width:"6%",borderRight:"1px solid #E0E2EC",borderBottom:"1px solid #E0E2EC",marginTop:-1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,color:l!=null&&l.status?"#07C160":"#E30000"}},l!=null&&l.status?"\u8FBE\u6210":"\u672A\u8FBE\u6210"),e.createElement("div",{style:{width:"8%",borderRight:"1px solid #E0E2EC",borderBottom:"1px solid #E0E2EC",marginTop:-1,display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,textAlign:"center"}},Te==null?void 0:Te.evaluation_time))})),e.createElement("div",{style:{display:"flex",height:"58px",border:"1px solid #E0E2EC",marginTop:-1}},e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"4%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},"\u603B\u5206"),e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"74%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}}),e.createElement("div",{style:{borderRight:"1px solid #E0E2EC",width:"7%",textAlign:"center",flexShrink:0,display:"flex",alignItems:"center",justifyContent:"center"}},Te==null?void 0:Te.total_score)))),e.createElement(It,{courseId:ae.current,isshow:Ye,setishow:Oe,items:ot,points:t,modalparams:s,getevaluations:dt,getcourse_evaluations:kt}),e.createElement(ft,{isshow:Ut,setishow:Nt,modalparams:s,getcourse_evaluations:dt}),e.createElement(F.default,{title:"\u7F16\u8F91\u8BFE\u7A0B\u76EE\u6807",open:He,wrapClassName:c.modalWrapContainer,width:918,okText:"\u4FDD\u5B58",onOk:()=>D(void 0,null,function*(){if((k==null?void 0:k.filter(d=>{var x,I;return!d.content||!d.weight||!d.standard_grade||((x=d==null?void 0:d.graduation_subitem_ids)==null?void 0:x.length)<=0||((I=d==null?void 0:d.graduation_subitem_ids)==null?void 0:I.filter(J=>!J).length)>0}).length)>0){W.ZP.info("\u8BF7\u586B\u5199\u6216\u5220\u9664\u6CA1\u6709\u586B\u5165\u6570\u503C\u7684\u6570\u636E");return}let l=yield(0,S.ZP)(`/api/ec_courses/${s==null?void 0:s.id}/course_targets`,{method:"POST",body:{course_targets:k}});(l==null?void 0:l.status)===0&&(Ge(!1),Ct(s),dt(s))}),onCancel:()=>{Ge(!1),Ct(s)}},e.createElement("div",{style:{color:"#464F66",fontSize:14,paddingLeft:40,paddingBottom:12}},e.createElement("div",null,"\u8BF4\u660E\uFF1A"),e.createElement("div",null,"1.\u8BFE\u7A0B\u76EE\u6807\u7684\u6743\u91CD\u4E4B\u548C\u5E94\u7B49\u4E8E1\uFF1B",e.createElement("br",null),"2.\u53EF\u5728\u8BBE\u7F6E\u8BFE\u7A0B\u8FBE\u6210\u5EA6\u8BA1\u7B97\u516C\u5F0F\u65F6\uFF0C\u9009\u62E9\u662F\u5426\u5C06\u8BFE\u7A0B\u76EE\u6807\u7684\u6743\u91CD\u53C2\u4E0E\u5230\u8BA1\u7B97\u4E2D\u3002")),e.createElement("div",{style:{display:"flex",background:"#F5F5F5",height:"38px",alignItems:"center",padding:"0px 10px"}},e.createElement("span",{style:{flex:1}},"\u5206\u9879"),e.createElement("span",{style:{flex:3}},e.createElement("span",{style:{color:"#EE0A24",marginRight:"5px"}},"*"),"\u8BFE\u7A0B\u76EE\u6807"),e.createElement("span",{style:{flex:2}},e.createElement("span",{style:{color:"#EE0A24",marginRight:"5px"}},"*"),"\u6743\u91CD"),e.createElement("span",{style:{flex:2}},e.createElement("span",{style:{color:"#EE0A24",marginRight:"5px"}},"*"),"\u8FBE\u6210\u5206\u503C\uFF08\u5206\uFF09")),k==null?void 0:k.map((l,d)=>{var x,I,J;return e.createElement("div",null,e.createElement("div",{style:{display:"flex",background:"#EEF2F8",height:"62px",alignItems:"center",padding:"0px 10px"}},e.createElement("span",{style:{flex:1}},d+1),e.createElement("span",{style:{flex:3,padding:"0px 10px"}},e.createElement(G.default,{onChange:L=>{l.content=L.target.value,f([...k])},value:l==null?void 0:l.content})),e.createElement("span",{style:{flex:2}},e.createElement(O.Z,{min:0,max:1,step:.1,onChange:L=>{l.weight=L,f([...k])},value:l==null?void 0:l.weight})),e.createElement("span",{style:{flex:2}},e.createElement(O.Z,{min:0,max:100,onChange:L=>{l.standard_grade=L,f([...k])},value:l==null?void 0:l.standard_grade}),e.createElement(H.Z,{title:"\u65B0\u589E\u8BFE\u7A0B\u76EE\u6807"},e.createElement("i",{style:{color:"#0152D9",cursor:"pointer",marginLeft:"10px"},className:"iconfont icon-xinzeng",onClick:()=>D(void 0,null,function*(){let L={id:0,content:"",weight:"",standard_grade:"",graduation_subitem_ids:[""]};k.push(L),f([...k])})})),d!==0&&e.createElement(H.Z,{title:"\u5220\u9664"},e.createElement("i",{onClick:()=>D(void 0,null,function*(){k.splice(d,1),f([...k])}),style:{color:"#0152D9",cursor:"pointer",marginLeft:"10px"},className:"iconfont icon-shanchu9"})))),e.createElement("div",{style:{display:"flex",padding:"0px 10px"}},e.createElement("span",{style:{flex:1}}),e.createElement("span",{style:{flex:3}}," ",e.createElement("span",{style:{color:"#EE0A24",marginRight:"5px"}},"*")," ","\u5BF9\u5E94\u6BD5\u4E1A\u8981\u6C42\u6307\u6807\u70B9"," "),e.createElement("span",{style:{flex:2}}),e.createElement("span",{style:{flex:2}})),(x=l==null?void 0:l.graduation_subitem_ids)==null?void 0:x.map((L,V)=>e.createElement("div",{style:{display:"flex",height:"40px",alignItems:"center",padding:"0px 10px"}},e.createElement("span",{style:{flex:1}}),e.createElement("span",{style:{flex:3,display:"flex",alignItems:"center"}},e.createElement(U.default,{value:L,getPopupContainer:w=>w.parentNode,onChange:w=>{l.graduation_subitem_ids[V]=w,f([...k])},style:{width:"320px"}},Ce==null?void 0:Ce.map((w,y)=>e.createElement(U.default.Option,{disabled:l.graduation_subitem_ids.includes(w==null?void 0:w.id),value:w==null?void 0:w.id,title:"\u6307\u6807\u70B9"+(w==null?void 0:w.index)+"\uFF1A"+(w==null?void 0:w.content)},"\u6307\u6807\u70B9",w==null?void 0:w.index,"\uFF1A",w==null?void 0:w.content))),e.createElement(H.Z,{title:"\u65B0\u589E\u6307\u6807\u70B9"},e.createElement("i",{style:{color:"#0152D9",cursor:"pointer",marginLeft:"10px"},className:"iconfont icon-xinzeng",onClick:()=>D(void 0,null,function*(){l==null||l.graduation_subitem_ids.push(""),f([...k])})})),V!==0&&e.createElement(H.Z,{title:"\u5220\u9664"},e.createElement("i",{onClick:()=>D(void 0,null,function*(){l.graduation_subitem_ids.splice(V,1),f([...k])}),style:{color:"#0152D9",cursor:"pointer",marginLeft:"10px"},className:"iconfont icon-shanchu9"}))),e.createElement("span",{style:{flex:2}}),e.createElement("span",{style:{flex:1}}))),((I=l==null?void 0:l.graduation_subitem_ids)==null?void 0:I.length)<=0&&((J=[""])==null?void 0:J.map((L,V)=>e.createElement("div",{style:{display:"flex",height:"40px",alignItems:"center",padding:"0px 10px"}},e.createElement("span",{style:{flex:1}}),e.createElement("span",{style:{flex:3,display:"flex",alignItems:"center"}},e.createElement(U.default,{value:L,getPopupContainer:w=>w.parentNode,onChange:w=>{l.graduation_subitem_ids[V]=w,f([...k])},style:{width:"320px"}},Ce==null?void 0:Ce.map((w,y)=>e.createElement(U.default.Option,{disabled:l.graduation_subitem_ids.includes(w==null?void 0:w.id),value:w==null?void 0:w.id,title:"\u6307\u6807\u70B9"+(w==null?void 0:w.index)+"\uFF1A"+(w==null?void 0:w.content)},"\u6307\u6807\u70B9",w==null?void 0:w.index,"\uFF1A",w==null?void 0:w.content))),e.createElement(H.Z,{title:"\u65B0\u589E\u6307\u6807\u70B9"},e.createElement("i",{style:{color:"#0152D9",cursor:"pointer",marginLeft:"10px"},className:"iconfont icon-xinzeng",onClick:()=>D(void 0,null,function*(){l==null||l.graduation_subitem_ids.push(""),f([...k])})})),V!==0&&e.createElement(H.Z,{title:"\u5220\u9664"},e.createElement("i",{onClick:()=>D(void 0,null,function*(){l.graduation_subitem_ids.splice(V,1),f([...k])}),style:{color:"#0152D9",cursor:"pointer",marginLeft:"10px"},className:"iconfont icon-shanchu9"}))),e.createElement("span",{style:{flex:2}}),e.createElement("span",{style:{flex:1}})))))})),e.createElement(F.default,{title:"\u8BBE\u7F6E\u8BA1\u7B97\u516C\u5F0F",open:r,width:918,className:c.modalWrapContainer,onCancel:()=>{o(!1)},onOk:()=>D(void 0,null,function*(){var l,d,x,I;(yield(0,S.ZP)("/api/ec_years/1/ec_courses/save_formulas.json",{method:"post",body:{ec_course_id:s.id,ec_course_target_formula_id:(d=(l=p==null?void 0:p.ec_course_target_formulas.filter(L=>L.checked))==null?void 0:l[0])==null?void 0:d.id,ec_course_formula_id:(I=(x=p==null?void 0:p.ec_course_formulas.filter(L=>L.checked))==null?void 0:x[0])==null?void 0:I.id}}))&&(o(!1),Lt(s.id))})},e.createElement("div",{style:{padding:"16px 0"}},e.createElement(z.default,{activeKey:_e,onChange:l=>{ke(l)}},e.createElement(z.default.TabPane,{key:1,tab:"\u8BFE\u7A0B\u76EE\u6807\u5B9E\u9645\u5206\u503C"}),e.createElement(z.default.TabPane,{key:2,tab:"\u8BFE\u7A0B\u603B\u5206"}))),_e==="1"&&e.createElement("div",null,e.createElement("div",{style:{display:"flex",height:38,background:"#F5F5F5",lineHeight:"38px",padding:"0px 40px"}},e.createElement("span",{style:{flex:1,marginRight:"30px"}},"\u8BFE\u7A0B\u76EE\u6807\u5B9E\u9645\u5206\u503C\u8BA1\u7B97\u516C\u5F0F"),e.createElement("span",{style:{width:185}},"\u64CD\u4F5C")),($=p==null?void 0:p.ec_course_target_formulas)==null?void 0:$.map((l,d)=>e.createElement("div",{style:{display:"flex",padding:"20px 40px"}},(l==null?void 0:l.checked)&&e.createElement("span",{style:{width:"40px",borderRadius:"2px",color:"#0152D9",border:"1px solid #0152D9",display:"inline-flex",alignItems:"center",justifyContent:"center",marginRight:"10px",height:"22px"}},"\u9ED8\u8BA4"),e.createElement("span",{style:{flex:1,marginRight:"30px",marginLeft:!(l!=null&&l.checked)&&"50px"}},e.createElement("p",null,l==null?void 0:l.content),(l==null?void 0:l.explain)&&e.createElement("p",null,"\u8BF4\u660E\uFF1A",l==null?void 0:l.explain)),e.createElement("span",{style:{width:185}},e.createElement(ze.ZP,{onClick:()=>{p==null||p.ec_course_target_formulas.map(x=>{l.id===x.id?x.checked=!0:x.checked=!1}),P(M({},p))},checked:l==null?void 0:l.checked}," ","\u8BBE\u4E3A\u9ED8\u8BA4\u516C\u5F0F"))))),_e==="2"&&e.createElement("div",null,e.createElement("div",{style:{display:"flex",height:38,background:"#F5F5F5",lineHeight:"38px",padding:"0px 40px"}},e.createElement("span",{style:{flex:1}},"\u8BFE\u7A0B\u603B\u5206\u8BA1\u7B97\u516C\u5F0F"),e.createElement("span",{style:{width:185}},"\u64CD\u4F5C")),(ee=p==null?void 0:p.ec_course_formulas)==null?void 0:ee.map((l,d)=>e.createElement("div",{style:{display:"flex",padding:"20px 40px"}},(l==null?void 0:l.checked)&&e.createElement("span",{style:{width:"40px",borderRadius:"2px",color:"#0152D9",border:"1px solid #0152D9",display:"inline-flex",alignItems:"center",justifyContent:"center",marginRight:"10px",height:"22px"}},"\u9ED8\u8BA4"),e.createElement("span",{style:{flex:1,marginRight:"30px",marginLeft:!(l!=null&&l.checked)&&"50px"}},e.createElement("p",null,l==null?void 0:l.content),(l==null?void 0:l.explain)&&e.createElement("p",null,"\u8BF4\u660E\uFF1A",l==null?void 0:l.explain)),e.createElement("span",{style:{width:185}},e.createElement(ze.ZP,{onClick:()=>{p==null||p.ec_course_formulas.map(x=>{l.id===x.id?x.checked=!0:x.checked=!1}),P(M({},p))},checked:l==null?void 0:l.checked}," ","\u8BBE\u4E3A\u9ED8\u8BA4\u516C\u5F0F")))))),e.createElement(F.default,{title:"\u6279\u91CF\u5BFC\u5165",open:$e,centered:!0,onCancel:()=>{ce(!1),g([])},okButtonProps:{loading:j},onOk:()=>D(void 0,null,function*(){const l=new FormData;if(i.length>0)l.append("file",i[0]);else{W.ZP.warning("\u8BF7\u9009\u62E9\u6587\u4EF6");return}if(!s.id){W.ZP.info("\u8BF7\u5148\u521B\u5EFA\u8BFE\u7A0B");return}R(!0),l.append("ec_course_id",s.id),ae.current&&l.append("id",ae.current);let d=ae.current?`/api/ec_courses/${s.id}/course_evaluations/update_offline.json`:`/api/ec_courses/${s.id}/course_evaluations/create_offline.json`,x=yield(0,S.ZP)(d,{method:ae.current?"put":"post",body:l},!0);R(!1),(x==null?void 0:x.status)===0&&(W.ZP.info("\u6DFB\u52A0\u6210\u529F"),ce(!1),g([]),kt(s))})},e.createElement("p",null,"\u6B65\u9AA41\uFF1A\u4E0B\u8F7D",e.createElement("a",{href:nt.Z.API_SERVER+"/api/ec_courses/1/course_evaluations/download_template.xlsx",download:"\u6A21\u7248.xlsx"},"\u660E\u7EC6\u6210\u7EE9\u5BFC\u5165\u6A21\u677F"),",\u5BFC\u5165\u7EBF\u4E0B\u6570\u636E\u5185\u5BB9\u3002",e.createElement("span",{style:{color:"#D95201"}},"\u6CE8\uFF1A\u76EE\u524D\u4EC5\u652F\u6301Excel\u683C\u5F0F\u6A21\u677F")),e.createElement(Me.Z,null,e.createElement(lt.Z,null,"\u6B65\u9AA42\uFF1A"),e.createElement(lt.Z,null,e.createElement(tt.default,M({},Qt),e.createElement(ne.ZP,{type:"primary"},"\u9009\u62E9\u6587\u4EF6"))))),e.createElement(m.Z,xe(M({},Be),{onClose:()=>{Et(xe(M({},Be),{type:""}))}})),e.createElement(F.default,{title:a?"\u7F16\u8F91\u77E5\u8BC6\u70B9":"\u65B0\u589E\u77E5\u8BC6\u70B9",open:zt,onOk:()=>{vt.submit()},okButtonProps:{loading:Mt},onCancel:()=>{Ft(!1),vt.setFieldsValue({name:"",target:"",content:"",problem:"",ec_course_target_ids:[]})}},e.createElement("p",{style:{color:"#FA6400",fontSize:"14px"}}),e.createElement(Ee.default,{labelCol:{span:7},wrapperCol:{span:17},form:vt,onFinish:l=>D(void 0,null,function*(){Ot(!0);let d=a?`/api/ec_courses/${s.id}/ec_points/${a}.json`:`/api/ec_courses/${s.id}/ec_points.json`,x=yield(0,S.ZP)(d,{method:a?"put":"post",body:M({ec_course_id:s.id,id:a},l)});Ot(!1),x.status===0&&(W.ZP.info("\u65B0\u589E\u6210\u529F"),Dt(s),vt.setFieldsValue({name:"",target:"",content:"",problem:"",ec_course_target_ids:[]}),Ft(!1))})},e.createElement(Ee.default.Item,{label:"\u77E5\u8BC6\u70B9",name:"name",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u77E5\u8BC6\u70B9"}]},e.createElement(G.default,null)),e.createElement(Ee.default.Item,{label:"\u6559\u5B66\u76EE\u7684",name:"target",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6559\u5B66\u76EE\u7684"}]},e.createElement(G.default,null)),e.createElement(Ee.default.Item,{label:"\u6559\u5B66\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u6559\u5B66\u5185\u5BB9"}]},e.createElement(G.default,null)),e.createElement(Ee.default.Item,{label:"\u91CD\u70B9\u96BE\u70B9",name:"problem",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u91CD\u70B9\u96BE\u70B9"}]},e.createElement(G.default,null)),e.createElement(Ee.default.Item,{label:"\u652F\u6491\u7684\u8BFE\u7A0B\u76EE\u6807",name:"ec_course_target_ids",rules:[{required:!0,message:"\u8BF7\u9009\u62E9\u8BFE\u7A0B\u76EE\u6807"}]},e.createElement(U.default,{mode:"multiple",disabled:((ie=s.kcdatas)==null?void 0:ie.length)<=0,placeholder:"\u8BF7\u9009\u62E9\u8BFE\u7A0B\u76EE\u6807"},me==null?void 0:me.map((l,d)=>e.createElement(U.default.Option,{key:d,value:l==null?void 0:l.id},l==null?void 0:l.content)))))))};var Bt=(0,Ie.connect)(({user:_})=>({user:_}))(At)}}]);