forked from jasder/forgeplus
39 lines
14 KiB
JavaScript
39 lines
14 KiB
JavaScript
webpackJsonp([277],{
|
|
|
|
/***/ 4968:
|
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
|
|
"use strict";
|
|
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_tooltip_style_css__ = __webpack_require__(173);
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_tooltip_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_tooltip_style_css__);
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_tooltip__ = __webpack_require__(172);
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_tooltip___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_tooltip__);
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css__ = __webpack_require__(57);
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css__);
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_input__ = __webpack_require__(58);
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3_antd_lib_input__);
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_radio_style_css__ = __webpack_require__(178);
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4_antd_lib_radio_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_4_antd_lib_radio_style_css__);
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_radio__ = __webpack_require__(176);
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5_antd_lib_radio___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_5_antd_lib_radio__);
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react__ = __webpack_require__(0);
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_6_react__);
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_axios__ = __webpack_require__(8);
|
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7_axios__);
|
|
var _createClass=function(){function defineProperties(target,props){for(var i=0;i<props.length;i++){var descriptor=props[i];descriptor.enumerable=descriptor.enumerable||false;descriptor.configurable=true;if("value"in descriptor)descriptor.writable=true;Object.defineProperty(target,descriptor.key,descriptor);}}return function(Constructor,protoProps,staticProps){if(protoProps)defineProperties(Constructor.prototype,protoProps);if(staticProps)defineProperties(Constructor,staticProps);return Constructor;};}();function _classCallCheck(instance,Constructor){if(!(instance instanceof Constructor)){throw new TypeError("Cannot call a class as a function");}}function _possibleConstructorReturn(self,call){if(!self){throw new ReferenceError("this hasn't been initialised - super() hasn't been called");}return call&&(typeof call==="object"||typeof call==="function")?call:self;}function _inherits(subClass,superClass){if(typeof superClass!=="function"&&superClass!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof superClass);}subClass.prototype=Object.create(superClass&&superClass.prototype,{constructor:{value:subClass,enumerable:false,writable:true,configurable:true}});if(superClass)Object.setPrototypeOf?Object.setPrototypeOf(subClass,superClass):subClass.__proto__=superClass;}var Curriculumtwo=function(_Component){_inherits(Curriculumtwo,_Component);//测试用
|
|
function Curriculumtwo(props){_classCallCheck(this,Curriculumtwo);// console.log(props);
|
|
var _this=_possibleConstructorReturn(this,(Curriculumtwo.__proto__||Object.getPrototypeOf(Curriculumtwo)).call(this,props));_this.updalevels=function(){var ec_course_id=_this.props.match.params.ec_course_id;var Url='/ec_courses/'+ec_course_id+'/score_level_data';__WEBPACK_IMPORTED_MODULE_7_axios___default.a.get(Url,{withCredentials:true}).then(function(response){if(response.status===200){_this.setState({levels:response.data.levels,ismanager:response.data.ismanager,editlevels:response.data.levels});}}).catch(function(error){console.log(error);});};_this.editecGrade=function(){_this.setState({editecGradetype:true});};_this.CancelecCourseEvaluationstop=function(){_this.updalevels();_this.setState({editecGradetype:false});};_this.SaveecCourseEvaluationstop=function(){var editlevels=_this.state.editlevels;var levels=editlevels;var ec_course_id=_this.props.match.params.ec_course_id;for(var i=0;i<levels.length;i++){if(levels[i].level===""){_this.setState({Modallisttypes:true,// Modallist:"等级名称不能为空",
|
|
listvaluey:i});return;}}var Url='/ec_courses/'+ec_course_id+'/crud_score_level';__WEBPACK_IMPORTED_MODULE_7_axios___default.a.post(Url,{levels:editlevels}).then(function(response){if(response.status===200){// this.setState({
|
|
// editecGradetype:false
|
|
// })
|
|
_this.updalevels();}}).catch(function(error){console.log(error);});};_this.deleteditecGrade=function(key){var editlevels=_this.state.editlevels;var neweditlevels=editlevels;// console.log(key)
|
|
neweditlevels.splice(key,1);_this.setState({editlevels:neweditlevels});};_this.additecGrade=function(key){var editlevels=_this.state.editlevels;var neweditlevels=editlevels;var list={score:0,level:""};neweditlevels.push(list);// console.log(key)
|
|
_this.setState({editlevels:neweditlevels});};_this.editlevelslist=function(e,key){var editlevels=_this.state.editlevels;var neweditlevels=editlevels;neweditlevels[key].level=e.target.value;_this.setState({editlevels:neweditlevels});};_this.editlevelslists=function(e,key){var editlevels=_this.state.editlevels;var neweditlevels=editlevels;var sum=parseInt(e.target.value);if(isNaN(sum)){sum=0;}neweditlevels[key].score=sum;_this.setState({editlevels:neweditlevels});};_this.hidemodeldelete=function(){_this.setState({Modallisttype:false});};_this.state={params:[],deletelist:[],ec_course_id:0,ec_course_name:undefined,ec_course_evaluation_lists:undefined,course_evaluation_lists:undefined,course_name:undefined,deletetype:"end",savetype:'',schooldata:{},course_url:undefined,Evaluationsparamstype:true,idkey:null,listid:null,Modallist:"",Modallisttype:false,titlemessage:"提示",savetypes:false,levels:undefined,editecGradetype:false,editlevels:undefined,listvaluey:null,Modallisttypes:false,ismanager:false};return _this;}_createClass(Curriculumtwo,[{key:'componentWillMount',value:function componentWillMount(){window.document.title="成绩等级设置";}},{key:'componentDidMount',value:function componentDidMount(){var _this2=this;console.log(this.props.match.params);this.props.Ontitine(this.props.match.params.type);var ec_course_id=706;var Url='/ec_courses/'+ec_course_id+'/score_levels.json';__WEBPACK_IMPORTED_MODULE_7_axios___default.a.get(Url).then(function(response){if(response.status===200){_this2.setState({levels:response.data.levels,ismanager:response.data.ismanager,editlevels:response.data.levels});}}).catch(function(error){console.log(error);});var jol='/ec_major_schools/get_navigation_data?ec_course_id='+ec_course_id;__WEBPACK_IMPORTED_MODULE_7_axios___default.a.get(jol,{withCredentials:true}).then(function(response){if(response.status===200){// if(response.data.allow_visit===false){
|
|
// window.location.href="/403"
|
|
// }
|
|
_this2.setState({schooldata:response.data});}}).catch(function(error){console.log(error);});}},{key:'render',value:function render(){var _this3=this;var RadioGroup=__WEBPACK_IMPORTED_MODULE_5_antd_lib_radio___default.a.Group;var _state=this.state,listvaluey=_state.listvaluey,params=_state.params,ec_course_evaluation_lists=_state.ec_course_evaluation_lists,ec_course_id=_state.ec_course_id,schooldata=_state.schooldata,course_name=_state.course_name,course_url=_state.course_url,idkey=_state.idkey,modeldelet=_state.modeldelet,listid=_state.listid,titlemessage=_state.titlemessage,Modallisttype=_state.Modallisttype,Modallist=_state.Modallist,savetypes=_state.savetypes,levels=_state.levels,editlevels=_state.editlevels,editecGradetype=_state.editecGradetype,Modallisttypes=_state.Modallisttypes,ismanager=_state.ismanager;console.log(ismanager);return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{className:'educontent fl'},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{className:'ListTableLine newSystem',id:'school_major_list'},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('p',{className:'clearfix Coursetitle',style:{width:"1200px"}},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'column-1 color-666 textalign '},'\u7B49\u7EA7\u540D\u79F0'),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'column-1 color-666 textalign'},'\u89C4\u5219'),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:ismanager===false?"none":"operationright color-666"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('a',{className:"newAddSubentry",'data-tip-down':'\u7F16\u8F91',onClick:this.editecGrade},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('i',{className:"iconfont icon-bianjidaibeijing color-green"})))),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('ul',{className:'edu-back-white',style:{display:editecGradetype===false?'block':'none'}},levels===undefined?"":levels.map(function(item,key){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('li',{className:'clearfix',key:key},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'column-1 textalign textalign'},item.level),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'column-1 task-hid a05101 textalign'},'\u5206\u6570',key>2?'<':'>= ',item.score));})),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{className:'ListTableLine newSystem',id:'school_major_list',style:{display:editecGradetype===false?'none':'block'}},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{className:'ant-spin ant-spin-spinning'},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',null,__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{className:'ListTableLine newSystem',id:'school_major_list'},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('p',{className:'clearfix Coursetitle GRADENEWFFF',style:{width:"1200px"}},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'column-1 color-666 textalign font-16'},'\u7B49\u7EA7\u540D\u79F0'),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'column-1 color-666 textalign font-16'},'\u89C4\u5219'),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'column-1 color-666 textalign font-16'},'\u5206\u503C'),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'column-3 textalign',style:{color:'#989898'}},'\uFF08\u8BF7\u6309\u7167\u5206\u6570\u7684\u964D\u5E8F\u65B9\u5F0F\u8FDB\u884C\u7B49\u7EA7\u7684\u5212\u5206\u8BBE\u7F6E\uFF09'))),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('ul',{className:'edu-back-white'},editlevels===undefined?"":editlevels.map(function(item,key){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('li',{className:'clearfix GRADENbottom',key:key},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'column-1 textalign textalign '},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default.a,{size:'large',className:parseInt(listvaluey)===key?"bor-red textalign":"textalign",style:{width:"100%"},value:item.level,index:key,onInput:function onInput(e){return _this3.editlevelslist(e,key);}})),key===editlevels.length-1?__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'column-1 task-hid a05101 textalign mt8'},'\u5C0F\u4E8E'):__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'column-1 task-hid a05101 textalign mt8'},'\u5927\u4E8E\u6216\u7B49\u4E8E'),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'column-1 textalign textalign '},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default.a,{size:'large',className:"textalign",style:{width:"100%"},value:item.score,index:key,onInput:function onInput(e){return _this3.editlevelslists(e,key);}})),key===editlevels.length-1?__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'column-3 GRADENpadding'},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('a',{className:'mr15 delSubentry'},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_tooltip___default.a,{placement:'bottom',title:'\u5220\u9664'},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('i',{className:'iconfont icon-shanchu color-grey-c font-17',onClick:function onClick(){return _this3.deleteditecGrade(key);}}))),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('a',{className:'newAddSubentry'},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_tooltip___default.a,{placement:'bottom',title:'\u6DFB\u52A0'},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('i',{className:'iconfont icon-tianjiafangda color-green additecGrade',onClick:function onClick(){return _this3.additecGrade(key);}})))):"");}),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('span',{className:'c_red none ml30',id:'error_tip',style:{display:Modallisttypes===true?"block":"none",width:'100px'}},'\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A')),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{className:'right editglybuttonbox mt20 mb20 mr20'},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{className:'defalutSubmitbtn fr',onClick:this.SaveecCourseEvaluationstop},'\u63D0\u4EA4'),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement('div',{className:'defalutCancelbtn fr mr20',onClick:this.CancelecCourseEvaluationstop},'\u53D6\u6D88')))))));}}]);return Curriculumtwo;}(__WEBPACK_IMPORTED_MODULE_6_react__["Component"]);/* harmony default export */ __webpack_exports__["default"] = (Curriculumtwo);
|
|
|
|
/***/ })
|
|
|
|
}); |