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.
2 lines
12 KiB
2 lines
12 KiB
(window.webpackJsonp=window.webpackJsonp||[]).push([[191],{"3TLj":function(x,E,r){x.exports={flex_box_center:"flex_box_center____TbjK",flex_space_between:"flex_space_between___2coRZ",flex_box_vertical_center:"flex_box_vertical_center___3NVFE",flex_box_center_end:"flex_box_center_end___3GKhy",flex_box_column:"flex_box_column___2SLfn",bg:"bg___3oKWe",formWrap:"formWrap___2Y1wq"}},"5v/u":function(x,E,r){"use strict";r.r(E);var Y=r("5NDa"),Z=r("5rEg"),A=r("2qtc"),v=r("kLXV"),T=r("9og8"),U=r("k1fw"),W=r("y8nQ"),R=r("Vl3Y"),j=r("tJVT"),z=r("PpiC"),Et=r("Znn+"),y=r("ZTPi"),B=r("q1tI"),c=r.n(B),N=r("9kvl"),lt=r("Ot1p"),et=r("HBuW"),ut=r("3TLj"),F=r.n(ut),ct=r("UqFu"),nt=r("9ZNV"),mt=r("nuEh");function V(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */V=function(){return s};var u,s={},O=Object.prototype,b=O.hasOwnProperty,f=Object.defineProperty||function(e,t,n){e[t]=n.value},C=typeof Symbol=="function"?Symbol:{},g=C.iterator||"@@iterator",pt=C.asyncIterator||"@@asyncIterator",H=C.toStringTag||"@@toStringTag";function p(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{p({},"")}catch(e){p=function(n,a,i){return n[a]=i}}function $(e,t,n,a){var i=t&&t.prototype instanceof it?t:it,o=Object.create(i.prototype),_=new l(a||[]);return f(o,"_invoke",{value:ht(e,n,_)}),o}function X(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(a){return{type:"throw",arg:a}}}s.wrap=$;var q="suspendedStart",rt="suspendedYield",ot="executing",w="completed",h={};function it(){}function k(){}function D(){}var tt={};p(tt,g,function(){return this});var G=Object.getPrototypeOf,Q=G&&G(G(P([])));Q&&Q!==O&&b.call(Q,g)&&(tt=Q);var L=D.prototype=it.prototype=Object.create(tt);function st(e){["next","throw","return"].forEach(function(t){p(e,t,function(n){return this._invoke(t,n)})})}function J(e,t){function n(i,o,_,m){var d=X(e[i],e,o);if(d.type!=="throw"){var K=d.arg,I=K.value;return I&&typeof I=="object"&&b.call(I,"__await")?t.resolve(I.__await).then(function(S){n("next",S,_,m)},function(S){n("throw",S,_,m)}):t.resolve(I).then(function(S){K.value=S,_(K)},function(S){return n("throw",S,_,m)})}m(d.arg)}var a;f(this,"_invoke",{value:function(o,_){function m(){return new t(function(d,K){n(o,_,d,K)})}return a=a?a.then(m,m):m()}})}function ht(e,t,n){var a=q;return function(i,o){if(a===ot)throw new Error("Generator is already running");if(a===w){if(i==="throw")throw o;return{value:u,done:!0}}for(n.method=i,n.arg=o;;){var _=n.delegate;if(_){var m=_t(_,n);if(m){if(m===h)continue;return m}}if(n.method==="next")n.sent=n._sent=n.arg;else if(n.method==="throw"){if(a===q)throw a=w,n.arg;n.dispatchException(n.arg)}else n.method==="return"&&n.abrupt("return",n.arg);a=ot;var d=X(e,t,n);if(d.type==="normal"){if(a=n.done?w:rt,d.arg===h)continue;return{value:d.arg,done:n.done}}d.type==="throw"&&(a=w,n.method="throw",n.arg=d.arg)}}}function _t(e,t){var n=t.method,a=e.iterator[n];if(a===u)return t.delegate=null,n==="throw"&&e.iterator.return&&(t.method="return",t.arg=u,_t(e,t),t.method==="throw")||n!=="return"&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),h;var i=X(a,e.iterator,t.arg);if(i.type==="throw")return t.method="throw",t.arg=i.arg,t.delegate=null,h;var o=i.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,t.method!=="return"&&(t.method="next",t.arg=u),t.delegate=null,h):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function ft(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function M(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function l(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(ft,this),this.reset(!0)}function P(e){if(e||e===""){var t=e[g];if(t)return t.call(e);if(typeof e.next=="function")return e;if(!isNaN(e.length)){var n=-1,a=function i(){for(;++n<e.length;)if(b.call(e,n))return i.value=e[n],i.done=!1,i;return i.value=u,i.done=!0,i};return a.next=a}}throw new TypeError(typeof e+" is not iterable")}return k.prototype=D,f(L,"constructor",{value:D,configurable:!0}),f(D,"constructor",{value:k,configurable:!0}),k.displayName=p(D,H,"GeneratorFunction"),s.isGeneratorFunction=function(e){var t=typeof e=="function"&&e.constructor;return!!t&&(t===k||(t.displayName||t.name)==="GeneratorFunction")},s.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,D):(e.__proto__=D,p(e,H,"GeneratorFunction")),e.prototype=Object.create(L),e},s.awrap=function(e){return{__await:e}},st(J.prototype),p(J.prototype,pt,function(){return this}),s.AsyncIterator=J,s.async=function(e,t,n,a,i){i===void 0&&(i=Promise);var o=new J($(e,t,n,a),i);return s.isGeneratorFunction(t)?o:o.next().then(function(_){return _.done?_.value:o.next()})},st(L),p(L,H,"Generator"),p(L,g,function(){return this}),p(L,"toString",function(){return"[object Generator]"}),s.keys=function(e){var t=Object(e),n=[];for(var a in t)n.push(a);return n.reverse(),function i(){for(;n.length;){var o=n.pop();if(o in t)return i.value=o,i.done=!1,i}return i.done=!0,i}},s.values=P,l.prototype={constructor:l,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=u,this.done=!1,this.delegate=null,this.method="next",this.arg=u,this.tryEntries.forEach(M),!t)for(var n in this)n.charAt(0)==="t"&&b.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=u)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if(t.type==="throw")throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function a(K,I){return _.type="throw",_.arg=t,n.next=K,I&&(n.method="next",n.arg=u),!!I}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],_=o.completion;if(o.tryLoc==="root")return a("end");if(o.tryLoc<=this.prev){var m=b.call(o,"catchLoc"),d=b.call(o,"finallyLoc");if(m&&d){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(m){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!d)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(t,n){for(var a=this.tryEntries.length-1;a>=0;--a){var i=this.tryEntries[a];if(i.tryLoc<=this.prev&&b.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&(t==="break"||t==="continue")&&o.tryLoc<=n&&n<=o.finallyLoc&&(o=null);var _=o?o.completion:{};return _.type=t,_.arg=n,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(_)},complete:function(t,n){if(t.type==="throw")throw t.arg;return t.type==="break"||t.type==="continue"?this.next=t.arg:t.type==="return"?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):t.type==="normal"&&n&&(this.next=n),h},finish:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.finallyLoc===t)return this.complete(a.completion,a.afterLoc),M(a),h}},catch:function(t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc===t){var i=a.completion;if(i.type==="throw"){var o=i.arg;M(a)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,a){return this.delegate={iterator:P(t),resultName:n,nextLoc:a},this.method==="next"&&(this.arg=u),h}},s}var dt=y.a.TabPane,at=function(s){var O,b=s.shixunsDetail,f=s.dispatch,C=s.match,g=s.practiceSetting,pt=Object(z.a)(s,["shixunsDetail","dispatch","match","practiceSetting"]),H=R.a.useForm(),p=Object(j.a)(H,1),$=p[0],X=Object(B.useState)({}),q=Object(j.a)(X,2),rt=q[0],ot=q[1],w=b.challengesNew,h=Object(B.useRef)(null),it=g.selectQuestionParams,k=g.id,D=g.newQuestion,tt=Object(B.useState)(!0),G=Object(j.a)(tt,2),Q=G[0],L=G[1];Object(B.useEffect)(function(){L(!0),f({type:"shixunsDetail/getChallengesNew",payload:Object(U.a)({},C.params)}),L(!1)},[C.params]);var st=function(){var M=Object(T.a)(V().mark(function l(P){var e,t;return V().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return e=Object(U.a)({},rt),e.identifier=C.params.id,e.st=1,a.next=5,Object(et.b)(Object(U.a)({},e));case 5:t=a.sent,t.status===1&&(N.c.replace("/shixuns/".concat(C.params.id,"/edit/").concat(t.challenge_id,"/editquestion?tab=2")),setTimeout(function(){f({type:"practiceSetting/setParams",payload:{newQuestion:null}}),f({type:"practiceSetting/setUpdateIndex"})},200));case 7:case"end":return a.stop()}},l)}));return function(P){return M.apply(this,arguments)}}(),J=function(){ft()},ht=function(l){clearTimeout(h.current),h.current=setTimeout(function(){"subject"in l&&D&&f({type:"practiceSetting/setParams",payload:{newQuestion:{st:1,name:l==null?void 0:l.subject}}});var P=$.getFieldsValue(),e=P.subject,t=P.task_pass;e!==""||t!==Object(ct.a)(w.task_pass_default)?f({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!0}}):f({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})},500)},_t=function(l){ot(Object(U.a)({},$.getFieldsValue())),ht(l)},ft=function(){var l,P=function(){N.c.push("/shixuns/".concat(k,"/challenges")),f({type:"practiceSetting/setSideBarTabs",payload:{confirmLeave:!1}})};(g==null||((l=g.sideBar)===null||l===void 0)?void 0:l.confirmLeave)?v.a.confirm({title:"\u79BB\u5F00\u6B64\u9875\u63D0\u793A",content:"\u7CFB\u7EDF\u53EF\u80FD\u4E0D\u4F1A\u4FDD\u5B58\u60A8\u6240\u505A\u7684\u66F4\u6539\u3002",okText:"\u79BB\u5F00",cancelText:"\u53D6\u6D88",onOk:function(){P()}}):P()};return c.a.createElement("section",{className:F.a.bg},c.a.createElement(y.a,{activeKey:"1"},c.a.createElement(dt,{tab:"\u672C\u5173\u4EFB\u52A1",key:"1"},c.a.createElement(R.a,{form:$,className:F.a.formWrap,scrollToFirstError:!0,layout:"vertical",onValuesChange:_t,onFinish:st},c.a.createElement("div",{className:F.a.fieldWrap},c.a.createElement(R.a.Item,{initialValue:"",name:"subject",label:"\u4EFB\u52A1\u540D\u79F0:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EFB\u52A1\u540D\u79F0"}]},c.a.createElement(Z.a,{bordered:!1,maxLength:60,suffix:"".concat(((O=rt.subject)===null||O===void 0?void 0:O.length)||0,"/60"),placeholder:"\u4F8B\u5982\uFF1A\u4ECEPython\u7A0B\u5E8F\u8BBE\u8BA1-\u5165\u95E8\u7CBE\u901A"}))),c.a.createElement("div",{className:F.a.mdWrap},c.a.createElement(R.a.Item,{name:"task_pass",label:"\u8FC7\u5173\u4EFB\u52A1:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4F5C\u4E1A\u7684\u7B80\u4ECB"},{max:35e3,message:"\u6700\u5927\u9650\u523635000\u4E2A\u5B57\u7B26"}]},c.a.createElement(lt.a,{watch:!0,defaultValue:w.task_pass_default}))),c.a.createElement(R.a.Item,{noStyle:!0},c.a.createElement(nt.a,{okButtonProps:{htmlType:"submit"},className:"customFixedButton",onCancel:J}))))),c.a.createElement(mt.a,{loading:Q}))};E.default=Object(N.a)(function(u){var s=u.shixunsDetail,O=u.practiceSetting;return{shixunsDetail:s,practiceSetting:O}})(at)},"9ZNV":function(x,E,r){"use strict";r.d(E,"a",function(){return z});var Y=r("0Owb"),Z=r("+L6B"),A=r("2/Rp"),v=r("q1tI"),T=r.n(v),U=r("UUDw"),W=r.n(U),R=r("TSYQ"),j=r.n(R),z=function(y){var B=y.cancelText,c=B===void 0?"\u53D6\u6D88":B,N=y.okText,lt=N===void 0?"\u786E\u5B9A":N,et=y.loading,ut=et===void 0?!1:et,F=y.hasOkBtn,ct=F===void 0?!0:F,nt=y.okButtonProps,mt=nt===void 0?{}:nt,V=y.onCancel,dt=V===void 0?function(){}:V,at=y.onOk,u=at===void 0?function(){}:at,s=y.className,O=s===void 0?"":s;return T.a.createElement("div",{className:j()(W.a.buttonFixed,O)},T.a.createElement("div",{className:W.a.buttonWrap},T.a.createElement(A.a,{size:"large",className:"".concat(W.a.button," mr20"),onClick:dt},c),ct&&T.a.createElement(A.a,Object(Y.a)({size:"large",type:"primary",className:"".concat(W.a.button," mr20"),loading:ut,onClick:u},mt),lt)))}},F8wB:function(x,E,r){x.exports={loading:"loading___1SIOG"}},UUDw:function(x,E,r){x.exports={buttonFixed:"buttonFixed___2zLVJ",button:"button___-JgFH",buttonWrap:"buttonWrap___aZhhk"}},UqFu:function(x,E,r){"use strict";r.d(E,"a",function(){return Y});var Y=function(A){var v=document.createElement("textarea");return v.value=A,v.value}},nuEh:function(x,E,r){"use strict";var Y=r("T2oS"),Z=r("W9HT"),A=r("q1tI"),v=r.n(A),T=r("F8wB"),U=r.n(T),W=function(j){var z=j.loading;return z?v.a.createElement("div",{className:U.a.loading},v.a.createElement(Z.a,null)):v.a.createElement(v.a.Fragment,null)};E.a=W}}]);
|