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.
p6tsc84h5/static/js/237.48cc9f6d.chunk.js

1 line
14 KiB

5 years ago
webpackJsonp([237],{4034:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a(66),l=(a.n(s),a(67)),E=a.n(l),n=a(178),i=(a.n(n),a(179)),c=a.n(i),r=a(168),o=(a.n(r),a(167)),y=a.n(o),u=a(296),m=(a.n(u),a(291)),N=a.n(m),p=a(0),w=a.n(p),P=a(45),C=a(309),h=a(12),d=a.n(h),f=a(341),S=(a.n(f),a(5)),x=function(e,t,a){return t&&v(e.prototype,t),a&&v(e,a),e};function v(e,t){for(var a=0;a<t.length;a++){var s=t[a];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}Object(S.Q)(),Object(S.Q)("/editormd/lib/");var g=window.$,j=N.a.Option,M=y.a.Group,b=(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)}(k,p.Component),x(k,[{key:"componentDidMount",value:function(){var l=this,n=this.props.match.params.shixunId,i=this.props.match.params.checkpointId,c="/shixuns/"+n+"/challenges/newquestion",r="/shixuns/"+n+"/challenges/new",o="/shixuns/"+n+"/challenges";if(void 0===i){var e="/shixuns/"+n+"/challenges/new.json";d.a.get(e).then(function(e){l.setState({choice_url:c,practice_url:r,go_back_url:o,position:e.data.position,task_pass_default:e.data.task_pass_default,submit_url:e.data.submit_url,checkpointId:i,exercisememoMDRefval:e.data.task_pass_default}),l.exercisememoMDRef.current.setValue(e.data.task_pass_default||"")}).catch(function(e){console.log(e)})}else{var t="/shixuns/"+n+"/challenges/"+i+".json?tab=0";d.a.get(t).then(function(e){var t=void 0;1===e.data.difficulty?t=[100,200]:2===e.data.difficulty?t=[300,400,500,600]:3===e.data.difficulty&&(t=[700,800,900,1e3]);var a=e.data.prev_challenge,s=e.data.next_challenge;null!=a&&(a=0===a.st?"/shixuns/"+n+"/challenges/"+a.id+"/editcheckpoint":"/shixuns/"+n+"/challenges/"+a.id+"/editquestion"),null!=s&&(s=0===s.st?"/shixuns/"+n+"/challenges/"+s.id+"/editcheckpoint":"/shixuns/"+n+"/challenges/"+s.id+"/editquestion"),l.setState({power:e.data.power,prev_challenge:a,next_challenge:s,choice_url:c,practice_url:r,go_back_url:o,shixunCreatePractice:e.data.subject,position:e.data.position,shixunCreatePracticeGroup:e.data.difficulty,optionsums:t,onshixunsmarkvalue:e.data.score,shixunsskillvaluelist:e.data.tags,checkpointId:i,exec_time:e.data.exec_time,tab2url:"/shixuns/"+n+"/challenges/"+i+"/tab=2",tab3url:"/shixuns/"+n+"/challenges/"+i+"/tab=3",exercisememoMDRefval:e.data.task_pass}),!1===e.data.power&&l.props.showSnackbar("你没有权限修改"),l.exercisememoMDRef.current.setValue(e.data.task_pass||"")}).catch(function(e){console.log(e)})}}},{key:"render",value:function(){var a=this,e=(this.props.match.params.type,this.state),t=(e.marktype,e.shixunCreatePracticetype),s=e.shixunsskillvaluelisttype,l=e.choice_url,n=e.practice_url,i=e.go_back_url,c=e.position,r=(e.task_pass_default,e.submit_url,e.setopen,e.checkpointId),o=e.prev_challenge,u=e.next_challenge,m=(e.power,e.shixunCreatePractice),p=e.shixunCreatePracticeGroup,h=e.onshixunsmarkvalue,d=e.shixunsskillvalue,f=e.shixunsskillvaluelist,x=e.tab2url,v=e.tab3url,g=e.optionsums,b=e.CreatePracticesendtype,k=e.editPracticesendtype,_=void 0;return null!=g&&(_=g.map(function(e,t){return w.a.createElement(j,{key:e,id:t},e)})),w.a.createElement(w.a.Fragment,null,w.a.createElement("div",{className:"educontent mt30 mb30"},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(S.M)("images/educoder/icon/code.svg"),"data-tip-down":"实训任务",className:"fl mt2 ml2"})),w.a.createElement("span",{className:"font-16 task-hide fl TPMtaskName"},"第",c,"关"),w.a.createElement(P.b,{to:void 0===i?"":i,className:"color-grey-6 fr font-15 mt3"},"返回"),void 0===u?"":w.a.createElement("a",{href:u,className:"fr color-blue mr15 mt4"},"下一关"),void 0===o?"":w.a.createElement("a",{href:o,className:"fr