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.
1 line
6.9 KiB
1 line
6.9 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[17527,36270],{96285:function(e,t,n){n.r(t),n.d(t,{default:function(){return S}});var a=n(7557),r=n.n(a),s=n(41498),c=n.n(s),o=n(79800),l=n.n(o),i=n(59301),u=n(1446),d=n(4023),m=n(18196),f=n(71418),p=n(85324),_=n(59731),x=n(26694),g=n(24334),h=n(61186),v=n.n(h),j=n(52362),b=n(37712),S=function(){var e=(0,m.useParams)().submitId,t=(0,i.useState)(""),n=l()(t,2),a=n[0],s=n[1],o=(0,i.useState)(""),h=l()(o,2),S=h[0],y=h[1],E=(0,i.useState)(void 0),$=l()(E,2),N=$[0],k=$[1];(0,i.useEffect)((function(){if(e){var t=function(){var t=c()(r()().mark((function t(){var n;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,p.X6)(e);case 2:n=t.sent,k(n.data);case 4:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();t()}}),[e]);var w=N||{},C=w.status,H=w.created_at,D=w.code,M=w.name,O=w.language,Z=w.pass_sets_count,z=w.set_count,I=w.error_msg,T=w.output,F=w.input,B=w.expected_output,R=(w.execute_memory,w.user),Y=w.execute_time,L=w.input_file_url,X=w.output_file_url,P=w.is_file,J=w.expected_output_file_url;return(0,b.jsxs)(f.Z,{spinning:!N,delay:500,children:[(0,b.jsx)("div",{className:"record-detail-info",children:N?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("header",{className:u.Z.header,children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("img",{src:"".concat(d.Z.IMG_SERVER,"/images/").concat(R.image_url),alt:"user",width:30}),(0,b.jsx)("span",{children:R.name})]}),(0,b.jsxs)("h2",{children:[" ",M," "]}),(0,b.jsx)("button",{className:"ant-btn",onClick:function(){m.history.back()},style:{border:"1px solid #bacffe",color:"#3061d0"},children:"返回该题"})]}),(0,b.jsxs)("div",{className:"record-detail-body",children:[(0,b.jsx)("h2",{children:" 提交记录 "}),(0,b.jsxs)("ul",{className:"record-info",children:[(0,b.jsxs)("li",{children:[" ","状态:",(0,b.jsx)("span",{className:0===C?"c-green":"c-red",children:_.Im[C]})," "]}),(0,b.jsxs)("li",{children:[" ","提交时间:",(0,b.jsx)("span",{children:v()(H).format("YYYY-MM-DD HH:mm:ss")})," "]}),(0,b.jsxs)("li",{children:[" ","语言:",(0,b.jsx)("span",{children:O})," "]}),(0,b.jsxs)("li",{children:[" ","执行用时:",(0,b.jsxs)("span",{children:[1e3*Y,"ms"]})," "]}),(0,b.jsxs)("li",{children:[" ","".concat(Z," / ").concat(z," 个通过的测试用例")," "]})]}),(0,b.jsx)(_.Y4,{status:C,error_msg:I,execute_time:Y,output:T,input:F,expected_output:B,input_file_url:L,output_file_url:X,is_file:P,expected_output_file_url:J,setData:s,setMonacoValue:y}),(0,b.jsx)("h2",{children:" 提交的内容 "}),(0,b.jsx)(x.ZP,{height:"calc(100% - 126px)",width:"100%",language:null==O?void 0:O.toLocaleLowerCase(),value:g.Base64.decode(D),options:{readOnly:!0}})]})]}):null}),(0,b.jsx)(j.Z,{close:!0,data:a,type:a.length?"txt":"",onClose:function(){return s("")},monacoEditor:{value:S,language:"txt",onChange:function(){},options:{readOnly:!0,fontSize:14,minimap:{enabled:!1}}}})]})}},1446:function(e,t){t.Z={header:"header___HqHSe",checkboxs:"checkboxs___ObBnD",field:"field___w_sM6","oj-form-container":"oj-form-container____odYP","oj-left-panel":"oj-left-panel___emEB2","oj-form-info":"oj-form-info___m00Ag",footer:"footer___O4iSJ",collapse:"collapse___Ltfkj","test-case-name":"test-case-name___miZcb","btn-remove-case":"btn-remove-case___cHap2","icon-tag":"icon-tag___gmyTb",btn_back:"btn_back___tNmX3",testJi:"testJi___L3fHb",upBtn:"upBtn___RGH6X",djs:"djs____TS0n",time:"time___IAdHc"}},31797:function(e,t,n){n.d(t,{Z:function(){return b}});var a=n(59301),r=n(56762),s=n(92343),c=n(92310),o=n.n(c),l=n(36355),i=n(78485);var u=e=>{const{value:t,formatter:n,precision:r,decimalSeparator:s,groupSeparator:c="",prefixCls:o}=e;let l;if("function"==typeof n)l=n(t);else{const e=String(t),n=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(n&&"-"!==e){const e=n[1];let t=n[2]||"0",i=n[4]||"";t=t.replace(/\B(?=(\d{3})+(?!\d))/g,c),"number"==typeof r&&(i=i.padEnd(r,"0").slice(0,r>0?r:0)),i&&(i=`${s}${i}`),l=[a.createElement("span",{key:"int",className:`${o}-content-value-int`},e,t),i&&a.createElement("span",{key:"decimal",className:`${o}-content-value-decimal`},i)]}else l=e}return a.createElement("span",{className:`${o}-content-value`},l)},d=n(17313),m=n(83116),f=n(37613);const p=e=>{const{componentCls:t,marginXXS:n,padding:a,colorTextDescription:r,titleFontSize:s,colorTextHeading:c,contentFontSize:o,fontFamily:l}=e;return{[`${t}`]:Object.assign(Object.assign({},(0,d.Wf)(e)),{[`${t}-title`]:{marginBottom:n,color:r,fontSize:s},[`${t}-skeleton`]:{paddingTop:a},[`${t}-content`]:{color:c,fontSize:o,fontFamily:l,[`${t}-content-value`]:{display:"inline-block",direction:"ltr"},[`${t}-content-prefix, ${t}-content-suffix`]:{display:"inline-block"},[`${t}-content-prefix`]:{marginInlineEnd:n},[`${t}-content-suffix`]:{marginInlineStart:n}}})}};var _=(0,m.Z)("Statistic",(e=>{const t=(0,f.TS)(e,{});return[p(t)]}),(e=>{const{fontSizeHeading3:t,fontSize:n}=e;return{titleFontSize:n,contentFontSize:t}}));var x=e=>{const{prefixCls:t,className:n,rootClassName:r,style:s,valueStyle:c,value:d=0,title:m,valueRender:f,prefix:p,suffix:x,loading:g=!1,onMouseEnter:h,onMouseLeave:v,decimalSeparator:j=".",groupSeparator:b=","}=e,{getPrefixCls:S,direction:y,statistic:E}=a.useContext(l.E_),$=S("statistic",t),[N,k]=_($),w=a.createElement(u,Object.assign({decimalSeparator:j,groupSeparator:b,prefixCls:$},e,{value:d})),C=o()($,{[`${$}-rtl`]:"rtl"===y},null==E?void 0:E.className,n,r,k);return N(a.createElement("div",{className:C,style:Object.assign(Object.assign({},null==E?void 0:E.style),s),onMouseEnter:h,onMouseLeave:v},m&&a.createElement("div",{className:`${$}-title`},m),a.createElement(i.Z,{paragraph:!1,loading:g,className:`${$}-skeleton`},a.createElement("div",{style:c,className:`${$}-content`},p&&a.createElement("span",{className:`${$}-content-prefix`},p),f?f(w):w,x&&a.createElement("span",{className:`${$}-content-suffix`},x)))))};const g=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]];function h(e,t){const{format:n=""}=t,a=new Date(e).getTime(),r=Date.now();return function(e,t){let n=e;const a=/\[[^\]]*]/g,r=(t.match(a)||[]).map((e=>e.slice(1,-1))),s=t.replace(a,"[]"),c=g.reduce(((e,t)=>{let[a,r]=t;if(e.includes(a)){const t=Math.floor(n/r);return n-=t*r,e.replace(new RegExp(`${a}+`,"g"),(e=>{const n=e.length;return t.toString().padStart(n,"0")}))}return e}),s);let o=0;return c.replace(a,(()=>{const e=r[o];return o+=1,e}))}(Math.max(a-r,0),n)}const v=e=>{const{value:t,format:n="HH:mm:ss",onChange:c,onFinish:o}=e,l=(0,r.Z)(),i=a.useRef(null),u=()=>{const e=function(e){return new Date(e).getTime()}(t);e>=Date.now()&&(i.current=setInterval((()=>{l(),null==c||c(e-Date.now()),e<Date.now()&&(null==o||o(),i.current&&(clearInterval(i.current),i.current=null))}),33.333333333333336))};a.useEffect((()=>(u(),()=>{i.current&&(clearInterval(i.current),i.current=null)})),[t]);return a.createElement(x,Object.assign({},e,{valueRender:e=>(0,s.Tm)(e,{title:void 0}),formatter:(e,t)=>h(e,Object.assign(Object.assign({},t),{format:n}))}))};var j=a.memo(v);x.Countdown=j;var b=x}}]); |