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/187.1d0ce8df.chunk.js

1 line
14 KiB

6 years ago
webpackJsonp([187],{3464:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a(64),n=(a.n(s),a(65)),E=a.n(n),l=a(183),i=(a.n(l),a(184)),c=a.n(i),r=a(166),o=(a.n(r),a(162)),y=a.n(o),u=a(290),m=(a.n(u),a(287)),N=a.n(m),p=a(0),w=a.n(p),P=a(45),C=a(312),h=a(26),d=a.n(h),f=a(340),S=(a.n(f),a(8)),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.N)(),Object(S.N)("/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 e,a=this,t=(this.props.match.params.type,this.state),s=(t.marktype,t.shixunCreatePracticetype),n=t.shixunsskillvaluelisttype,l=t.choice_url,i=t.practice_url,c=t.go_back_url,r=t.position,o=(t.task_pass_default,t.submit_url,t.setopen,t.checkpointId),u=t.prev_challenge,m=t.next_challenge,p=(t.power,t.shixunCreatePractice),h=t.shixunCreatePracticeGroup,d=t.onshixunsmarkvalue,f=t.shixunsskillvalue,x=t.shixunsskillvaluelist,v=t.tab2url,g=t.tab3url,b=t.optionsums,k=t.CreatePracticesendtype,_=t.editPracticesendtype;return e=b.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.J)("images/educoder/icon/code.svg"),"data-tip-down":"实训任务",className:"fl mt2 ml2"})),w.a.createElement("span",{className:"font-16 task-hide fl TPMtaskName"},"第",r,"关"),w.a.createElement(P.b,{to:void 0===c?"":c,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===m?"":w.a.createElement("a",{href:m,className:"fr color-blue mr15 mt4"},"下一关"),w.a.createE