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
7.4 KiB
1 line
7.4 KiB
webpackJsonp([239],{4063:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=a(162),n=(a.n(l),a(161)),c=a.n(n),s=a(65),o=(a.n(s),a(66)),r=a.n(o),i=a(166),d=(a.n(i),a(165)),u=a.n(d),m=a(0),p=a.n(m),v=a(12),f=a.n(v),h=function(e,t,a){return t&&y(e.prototype,t),a&&y(e,a),e};function y(e,t){for(var a=0;a<t.length;a++){var l=t[a];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(e,l.key,l)}}var g=(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)}(_,m.Component),h(_,[{key:"componentWillMount",value:function(){window.document.title="成绩等级设置"}},{key:"componentDidMount",value:function(){var t=this;console.log(this.props.match.params),this.props.Ontitine(this.props.match.params.type),f.a.get("/ec_courses/706/score_levels.json").then(function(e){200===e.status&&t.setState({levels:e.data.levels,ismanager:e.data.ismanager,editlevels:e.data.levels})}).catch(function(e){console.log(e)}),f.a.get("/ec_major_schools/get_navigation_data?ec_course_id=706",{withCredentials:!0}).then(function(e){200===e.status&&t.setState({schooldata:e.data})}).catch(function(e){console.log(e)})}},{key:"render",value:function(){var a=this,e=(u.a.Group,this.state),l=e.listvaluey,t=(e.params,e.ec_course_evaluation_lists,e.ec_course_id,e.schooldata,e.course_name,e.course_url,e.idkey,e.modeldelet,e.listid,e.titlemessage,e.Modallisttype,e.Modallist,e.savetypes,e.levels),n=e.editlevels,s=e.editecGradetype,o=e.Modallisttypes,i=e.ismanager;return console.log(i),p.a.createElement("div",{className:"educontent fl"},p.a.createElement("div",{className:"ListTableLine newSystem",id:"school_major_list"},p.a.createElement("p",{className:"clearfix Coursetitle",style:{width:"1200px"}},p.a.createElement("span",{className:"column-1 color-666 textalign "},"等级名称"),p.a.createElement("span",{className:"column-1 color-666 textalign"},"规则"),p.a.createElement("span",{className:!1===i?"none":"operationright color-666"},p.a.createElement("a",{className:"newAddSubentry","data-tip-down":"编辑",onClick:this.editecGrade},p.a.createElement("i",{className:"iconfont icon-bianjidaibeijing color-green"})))),p.a.createElement("ul",{className:"edu-back-white",style:{display:!1===s?"block":"none"}},void 0===t?"":t.map(function(e,t){return p.a.createElement("li",{className:"clearfix",key:t},p.a.createElement("span",{className:"column-1 textalign textalign"},e.level),p.a.createElement("span",{className:"column-1 task-hid a05101 textalign"},"分数",2<t?"<":">= ",e.score))})),p.a.createElement("div",{className:"ListTableLine newSystem",id:"school_major_list",style:{display:!1===s?"none":"block"}},p.a.createElement("div",{className:"ant-spin ant-spin-spinning"},p.a.createElement("div",null,p.a.createElement("div",{className:"ListTableLine newSystem",id:"school_major_list"},p.a.createElement("p",{className:"clearfix Coursetitle GRADENEWFFF",style:{width:"1200px"}},p.a.createElement("span",{className:"column-1 color-666 textalign font-16"},"等级名称"),p.a.createElement("span",{className:"column-1 color-666 textalign font-16"},"规则"),p.a.createElement("span",{className:"column-1 color-666 textalign font-16"},"分值"),p.a.createElement("span",{className:"column-3 textalign",style:{color:"#989898"}},"(请按照分数的降序方式进行等级的划分设置)"))),p.a.createElement("ul",{className:"edu-back-white"},void 0===n?"":n.map(function(e,t){return p.a.createElement("li",{className:"clearfix GRADENbottom",key:t},p.a.createElement("span",{className:"column-1 textalign textalign "},p.a.createElement(r.a,{size:"large",className:parseInt(l)===t?"bor-red textalign":"textalign",style:{width:"100%"},value:e.level,index:t,onInput:function(e){return a.editlevelslist(e,t)}})),t===n.length-1?p.a.createElement("span",{className:"column-1 task-hid a05101 textalign mt8"},"小于"):p.a.createElement("span",{className:"column-1 task-hid a05101 textalign mt8"},"大于或等于"),p.a.createElement("span",{className:"column-1 textalign textalign "},p.a.createElement(r.a,{size:"large",className:"textalign",style:{width:"100%"},value:e.score,index:t,onInput:function(e){return a.editlevelslists(e,t)}})),t===n.length-1?p.a.createElement("span",{className:"column-3 GRADENpadding"},p.a.createElement("a",{className:"mr15 delSubentry"},p.a.createElement(c.a,{placement:"bottom",title:"删除"},p.a.createElement("i",{className:"iconfont icon-shanchu color-grey-c font-17",onClick:function(){return a.deleteditecGrade(t)}}))),p.a.createElement("a",{className:"newAddSubentry"},p.a.createElement(c.a,{placement:"bottom",title:"添加"},p.a.createElement("i",{className:"iconfont icon-tianjiafangda color-green additecGrade",onClick:function(){return a.additecGrade(t)}})))):"")}),p.a.createElement("span",{className:"c_red none ml30",id:"error_tip",style:{display:!0===o?"block":"none",width:"100px"}},"内容不能为空")),p.a.createElement("div",{className:"right editglybuttonbox mt20 mb20 mr20"},p.a.createElement("div",{className:"defalutSubmitbtn fr",onClick:this.SaveecCourseEvaluationstop},"提交"),p.a.createElement("div",{className:"defalutCancelbtn fr mr20",onClick:this.CancelecCourseEvaluationstop},"取消")))))))}}]),_);function _(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,_);var s=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(_.__proto__||Object.getPrototypeOf(_)).call(this,e));return s.updalevels=function(){var e="/ec_courses/"+s.props.match.params.ec_course_id+"/score_level_data";f.a.get(e,{withCredentials:!0}).then(function(e){200===e.status&&s.setState({levels:e.data.levels,ismanager:e.data.ismanager,editlevels:e.data.levels})}).catch(function(e){console.log(e)})},s.editecGrade=function(){s.setState({editecGradetype:!0})},s.CancelecCourseEvaluationstop=function(){s.updalevels(),s.setState({editecGradetype:!1})},s.SaveecCourseEvaluationstop=function(){for(var e=s.state.editlevels,t=e,a=s.props.match.params.ec_course_id,l=0;l<t.length;l++)if(""===t[l].level)return void s.setState({Modallisttypes:!0,listvaluey:l});var n="/ec_courses/"+a+"/crud_score_level";f.a.post(n,{levels:e}).then(function(e){200===e.status&&s.updalevels()}).catch(function(e){console.log(e)})},s.deleteditecGrade=function(e){var t=s.state.editlevels;t.splice(e,1),s.setState({editlevels:t})},s.additecGrade=function(e){var t=s.state.editlevels;t.push({score:0,level:""}),s.setState({editlevels:t})},s.editlevelslist=function(e,t){var a=s.state.editlevels;a[t].level=e.target.value,s.setState({editlevels:a})},s.editlevelslists=function(e,t){var a=s.state.editlevels,l=parseInt(e.target.value);isNaN(l)&&(l=0),a[t].score=l,s.setState({editlevels:a})},s.hidemodeldelete=function(){s.setState({Modallisttype:!1})},s.state={params:[],deletelist:[],ec_course_id:0,ec_course_name:void 0,ec_course_evaluation_lists:void 0,course_evaluation_lists:void 0,course_name:void 0,deletetype:"end",savetype:"",schooldata:{},course_url:void 0,Evaluationsparamstype:!0,idkey:null,listid:null,Modallist:"",Modallisttype:!1,titlemessage:"提示",savetypes:!1,levels:void 0,editecGradetype:!1,editlevels:void 0,listvaluey:null,Modallisttypes:!1,ismanager:!1},s}t.default=g}}); |