|
|
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[79921],{40578:function(e,s,n){n.d(s,{Z:function(){return l}});var t=n(81978),i=n(59301),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M724 218.3V141c0-6.7-7.7-10.4-12.9-6.3L260.3 486.8a31.86 31.86 0 000 50.3l450.8 352.1c5.3 4.1 12.9.4 12.9-6.3v-77.3c0-4.9-2.3-9.6-6.1-12.6l-360-281 360-281.1c3.8-3 6.1-7.7 6.1-12.6z"}}]},name:"left",theme:"outlined"},r=n(1393),a=function(e,s){return i.createElement(r.Z,(0,t.Z)({},e,{ref:s,icon:c}))};var l=i.forwardRef(a)},83148:function(e,s,n){n.d(s,{Z:function(){return l}});var t=n(81978),i=n(59301),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M765.7 486.8L314.9 134.7A7.97 7.97 0 00302 141v77.3c0 4.9 2.3 9.6 6.1 12.6l360 281.1-360 281.1c-3.9 3-6.1 7.7-6.1 12.6V883c0 6.7 7.7 10.4 12.9 6.3l450.8-352.1a31.96 31.96 0 000-50.4z"}}]},name:"right",theme:"outlined"},r=n(1393),a=function(e,s){return i.createElement(r.Z,(0,t.Z)({},e,{ref:s,icon:c}))};var l=i.forwardRef(a)},78405:function(e,s,n){n.d(s,{Z:function(){return l}});var t=n(81978),i=n(59301),c={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.6 854.5L649.9 594.8C690.2 542.7 712 479 712 412c0-80.2-31.3-155.4-87.9-212.1-56.6-56.7-132-87.9-212.1-87.9s-155.5 31.3-212.1 87.9C143.2 256.5 112 331.8 112 412c0 80.1 31.3 155.5 87.9 212.1C256.5 680.8 331.8 712 412 712c67 0 130.6-21.8 182.7-62l259.7 259.6a8.2 8.2 0 0011.6 0l43.6-43.5a8.2 8.2 0 000-11.6zM570.4 570.4C528 612.7 471.8 636 412 636s-116-23.3-158.4-65.6C211.3 528 188 471.8 188 412s23.3-116.1 65.6-158.4C296 211.3 352.2 188 412 188s116.1 23.2 158.4 65.6S636 352.2 636 412s-23.3 116.1-65.6 158.4z"}}]},name:"search",theme:"outlined"},r=n(1393),a=function(e,s){return i.createElement(r.Z,(0,t.Z)({},e,{ref:s,icon:c}))};var l=i.forwardRef(a)},12594:function(e,s,n){var t=n(82242),i=n.n(t),c=(n(59301),n(93314)),r=n(3113),a=n(37712);s.Z=function(e){var s=e.img,n=e.buttonProps,t=void 0===n?{}:n,l=e.styles,o=void 0===l?{}:l,u=e.customText,d=e.ButtonText,m=e.ButtonClick,p=e.Buttonclass,f=e.ButtonTwo,h=e.imgStyles,x=e.loading,v=void 0!==x&&x;return(0,a.jsxs)("section",{className:"tc animated fadeIn",style:i()(i()({},{color:"#999",margin:"100px auto",visibility:v?"hidden":"visible"}),o),children:[(0,a.jsx)("img",{src:s||c,style:i()(i()({},h),{},{pointerEvents:"none",userSelect:"none"})}),(0,a.jsx)("p",{className:"mt20 font14",children:u||"暂时还没有相关数据哦!"}),d&&(0,a.jsx)(r.ZP,i()(i()({className:p,onClick:m},t),{},{children:d})),f&&f]})}},33586:function(e,s,n){n.r(s),n.d(s,{default:function(){return R}});var t=n(7557),i=n.n(t),c=n(41498),r=n.n(c),a=n(82242),l=n.n(a),o=n(79800),u=n.n(o),d=n(39647),m=n.n(d),p=n(59301),f=n(59822),h=n(57809),x=n(8591),v=n(95237),g=n(43604),_=n(3113),j=n(66999),y=n(86859),b=n(12594),k="acitons___teF7U",N=n(43418),w=n(6848),C=n(24905),Z=n(26790),S=n(84112),P="listItem___ye5vB",E="info___Z1Jmz",L="title___Pq4sD",B="titleLeft___nUs7_",O="titleRight___nhuLW",D="name___hjh5r";Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var Y=n(16080),M=n(17810),z=n.n(M),T=n(37712),I=function(e){var s,n,t,c,a,l,o,d=e.v,m=e.k,h=(e.match,e.selectArrs),v=e.setSelectArrs,g=(e.dispatch,e.params),_=(0,p.useState)([]),j=u()(_,2),y=(j[0],j[1],(0,p.useState)(!1)),b=u()(y,2),k=(b[0],b[1],"YYYY-MM-DD"),S=z()("2020-11-15",k);var M=function(e){var s;f.history.push("/classrooms/".concat(e.course_identifier,"/exercisenotice/").concat(e.id,"/users/").concat(null===(s=(0,Y.eY)())||void 0===s?void 0:s.login))};"publish_time"===g.order_by&&g.sort_direction,"end_time"===g.order_by&&g.sort_direction;return console.log((0,Y.RV)(),222),(0,T.jsxs)("div",{className:P,children:[(0,Y.GJ)()&&(0,T.jsx)(C.Z,{checked:h.includes(d.id),value:d.id,onClick:function(e){e.stopPropagation()},onChange:function(e){h.indexOf(d.id);h.indexOf(d.id)>-1?v(h.filter((function(e){return e!==d.id}))):v(h.concat(d.id))}}),(0,T.jsxs)("div",{className:E,children:[(0,T.jsxs)("div",{className:L,children:[(0,T.jsxs)("div",{className:B,style:{marginRight:"15px"},children:[function(e){return null!=e&&e.includes("未开始")?(0,T.jsx)("span",{style:{backgroundColor:"#B8B8B8"},className:"tag-style mr10",children:"未开始"}):null!=e&&e.includes("考试中")?(0,T.jsx)("span",{style:{backgroundColor:"#007AFF"},className:"tag-style mr10",children:"考试中"}):null!=e&&e.includes("已结束")?(0,T.jsx)("span",{style:{backgroundColor:"#FC2D6B"},className:"tag-style mr10",children:"已结束"}):void 0}(null==d?void 0:d.exercise_tips),(0,T.jsx)(w.Z,{title:d.exercise_name,children:(0,T.jsx)("span",{className:"".concat(D),style:{maxWidth:null!=d&&null!==(s=d.exercise_tips)&&void 0!==s&&s.includes("已开启防作弊")?400:498},children:d.exercise_name})}),!d.is_public&&(0,Y.GJ)()&&(0,T.jsx)(w.Z,{title:"私有属性,非课堂成员不能访问",children:(0,T.jsx)("span",{className:"iconfont icon-suo1 ml10 mr10 c-light-black font12"})}),(null==d||null===(n=d.exercise_tips)||void 0===n?void 0:n.includes("已开启防作弊"))&&(0,T.jsx)("span",{style:{flexShrink:0},className:"tag-style-fzb iconfont icon-fangzuobi ml10",children:"已开启防作弊"}),(null==d||null===(t=d.exercise_tips)||void 0===t?void 0:t.includes("已结束"))&&(null==d||null===(c=d.exercise_tips)||void 0===c?void 0:c.includes("未提交"))&&(0,T.jsx)("span",{style:{flexShrink:0,backgroundColor:"#B8B8B8"},className:"tag-style ml10",children:"未提交"})]}),(0,T.jsxs)("div",{className:O,onClick:function(e){e.stopPropagation(),e.preventDefault()},children:[(0,Y.GJ)()&&d.assistant_auth&&(0,T.jsx)("span",{onClick:function(e){e.stopPropagation();var s=z()(d.created_at,k);z()(S).diff(z()(s),"days")>0&&null!=d&&d.is_random?N.Z.info({title:"题库改版告知",content:(0,T.jsx)(T.Fragment,{children:"EduCoder已升级题库功能,所有试题均需匹配知识点。 当前试卷所涉及试题均未匹配知识点,无法随机抽取,已不能有效使用。请在试卷库重新组卷后使用。 由此带来的不便,敬请谅解!"})}):null!=d&&d.is_random?f.history.push("/classrooms/".concat(d.course_id,"/exercise/").concat(d.id,"/random/preview?random=").concat(d.is_random)):f.history.push("/classrooms/".concat(d.course_id,"/exercise/").concat(d.id,"/detail?random=").concat(d.is_random,"&tabs=2"))},children:"预览"}),(0,T.jsx)("a",{onClick:function(e){e.preventDefault(),e.stopPropagation(),(0,Z.xg)("/classrooms/".concat(d.course_id,"/exercise/").concat(d.id,"/detail?random=").concat(d.is_random))},children:"详情"}),(0,T.jsxs)(T.Fragment,{children:[!!d.off_limits&&(0,T.jsx)(w.Z,{title:"迟到超过".concat(null==d?void 0:d.last_times,"分钟,禁止进入答题"),children:(0,T.jsx)("b",{className:"font16 c-grey-999",children:"迟到禁止答题"})}),!d.off_limits&&0===d.current_status&&d.exercise_status>1&&!(null!==(a=d.exercise_tips)&&void 0!==a&&a.includes("已截止"))&&(0,T.jsxs)("a",{onClick:function(e){e.stopPropagation(),e.preventDefault(),M(d)},href:"",children:[(null==d?void 0:d.screen_used_num)>(null==d?void 0:d.screen_total_num)&&"申请"," 继续考试"]}),!(null!==(l=d.exercise_tips)&&void 0!==l&&l.includes("已截止"))&&(null==d?void 0:d.screen_used_num)>(null==d?void 0:d.screen_total_num)&&(0,T.jsx)("a",{onClick:function(e){e.stopPropagation(),e.preventDefault(),M(d)},href:"",children:"申请继续考试"}),!d.off_limits&&1===d.current_status&&d.exercise_status>1&&"kepukehuan.educoder.net"!=document.domain&&(0,T.jsx)("a",{style:{color:"#0152d9"},onClick:function(){var e=r()(i()().mark((function e(s){var n;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s.preventDefault(),s.stopPropagation(),null!=d&&d.answered_open){e.next=5;break}return x.ZP.info("老师已设置本试卷在交卷后不可查看"),e.abrupt("return");case 5:(0,Z.xg)("/classrooms/".concat(g.coursesId,"/exercise/").concat(d.id,"/users/").concat(null===(n=(0,Y.eY)())||void 0===n?void 0:n.login,"?check=true"));case 6:case"end":return e.stop()}}),e)})));return function(s){return e.apply(this,arguments)}}(),children:"查看考试"}),!d.off_limits&&2===d.current_status&&d.exercise_status>1&&!(null!==(o=d.exercise_tips)&&void 0!==o&&o.includes("已截止"))&&(0,T.jsx)("a",{style:{color:1===(null==d?void 0:d.is_redo)&&"red"},onClick:function(e){e.stopPropagation(),e.preventDefault(),M(d)},href:"",children:0===(null==d?void 0:d.is_redo)?"开始考试":"重新考试"})]})]})]}),(0,T.jsxs)("p",{style:{display:"flex"},children:[(0,T.jsxs)("span",{className:"c-grey-999 mr20",children:["创建者:",(0,T.jsx)("span",{className:"c-blue",children:d.username})]}),(0,T.jsxs)("span",{className:"c-grey-999 mr20",children:["所属课堂:",(0,T.jsx)("span",{className:"c-blue",children:d.course_name})]}),(0,T.jsxs)("span",{className:"ml30 c-grey-999 mr20",children:["考试时长:",(0,T.jsx)("span",{className:"c-blue",children:null===d.time||-1===d.time?"不限":"".concat(d.time,"分钟")})]}),(0,T.jsxs)("span",{className:"ml15 c-grey-999",children:["考试时间:",(0,T.jsx)("span",{className:"c-blue",children:z()(null==d?void 0:d.published_time).format("YYYY-MM-DD HH:mm")})," 至 ",(0,T.jsx)("span",{className:"c-blue",children:z()(null==d?void 0:d.end_time).format("YYYY-MM-DD HH:mm")})]})]})]})]},m)},A=["classroomList","globalSetting","exercise","loading","dispatch","match"],F=h.default.Option,R=(0,f.connect)((function(e){var s=e.classroomList,n=e.loading,t=e.globalSetting,i=e.exercise;return{classroomList:s,globalSetting:t,loading:n.effects,exercise:i}}))((function(e){var s,n,t,c,a=e.classroomList,o=(e.globalSetting,e.exercise),d=e.loading,N=e.dispatch,w=e.match,C=(m()(e,A),(0,p.useState)(l()({},(0,f.useParams)()))),P=u()(C,2),E=P[0],L=(P[1],(0,f.useLocation)(),a.detailExerciseList),B=(a.detailTopBanner,a.detailLeftMenus,(0,p.useState)([])),O=u()(B,2),D=O[0],Y=O[1],M=(0,p.useState)(!1),z=u()(M,2),R=z[0],H=z[1],G=(0,p.useState)({page:1,course_id:""}),J=u()(G,2),U=J[0],V=J[1];E.id=E.coursesId;var W=(0,p.useMemo)((function(){return new WebSocket("ws://localhost:8082")}),[]);(0,p.useEffect)((function(){K(),N({type:"globalSetting/footerToggle",payload:!1}),N({type:"globalSetting/onlyShowBackTopToggle",payload:!0})}),[U]),(0,p.useEffect)((function(){q()}),[]);var q=function(){var e=r()(i()().mark((function e(){var s,n;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,S.ZP)("/api/users/check_client_cheating.json",{method:"get"});case 2:0===(s=e.sent).status&&H(null==s||null===(n=s.data)||void 0===n?void 0:n.show_unlimit);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,p.useEffect)((function(){Y([])}),[L]);var K=function(){document.body.scrollIntoView(),N({type:"exercise/getUserExercise",payload:U})},Q=function(){var e=r()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(0,Z.G5)(W),x.ZP.success("操作成功");case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,T.jsxs)("section",{className:"minH500 minW1200",children:[(0,T.jsx)("aside",{className:"".concat(k," w100"),children:(0,T.jsxs)(v.Z,{className:"w100",align:"middle",children:[(0,T.jsx)(g.Z,{flex:"1",children:(0,T.jsx)("div",{className:"font20 blod",children:"考试列表"})}),R&&(0,T.jsx)(g.Z,{children:(0,T.jsx)(_.ZP,{onClick:Q,className:"mr20",type:"primary",ghost:!0,children:"解除客户端限制"})}),(0,T.jsx)(g.Z,{children:(0,T.jsxs)("div",{children:["按课堂名称搜索试卷考试:",(0,T.jsxs)(h.default,{className:"ml20",size:"large",style:{width:300},placeholder:"全部",onChange:function(e){U.course_id=e,U.page=1,V(l()({},U))},children:[(0,T.jsx)(F,{value:"",children:"全部"}),null==o||null===(s=o.userExerciseList)||void 0===s||null===(s=s.courses)||void 0===s?void 0:s.map((function(e,s){return(0,T.jsx)(F,{value:e.id,children:e.name})}))]})]})})]})}),0===(null==o||null===(n=o.userExerciseList)||void 0===n?void 0:n.exercises_count)&&(0,T.jsx)(b.Z,{}),(0,T.jsxs)(j.Z,{loading:d["exercise/getUserExercise"],active:!0,avatar:{size:40},paragraph:{rows:5},className:"mt30",children:[(null==o||null===(t=o.userExerciseList)||void 0===t?void 0:t.exercises)&&(null==o||null===(c=o.userExerciseList)||void 0===c?void 0:c.exercises.map((function(e,s){return(0,T.jsx)(I,{v:e,k:s,match:w,selectArrs:D,setSelectArrs:Y,dispatch:N,params:E})}))),(0,T.jsx)("aside",{className:"tc mb50 mt30",children:(0,T.jsx)(y.Z,{showTotal:function(e){var s;return"共 ".concat(null==o||null===(s=o.userExerciseList)||void 0===s?void 0:s.exercises_count," 条")},hideOnSinglePage:!0,showSizeChanger:!1,onChange:function(e){U.page=e,V(l()({},U))},defaultPageSize:20,defaultCurrent:U.page,current:U.page||1,total:null==o?void 0:o.userExerciseList.exercises_count})})]})]})}))}}]); |