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.
educoder/public/react/build/static/js/240.17ceaa5f.chunk.js

1 line
14 KiB

5 years ago
webpackJsonp([240],{4097:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a(67),n=(a.n(s),a(68)),E=a.n(n),l=a(178),i=(a.n(l),a(179)),c=a.n(i),r=a(168),o=(a.n(r),a(167)),y=a.n(o),u=a(295),m=(a.n(u),a(290)),N=a.n(m),p=a(0),w=a.n(p),P=a(45),C=a(308),h=a(12),d=a.n(h),f=a(340),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.S)(),Object(S.S)("/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 n=this,l=this.props.match.params.shixunId,i=this.props.match.params.checkpointId,c="/shixuns/"+l+"/challenges/newquestion",r="/shixuns/"+l+"/challenges/new",o="/shixuns/"+l+"/challenges";if(void 0===i){var e="/shixuns/"+l+"/challenges/new.json";d.a.get(e).then(function(e){n.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}),n.exercisememoMDRef.current.setValue(e.data.task_pass_default||"")}).catch(function(e){})}else{var t="/shixuns/"+l+"/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/"+l+"/challenges/"+a.id+"/editcheckpoint":"/shixuns/"+l+"/challenges/"+a.id+"/editquestion"),null!=s&&(s=0===s.st?"/shixuns/"+l+"/challenges/"+s.id+"/editcheckpoint":"/shixuns/"+l+"/challenges/"+s.id+"/editquestion"),n.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/"+l+"/challenges/"+i+"/tab=2",tab3url:"/shixuns/"+l+"/challenges/"+i+"/tab=3",exercisememoMDRefval:e.data.task_pass}),!1===e.data.power&&n.props.showSnackbar("你没有权限修改"),n.exercisememoMDRef.current.setValue(e.data.task_pass||"")}).catch(function(e){})}}},{key:"render",value:function(){var a=this,e=(this.props.match.params.type,this.state),t=(e.marktype,e.shixunCreatePracticetype),s=e.shixunsskillvaluelisttype,n=e.choice_url,l=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 color-blue mr15 mt4"},"<EFBFBD><EFBFBD>