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
302 KiB
1 line
302 KiB
5 years ago
|
(this.webpackJsonph5=this.webpackJsonph5||[]).push([[18,6,7,13,15,151],{1048:function(e,t,n){"use strict";var a=n(8),r=n(7),o=n(10),i=n(9),l=n(11),s=n(0),c=n.n(s),u=n(574),p=n(802),f=n(6),d=n.n(f),m=n(49),h=n.n(m),v=function(e){function t(e){var n;return Object(a.a)(this,t),(n=Object(o.a)(this,Object(i.a)(t).call(this,e))).open=function(e){n.usingCheckBeforePost=1==e,n.homeworkstart()},n.homeworkstart=function(){var e=n.props.isPublish,t=n.props.isPublishtype,a=!0===e||1===t;n.props.checkBoxValues&&0!=n.props.checkBoxValues.length?n.fetchCourseGroups():n.props.showNotification("\u8bf7\u5148\u9009\u62e9\u8981\u7acb\u5373".concat(a?"\u53d1\u5e03":"\u622a\u6b62","\u7684\u4f5c\u4e1a"))},n.showDialog=function(e){var t=n.props.isPublish,a=n.props.isPublishtype,r="YYYY-MM-DD HH:mm",o=!0===t&&void 0===a,i=!0===t||1===a,l=h()();n.setState({modalname:i?"\u7acb\u5373\u53d1\u5e03":"\u7acb\u5373\u622a\u6b62",modaltype:0<e.length?1:2,visible:!o,OneSelftype:o,Topval:i?"\u5b66\u751f\u5c06\u7acb\u5373\u6536\u5230\u4f5c\u4e1a":"\u5b66\u751f\u5c06\u4e0d\u80fd\u518d\u63d0\u4ea4\u4f5c\u54c1",Botval:n.props.fromListPage?i?"\u672c\u64cd\u4f5c\u53ea\u5bf9\u201c\u672a\u53d1\u5e03\u201d\u7684\u4f5c\u4e1a\u6709\u6548":"\u672c\u64cd\u4f5c\u53ea\u5bf9\u201c\u63d0\u4ea4\u4e2d\u201d\u7684\u4f5c\u4e1a\u6709\u6548":"",starttime:i?"\u53d1\u5e03\u65f6\u95f4\uff1a".concat(l.format(r)):"",starttimes:i?"".concat(l.format(r)):"",endtime:i?"\u622a\u6b62\u65f6\u95f4\uff1a".concat(l.add(1,"months").add(1,"hours").minutes(0).format(r)):"",Cancelname:i?"\u6682\u4e0d\u53d1\u5e03":"\u6682\u4e0d\u622a\u6b62",Savesname:i?"\u7acb\u5373\u53d1\u5e03":"\u7acb\u5373\u622a\u6b62",Cancel:n.homeworkhide,Saves:n.homeworkstartend,typs:i?"start":"end"})},n.homeworkhide=function(){n.setState({modalname:void 0,modaltype:void 0,visible:!1,OneSelftype:!1,Topval:void 0,Topvalright:void 0,Botvalleft:void 0,Botval:void 0,starttime:void 0,endtime:void 0,Cancelname:void 0,Savesname:void 0,Cancel:void 0,Saves:void 0,StudentList_value:void 0,addname:void 0,addnametype:!1,addnametab:void 0})},n.homeworkstartend=function(e,t){if(n.usingCheckBeforePost&&n.props.checkBeforePost&&!n.props.checkBeforePost())n.homeworkhide();else{var a=n.props.isPublish,r=e;if(n.usingCheckBeforePost&&(r=n.state.course_groups.map((function(e){return e.id}))),0<n.state.course_groups.length&&n.state.course_groups.length&&(!r||r&&0==r.length))n.props.showNotification("\u8bf7\u81f3\u5c11\u9009\u62e9\u4e00\u4e2a\u5206\u73ed");else{var o;o=e&&0===e.length?{homework_ids:n.props.checkBoxValues,end_time:"Invalid date"===t?void 0:t}:!0===n.props.islist?{homework_ids:n.props.checkBoxValues,group_ids:r,end_time:t}:{homework_ids:n.props.checkBoxValues,group_ids:r,group_end_times:t,detail:!0};var i=n.props.isPublishtype,l=!0===a||1===i,s=n.props.match.params.coursesId,c="/courses/".concat(s,"/homework_commons/").concat(l?"publish_homework":"end_homework",".json");d.a.post(c,o).then((function(e){0==e.data.status&&(n.homeworkhide(),n.props.showNotification(l?"\u7acb\u5373\u53d1\u5e03\u6210\u529f":"\u7acb\u5373\u622a\u6b62\u6210\u529f"),n.props.doWhenSuccess&&n.props.doWhenSuccess(),n.setState({visible:!1}),n.props.action&&n.props.action())})).catch((function(e){}))}}},n.fetchCourseGroups=function(){var e=n.props.isPublish,t=n.props.isPublishtype,a=!0===e||1===t,r=n.props.match.params.coursesId,o="/courses/".concat(r,"/all_course_groups.json");1==n.props.checkBoxValues.length&&(n.props.isPublish,o="/homework_commons/".concat(n.props.checkBoxValues[0],"/").concat(a?"publish_groups":"end_groups",".json")),d.a.get(o,{}).then((function(e){e&&-1!=e.data.status?(n.showDialog(e.data.course_groups),n.setState({course_groups:e.data.course_groups,starttimesend:void 0===e.data.end_time||null===e.data.end_time||""===e.data.end_time?void 0:e.data.end_time})):n.setState({visible:!1})})).catch((function(e){}))},n.state={course_groups:[],modalname:void 0,modaltype:void 0,visible:!1,Topval:void 0,Botvalleft:void 0,Botval:void 0,starttime:void 0,endtime:void 0,Cancelname:void 0,Savesname:void 0,Cancel:void 0,Saves:void 0,Topvalright:void 0},n}retu
|