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
8.8 KiB
1 line
8.8 KiB
5 years ago
|
webpackJsonp([238],{4036:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=a(1034),s=(a.n(n),a(1035)),f=a.n(s),l=a(66),r=(a.n(l),a(67)),g=a.n(r),c=a(165),o=(a.n(c),a(164)),v=a.n(o),i=a(168),m=(a.n(i),a(167)),u=a.n(m),p=a(296),h=(a.n(p),a(291)),d=a.n(h),b=a(0),w=a.n(b),E=a(45),y=a(5),_=a(12),x=a.n(_),k=a(341),N=(a.n(k),a(309)),S=function(e,t,a){return t&&O(e.prototype,t),a&&O(e,a),e};function O(e,t){for(var a=0;a<t.length;a++){var n=t[a];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object(y.Q)(),Object(y.Q)("/editormd/lib/");var j=window.$,C=(d.a.Option,u.a.Group,function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(I,b.Component),S(I,[{key:"componentDidMount",value:function(){var n=this,s=this.props.match.params.shixunId,e=this.props.match.params.checkpointId,l="/shixuns/"+s+"/challenges/newquestion",r="/shixuns/"+s+"/challenges/new",c="/shixuns/"+s+"/challenges";this.setState({shixunId:s,checkpointId:e});var t="/shixuns/"+s+"/challenges/"+e+"/edit.json?tab=2";x.a.get(t).then(function(e){var t=e.data.prev_challenge,a=e.data.next_challenge;null!=t&&(t=0===t.st?"/shixuns/"+s+"/challenges/"+t.id+"/editcheckpoint":"/shixuns/"+s+"/challenges/"+t.id+"/editquestion"),null!=a&&(a=0===a.st?"/shixuns/"+s+"/challenges/"+a.id+"/editcheckpoint":"/shixuns/"+s+"/challenges/"+a.id+"/editquestion"),n.setState({answer:e.data.answer,power:e.data.power,choice_url:l,practice_url:r,go_back_url:c,position:e.data.position,prev_challenge:t,next_challenge:a}),!1===e.data.power&&n.props.showSnackbar("没有权限修改")}).catch(function(e){console.log(e)});var a="/shixuns/"+s+"/challenges/"+e+"/answer.json";x.a.get(a).then(function(e){401===e.data.status||e.data&&n.setState({answers:e.data})})}},{key:"render",value:function(){var a=this,e=this.state,t=e.choice_url,n=e.practice_url,s=e.go_back_url,l=e.position,r=(e.task_pass_default,e.submit_url,e.shixunId),c=e.checkpointId,o=e.power,i=e.prev_challenge,m=e.next_challenge,u=e.answers,p="/shixuns/"+r+"/challenges/"+c+"/editcheckpoint",h="/shixuns/"+r+"/challenges/"+c+"/tab=2",d="/shixuns/"+r+"/challenges/"+c+"/tab=3";return w.a.createElement(w.a.Fragment,null,w.a.createElement("div",{className:"educontent mt30 mb30 tpmAnswer"},w.a.createElement("div",{className:"padding10-20 mb10 edu-back-white clearfix"},w.a.createElement("span",{className:"fl ring-blue mr10 mt7"},w.a.createElement("img",{src:Object(y.M)("images/educoder/icon/code.svg"),"data-tip-down":"实训任务",className:"fl mt2 ml2"})),w.a.createElement("span",{className:"font-16 task-hide fl TPMtaskName"},"第",l,"关"),w.a.createElement(E.b,{to:void 0===s?"":s,className:"color-grey-6 fr font-15 mt3"},"返回"),void 0===i?"":w.a.createElement("a",{href:i,className:"fr color-blue mr15 mt4"},"上一关"),void 0===m?"":w.a.createElement("a",{href:m,className:"fr color-blue mr15 mt4"},"下一关"),w.a.createElement(E.b,{to:void 0===n?"":n,className:"fr color-blue mr15 mt4",style:{display:2===this.props.status||1===this.props.status?"none":"block"},"data-tip-down":"新增代码编辑类型的任务"},"+ 实践类型"),w.a.createElement(E.b,{to:void 0===t?"":t,className:"fr color-blue mr15 mt4",style:{display:2===this.props.status||1===this.props.status?"none":"block"},"data-tip-down":"新增选择题类型的任务"},"+ 选择题类型")),w.a.createElement("div",{className:"challenge_nav clearfix edu-back-white"},w.a.createElement("li",null,w.a.createElement(E.b,{to:p},"本关任务")),w.a.createElement("li",null,w.a.createElement(E.b,{to:h},"评测设置")),w.a.createElement("li",{className:"active"},w.a.createElement(E.b,{to:d},"参考答案"))),w.a.createElement("div",{className:"edu-back-white mb10 clearfix"},w.a.createElement("div",{className:"padding30-20"},w.a.createElement("p",{cla
|