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
210 KiB
1 line
210 KiB
5 years ago
|
(this.webpackJsonph5=this.webpackJsonph5||[]).push([[23,13,15],{1048:function(e,t,n){"use strict";var a=n(8),o=n(7),r=n(10),s=n(9),i=n(11),l=n(0),c=n.n(l),u=n(574),p=n(802),d=n(6),f=n.n(d),m=n(49),h=n.n(m),v=function(e){function t(e){var n;return Object(a.a)(this,t),(n=Object(r.a)(this,Object(s.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,o="YYYY-MM-DD HH:mm",r=!0===t&&void 0===a,s=!0===t||1===a,i=h()();n.setState({modalname:s?"\u7acb\u5373\u53d1\u5e03":"\u7acb\u5373\u622a\u6b62",modaltype:0<e.length?1:2,visible:!r,OneSelftype:r,Topval:s?"\u5b66\u751f\u5c06\u7acb\u5373\u6536\u5230\u4f5c\u4e1a":"\u5b66\u751f\u5c06\u4e0d\u80fd\u518d\u63d0\u4ea4\u4f5c\u54c1",Botval:n.props.fromListPage?s?"\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:s?"\u53d1\u5e03\u65f6\u95f4\uff1a".concat(i.format(o)):"",starttimes:s?"".concat(i.format(o)):"",endtime:s?"\u622a\u6b62\u65f6\u95f4\uff1a".concat(i.add(1,"months").add(1,"hours").minutes(0).format(o)):"",Cancelname:s?"\u6682\u4e0d\u53d1\u5e03":"\u6682\u4e0d\u622a\u6b62",Savesname:s?"\u7acb\u5373\u53d1\u5e03":"\u7acb\u5373\u622a\u6b62",Cancel:n.homeworkhide,Saves:n.homeworkstartend,typs:s?"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,o=e;if(n.usingCheckBeforePost&&(o=n.state.course_groups.map((function(e){return e.id}))),0<n.state.course_groups.length&&n.state.course_groups.length&&(!o||o&&0==o.length))n.props.showNotification("\u8bf7\u81f3\u5c11\u9009\u62e9\u4e00\u4e2a\u5206\u73ed");else{var r;r=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:o,end_time:t}:{homework_ids:n.props.checkBoxValues,group_ids:o,group_end_times:t,detail:!0};var s=n.props.isPublishtype,i=!0===a||1===s,l=n.props.match.params.coursesId,c="/courses/".concat(l,"/homework_commons/").concat(i?"publish_homework":"end_homework",".json");f.a.post(c,r).then((function(e){0==e.data.status&&(n.homeworkhide(),n.props.showNotification(i?"\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,o=n.props.match.params.coursesId,r="/courses/".concat(o,"/all_course_groups.json");1==n.props.checkBoxValues.length&&(n.props.isPublish,r="/homework_commons/".concat(n.props.checkBoxValues[0],"/").concat(a?"publish_groups":"end_groups",".json")),f.a.get(r,{}).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}return Objec
|