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/183.3af999b3.chunk.js

170 lines
55 KiB

5 years ago
webpackJsonp([183],{
/***/ 1031:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(1369);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 1070:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_tooltip_style_css__ = __webpack_require__(169);
/* 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__(168);
/* 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_react__ = __webpack_require__(0);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_react___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_2_react__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__css_Courses_css__ = __webpack_require__(326);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__css_Courses_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_3__css_Courses_css__);
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 CoursesListType=function(_Component){_inherits(CoursesListType,_Component);function CoursesListType(props){_classCallCheck(this,CoursesListType);var _this=_possibleConstructorReturn(this,(CoursesListType.__proto__||Object.getPrototypeOf(CoursesListType)).call(this,props));_this.state={// typelist:[],
// typesylename:"",
// tipval:""
};return _this;}_createClass(CoursesListType,[{key:'componentDidMount',value:function componentDidMount(){// let{typelist,typesylename,tipval}=this.props;
//
// this.setState({
// typelist:typelist,
// typesylename:typesylename,
// tipval:tipval
// })
// console.log("CoursesListType")
// console.log(typelist)
}},{key:'render',value:function render(){var _props=this.props,typelist=_props.typelist,typesylename=_props.typesylename,tipval=_props.tipval;return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{style:{display:'inline-block'}},typelist===undefined||typelist===403||typelist===401||typelist===407||typelist===408||typelist===409||typelist===500?"":typelist.map(function(item,key){return __WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_tooltip___default.a,{placement:'bottom',title:tipval,getPopupContainer:function getPopupContainer(){return document.querySelector('.TabsWarp');},key:key},__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{key:key},item==="公开"?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:"edu-filter-btn edu-filter-btn-4CACFF ml15 fl typestyle "+typesylename},'\u516C\u5F00'):"",item==="已开启补交"?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:"edu-filter-btn edu-filter-btn-028d01 ml15 fl typestyle "+typesylename},'\u5DF2\u5F00\u542F\u8865\u4EA4'):"",item==="未开启补交"?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:"edu-filter-btn edu-filter-btn-CC317C ml15 fl typestyle "+typesylename},'\u672A\u5F00\u542F\u8865\u4EA4'):"",item==="匿名作品"?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:"edu-filter-btn edu-filter-btn-006B75 ml15 fl typestyle "+typesylename},'\u533F\u540D\u4F5C\u54C1'):"",item==="已选择"?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:"edu-filter-btn edu-filter-btn-EDEDED ml15 fl typestyle color666666 "+typesylename},'\u5DF2\u9009\u62E9'):"",item==="已结束"?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:"edu-filter-btn edu-filter-btn-EDEDED ml15 fl typestyle color666666 "+typesylename},'\u5DF2\u7ED3\u675F'):"",item==="提交中"?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:"edu-filter-btn edu-filter-btn-4CACFF ml15 fl typestyle "+typesylename},'\u63D0\u4EA4\u4E2D'):"",item==="匿评中"?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:"edu-filter-btn edu-filter-btn-4CACFF ml15 fl typestyle "+typesylename},'\u533F\u8BC4\u4E2D'):"",item==="申诉中"?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:"edu-filter-btn edu-filter-btn-4CACFF ml15 fl typestyle "+typesylename},'\u7533\u8BC9\u4E2D'):"",item==="补交中"?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:"edu-filter-btn edu-filter-btn-4CACFF ml15 fl typestyle "+typesylename},'\u8865\u4EA4\u4E2D'):"",item==="评阅中"?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:"edu-filter-btn edu-filter-btn-4CACFF ml15 fl typestyle "+typesylename},'\u8BC4\u9605\u4E2D'):"",item==="待选中"?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:"edu-filter-btn edu-filter-btn-4CACFF ml15 fl typestyle "+typesylename},'\u5F85\u9009\u4E2D'):"",item==="交叉评阅中"?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:"edu-filter-btn edu-filter-btn-4CACFF ml15 fl typestyle "+typesylename},'\u4EA4\u53C9\u8BC4\u9605\u4E2D'):"",item==="已开启交叉评阅"?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:"edu-filter-btn edu-filter-btn-E99695 ml15 fl typestyle "+typesylename},'\u5DF2\u5F00\u542F\u4EA4\u53C9\u8BC4\u9605'):"",item==="待确认"?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:"edu-filter-btn edu-filter-btn-5E5FB9 ml15 fl typestyle "+typesylename},'\u5F85\u786E\u8BA4'):"",item==="待处理"?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:"edu-filter-btn edu-filter-btn-5E5FB9 ml15 fl typestyle mr10 "+typesylename},'\u5F85\u5904\u7406'):"",item==="未发布"?__WEBPACK_IMPORTED_MODULE_2_react___default.a.createElement('span',{className:"edu-filter-btn edu-filter-btn-84B6EB m
// "已开启补交",
// "未开启补交",
// "匿名作品",
// "已选择",
// "已结束",
// "提交中",
// "匿评中",
// "申诉中",
// "补交中",
// "评阅中",
// "待选中",
// "交叉评阅中",
// "已开启交叉评阅",
// "待确认",
// "待处理",
// "未发布",
// "私有",
// "未提交",
// "已确认",
// "已截止",
// ]
/***/ }),
/***/ 1369:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".polllisthover:hover{-webkit-box-shadow:0 2px 6px rgba(51,51,51,.09);box-shadow:0 2px 6px rgba(51,51,51,.09);opacity:1;border-radius:2px}.workList_Item{display:-ms-flexbox;display:flex;background-color:#fff;margin-bottom:20px;padding-top:10px}p span{cursor:default}.mt-5{margin-top:-5px}.bankNav li{float:left;margin-right:20px}.bankNav li:last-child{margin-right:0}.bankNav li.active a{color:#fff!important;background-color:#4cacff}.bankNav li a{display:block;padding:0 10px;height:28px;line-height:28px;background-color:#f5f5f5;border-radius:36px;color:#666!important}.task_menu_ul{width:600px}.task_menu_ul .ant-menu-item,.task_menu_ul .ant-menu-submenu-title{padding:0;margin-right:30px;line-height:68px;font-size:16px}.ant-menu{color:#05101a}.task_menu_ul .ant-menu-horizontal{border-bottom:none}.task_menu_ul .ant-menu-horizontal>.ant-menu-item:hover{border-bottom:2px solid transparent}.task_menu_ul .ant-menu-horizontal>.ant-menu-item-selected{border-bottom:2px solid #4cacff!important}.sourceTag a{display:block;float:left;background-color:#e5f3ff;padding:0 10px;height:24px;line-height:24px;color:#4e7a9b;margin:5px 0 5px 10px}.sourceTag a.active{color:#fff;background-color:#4cacff}", "", {"version":3,"sources":["/Users/hs/edu/educoder/public/react/src/modules/courses/css/busyWork.css"],"names":[],"mappings":"AACA,qBACE,gDAAoD,AAC5C,wCAA4C,AACpD,UAAW,AACX,iBAAmB,CACpB,AAED,eAEE,oBAAqB,AACrB,aAAc,AACd,sBAAuB,AACvB,mBAAoB,AACpB,gBAAkB,CACnB,AACD,OACE,cAAgB,CACjB,AACD,MAAO,eAAgB,CAAC,AAIxB,YACE,WAAY,AACZ,iBAAmB,CACpB,AACD,uBACE,cAAkB,CACnB,AACD,qBACE,qBAAsB,AACtB,wBAA0B,CAC3B,AACD,cACE,cAAe,AACf,eAAiB,AACjB,YAAa,AACb,iBAAkB,AAClB,yBAA0B,AAC1B,mBAAoB,AACpB,oBAAyB,CAC1B,AAID,cACE,WAAa,CACd,AAED,mEACE,UAAY,AACZ,kBAAmB,AACnB,iBAAkB,AAClB,cAAgB,CACjB,AACD,UACE,aAAe,CAChB,AACD,mCACE,kBAAoB,CACrB,AACD,wDACE,mCAAoC,CACrC,AACD,2DACE,yCAA4C,CAC7C,AAED,aACE,cAAe,AACf,WAAY,AACZ,yBAAyB,AACzB,eAAkB,AAClB,YAAa,AACb,iBAAkB,AAClB,cAAe,AACf,qBAAwB,CACzB,AACD,oBACE,WAAe,wBAAyB,CACzC","file":"busyWork.css","sourcesContent":["\n.polllisthover:hover {\n -webkit-box-shadow: 0px 2px 6px rgba(51,51,51,0.09);\n box-shadow: 0px 2px 6px rgba(51,51,51,0.09);\n opacity: 1;\n border-radius: 2px;\n}\n\n.workList_Item{\n /* padding:20px 30px; */\n display: -ms-flexbox;\n display: flex;\n background-color: #fff;\n margin-bottom: 20px;\n padding-top: 10px;\n}\np span{\n cursor: default;\n}\n.mt-5{ margin-top:-5px;}\n\n\n/* <20><><EFBFBD>ѡ<EFBFBD><D1A1>tab */\n.bankNav li{\n float: left;\n margin-right: 20px;\n}\n.bankNav li:last-child{\n margin-right: 0px;\n}\n.bankNav li.active a{\n color: #fff!important;\n background-color: #4CACFF;\n}\n.bankNav li a{\n display: block;\n padding:0px 10px;\n height: 28px;\n line-height: 28px;\n background-color: #F5F5F5;\n border-radius: 36px;\n color: #666666!important;\n}\n\n\n\n.task_menu_ul{\n width: 600px;\n}\n\n.task_menu_ul .ant-menu-item,.task_menu_ul .ant-menu-submenu-title{\n padding:0px;\n margin-right: 30px;\n line-height: 68px;\n font-size: 16px;\n}\n.ant-menu{\n color: #05101a;\n}\n.task_menu_ul .ant-menu-horizontal{\n border-bottom: none;\n}\n.task_menu_ul .ant-menu-horizontal > .ant-menu-item:hover{\n border-bottom:2px solid transparent;\n}\n.task_menu_ul .ant-menu-horizontal > .ant-menu-item-selected{\n border-bottom: 2px solid #4CACFF !important;\n}\n\n.sourceTag a{\n display: block;\n float: left;\n background-color:#E5F3FF;\n padding: 0px 10px;\n height: 24px;\n line-height: 24px;\n color: #4E7A9B;\n margin:5px 0px 5px 10px;\n}\n.sourceTag a.active{\n color: #FFFFFF;background-color:#4CACFF; \n}\n\n"],"sourceRoot":""}]);
// exports
/***/ }),
/***/ 1434:
/***/ (function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(1498);
if(typeof content === 'string') content = [[module.i, content, '']];
// Prepare cssTransformation
var transform;
var options = {"hmr":false}
options.transform = transform
// add the styles to the DOM
var update = __webpack_require__(313)(content, options);
if(content.locals) module.exports = content.locals;
/***/ }),
/***/ 1498:
/***/ (function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(312)(true);
// imports
// module
exports.push([module.i, ".ant-form{color:#05101a}.ant-checkbox-disabled+span,.ant-radio-disabled+span{color:#666!important;cursor:default}.ant-radio-wrapper{color:#666!important}.ant-checkbox-wrapper+.ant-checkbox-wrapper{margin-left:0!important}.ant-select-selection,.ant-select-selection-selected-value{min-height:40px;min-line-height:40px}.ml61{margin-left:61px}.w64{width:64px}.w55{width:55px!important}.max1010{width:1010px!important;max-width:1010px!important}.yw18{min-width:18px}.chooseAnswer{display:inline-block;width:68px;text-align:center;height:24px;line-height:24px;background:#ededed;color:#666;margin-left:10px;border-radius:12px}.problemShow{padding:30px;border-bottom:1px solid #eee}.problemShow:last-child{border-bottom:none}.invite-tipysls{position:absolute;top:-8px;right:140px;color:#fff;-webkit-box-sizing:border-box;box-sizing:border-box;width:170px;text-align:center;border-radius:2px;background-color:rgba(5,16,26,.6)}.yslinvitetip{display:block;right:-16px}.right-black-trangle,.yslinvitetip{border-width:8px;position:absolute;top:10px;border-style:dashed solid dashed dashed;border-color:transparent transparent transparent rgba(5,16,26,.6);font-size:0;line-height:0}.right-black-trangle{left:-16px}.right-black-trangles{top:10px;left:-16px;border-color:transparent rgba(5,16,26,.6) transparent transparent}.right-black-trangles,.top-black-trangle{border-width:8px;position:absolute;border-style:dashed solid dashed dashed;font-size:0;line-height:0}.top-black-trangle{top:-16px;right:4px;border-color:transparent transparent rgba(5,16,26,.6)}.invite-tipysl{color:#999;-webkit-box-sizing:border-box;box-sizing:border-box;text-align:center;border-radius:2px;font-size:14px}.edu-position-hideysl li a:hover{background:#f1f1f1;color:#05101a}.to-back-left{width:0;height:0;margin-top:27px;border-right:15px solid #fafafa;border-top:10px solid transparent;border-bottom:10px solid transparent}.unlimit{height:24px;line-height:24px;padding:0 10px;border-radius:12px;cursor:pointer;border:1px solid #cdcdcd;color:#666}.unlimit.active{background-color:#4cacff;border:1px solid #4cacff;color:#fff}.edu-table tbody tr:last-child td,.edu-table thead th{border-bottom:none!important}.edu-table tbody tr:hover td{background-color:#fff!important}.countList p.countHeader{background-color:#f8f8f8;color:#666;height:38px;font-size:16px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;display:-webkit-flex}.countList p.countHeader ul{width:100%;padding:0 30px}.countList div.countBody span,.countList p.countHeader span{float:left}.countList div.countBody{margin:0 30px;border-bottom:1px solid #ebebeb;padding:12px 0}.countList div.countBody:last-child{border-bottom:none}.countList div.countBody span:first-child,.countList p.countHeader span:first-child{width:50%;text-align:left}.countList div.countBody span:nth-child(2),.countList p.countHeader span:nth-child(2){width:15%;text-align:center}.countList div.countBody span:nth-child(3),.countList p.countHeader span:nth-child(3){width:35%;text-align:left}.percentForm{width:330px;background:#f5f5f5;position:relative;margin-top:7px}.percentForm,.percentValue{height:11px;border-radius:6px}.percentValue{position:absolute;top:0;left:0;background:#29bd8b}.answerTxt{max-height:500px;background-color:#f2f9ff;width:100%;margin-top:10px;padding:10px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#4c4c4c}.otherTxt{border:none!important;border-bottom:1px solid #eee!important;background:transparent!important;-ms-flex:1 1;flex:1 1;height:20px!important;line-height:20px!important}.otherTxt.ant-input:focus,.otherTxt.ant-input:hover{border:none!important;border-bottom:1px solid #eee!important;background:#f8f8f8!important}.mustAnswer{padding:0 10px;border-radius:15px;height:22px;line-height:22px;background:#eaeaea;color:#999;font-size:14px}.previewList{border-bottom:1px solid #ebebeb}.previewList:last-child{border-bottom:none}.textLine{-ms-flex:1 1;flex:1 1;height:22px;border-bottom:1px solid #ebebeb}.answerList{margin-bottom:20px}.answerList,.answerList li{-webkit-box-sizing:borde
// exports
/***/ }),
/***/ 4608:
/***/ (function(module, __webpack_exports__, __webpack_require__) {
"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_checkbox_style_css__ = __webpack_require__(317);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_antd_lib_checkbox_style_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_antd_lib_checkbox_style_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_checkbox__ = __webpack_require__(314);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_antd_lib_checkbox___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1_antd_lib_checkbox__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_antd_lib_input_style_css__ = __webpack_require__(68);
/* 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__(69);
/* 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__(177);
/* 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__(175);
/* 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__css_members_css__ = __webpack_require__(329);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7__css_members_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_7__css_members_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__css_busyWork_css__ = __webpack_require__(1031);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__css_busyWork_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_8__css_busyWork_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__pollStyle_css__ = __webpack_require__(1434);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__pollStyle_css___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_9__pollStyle_css__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_moment__ = __webpack_require__(86);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_10_moment___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_10_moment__);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_11_educoder__ = __webpack_require__(5);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_12__modals_Modals__ = __webpack_require__(173);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_13__coursesPublic_CoursesListType__ = __webpack_require__(1070);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_axios__ = __webpack_require__(15);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_14_axios___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_14_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 map={1:"单选题",2:"多选题",3:"主观题"};var statudmap={1:"未发布",2:"提交中",3:"已截止"};var PollInfo=function(_Component){_inherits(PollInfo,_Component);function PollInfo(props){_classCallCheck(this,PollInfo);var _this=_possibleConstructorReturn(this,(PollInfo.__proto__||Object.getPrototypeOf(PollInfo)).call(this,props));_this.handleScroll=function(){if(parseInt(window.scrollY)>230){_this.setState({questionPanelFixed:true});}else{_this.setState({questionPanelFixed:false});}};_this.scrollToAnchor=function(index){var name="Anchor_"+index;if(index){var anchorElement=document.getElementById(name);if(anchorElement){anchorElement.scrollIntoView();}}};_this.getInfo=function(){_this.setState({courseName:_this.props.current_user.course_name});var pollId=_this.props.match.params.pollId;var user_id=_this.props.match.params.login;var url="/polls/"+pollId+"/start_answer.json?login="+user_id;__WEBPACK_IMPORTED_MODULE_14_axios___default.a.get(url).then(function(result){if(result.status==200){_this.setState({poll:result.data.poll,question_answered:result.data.question_answered,question_types:result.data.question_types,questions:result.data.questions});var list=[];for(var i=0;i<result.data.questions.length;i++){list.push({id:result.data.questions[i].question.id,text:result.data.questions[i].question.poll_vote_texts||"",is_necessary:result.data.questions[i].question.is_necessary,answers:result.data.questions[i].question.poll_answer_ids,answersList:result.data.questions[i].question.answers});}_this.setState({inputArray:list});}}).catch(function(error){console.log(error);});};_this.ChangeOptionSingle=function(item){var arr=item.target.name;var txt=Object.assign({},_this.state.inputArray[parseInt(arr[1])]);var ids=item.target.value;var list=txt.answersList.filter(function(element){return element.answer_id==ids;});_this.postAnswer(arr[0],ids,list[0].answer_text=="其他"?txt.text:"",arr[1]);};_this.ChangeOptionMuntil=function(a_id,q_id,key){var ind=Object.assign({},_this.state.inputArray[parseInt(key)]);var count=0;a_id.forEach(function(element){var list=ind.answersList.filter(function(item){return item.answer_id==element;});if(list[0].answer_text=="其他"){count++;}});_this.postAnswer(q_id,a_id,count>0?ind.text:"",key);};_this.postAnswer=function(q_id,a_id,text,key){var url="/poll_questions/"+q_id+"/poll_votes.json";console.log(text);__WEBPACK_IMPORTED_MODULE_14_axios___default.a.post(url,{poll_answer_id:a_id,vote_text:text}).then(function(result){if(result){var answer=Object.assign({},_this.state.question_answered[parseInt(key)]);answer.ques_status=result.data.poll_vote.question_status;var question_answered=_this.state.question_answered;question_answered[parseInt(key)]=answer;var inputs=Object.assign({},_this.state.inp
if(!prevProps.current_user&&this.props.current_user){this.getInfo();}}},{key:"componentDidMount",value:function componentDidMount(){if(this.props.current_user){this.getInfo();}//window.addEventListener('scroll', this.handleScroll);
}// 滚动定位
//选中选择题(单选题)选项保存
//选中选择题(多选题)选项保存
//输入其它--内容
//输入其它--内容后重新保存
//提交主观题
// 提交
},{key:"render",value:function render(){var _this2=this;var coursesId=this.props.match.params.coursesId;var _state=this.state,poll=_state.poll,question_answered=_state.question_answered,question_types=_state.question_types,questions=_state.questions,courseName=_state.courseName,inputArray=_state.inputArray,modalsType=_state.modalsType,modalsTopval=_state.modalsTopval,loadtype=_state.loadtype,modalsBottomval=_state.modalsBottomval,modalSave=_state.modalSave,questionPanelFixed=_state.questionPanelFixed;var current_user=this.props.current_user;var isAdmin=this.props.isAdmin();var isStudent=this.props.isStudent();document.title=courseName&&courseName;return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"newMain",style:{paddingTop:"0px"}},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_12__modals_Modals__["a" /* default */],{modalsType:modalsType,modalsTopval:modalsTopval,modalsBottomval:modalsBottomval,loadtype:loadtype,modalCancel:this.cancelSubmit,modalSave:modalSave}),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"educontent mt10 mb50"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("p",{className:"clearfix mb20"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_educoder__["A" /* WordsBtn */],{style:"grey",className:"fl",to:current_user&&current_user.first_category_url},courseName),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("span",{className:"color-grey-9 fl ml3 mr3"},">"),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_educoder__["A" /* WordsBtn */],{style:"grey",className:"fl",to:"/courses/"+this.props.match.params.coursesId+"/polls/"+(poll&&poll.left_banner_id)},"\u95EE\u5377"),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("span",{className:"color-grey-9 fl ml3 mr3"},">"),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_educoder__["A" /* WordsBtn */],{style:"grey",to:"/courses/"+coursesId+"/polls/"+this.props.match.params.pollId+"/detail",className:"fl mr3"},"\u95EE\u5377\u8BE6\u60C5"),">",__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("span",{className:"ml3"},question_types&&question_types.user_name)),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("p",{className:"clearfix mb20"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("span",{className:"color-grey-3 font-24 fl task-hide break-word",style:{maxWidth:"900px",lineHeight:"30px"}},poll&&poll.polls_name),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_13__coursesPublic_CoursesListType__["a" /* default */],{typelist:[""+statudmap[poll&&poll.poll_status]],typesylename:""}),isAdmin||poll&&poll.user_poll_status==1?__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_11_educoder__["A" /* WordsBtn */],{className:"fr font-16 mt5",style:"grey",to:"/courses/"+coursesId+"/polls/"+this.props.match.params.pollId+"/detail"},"\u8FD4\u56DE"):''),poll&&poll.polls_description&&__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("p",{style:{backgroundColor:"#F2F9FF",whiteSpace:"pre-wrap"},className:"color-blue pl30 pr30 pt15 pb15"},poll.polls_description),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"edu-back-white"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("p",{className:"padding20-30 bor-bottom-greyE"},question_types&&question_types.q_counts>0&&__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("span",{className:"color-grey-3"},"\u5408\u8BA1",question_types.q_counts,"\u9898\uFF1A"),question_types&&question_types.q_singles>0&&__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("span",{className:"color-grey-9 mr15"},"\u5355\u9009\u9898",question_types.q_singles,"\u9898"),question_types&&question_types.q_doubles>0&&__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("span",{className:"color-grey-9 mr15"},"\u591A\u9009\u9898",question_t
item.question.question_type==1&&__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_radio___default.a.Group,{disabled:isAdmin||isStudent&&poll&&poll.user_poll_status==1?true:false,className:"answerList",defaultValue:item.question.poll_answer_ids[0],name:[item.question.id,key],onChange:_this2.ChangeOptionSingle},item.question.answers&&item.question.answers.map(function(i,k){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("li",{className:i.answer_text=="其他"?"df clearfix":"clearfix"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_5_antd_lib_radio___default.a,{name:[item.question.id,key],className:"fl",value:i.answer_id}),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("span",{className:"break-word fl",style:{maxWidth:"1116px"}},i.answer_text),i.answer_text=="其他"?__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Fragment,null,inputArray&&inputArray.map(function(j,k){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Fragment,null,j.id==item.question.id?__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default.a,{type:"text",className:"otherTxt",autoComplete:"off",value:j.text&&j.text,name:key,onInput:_this2.blurTxt,onBlur:function onBlur(e){return _this2.saveInputAndAnswer(e,i.answer_id,item.question.id,key,item.question.question_type);}}):"");})):"");})),//多选
item.question.question_type==2&&__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_checkbox___default.a.Group,{onChange:function onChange(value){return _this2.ChangeOptionMuntil(value,item.question.id,key);},disabled:isAdmin||isStudent&&poll&&poll.user_poll_status==1?true:false,defaultValue:item.question.poll_answer_ids,className:"answerList",name:key},item.question.answers&&item.question.answers.map(function(i,k){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("li",{className:i.answer_text=="其他"?"df clearfix":"clearfix"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_1_antd_lib_checkbox___default.a,{className:"fl mr8",value:i.answer_id,key:i.answer_id}),__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("span",{className:"break-word fl",style:{maxWidth:"1116px"}},i.answer_text),i.answer_text=="其他"?__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Fragment,null,inputArray&&inputArray.map(function(j,k){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Fragment,null,j.id==item.question.id?__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_3_antd_lib_input___default.a,{type:"text",className:"otherTxt",autoComplete:"off",value:j.text&&j.text,name:key,onInput:_this2.blurTxt,onBlur:function onBlur(e){return _this2.saveInputAndAnswer(e,i.answer_id,item.question.id,key,item.question.question_type);}}):"");})):"");})),//主观题
item.question.question_type==3&&__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"mt10 pl30 pr30 pb20"},inputArray&&inputArray.map(function(j,k){return __WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement(__WEBPACK_IMPORTED_MODULE_6_react___default.a.Fragment,null,j.id==item.question.id?__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("textarea",{placeholder:"\u5728\u6B64\u586B\u5165\u7B54\u6848",disabled:isAdmin||isStudent&&poll&&poll.user_poll_status==1?true:false,value:j.text&&j.text,className:"winput-100-130",name:key,onInput:_this2.blurTxt,onBlur:function onBlur(){return _this2.commitText(key,item.question.id);}}):"");})));}))),isStudent&&poll&&poll.user_poll_status==0?__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("div",{className:"mt30 mb50"},__WEBPACK_IMPORTED_MODULE_6_react___default.a.createElement("a",{type:"primary",className:"defalutSubmitbtn",onClick:this.submitPoll},"\u63D0\u4EA4")):""));}}]);return PollInfo;}(__WEBPACK_IMPORTED_MODULE_6_react__["Component"]);/* harmony default export */ __webpack_exports__["default"] = (PollInfo);
/***/ })
});