diff --git a/index.html b/index.html index dc2153dca2..f78f33ebed 100644 --- a/index.html +++ b/index.html @@ -93,6 +93,6 @@ gtag('config', 'UA-198293321-1'); --> - + diff --git a/p__Exam__Lists__ExaminationManagement__Export__index.c602c465.async.js b/p__Exam__Lists__ExaminationManagement__Export__index.4ed78747.async.js similarity index 53% rename from p__Exam__Lists__ExaminationManagement__Export__index.c602c465.async.js rename to p__Exam__Lists__ExaminationManagement__Export__index.4ed78747.async.js index 710882b660..48734dc63a 100644 --- a/p__Exam__Lists__ExaminationManagement__Export__index.c602c465.async.js +++ b/p__Exam__Lists__ExaminationManagement__Export__index.4ed78747.async.js @@ -1,8 +1,8 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[129,5],{"+hAq":function(Ae,be,a){"use strict";a.r(be);var Ue=a("+L6B"),qe=a("2/Rp"),ft=a("/zsF"),Me=a("PArb"),$e=a("sRBo"),Fe=a("kaz8"),F=a("14J3"),we=a("BMrR"),We=a("jCWc"),J=a("kPKH"),Pe=a("7Kak"),ze=a("9yH6"),He=a("2qtc"),Ie=a("kLXV"),Ve=a("WmNS"),se=a.n(Ve),ve=a("k1fw"),N=a("9og8"),$=a("tJVT"),Be=a("PpiC"),r=a("q1tI"),e=a.n(r),H=a("Ty5D"),le=a("55Ip"),ce=a("9kvl"),q=a("r0c9"),G=a.n(q),W=a("jhfD"),M=a("dF/Y"),Ne=a("PLEg"),ee=a.n(Ne),ie=a("9Bee"),Ye=a("5NDa"),m=a("5rEg"),E=function(s){var i=s.data;console.log("--------",i);var p=Object(r.useState)(!1),D=Object($.a)(p,2),o=D[0],u=D[1],c=function(){var U,V;switch(i.question_type){case 3:return e.a.createElement("aside",null,e.a.createElement("span",{style:{cursor:"pointer"},className:"font12 c-blue current",onClick:function(){u(!o)}},o?"\u9690\u85CF\u53C2\u8003\u7B54\u6848":"\u67E5\u770B\u53C2\u8003\u7B54\u6848"),o&&e.a.createElement("div",null,i==null||((U=i.standard_answer)===null||U===void 0)?void 0:U.map(function(ne,Q){var b;return e.a.createElement(we.a,{className:"mt10"},e.a.createElement(J.a,{flex:"50px"},e.a.createElement("span",{className:"mt10"},"\u586B\u7A7A",ne.choice_id)),e.a.createElement(J.a,{flex:1},ne==null||((b=ne.answer_text)===null||b===void 0)?void 0:b.map(function(Z,pe){return e.a.createElement("div",{style:{border:"1px solid #eee",padding:"15px 10px 0 10px"}},e.a.createElement(ie.a,{value:Z}))})))})));case 4:return e.a.createElement("aside",null,e.a.createElement("span",{style:{cursor:"pointer"},className:"font12 c-blue current",onClick:function(){u(!o)}},o?"\u9690\u85CF\u53C2\u8003\u7B54\u6848":"\u67E5\u770B\u53C2\u8003\u7B54\u6848"),o&&e.a.createElement("div",null,e.a.createElement(ie.a,{value:i==null||((V=i.standard_answer)===null||V===void 0)?void 0:V.join(" ")})))}};return e.a.createElement("section",null,c())},R=a("m3rI"),y=a("6hOw"),j=a.n(y),te=a("wd/R"),L=a.n(te),T=a("1vsH"),_e=m.a.TextArea,me=function(s){var i,p,D,o=s.item,u=s.answerData,c=s.changeScoreData,S=s.textValue,U=s.textOnChange,V=U===void 0?function(){}:U,ne=Object(r.useState)([]),Q=Object($.a)(ne,2),b=Q[0],Z=Q[1],pe=Object(r.useState)(!1),_=Object($.a)(pe,2),X=_[0],O=_[1];return Object(r.useEffect)(function(){(c==null?void 0:c[o.q_position])?!X&&O(!0):X&&O(!1)},[c==null?void 0:c[o==null?void 0:o.q_position]]),Object(r.useEffect)(function(){for(var ae=[],he=0;he<(o==null?void 0:o.multi_count);he++){var Ce;ae.push(Object(ve.a)({},(o==null||((Ce=o.user_answer)===null||Ce===void 0)?void 0:Ce[he])||{}))}Z(ae)},[o==null?void 0:o.user_answer]),e.a.createElement("div",null,b==null?void 0:b.map(function(ae,he){return e.a.createElement("div",null,e.a.createElement("span",null,"\u7B54\u6848\uFF08\u586B\u7A7A",he+1,"\uFF09:"),e.a.createElement("div",{style:{border:"1px solid #eee",padding:"15px 10px 0 10px"}},e.a.createElement(ie.a,{value:ae==null?void 0:ae.answer_text})))}),e.a.createElement(E,{data:o}),e.a.createElement(Me.a,null),X?e.a.createElement(_e,{style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u8BC4\u8BED\uFF0C\u6700\u5927\u9650\u5236 100 \u4E2A\u5B57\u7B26",value:S,onChange:function(he){return V(he.target.value)}}):e.a.createElement(e.a.Fragment,null,!Object(T.E)((i=o.question_comments)===null||i===void 0?void 0:i.comment)&&e.a.createElement("div",{className:j.a.fillComment},e.a.createElement("img",{src:"".concat(R.a.IMG_SERVER,"/images/").concat((p=o.question_comments)===null||p===void 0?void 0:p.user_picture)}),e.a.createElement("div",{className:j.a.commentContent},e.a.createElement("div",null,L()((D=o.question_comments)===null||D===void 0?void 0:D.updated_at).format("YYYY-MM-DD HH:mm")),e.a.createElement("div",null,o.question_comments.user_name),o.question_comments.comment&&e.a.createElement("div",{className:j.a.commentText},o.question_comments.comment)))))},De=me,Le=a("g9YV"),xe=a("wCAj"),fe=a("giR+"),Ke=a("fyUT"),et=a("miYZ"),tt=a("tsqr"),Je=a("xKgJ"),Se=a("ZW9T"),A=function(s){var i,p,D,o=s.item,u=s.answerData,c=s.hasChangeScore,S=c===void 0?!0:c,U=s.autoHeight,V=s.saveChangeScore,ne=V===void 0?function(){}:V,Q=Object(r.useState)([]),b=Object($.a)(Q,2),Z=b[0],pe=b[1],_=Object(r.useState)([]),X=Object($.a)(_,2),O=X[0],ae=X[1];Object(r.useEffect)(function(){var v;if(!(o==null||((v=o.shixun_details)===null||v===void 0)?void 0:v.length))return;for(var w=[],x=[],h=0;h<(o==null||((f=o.shixun_details)===null||f===void 0)?void 0:f.length);h++){for(var f,Re,t,z=0;z<(o==null?void 0:o.shixun_details[h].stage_list.length);z++){var n,ue,Te,B,ke,mt=o==null?void 0:o.shixun_details[h].stage_list[z];w.push(Object(ve.a)(Object(ve.a)({},mt),{operation:o==null||((n=o.shixun_details)===null||n===void 0||((ue=n[h])===null||ue===void 0||((Te=ue.shixun_detail)===null||Te===void 0||((B=Te[0])===null||B===void 0))))?void 0:B.game_identifier,shixun_challenge_id:o==null||((ke=o.shixun_details[h])===null||ke===void 0)?void 0:ke.shixun_challenge_id}))}if(o==null||((Re=o.shixun_details)===null||Re===void 0||((t=Re[h])===null||t===void 0))?void 0:t.shixun_detail){var Oe,Qe,ot;x.push(o==null||((Oe=o.shixun_details)===null||Oe===void 0||((Qe=Oe[h])===null||Qe===void 0||((ot=Qe.shixun_detail)===null||ot===void 0)))?void 0:ot[0])}}ae(x),pe(w)},[o==null?void 0:o.shixun_details]);var he=[{title:"\u5173\u5361",dataIndex:"position",key:"position",align:"center"},{title:"\u4EFB\u52A1\u540D\u79F0",dataIndex:"name",key:"name",align:"center",render:function(w){return e.a.createElement("span",{className:"overflowHidden1",style:{maxWidth:"400px"},title:w&&w.length>25?w:""},w)}},{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"evaluate_count",key:"evaluate_count",align:"center",render:function(w,x){return e.a.createElement("span",null,x.evaluate_count?x.evaluate_count:e.a.createElement("span",{className:"color-grey-9"},"--"))}},{title:"\u5B8C\u6210\u65F6\u95F4",key:"finished_time",dataIndex:"finished_time",align:"center",render:function(w,x){var h=!1;return x.finished_time&&(u==null?void 0:u.exercise)&&(u==null?void 0:u.exercise_answer_user)&&((u==null?void 0:u.exercise.time)===-1?h=L()(u==null?void 0:u.exercise.end_time).isBefore(x.finished_time):h=L()(u==null?void 0:u.exercise_answer_user.start_at).add(u==null?void 0:u.exercise.time,"m").isBefore(x.finished_time)),e.a.createElement("span",null,x.finished_time||e.a.createElement("span",{className:"c-grey-999"},"--"),e.a.createElement("span",{className:"c-orange-ff9 "},h?"\uFF08\u5DF2\u8D85\u65F6\uFF09":""))}},{title:"\u8017\u65F6",dataIndex:"time_consuming",key:"time_consuming",align:"center",render:function(w,x){return e.a.createElement("span",null,x.time_consuming||e.a.createElement("span",{className:"color-grey-9"},"--"))}},{title:"\u67E5\u770B\u7B54\u6848",dataIndex:"view_answer",key:"view_answer",align:"center",render:function(w,x){return e.a.createElement("span",null,x.view_answer?"\u5DF2\u67E5\u770B":"\u672A\u67E5\u770B")}},{title:"\u5F97\u5206/\u6EE1\u5206",dataIndex:"user_score",key:"user_score",align:"center",render:function(w,x){return e.a.createElement("span",null,e.a.createElement("span",{className:"c-orange"},x.user_score),"/",x.game_score)}},S&&{title:"\u8C03\u5206",dataIndex:"user_score",key:"user_score",align:"center",render:function(w,x,h){return e.a.createElement(Ke.a,{min:0,max:Number(x.game_score),defaultValue:w,onBlur:function(){var f=Object(N.a)(se.a.mark(function Re(t){var z;return se.a.wrap(function(ue){for(;;)switch(ue.prev=ue.next){case 0:if(!(t.target.value!=w)){ue.next=6;break}return ue.next=3,ne(Object(ve.a)(Object(ve.a)({},o),{shixun_challenge_id:x.shixun_challenge_id,shixunScore:t.target.value}));case 3:z=ue.sent,console.log("res: ",z),(z==null?void 0:z.question_comments)&&tt.b.success("\u5DF2\u4FEE\u6539\u5F53\u524D\u8BC4\u5206");case 6:case"end":return ue.stop()}},Re)}));return function(Re){return f.apply(this,arguments)}}()})}}].filter(function(v){return!!v}),Ce=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"key",width:"127px",key:"key",align:"center",render:function(w,x){return e.a.createElement("span",null,x.key)}},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"error_msg",key:"error_msg",align:"center",render:function(w,x){return e.a.createElement("span",null,x.error_msg?x.error_msg:"--")}},{title:"\u8BC4\u6D4B\u65F6\u95F4",dataIndex:"updated_at",key:"updated_at",align:"center",width:200,render:function(w,x){return e.a.createElement("span",null,x.updated_at?x.updated_at:"--")}}],Y={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};return e.a.createElement(e.a.Fragment,null,((u==null||((i=u.exercise)===null||i===void 0)?void 0:i.student_commit_status)!==0||(u==null||((p=u.exercise)===null||p===void 0)?void 0:p.user_exercise_status)!==0)&&e.a.createElement("div",{className:"mt15"},e.a.createElement("p",{className:"font16 c-grey-666"},"\u9636\u6BB5\u6210\u7EE9"),!!(Z==null?void 0:Z.length)&&e.a.createElement(xe.a,{columns:he,dataSource:Z,pagination:!1})),!!(O==null?void 0:O.length)&&e.a.createElement(e.a.Fragment,null,e.a.createElement("p",{className:"font16 c-grey-666 mt10"},"\u5B9E\u8BAD\u8BE6\u60C5"),O==null?void 0:O.map(function(v,w){var x;return e.a.createElement(e.a.Fragment,null,e.a.createElement("div",{className:"mt5"},e.a.createElement("span",{className:"font16 mr15"}," \u7B2C",v.position,"\u5173"),e.a.createElement(le.Link,{className:"current c-black font16",to:"/tasks/".concat(v.game_identifier)},v.name)),!!(v==null||((x=v.outputs)===null||x===void 0)?void 0:x.length)&&e.a.createElement(xe.a,{bordered:!0,dataSource:v.outputs.map(function(h){return{key:h.position,error_msg:h.output_detail,updated_at:h.updated_at}}),columns:Ce,pagination:!1}),(v==null?void 0:v.st)===0&&v.passed_code&&e.a.createElement("div",{className:j.a.shixunWrp},e.a.createElement("h2",null,"\u6700\u540E\u4E00\u6B21\u901A\u5173\u7684\u4EE3\u7801\uFF08\u672A\u901A\u5173\u5219\u4E3A\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\uFF09",e.a.createElement("span",{className:"c-light-black"},v.path)),e.a.createElement(Se.b,{height:300,autoHeight:U,language:"python",theme:"default",value:v.passed_code,options:Y})))})),Object(Je.t)()&&e.a.createElement(ie.a,{className:"c-grey-999 mt20 mb20",value:o==null?void 0:o.question_title}),o==null||((D=o.shixun)===null||D===void 0)?void 0:D.map(function(v,w){return e.a.createElement("p",{className:"font16 c-grey-666 mb5"},e.a.createElement("span",{className:"mr20"},"\u7B2C",v==null?void 0:v.challenge_position,"\u5173 ",v==null?void 0:v.challenge_name),e.a.createElement("span",null,v==null?void 0:v.challenge_score,"\u5206"))}),e.a.createElement("div",{className:"mb15"}))},pt=A,lt=m.a.TextArea,Ee=function(s){var i,p,D,o,u=s.item,c=s.answerData,S=s.changeScoreData,U=s.textValue,V=s.textOnChange,ne=V===void 0?function(){}:V,Q=Object(r.useState)(!1),b=Object($.a)(Q,2),Z=b[0],pe=b[1];return Object(r.useEffect)(function(){(S==null?void 0:S[u.q_position])?!Z&&pe(!0):Z&&pe(!1)},[S==null?void 0:S[u==null?void 0:u.q_position]]),e.a.createElement("div",null,e.a.createElement(e.a.Fragment,null,e.a.createElement("div",{className:j.a.simpleWrap},e.a.createElement(ie.a,{value:(u==null||((i=u.user_answer)===null||i===void 0)?void 0:i[0])||""})),Object(Je.d)()&&e.a.createElement(E,{data:u})),e.a.createElement(Me.a,null),Z?e.a.createElement(lt,{style:{width:"100%"},placeholder:"\u8BF7\u8F93\u5165\u8BC4\u8BED\uFF0C\u6700\u5927\u9650\u5236 100 \u4E2A\u5B57\u7B26",value:U,onChange:function(X){return ne(X.target.value)}}):e.a.createElement(e.a.Fragment,null,!Object(T.E)((p=u.question_comments)===null||p===void 0?void 0:p.comment)&&e.a.createElement("div",{className:j.a.fillComment},e.a.createElement("img",{src:"".concat(R.a.IMG_SERVER,"/images/").concat((D=u.question_comments)===null||D===void 0?void 0:D.user_picture)}),e.a.createElement("div",{className:j.a.commentContent},e.a.createElement("div",null,L()((o=u.question_comments)===null||o===void 0?void 0:o.updated_at).format("YYYY-MM-DD HH:mm")),e.a.createElement("div",null,u.question_comments.user_name),e.a.createElement("div",{className:j.a.commentText},u.question_comments.comment)))))},gt=Ee,it=a("J66h"),nt=a("HhNu"),ut=a.n(nt),dt=function(s){var i,p,D,o,u,c=s.item,S=s.answerData,U=s.autoHeight,V=Object(r.useState)([]),ne=Object($.a)(V,2),Q=ne[0],b=ne[1];Object(r.useEffect)(function(){var _;if((c==null||((_=c.evaluate_codes)===null||_===void 0)?void 0:_.length)>0){var X;b(c==null||((X=c.evaluate_codes)===null||X===void 0)?void 0:X.map(function(O,ae){return{key:ae+1,error_msg:(O==null?void 0:O.error_msg)?it.Base64.decode(O==null?void 0:O.error_msg):"",created_at:O.created_at}}))}else b([{key:"--",error_msg:"--"}])},[c==null?void 0:c.evaluate_codes]);var Z=[{title:"\u8BC4\u6D4B\u6B21\u6570",dataIndex:"key",width:"127px",key:"key",align:"center",render:function(X,O){return e.a.createElement("span",null,O.key)}},{title:"\u8BE6\u7EC6\u4FE1\u606F",dataIndex:"error_msg",key:"error_msg",align:"center",render:function(X,O){return e.a.createElement("span",null,O.error_msg?O.error_msg:"--")}},{title:"\u8BC4\u6D4B\u65F6\u95F4",dataIndex:"created_at",key:"created_at",align:"center",width:200,render:function(X,O){return e.a.createElement("span",null,O.created_at?L()(O.created_at).format("YYYY-MM-DD HH:mm"):"--")}}],pe={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};return e.a.createElement(e.a.Fragment,null,e.a.createElement("div",{className:"mt15 mb15"},e.a.createElement(ie.a,{value:c==null?void 0:c.description})),(!!(S==null||((i=S.exercise)===null||i===void 0)?void 0:i.student_commit_status)&&(S==null||((p=S.exercise)===null||p===void 0)?void 0:p.student_commit_status)!==0||!!(S==null||((D=S.exercise)===null||D===void 0)?void 0:D.user_exercise_status)&&(S==null||((o=S.exercise)===null||o===void 0)?void 0:o.user_exercise_status)!==0)&&e.a.createElement(xe.a,{className:"mt5",bordered:!0,dataSource:Q,columns:Z,pagination:!1}),!!(c==null||((u=c.user_answer)===null||u===void 0)?void 0:u.length)&&(c==null?void 0:c.passed_code)&&e.a.createElement("aside",{className:ut.a.shixunWrp},e.a.createElement("h3",null,"\u6700\u540E\u4E00\u6B21\u901A\u5173\u7684\u4EE3\u7801\uFF08\u672A\u901A\u5173\u5219\u4E3A\u6700\u540E\u4E00\u6B21\u63D0\u4EA4\u8BC4\u6D4B\u7684\u4EE3\u7801\uFF09"),e.a.createElement(Se.b,{style:{border:"1px solid #ccc"},height:300,language:"python",theme:"vs-light",value:(c==null?void 0:c.passed_code)?it.Base64.decode(c==null?void 0:c.passed_code):"",autoHeight:U,options:pe})))},Ge=dt,ct=a("oBTY"),xt=a("Ti8U"),at=a.n(xt),_t=a("V0Rq"),ht=function(s){var i=s.isPreview,p=i===void 0?!1:i,D=s.isExportBlank,o=D===void 0?!1:D,u=s.activeTabs,c=s.exercise,S=s.globalSetting,U=s.loading,V=s.user,ne=s.dispatch,Q=Object(H.m)(),b=V.userInfo,Z=Object(r.useState)(),pe=Object($.a)(Z,2),_=pe[0],X=pe[1],O=Object(r.useState)(),ae=Object($.a)(O,2),he=ae[0],Ce=ae[1];Object(r.useEffect)(function(){Object(T.G)(u)||u==="2"&&Y()},[Q.userId,Q.coursesId,Q.exerciseId,Q.categoryId,u]),Object(r.useEffect)(function(){var h;if((h=c.exerciseExportHeadDatas)===null||h===void 0?void 0:h.title){var f=c.exerciseExportHeadDatas;X(Object(ve.a)({},f||{}));var Re=f||{},t=Re.table,z,n;((t==null?void 0:t.total_singles_scores)||(t==null?void 0:t.total_doubles_scores)||(t==null?void 0:t.total_nulls_scores)||(t==null?void 0:t.total_judges_scores)||(t==null?void 0:t.total_pros_scores)||(t==null?void 0:t.total_shixuns_scores)||(t==null?void 0:t.total_mains_scores))&&(z=Number(t==null?void 0:t.total_singles_scores)+Number(t==null?void 0:t.total_doubles_scores)+Number(t==null?void 0:t.total_nulls_scores)+Number(t==null?void 0:t.total_judges_scores)+Number(t==null?void 0:t.total_pros_scores)+Number(t==null?void 0:t.total_shixuns_scores)+Number(t==null?void 0:t.total_mains_scores)),((t==null?void 0:t.singles_scores)||(t==null?void 0:t.doubles_scores)||(t==null?void 0:t.nulls_scores)||(t==null?void 0:t.judges_scores)||(t==null?void 0:t.pros_scores)||(t==null?void 0:t.shixuns_scores)||(t==null?void 0:t.mains_scores))&&(n=Number(t==null?void 0:t.singles_scores)+Number(t==null?void 0:t.doubles_scores)+Number(t==null?void 0:t.nulls_scores)+Number(t==null?void 0:t.judges_scores)+Number(t==null?void 0:t.pros_scores)+Number(t==null?void 0:t.shixuns_scores)+Number(t==null?void 0:t.mains_scores));var ue=[{key:"1",name:"\u5E94\u5F97\u5206",singles_score:t==null?void 0:t.total_singles_scores,doubles_score:t==null?void 0:t.total_doubles_scores,nulls_score:t==null?void 0:t.total_nulls_scores,judges_score:t==null?void 0:t.total_judges_scores,pros_score:t==null?void 0:t.total_pros_scores,shixuns_score:t==null?void 0:t.total_shixuns_scores,mains_score:t==null?void 0:t.total_mains_scores,total_score:z},{key:"2",name:"\u5B9E\u5F97\u5206",singles_score:t==null?void 0:t.singles_scores,doubles_score:t==null?void 0:t.doubles_scores,nulls_score:t==null?void 0:t.nulls_scores,judges_score:t==null?void 0:t.judges_scores,pros_score:t==null?void 0:t.pros_scores,shixuns_score:t==null?void 0:t.shixuns_scores,mains_score:t==null?void 0:t.mains_scores,total_score:n},{key:"3",name:"\u8BC4\u5377\u4EBA"}],Te=[{key:"1",name:"\u5E94\u5F97\u5206"},{key:"2",name:"\u5B9E\u5F97\u5206"},{key:"3",name:"\u8BC4\u5377\u4EBA"}];Ce(Object(ct.a)(o?Te:ue))}},[c.exerciseExportHeadDatas]);var Y=function(){var h=Object(N.a)(se.a.mark(function f(){var Re,t,z,n,ue,Te,B,ke;return se.a.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return Re={id:Q.exerciseId||Q.categoryId,identify:(b==null?void 0:b.login)||null},Oe.next=3,Object(_t.w)(Re);case 3:t=Oe.sent,X(t||{}),z=t||{},n=z.table,((n==null?void 0:n.total_singles_scores)||(n==null?void 0:n.total_doubles_scores)||(n==null?void 0:n.total_nulls_scores)||(n==null?void 0:n.total_judges_scores)||(n==null?void 0:n.total_pros_scores)||(n==null?void 0:n.total_shixuns_scores)||(n==null?void 0:n.total_mains_scores))&&(ue=Number(n==null?void 0:n.total_singles_scores)+Number(n==null?void 0:n.total_doubles_scores)+Number(n==null?void 0:n.total_nulls_scores)+Number(n==null?void 0:n.total_judges_scores)+Number(n==null?void 0:n.total_pros_scores)+Number(n==null?void 0:n.total_shixuns_scores)+Number(n==null?void 0:n.total_mains_scores)),((n==null?void 0:n.singles_scores)||(n==null?void 0:n.doubles_scores)||(n==null?void 0:n.nulls_scores)||(n==null?void 0:n.judges_scores)||(n==null?void 0:n.pros_scores)||(n==null?void 0:n.shixuns_scores)||(n==null?void 0:n.mains_scores))&&(Te=Number(n==null?void 0:n.singles_scores)+Number(n==null?void 0:n.doubles_scores)+Number(n==null?void 0:n.nulls_scores)+Number(n==null?void 0:n.judges_scores)+Number(n==null?void 0:n.pros_scores)+Number(n==null?void 0:n.shixuns_scores)+Number(n==null?void 0:n.mains_scores)),B=[{key:"1",name:"\u5E94\u5F97\u5206",singles_score:n==null?void 0:n.total_singles_scores,doubles_score:n==null?void 0:n.total_doubles_scores,nulls_score:n==null?void 0:n.total_nulls_scores,judges_score:n==null?void 0:n.total_judges_scores,pros_score:n==null?void 0:n.total_pros_scores,shixuns_score:n==null?void 0:n.total_shixuns_scores,mains_score:n==null?void 0:n.total_mains_scores,total_score:ue},{key:"2",name:"\u5B9E\u5F97\u5206",singles_score:n==null?void 0:n.singles_scores,doubles_score:n==null?void 0:n.doubles_scores,nulls_score:n==null?void 0:n.nulls_scores,judges_score:n==null?void 0:n.judges_scores,pros_score:n==null?void 0:n.pros_scores,shixuns_score:n==null?void 0:n.shixuns_scores,mains_score:n==null?void 0:n.mains_scores,total_score:Te},{key:"3",name:"\u8BC4\u5377\u4EBA"}],ke=[{key:"1",name:"\u5E94\u5F97\u5206"},{key:"2",name:"\u5B9E\u5F97\u5206"},{key:"3",name:"\u8BC4\u5377\u4EBA"}],Ce(o?ke:B);case 11:case"end":return Oe.stop()}},f)}));return function(){return h.apply(this,arguments)}}(),v=[{width:"11%",title:"\u9898\u578B",align:"center",dataIndex:"name",render:function(f){return e.a.createElement("a",null,f)}},{width:"11%",title:"\u5355\u9009\u9898",align:"center",dataIndex:"singles_score",render:function(f){return e.a.createElement("a",null,f==="0.0"?0:f)}},{width:"11%",title:"\u591A\u9009\u9898",align:"center",dataIndex:"doubles_score",render:function(f){return e.a.createElement("a",null,f==="0.0"?0:f)}},{width:"11%",title:"\u586B\u7A7A\u9898",align:"center",dataIndex:"nulls_score",render:function(f){return e.a.createElement("a",null,f==="0.0"?0:f)}},{width:140,title:"\u5224\u65AD\u9898",align:"center",dataIndex:"judges_score",render:function(f){return e.a.createElement("a",null,f==="0.0"?0:f)}},{width:"11%",title:"\u7F16\u7A0B\u9898",align:"center",dataIndex:"pros_score",render:function(f){return e.a.createElement("a",null,f==="0.0"?0:f)}},{width:"11%",title:"\u5B9E\u8BAD\u9898",align:"center",dataIndex:"shixuns_score",render:function(f){return e.a.createElement("a",null,f==="0.0"?0:f)}},{width:"11%",title:"\u7B80\u7B54\u9898",align:"center",dataIndex:"mains_score",render:function(f){return e.a.createElement("a",null,f==="0.0"?0:f)}},{width:"11%",title:"\u603B\u5206",align:"center",dataIndex:"total_score",render:function(f){return e.a.createElement("a",null,f==="0.0"?0:f)}}],w=_||{},x=w.exercise_header;return e.a.createElement(e.a.Fragment,null,e.a.createElement("section",{className:at.a.glassSeal},e.a.createElement("span",null,"\u59D3\u540D\uFF1A",e.a.createElement("span",null,_==null?void 0:_.user)),e.a.createElement("span",null,"\u5B66\u53F7\uFF1A",e.a.createElement("span",null,_==null?void 0:_.student_id)),e.a.createElement("span",null,"\u4E13\u4E1A\u73ED\u7EA7\uFF1A",e.a.createElement("span",null,_==null?void 0:_.group_name))),e.a.createElement("section",{className:"".concat(at.a.wrap," ").concat(p?"pl20":""," ")},e.a.createElement("p",{className:"font16 tc c-grey-333"},e.a.createElement("strong",null,_==null?void 0:_.title)),e.a.createElement("p",{className:"tc c-grey-333"},"\u8003\u8BD5\u5185\u5BB9\uFF1A",_==null?void 0:_.body),e.a.createElement("p",{className:"tc c-grey-666"},"\u5171:\u3010",_==null?void 0:_.large_counts,"\u5927\u9898\u3011\u3010",_==null?void 0:_.total_count,"\u5C0F\u9898\u3011\u3010 \u6EE1\u5206",_==null?void 0:_.score,"\u5206\u3011 \u8003\u8BD5\u65F6\u95F4\uFF1A\u3010",(_==null?void 0:_.time)>-1?"".concat(_==null?void 0:_.time,"\u5206\u949F"):"\u4E0D\u9650","\u3011"),e.a.createElement("div",{className:"mt10"},e.a.createElement(xe.a,{className:at.a.table,columns:v,dataSource:Object(ct.a)(he||[]),bordered:!0,pagination:!1}))))},Ot=Object(ce.a)(function(d){var s=d.exercise,i=d.loading,p=d.user,D=d.globalSetting;return{exercise:s,globalSetting:D,user:p,loading:i.effects}})(ht),Rt=a("1n7x"),rt=a.n(Rt),jt=30,yt=["\u5355\u9009\u9898","\u591A\u9009\u9898","\u5224\u65AD\u9898","\u586B\u7A7A\u9898","\u7B80\u7B54\u9898","\u5B9E\u8BAD\u9898","\u7F16\u7A0B\u9898"],Ut=function(s){var i,p=s.exercise,D=s.globalSetting,o=s.loading,u=s.user,c=s.dispatch,S=Object(Be.a)(s,["exercise","globalSetting","loading","user","dispatch"]),U=Object(H.m)(),V=u.userInfo,ne=Object(r.useState)({}),Q=Object($.a)(ne,2),b=Q[0],Z=Q[1],pe=Object(r.useRef)(),_=Object(r.useState)(!1),X=Object($.a)(_,2),O=X[0],ae=X[1],he=Object(r.useState)({}),Ce=Object($.a)(he,2),Y=Ce[0],v=Ce[1],w=Object(r.useState)(!1),x=Object($.a)(w,2),h=x[0],f=x[1],Re=Object(r.useState)(new G.a),t=Object($.a)(Re,2),z=t[0],n=t[1],ue=Object(r.useState)([]),Te=Object($.a)(ue,2),B=Te[0],ke=Te[1],mt=Object(r.useState)(!1),Oe=Object($.a)(mt,2),Qe=Oe[0],ot=Oe[1],Tt=Object(H.l)();Object(r.useEffect)(function(){(V==null?void 0:V.login)&&At();try{ke(JSON.parse(localStorage.total_exercise_users))}catch(ye){}},[U.userId,U.coursesId,U.exerciseId,V]);var bt=function(){document.querySelectorAll("canvas").forEach(function(l){(!l.clientWidth||!l.clientHeight)&&l.remove()})},Nt=function(){document.body.scrollIntoView()},At=function(){var ye=Object(N.a)(se.a.mark(function l(){var I;return se.a.wrap(function(P){for(;;)switch(P.prev=P.next){case 0:if(c({type:"exercise/getExerciseExportHeadDatas",payload:{id:U.exerciseId||U.categoryId,identify:U.userId||null,student_id:U.userId}}),!U.userId){P.next=8;break}return P.next=4,c({type:"exercise/getReviewExercises",payload:{exerciseId:U.exerciseId,login:Tt.query.login,student_id:U.userId}});case 4:I=P.sent,f(!1),P.next=9;break;case 8:f(!0);case 9:v(Object(ve.a)({},I||{})),setTimeout(function(){var k=1,re=document.getElementById("export-id-all"),je=860,de=0},1500);case 11:case"end":return P.stop()}},l)}));return function(){return ye.apply(this,arguments)}}(),Pt=function(){z.generateAsync({type:"blob"}).then(function(l){var I,C,P,k=document.createElement("a");k.href=window.URL.createObjectURL(l),k.download=Object.keys(z.files).length>1?Y==null||((I=Y.exercise)===null||I===void 0)?void 0:I.exercise_name:((p==null||((C=p.exerciseExportHeadDatas)===null||C===void 0)?void 0:C.user)||(Y==null||((P=Y.exercise)===null||P===void 0)?void 0:P.exercise_name))+".zip",document.body.appendChild(k);var re=document.createEvent("MouseEvents");re.initEvent("click",!1,!1),k.dispatchEvent(re),document.body.removeChild(k),n(new G.a)})},Dt=function(){var ye=Object(N.a)(se.a.mark(function l(I){var C,P,k,re,je,de,K,oe,ge,vt;return se.a.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:return vt=function(){return vt=Object(N.a)(se.a.mark(function Lt(){var St;return se.a.wrap(function(Ze){for(;;)switch(Ze.prev=Ze.next){case 0:return P++,Nt(),Ze.next=4,c({type:"exercise/getexerciseExportHeadDatas",payload:{id:U.exerciseId||U.categoryId,identify:B[P-1].user_login,student_id:U.userId}});case 4:return Ze.next=6,c({type:"exercise/getReviewExercises",payload:{exerciseId:U.exerciseId,login:B[P-1].user_login,student_id:U.userId}});case 6:St=Ze.sent,v(Object(ve.a)({},St||{})),setTimeout(Object(N.a)(se.a.mark(function Ft(){var Ct;return se.a.wrap(function(st){for(;;)switch(st.prev=st.next){case 0:return bt(),st.next=3,rt()().from(document.getElementById("export-all")).set(re).output("blob");case 3:Ct=st.sent,ae(!1),z.file("".concat(B[P-1].user_name,"-").concat(L()().format("YYYY-MM-DD HH:mm:ss"),".pdf"),Ct),k.update({content:e.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",e.a.createElement("span",{className:"c-blue"},P+1),"/",B==null?void 0:B.length)}),P==(B==null?void 0:B.length)?(k.destroy(),Pt()):ge();case 8:case"end":return st.stop()}},Ft)})),2600);case 9:case"end":return Ze.stop()}},Lt)})),vt.apply(this,arguments)},ge=function(){return vt.apply(this,arguments)},I==="all"?f(!1):U.userId||f(!0),Nt(),ot(!0),P=0,I!=="all"&&ae(!0),k=Ie.a.info({width:460,title:e.a.createElement("div",null,"\u6B63\u5728\u5BFC\u51FA\u8BD5\u5377,",e.a.createElement("span",{className:"c-red"},"\u8BF7\u52FF\u5173\u95ED\u6216\u64CD\u4F5C\u5F53\u524D\u6D4F\u89C8\u5668\u7A97\u53E3")),content:I==="all"?e.a.createElement("div",null,"\u5F53\u524D\u8FDB\u5EA6: ",e.a.createElement("span",{className:"c-blue"},P+1),"/",B==null?void 0:B.length):null,maskClosable:!1,className:ee.a.modal,onOk:function(){}}),bt(),Xe.next=11,new Promise(function(Et,Lt){setTimeout(function(){Et("")},5e3)});case 11:return re={html2canvas:{letterRendering:!0,useCORS:!0,allowTaint:!1},jsPDF:{unit:"in",format:"letter",orientation:"portrait"}},je="".concat(L()().format("YYYY-MM-DD HH:mm:ss")),((C=p.exerciseExportHeadDatas)===null||C===void 0?void 0:C.user)&&(je="".concat(((de=p.exerciseExportHeadDatas)===null||de===void 0?void 0:de.student_id)||"").concat((K=p.exerciseExportHeadDatas)===null||K===void 0?void 0:K.user)),Xe.next=16,rt()().from(document.getElementById("export-all")).set(re).output("blob");case 16:if(oe=Xe.sent,ae(!1),I!=="all"&&z.file("".concat(je,"-").concat(L()().format("YYYY-MM-DD HH:mm:ss"),".pdf"),oe),!(I!=="all")){Xe.next=23;break}return k.destroy(),Pt(),Xe.abrupt("return");case 23:!!(B==null?void 0:B.length)&&I==="all"?ge():Pt();case 24:case"end":return Xe.stop()}},l)}));return function(I){return ye.apply(this,arguments)}}(),Ht=function(l){for(var I=l.internal.getNumberOfPages(),C=1;C<=I;C+=1)l.setPage(C),l.setFontSize(9),l.setTextColor("#6a6a6a"),l.text("".concat(C," / ").concat(I),l.internal.pageSize.getWidth()-20,l.internal.pageSize.getHeight()-6)},wt=function(l,I){var C,P,k,re,je;return e.a.createElement(e.a.Fragment,null,e.a.createElement("div",{style:{display:"flex"},className:ee.a.programTitle},e.a.createElement("span",{style:{flexShrink:0},className:"font18"},I+1,"."),e.a.createElement(ie.a,{value:l.question_title}),e.a.createElement("span",{style:{flexShrink:0},className:"font16"},"\uFF08",l.question_score,"\u5206\uFF09")),l.question_type===0&&e.a.createElement(e.a.Fragment,null,(C=l.question_choices)===null||C===void 0?void 0:C.map(function(de,K){var oe;return e.a.createElement(we.a,{key:K},e.a.createElement(J.a,{flex:"25px"},e.a.createElement("div",{style:{width:25,overflow:"hidden"}},e.a.createElement(ze.a,{checked:(oe=l.user_answer)===null||oe===void 0?void 0:oe.includes(de.choice_id),style:{width:25}}))),e.a.createElement(J.a,{flex:"1"},e.a.createElement(ie.a,{value:de.choice_text||""})))})),l.question_type===1&&e.a.createElement(e.a.Fragment,null,(P=l.question_choices)===null||P===void 0?void 0:P.map(function(de,K){var oe;return e.a.createElement(we.a,{key:K},e.a.createElement(J.a,{flex:"25px"},e.a.createElement("div",{style:{width:25,overflow:"hidden"}},e.a.createElement(Fe.a,{checked:(oe=l.user_answer)===null||oe===void 0?void 0:oe.includes(de.choice_id),style:{width:25}}))),e.a.createElement(J.a,{flex:"1"},e.a.createElement(ie.a,{value:de.choice_text||""})))})),l.question_type===2&&e.a.createElement("div",{className:ee.a.flexRow},(k=l.question_choices)===null||k===void 0?void 0:k.map(function(de,K){var oe;return e.a.createElement(we.a,{key:K},e.a.createElement(J.a,{flex:"25px"},e.a.createElement("div",{style:{width:25,overflow:"hidden"}},e.a.createElement(ze.a,{checked:(oe=l.user_answer)===null||oe===void 0?void 0:oe.includes(de.choice_id),style:{width:25}}))),e.a.createElement(J.a,{flex:"1"},de.choice_text))})),l.question_type===3&&!h&&e.a.createElement(De,{item:l,answerData:Y,changeScoreData:b,textValue:(re=b[l.q_position])===null||re===void 0?void 0:re.text,textOnChange:function(K){b[l.q_position].text=K,Z(Object(ve.a)({},b))}}),l.question_type===5&&e.a.createElement(pt,{item:l,answerData:Y,hasChangeScore:!1,autoHeight:Qe}),l.question_type===4&&e.a.createElement(gt,{item:l,answerData:Y,changeScoreData:b,textValue:(je=b[l.q_position])===null||je===void 0?void 0:je.text,textOnChange:function(K){b[l.q_position].text=K,Z(Object(ve.a)({},b))}}),l.question_type===6&&e.a.createElement(Ge,{item:l,answerData:Y,autoHeight:Qe}),e.a.createElement(Me.a,{style:h?{marginTop:30}:{}}))},Mt=function(l){var I=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],C=["","\u5341","\u767E","\u5343","\u4E07"];l=parseInt(l);var P=function(de){for(var K=de.toString().split("").reverse(),oe="",ge=0;ge0&&K[ge]==0&&K[ge-1]==0?"":I[K[ge]]+(K[ge]==0?C[0]:C[ge]))+oe;return oe},k=Math.floor(l/1e4),re=l%1e4;return re.toString().length<4&&(re="0"+re),k?P(k)+"\u4E07"+P(re):P(l)},It=function(){var l,I=Y==null||((l=Y.exercise_question_types)===null||l===void 0)?void 0:l.map(function(C,P){var k;return e.a.createElement(r.Fragment,{key:P},e.a.createElement("div",null,e.a.createElement("span",{className:"font16 c-light-primary"},Mt(P+1),"\u3001",C.name),e.a.createElement("span",{className:"c-grey-999"},"\uFF08\u5171",C.count,"\u9898\uFF1B\u5171",C.score,"\u5206\uFF09")),(k=C.items)===null||k===void 0?void 0:k.map(function(re,je){return e.a.createElement(r.Fragment,{key:je},wt(re,je))}))});return I};return e.a.createElement("section",{className:"edu-container"},e.a.createElement("section",{className:"animated fadeIn"},e.a.createElement("aside",{className:[ee.a.title,"mt20"].join(" ")},e.a.createElement(we.a,{style:{width:"100%"}},e.a.createElement(J.a,{flex:"1"},e.a.createElement(le.Link,{to:"/exam/examinationManagement/".concat(U.exerciseId,"/detail")},e.a.createElement(W.a,{className:"font16 c-black"})),e.a.createElement("strong",{className:"font20 ml5"},Y==null||((i=Y.exercise)===null||i===void 0)?void 0:i.exercise_name)),e.a.createElement(J.a,null,e.a.createElement(qe.a,{type:"primary",onClick:function(){return Dt("")},loading:O},e.a.createElement(M.a,null),"\u5BFC\u51FA\u5F53\u524D\u8BD5\u5377"),e.a.createElement(qe.a,{disabled:O,className:"ml10",type:"primary",onClick:function(){return Dt("all")}},e.a.createElement(M.a,null),"\u5BFC\u51FA\u6240\u6709\u5B66\u751F\u8BD5\u5377"))))),e.a.createElement("section",{id:"export-all",className:[ee.a.bg,"pt30","pb30","mt20","mb20","relative","pl60","pr30"].join(" "),ref:pe},e.a.createElement(Ot,{isExportBlank:h}),e.a.createElement(Me.a,{className:ee.a.divider}),It()))},g=be.default=Object(ce.a)(function(d){var s=d.exercise,i=d.loading,p=d.user,D=d.globalSetting;return{exercise:s,globalSetting:D,user:p,loading:i.effects}})(Ut)},"6hOw":function(Ae,be,a){Ae.exports={flex_box_center:"flex_box_center___1cAqX",flex_space_between:"flex_space_between___22g_w",flex_box_vertical_center:"flex_box_vertical_center___2ICWE",flex_box_center_end:"flex_box_center_end___3zAwX",flex_box_column:"flex_box_column___HAq11",shixunWrp:"shixunWrp___EsI7W",fillComment:"fillComment___LEfmp",commentContent:"commentContent___2KuEg",commentText:"commentText___2yenx",simpleWrap:"simpleWrap___GjmYM"}},"9Bee":function(Ae,be,a){"use strict";var Ue=a("q1tI"),qe=a.n(Ue),ft=a("vg9a"),Me=a("tJVT"),$e=a("DlQD"),Fe=a.n($e),F=a("rUJ1");function we(m,E){var R=m.match(/^(\s+)(?:```)/);if(R===null)return E;var y=R[1];return E.split(` -`).map(function(j){var te=j.match(/^\s+/);if(te===null)return j;var L=Object(Me.a)(te,1),T=L[0];return T.length>=y.length?j.slice(y.length):j}).join(` -`)}var We=[],J=["