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
24 KiB
1 line
24 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[37110],{85952:function(e,n,t){t.d(n,{Z:function(){return a}});t(67294);var i="disabled___kyQ47",s=t(83062),r=t(85893),a=function(e){var n=e.children,t=e.tips,a=e.title,o=e.style,l=a||(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{children:"提示:"}),(0,r.jsx)("div",{children:"本场考试已开启集中阅卷,为了不影响成绩评定,不可进行此操作。"}),(0,r.jsx)("div",{children:"(如需发布新班级考试,请创建新试卷后发布)"})]});return n&&t?(0,r.jsx)(s.Z,{overlayStyle:{maxWidth:"initial"},title:l,children:(0,r.jsx)("span",{className:i,style:o,children:n})}):n&&!t?(0,r.jsx)(r.Fragment,{children:n}):(0,r.jsx)(r.Fragment,{})}},92524:function(e,n,t){var i=t(17061),s=t.n(i),r=t(38416),a=t.n(r),o=t(861),l=t.n(o),c=t(42122),u=t.n(c),d=t(17156),p=t.n(d),m=t(27424),h=t.n(m),f=t(67294),x=t(91773),v=t(2453),g=t(14446),b=t(57953),y=t(71230),_=t(78045),j=t(45741),w=t(84567),k=t(27484),Z=t.n(k),T=t(84519),H=t(29427),Y=t(88275),A=t(56606),S=t(67381),C=t(85893);function P(e,n){for(var t=[],i=e;i<n;i++)t.push(i);return t}var D=function(e){var n=new Date,t=Z()(e).format("HH");if(Z()(e).isSame(Z()(n),"day")){var i=Z()(n).format("HH"),s=Z()(n).format("mm");return{disabledHours:function(){return P(0,24).splice(1,1*i-1)},disabledMinutes:function(){return Z()(e).isSame(Z()(n),"hour")&&t<=i?P(0,60).splice(0,s):P(60,60)}}}if(Z()(e).isSame(Z()(),"day")){var r=Z()().format("HH"),a=Z()().format("mm");return{disabledHours:function(){return P(0,24).splice(0,r)},disabledMinutes:function(){return t<=r?P(0,a):P(60,60)}}}return!1};n.Z=(0,Y.connect)((function(e){return{exercise:e.exercise}}))((function(e){var n,t=e.exercise,i=e.dispatch,r=(0,Y.useParams)(),o=x.Z.useForm(),c=h()(o,1)[0],d=(0,f.useState)(1),m=h()(d,2),k=(m[0],m[1]),P=(0,f.useState)([]),M=h()(P,2),N=M[0],I=M[1],F=(0,f.useState)(!0),O=h()(F,2),E=O[0],R=O[1],L=(0,f.useState)([]),B=h()(L,2),K=B[0],G=B[1],Q=(0,f.useState)(!0),V=h()(Q,2),z=V[0],W=V[1],U=(0,f.useState)(!1),J=h()(U,2),X=J[0],q=J[1];(0,f.useEffect)((function(){"批量结束"===t.actionTabs.key&&$()}),[t.actionTabs]);var $=function(){var e=p()(s()().mark((function e(n){var o,d,p,m;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return R(!0),e.next=3,i({type:"exercise/getEndGroups",payload:u()(u()({},r),{},{check_ids:l()((null===(o=t.actionTabs.selectArrs)||void 0===o?void 0:o.map((function(e){return Number(e)})))||[])})});case 3:p=e.sent,m=null==p||null===(d=p.course_info)||void 0===d?void 0:d.map((function(e,n){return u()(u()({},e),{},{key:e.course_group_id,title:e.course_group_name,name:e.course_group_name,disabled:!!e.is_published})})),p&&null!=p&&p.course_info&&(I(l()(m)),c.setFieldsValue(a()({},"end_time",Z()(Z()(new Date((0,H.qd)("/"))).add(7,"days").format("YYYY-MM-DD HH:mm"))))),R(!1);case 7:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),ee=function(){var e=p()(s()().mark((function e(){var n,a,o,d,p,m;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=u()({},c.getFieldsValue()),!((null==K?void 0:K.length)<=0&&N.length>0)||null!==(n=t.actionTabs)&&void 0!==n&&n.unified_setting){e.next=4;break}return v.ZP.info("班级不能为空"),e.abrupt("return");case 4:return q(!0),d={check_ids:l()((null===(a=t.actionTabs.selectArrs)||void 0===a?void 0:a.map((function(e){return Number(e)})))||[]),group_ids:K},z||(d.end_time=Z()(o.end_time).format("YYYY-MM-DD HH:mm")),d.group_ids=K.map((function(e){return e.course_group_id})),e.next=10,(0,T.ZP)("/api/courses/".concat(r.coursesId,"/exercises/end_exercise.json"),{method:"post",body:d});case 10:0===e.sent.status&&(v.ZP.success("操作成功"),(0,H.L9)(["教学课堂","试卷","批量结束"]),i({type:"exercise/setActionTabs",payload:{}}),null!=t&&null!==(p=t.actionTabs)&&void 0!==p&&p.cb?null==t||null===(m=t.actionTabs)||void 0===m||m.cb():i({type:"classroomList/getClassroomExercisesList",payload:u()({},t.actionTabs.params)})),q(!1);case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,C.jsx)(g.Z,{centered:!0,title:"结束考试",open:"批量结束"===t.actionTabs.key,okText:"确认",cancelText:"取消",onOk:ee,width:680,confirmLoading:X||E,onCancel:function(){k(1),I([]),G([]),W(!0),i({type:"exercise/setActionTabs",payload:{}})},children:(0,C.jsx)(b.Z,{spinning:E,children:N&&(0,C.jsxs)(x.Z,{form:c,children:[(0,C.jsxs)("div",{style:{color:"#333333",display:"flex"},className:"font14 mb10",children:[(0,C.jsx)("img",{style:{marginRight:5,objectFit:"contain"},src:A.Z}),"考试时间结束后,学生将不能再答题。"]}),(0,C.jsxs)(y.Z,{className:"mt20 mb10",children:[(0,C.jsxs)("span",{className:"mr10",children:[(0,C.jsx)("span",{style:{color:"red",marginRight:3},children:"*"}),"结束时间"]}),(0,C.jsxs)(_.ZP.Group,{value:z,onChange:function(e){W(e.target.value),G([])},children:[(0,C.jsx)(_.ZP,{value:!0,children:"立即结束"}),(0,C.jsx)(_.ZP,{value:!1,children:"定时结束"})]}),(0,C.jsx)(x.Z.Item,{name:"end_time",style:{marginTop:-3,visibility:z?"hidden":"visible"},children:(0,C.jsx)(j.Z,{style:{width:170},placeholder:"请选择结束时间",showTime:{format:"HH:mm",defaultValue:Z()((0,H.U6)(),"HH:mm")},disabledDate:function(e){return e&&e<Z()().subtract(0,"days")},disabledTime:D,format:"YYYY-MM-DD HH:mm",allowClear:!1})})]}),N.length>0&&!(null!==(n=t.actionTabs)&&void 0!==n&&n.unified_setting)&&(0,C.jsxs)(y.Z,{style:{marginBottom:"10px"},children:[(0,C.jsxs)("span",{className:"mr10",children:[(0,C.jsx)("span",{style:{color:"red",marginRight:3},children:"*"}),"选择班级:"]}),(0,C.jsxs)("div",{children:[N.length>0&&(0,C.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"10px"},children:[(0,C.jsxs)("span",{style:{flex:1},children:[(0,C.jsx)(w.Z,{checked:K.length===N.length,onChange:function(e){K.length===N.length?G([]):G(N)},children:"全选"})," "]}),(0,C.jsx)("span",{style:{width:16}}),(0,C.jsxs)("span",{style:{flex:1},children:["已选择",K.length||0,"个分班"]})]}),(0,C.jsx)(S.Z,{data:N,selectedRowKeys:K,setSelectedRowKeys:G})]})]})]})})})}))},54184:function(e,n,t){var i=t(17061),s=t.n(i),r=t(38416),a=t.n(r),o=t(42122),l=t.n(o),c=t(861),u=t.n(c),d=t(17156),p=t.n(d),m=t(27424),h=t.n(m),f=t(67294),x=t(91773),v=t(2453),g=t(14446),b=t(57953),y=t(71230),_=t(45741),j=t(78045),w=t(84567),k=t(27484),Z=t.n(k),T=t(84519),H=t(29427),Y=t(88275),A=t(51412),S=t(56606),C=t(67381),P=t(85893);function D(e,n){for(var t=[],i=e;i<n;i++)t.push(i);return t}var M=function(e){var n=new Date,t=Z()(e).format("HH");if(Z()(e).isSame(Z()(n),"day")){var i=Z()(n).format("HH"),s=Z()(n).format("mm");return{disabledHours:function(){return D(0,24).splice(1,1*i-1)},disabledMinutes:function(){return console.log("禁止时间:",t,i),Z()(e).isSame(Z()(n),"hour")&&t<=i?D(0,60).splice(0,s):D(60,60)}}}if(Z()(e).isSame(Z()(),"day")){var r=Z()().format("HH"),a=Z()().format("mm");return{disabledHours:function(){return D(0,24).splice(0,r)},disabledMinutes:function(){return t<=r?D(0,a):D(60,60)}}}return!1};n.Z=(0,Y.connect)((function(e){return{exercise:e.exercise}}))((function(e){var n,t,i,r=e.exercise,o=e.dispatch,c=(0,Y.useParams)(),d=x.Z.useForm(),m=h()(d,1)[0],k=(0,f.useState)(1),D=h()(k,2),N=D[0],I=D[1],F=(0,f.useState)([]),O=h()(F,2),E=O[0],R=O[1],L=(0,f.useState)(!0),B=h()(L,2),K=B[0],G=B[1],Q=(0,f.useState)([]),V=h()(Q,2),z=V[0],W=V[1],U=(0,f.useState)(!0),J=h()(U,2),X=J[0],q=J[1],$=(0,f.useState)(!1),ee=h()($,2),ne=ee[0],te=ee[1];(0,f.useEffect)((function(){if("批量发布"===r.actionTabs.key&&(ie(),re(),2===r.actionTabs.type)){var e,n=null===(e=r.actionTabs)||void 0===e?void 0:e.unified_setting;q(n)}}),[r.actionTabs]);var ie=function(){var e=p()(s()().mark((function e(n){var t,i,o,d,p;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return G(!0),e.next=3,(0,A.N3)({coursesId:c.coursesId,check_ids:u()((null===(t=r.actionTabs.selectArrs)||void 0===t?void 0:t.map((function(e){return Number(e)})))||[]),page:N,limit:2e4});case 3:o=e.sent,console.log(o,"res"),d=(null==o||null===(i=o.course_info)||void 0===i?void 0:i.map((function(e,n){return l()(l()({},e),{},{key:e.course_group_id,title:e.course_group_name,name:e.course_group_name,disabled:!!e.is_published})})))||[],-1!==(null==o?void 0:o.status)&&(R(u()(d)),m.setFieldsValue((p={},a()(p,"publish_time",Z()(Z()(new Date).add(0,"days").format("YYYY-MM-DD HH:mm"))),a()(p,"end_time",Z()(Z()(new Date((0,H.qd)("/"))).add(1,"days").format("YYYY-MM-DD HH:mm"))),p))),G(!1);case 8:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),se=function(){var e=p()(s()().mark((function e(){var n,t,i,a,d,p,h;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=l()({},m.getFieldsValue()),i=Z()(Z()(t.publish_time).format("YYYY-MM-DD HH:mm")).valueOf(),a=Z()(Z()(t.end_time).format("YYYY-MM-DD HH:mm")).valueOf(),console.log(i,i,33),!(a<=i)){e.next=7;break}return v.ZP.info("结束时间不允许小于等于开始时间"),e.abrupt("return");case 7:if(!((null==z?void 0:z.length)<=0&&!X&&E.length>0)){e.next=10;break}return v.ZP.info("班级不能为空"),e.abrupt("return");case 10:return te(!0),E.map((function(e){return e.key})),d={check_ids:u()((null===(n=r.actionTabs.selectArrs)||void 0===n?void 0:n.map((function(e){return Number(e)})))||[]),end_time:Z()(t.end_time).format("YYYY-MM-DD HH:mm"),publish_time:Z()(t.publish_time).format("YYYY-MM-DD HH:mm"),group_ids:z.map((function(e){return e.course_group_id})),unified_setting:!z.length},e.next=15,(0,T.ZP)("/api/courses/".concat(c.coursesId,"/exercises/publish.json"),{method:"post",body:d});case 15:0===e.sent.status&&((0,H.L9)(["教学课堂","试卷","立即发布"]),re(),v.ZP.success("发布成功"),o({type:"exercise/setActionTabs",payload:{}}),null!=r&&null!==(p=r.actionTabs)&&void 0!==p&&p.cb?null==r||null===(h=r.actionTabs)||void 0===h||h.cb():o({type:"classroomList/getClassroomExercisesList",payload:l()({},r.actionTabs.params)})),te(!1);case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),re=function(){I(1),R([]),W([])};return(0,P.jsx)(g.Z,{centered:!0,title:"发布考试",open:"批量发布"===r.actionTabs.key,okText:"确认",cancelText:"取消",onOk:se,confirmLoading:ne||K,onCancel:function(){re(),o({type:"exercise/setActionTabs",payload:{}})},children:(0,P.jsx)(b.Z,{spinning:K,children:E&&(0,P.jsxs)(x.Z,{form:m,children:[!(null==r||null===(n=r.actionTabs)||void 0===n||!n.disabled)&&(0,P.jsxs)("div",{style:{color:"#333333",display:"flex"},className:"font14 mb10",children:[(0,P.jsx)("img",{style:{marginRight:5,objectFit:"contain"},src:S.Z}),"已经发布过考试的试卷不可以统一发布。"]}),(0,P.jsxs)(y.Z,{children:[(0,P.jsxs)("span",{className:"mr10 mt5",children:[(0,P.jsx)("span",{style:{color:"red",marginRight:3},children:"*"}),"考试时间"]}),(0,P.jsx)(x.Z.Item,{name:"publish_time",children:(0,P.jsx)(_.Z,{style:{width:170},disabledDate:function(e){return e&&e<=Z()().subtract(0,"days")},disabledTime:M,placeholder:"请选择发布时间",showTime:{format:"HH:mm",defaultValue:Z()((0,H.U6)(),"HH:mm")},format:"YYYY-MM-DD HH:mm",allowClear:!1})}),(0,P.jsx)("span",{className:"mt5 ml5 mr5",children:"到"}),(0,P.jsx)(x.Z.Item,{name:"end_time",children:(0,P.jsx)(_.Z,{style:{width:170},placeholder:"请选择结束时间",showTime:{format:"HH:mm",defaultValue:Z()((0,H.U6)(),"HH:mm")},disabledDate:function(e){return e&&e<Z()().subtract(0,"days")},disabledTime:M,format:"YYYY-MM-DD HH:mm",allowClear:!1})})]}),2===r.actionTabs.type&&(0,P.jsxs)(y.Z,{style:{marginBottom:"10px"},children:[(0,P.jsxs)("span",{className:"mr10",children:[(0,P.jsx)("span",{style:{color:"red",marginRight:3},children:"*"}),"选择班级"]}),(0,P.jsxs)(j.ZP.Group,{value:X,onChange:function(e){q(e.target.value),W([])},children:[(0,P.jsx)(j.ZP,{disabled:!(null==r||null===(t=r.actionTabs)||void 0===t||!t.disabled)||E.some((function(e){return null==e?void 0:e.is_published}))||!(null!=r&&null!==(i=r.actionTabs)&&void 0!==i&&i.manage_all_group),value:!0,children:"统一发布"}),(0,P.jsx)(j.ZP,{disabled:E.length<=0,value:!1,children:"分班发布"})]})]}),E.length<=0&&2===r.actionTabs.type&&(0,P.jsx)("span",{style:{marginLeft:"65px",color:"rgba(0, 0, 0, 0.25)"},children:'课堂无分班,仅支持选择“统一发布"'}),(1===r.actionTabs.type||!X)&&E.length>0&&(0,P.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"10px"},children:[(0,P.jsx)("span",{style:{flex:1},children:(0,P.jsx)(w.Z,{checked:z.length===E.length,onChange:function(e){z.length===E.length?W([]):W(E)},children:"全选"})}),(0,P.jsx)("span",{style:{width:16}}),(0,P.jsxs)("span",{style:{flex:1},children:["已选择",z.length||0,"个分班"]})]}),(1===r.actionTabs.type||!X)&&E.length>0&&(0,P.jsx)(C.Z,{data:E,selectedRowKeys:z,setSelectedRowKeys:W})]})})})}))},67381:function(e,n,t){t.d(n,{Z:function(){return b}});var i=t(17061),s=t.n(i),r=t(17156),a=t.n(r),o=t(27424),l=t.n(o),c=t(67294),u=t(11486),d=t(84567),p=t(71230),m="leftdiv___iuhY9",h="listClass___o5N53",f="spantitle___KVMSL",x="rightdiv___f2zZr",v=t(82982),g=t(85893),b=function(e){var n=e.data,t=(e.value,e.handleChangePage,e.setSelectedRowKeys),i=e.selectedRowKeys,r=(e.onChange,(0,c.useState)([])),o=l()(r,2),b=o[0],y=o[1],_=(0,c.useState)([]),j=l()(_,2),w=j[0],k=j[1],Z=(0,c.useState)([]),T=l()(Z,2),H=T[0],Y=T[1],A=(0,c.useState)(1),S=l()(A,2),C=(S[0],S[1],(0,c.useState)()),P=l()(C,2);P[0],P[1];return(0,c.useEffect)((function(){y(n),k([]),Y([])}),[n]),(0,c.useEffect)((function(){t&&(k(i),Y(i))}),[i]),(0,g.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,g.jsxs)("div",{className:m,children:[(0,g.jsx)(u.Z.Search,{size:"middle",onChange:function(){var e=a()(s()().mark((function e(t){return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:y(n.filter((function(e){var n;return null==e||null===(n=e.name)||void 0===n?void 0:n.includes(t.target.value)})));case 1:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),placeholder:"可输入班级名称查询"}),0===b.length&&(0,g.jsx)(v.Z,{styles:{margin:"70px auto"},customText:"暂无分班"}),(0,g.jsx)("div",{style:{height:"85%",overflow:"auto",overflowX:"hidden"},children:(0,g.jsx)(d.Z.Group,{value:w.map((function(e){return"".concat(e.course_group_id)})),onChange:function(e){t(b.filter((function(n){return e.includes("".concat(n.course_group_id))})))},style:{marginTop:"10px",flexDirection:"column"},children:b.map((function(e,n){return(0,g.jsx)(p.Z,{style:{marginTop:"10px",lineHeight:"24px",display:"flex",width:200},children:(0,g.jsx)(d.Z,{style:{display:"flex",height:"24px",alignItems:"center"},disabled:e.is_published,value:"".concat(e.course_group_id),children:(0,g.jsxs)("div",{className:h,children:[(0,g.jsx)("span",{className:f,style:{width:e.is_published?"108px":"170px"},children:e.name}),e.is_published&&(0,g.jsx)("span",{style:{width:"52px",height:"24px",background:"#B8B8B8",borderRadius:"13px",color:"white",lineHeight:"24px",textAlign:"center",display:"inline-block"},children:"已发布"})]})})},e.course_group_id)}))})})]}),(0,g.jsxs)("div",{className:x,children:[(0,g.jsx)(u.Z.Search,{onChange:function(e){Y(w.filter((function(n){return n.name.includes(e.target.value)})))},size:"middle",placeholder:"可输入班级名称查询"}),0===H.length&&(0,g.jsx)(v.Z,{styles:{margin:"70px auto"},customText:"暂未选择分班"}),H.length>0&&(0,g.jsx)("div",{style:{marginTop:"10px",height:"85%",overflow:"hidden",position:"relative"},children:(0,g.jsx)("div",{style:{overflowX:"hidden",overflowY:"scroll",position:"absolute",left:0,top:0,right:-17,bottom:0},children:H.map((function(e,n){return(0,g.jsxs)(p.Z,{justify:"space-between",style:{marginTop:"10px"},children:[(0,g.jsx)("div",{style:{overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis",marginRight:"5px",marginLeft:"5px",width:"75%"},children:e.name}),(0,g.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAbVJREFUOE+Nk79rFUEUhb+zE4OFwUD+CyGKKQQbSaMikQQ7C1tBBIsUQaJvl2Fn/cWDpAiIYJsi7YOIaCUWFoKKRhG0sbEzEImFGnev7G6yyXsxeU5159yZb87l3hG9q2WLiBO79FIwXpLp0s6cwITnQCMWrGDM43jdBckZQ0wTMdrong2R2Bxm0/98sZ8ozdcOEm5hjOC41u9Olc9ZQKySclOVkNhljCmCzjeAJM/4FbW5p+8k5tlggTtarfKxLSM6pHq4BTiL0SboaAOIi284jeP1nti+ApMEvdoEvEPMkOpJDZi1IwzwgqDh/wSsYZwk08ca4O0Qua3zW8OV5crmHg6u22EGbQ2nIbx+1IC6rrK+cYJW9gXEVrbxGUEj5bltQGJvgBapHu0LSGwCyEh1vBsQWwd4TNCDPg6uAOcImuoFlL1dJ9WNPg5uYwwRVM3MzhJmKIpjZK6e9bj4jNNpvL4QFx9wuoDXJ1r5IlH0llTtXgcXwa4SolObnYnwKnbFcfEcdJ+gpW6AtzFynuIop/Fn053u4CA5yzjO4FV9tu0Syl2S38WiSWBgD8AfoEPQ7Fb+LwIiyhxWwe2KAAAAAElFTkSuQmCC",style:{cursor:"pointer",height:"16px",marginRight:17},onClick:function(){t(w.filter((function(n){return"".concat(n.course_group_name)!="".concat(e.course_group_name)})))}})]},e.course_group_id)}))})})]})]})}},61050:function(e,n,t){var i=t(18698),s=t.n(i),r=t(17061),a=t.n(r),o=t(17156),l=t.n(o),c=t(27424),u=t.n(c),d=t(67294),p=t(55054),m=t(91773),h=t(14446),f=t(76661),x=t(11486),v=t(71230),g=t(15746),b=t(71577),y=t(51412),_=t(27484),j=t.n(_),w=t(88275),k=t(29427),Z=t(79443),T=t(7),H=t(85893);p.Z.Countdown;n.Z=(0,w.connect)((function(e){return{exercise:e.exercise}}))((function(e){var n,t,i,r,o=e.exercise,c=e.successCb,p=e.dispatch,_=(0,w.useParams)(),Y=m.Z.useForm(),A=u()(Y,1)[0],S=(0,d.useState)(!1),C=u()(S,2),P=C[0],D=C[1],M=(0,d.useRef)(),N=o.actionTabs;(0,d.useEffect)((function(){"student-unlock"===o.actionTabs.key&&(D(!1),A.resetFields())}),[o.actionTabs.key]);var I=function(){var e=l()(a()().mark((function e(){var n,t,i,s,r,o,u,d,m,h;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,A.validateFields();case 2:if(r=A.getFieldsValue(),D(!0),!("no"!==(null==N||null===(n=N.exerciseParams)||void 0===n?void 0:n.ip_limit)||null!=N&&null!==(t=N.exerciseParams)&&void 0!==t&&t.ip_bind)){e.next=7;break}return e.next=7,new Promise(function(){var e=l()(a()().mark((function e(n){var t,i;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Z.y)({ip_limit:null==N||null===(t=N.exerciseParams)||void 0===t?void 0:t.ip_limit,ip_bind:null==N||null===(i=N.exerciseParams)||void 0===i?void 0:i.ip_bind});case 2:return M.current=e.sent,e.abrupt("return",n());case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}());case 7:return e.next=9,(0,y.ZD)(null==N||null===(i=N.exerciseParams)||void 0===i?void 0:i.id,{exercise_user_id:null==N||null===(s=N.exerciseParams)||void 0===s?void 0:s.exercise_user_id,unlock_key:r.unlock_key,ip:M.current});case 9:if(0!==e.sent.status){e.next=22;break}if(!c){e.next=15;break}return p({type:"exercise/setActionTabs",payload:{}}),c(),e.abrupt("return");case 15:if(!r.time){e.next=19;break}return m={time:j()(r.time).format("YYYY-MM-DD HH:mm"),exercise_user_id:null==N||null===(u=N.exerciseParams)||void 0===u?void 0:u.exercise_user_id,id:null==N||null===(d=N.exerciseParams)||void 0===d?void 0:d.id},e.next=19,(0,y.qz)(m);case 19:h=null==N?void 0:N.exerciseParams,(0,k.nr)({inner_ip:h.inner_ip,public_ip:h.public_ip,open_camera:h.open_camera,ip_limit:h.ip_limit,ip_bind:h.ip_bind,exercise_tips:h.exercise_tips,exerciseId:h.id,screen_open:h.screen_open,screen_num:h.screen_num,screen_sec:h.screen_sec,coursesId:_.coursesId,login:null===(o=(0,T.eY)())||void 0===o?void 0:o.login,history:history,identity_verify:h.identity_verify,open_phone_video_recording:h.open_phone_video_recording,current_status:h.current_status}),p({type:"exercise/setActionTabs",payload:{}});case 22:D(!1);case 23:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),F=[{title:"IP地址",dataIndex:"ip",key:"ip",render:function(e){return(0,H.jsx)("span",{className:e.indexOf("异常")>-1?"c-red":"c-green",children:e})}},{title:"浏览器",dataIndex:"browser",key:"browser",render:function(e){return(0,H.jsx)("span",{className:e.indexOf("异常")>-1?"c-red":"c-green",children:e})}},{title:"上次登录时间",dataIndex:"last_login_time",key:"last_login_time"}],O=(null==N||null===(n=N.exerciseParams)||void 0===n?void 0:n.errorMessage)&&"object"===s()(null==N||null===(t=N.exerciseParams)||void 0===t?void 0:t.errorMessage);return(0,H.jsx)(H.Fragment,{children:(0,H.jsxs)(h.Z,{width:514,centered:!0,closable:!(null==N||null===(i=N.exerciseParams)||void 0===i||!i.unlockClose),maskClosable:!1,keyboard:!1,maskStyle:{background:"#000"},title:"提示",open:"student-unlock"===o.actionTabs.key,footer:null,onCancel:function(){p({type:"exercise/setActionTabs",payload:{}})},children:[O&&(0,H.jsx)("div",{style:{marginBottom:16},children:"该账号已经存在异常情况,若非本人操作,请联系监考老师说明情况。 "}),!O&&(0,H.jsx)("div",{style:{marginBottom:16},children:"系统检测到您在考试时中途退出,现已将考试锁定。如需继续进行考试, 请尽快联系课堂老师进行解锁!"}),O&&(0,H.jsx)(f.Z,{className:"mb20",pagination:{hideOnSinglePage:!0},dataSource:[(null==N||null===(r=N.exerciseParams)||void 0===r?void 0:r.errorMessage)||{}],columns:F}),(0,H.jsx)("div",{className:"",children:(0,H.jsx)(m.Z,{form:A,layout:"vertical",autoComplete:"off",children:(0,H.jsx)(m.Z.Item,{label:"考试解锁码",name:"unlock_key",rules:[{required:!0,message:"请输入考试解锁码"}],children:(0,H.jsx)(x.Z.Password,{autoComplete:"off",placeholder:"请输入考试解锁码",visibilityToggle:!1})})})}),(0,H.jsxs)(v.Z,{justify:"space-between",align:"middle",children:[(0,H.jsx)(g.Z,{}),(0,H.jsx)(g.Z,{children:(0,H.jsx)(b.ZP,{loading:P,onClick:I,children:"进入考试"})})]})]})})}))},9269:function(e,n,t){t.d(n,{w:function(){return d}});var i=t(17061),s=t.n(i),r=t(17156),a=t.n(r),o=t(84519),l=(t(67294),t(14446)),c=t(88275),u=t(85893),d=function(){var e=a()(s()().mark((function e(n,t){var i,r,a,d,p,m,h,f=arguments;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=f.length>2&&void 0!==f[2]?f[2]:"正在进入评阅,请稍后...",a=f.length>3&&void 0!==f[3]?f[3]:1,d=f.length>4&&void 0!==f[4]?f[4]:2,1===a&&(0,c.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:1===a?r:"正在检测中,请稍后..."}}),e.next=6,(0,o.ZP)("/api/exercises/".concat(t,"/user_appraise_status.json"),{method:"get",params:{appraise_type:a}});case 6:if(-1!==(null==(p=e.sent)?void 0:p.status)){e.next=11;break}return(0,c.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1}}),e.abrupt("return",Promise.reject());case 11:if(m={status:0},2!==(null==p?void 0:p.type)){e.next=16;break}return e.next=15,(0,o.ZP)("/api/exercises/".concat(t,"/create_appraise_students.json"),{method:"get"});case 15:m=e.sent;case 16:if((0,c.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),-1!==(null===(i=m)||void 0===i?void 0:i.status)){e.next=19;break}return e.abrupt("return",Promise.reject());case 19:if(2!==(null==p?void 0:p.type)){e.next=24;break}if(h=function(){var e;c.history.replace("/classrooms/".concat(n,"/exercise/").concat(t,"/centralizeReview/").concat(null===(e=m)||void 0===e?void 0:e.login))},l.Z.confirm({centered:!0,width:470,okText:"确定",cancelText:"取消",title:"提示",keyboard:!1,onOk:h,onCancel:function(){1===d&&c.history.replace("/classrooms/".concat(n,"/exercise/").concat(t,"/detail"))},content:(0,u.jsxs)("div",{children:[(0,u.jsxs)("div",{children:["您已成为指定阅卷教师,是否现在前往",(0,u.jsx)("span",{onClick:h,className:"ml5 mr5 c-light-primary current",children:"集中阅卷"}),"继续评阅?"]}),(0,u.jsx)("div",{className:"c-grey-999",children:"(阅卷结束后恢复学生个人评阅功能,并展示学生成绩)"})]})}),3===d){e.next=24;break}return e.abrupt("return",Promise.reject());case 24:if(3!==(null==p?void 0:p.type)){e.next=28;break}if(l.Z.info({centered:!0,width:470,okText:"确定",keyboard:!1,title:"提示",onOk:function(){1===d&&c.history.replace("/classrooms/".concat(n,"/exercise/").concat(t,"/detail"))},content:(0,u.jsx)("div",{children:(null==p?void 0:p.message)||""})}),3===d){e.next=28;break}return e.abrupt("return",Promise.reject());case 28:if(4!==(null==p?void 0:p.type)){e.next=32;break}if(l.Z.info({centered:!0,width:470,okText:"确定",title:"提示",keyboard:!1,onOk:function(){1===d&&c.history.replace("/classrooms/".concat(n,"/exercise/").concat(t,"/detail"))},content:(0,u.jsx)("div",{children:(null==p?void 0:p.message)||""})}),3===d){e.next=32;break}return e.abrupt("return",Promise.reject());case 32:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}()}}]); |