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/dist/static/js/213.fa5e6bbb.chunk.js

1 line
15 KiB

(this.webpackJsonph5=this.webpackJsonph5||[]).push([[213],{2256:function(e,n,t){"use strict";t.r(n),t(498);var o=t(499),a=(t(104),t(60)),i=t(8),r=t(7),c=t(10),s=t(9),p=t(11),d=t(0),u=t.n(d),_=t(6),l=t.n(_),m=t(28),w=(t(1542),t(171)),g=function(e){function n(e){var t;return Object(i.a)(this,n),(t=Object(c.a)(this,Object(s.a)(n).call(this,e))).paginationonChanges=function(e){t.setState({page:e}),t.getdata(t.state.typeysl,e)},t.getdata=function(e,n){t.setState({isSpin:!0});var o=t.state.limit;l.a.get("/users/tidings.json",{params:{type:e,page:n,per_page:o}}).then((function(o){o&&t.setState({page:n,count:o.data.count,typeysl:e,isSpin:!1,data:null===o.data.tidings||void 0===o.data.tidings||o.data.tidings===[]||"[]"===o.data.tidings||0===o.data.tidings.length?void 0:o.data.tidings})})).catch((function(e){t.setState({isSpin:!1})}))},t.getdatas=function(){t.setState({isSpin:!0});var e=t.state,n=e.typeysl,o=e.page,a=e.limit;l.a.get("/users/tidings.json",{params:{type:n,page:o,per_page:a}}).then((function(e){e&&t.setState({page:o,count:e.data.count,typeysl:n,isSpin:!1,data:null===e.data.tidings||void 0===e.data.tidings||e.data.tidings===[]||"[]"===e.data.tidings||0===e.data.tidings.length?void 0:e.data.tidings})})).catch((function(e){t.setState({isSpin:!1})}))},t.gettourl=function(e){switch(e.container_type){case"ApplyUserAuthentication":if("Apply"===e.tiding_type){if(1===e.auth_type)return window.open("/admins/identity_authentications");if(2===e.auth_type)return window.open("/admins/professional_authentications")}return"System"===e.tiding_type?window.open("/account/certification"):void 0;case"CancelUserAuthentication":case"CancelUserProCertification":return window.open("/account/certification");case"ApplyAddDepartment":return"Apply"===e.tiding_type?window.open("/admins/department_applies"):"System"===e.tiding_type?window.open("/account/profile"):void 0;case"ApplyAddSchools":return"Apply"===e.tiding_type?window.open("/admins/unit_applies"):"System"===e.tiding_type?window.open("/account/profile"):void 0;case"ApplyAction":switch(e.parent_container_type){case"ApplyShixun":if("Apply"===e.tiding_type)return window.open("/admins/shixun_authorizations");if("System"===e.tiding_type)return window.open("/shixuns/".concat(e.identifier,"/challenges"));case"ApplySubject":if("Apply"===e.tiding_type)return window.open("/admins/subject_authorizations");if("System"===e.tiding_type)return window.open("/paths/".concat(e.parent_container_id));case"TrialAuthorization":if("Apply"===e.tiding_type)return window.open("/managements/trial_authorization");if("System"===e.tiding_type)return window.open("/account/profile")}return;case"JoinCourse":return window.open("/courses/".concat(e.belong_container_id,"/teachers"));case"StudentJoinCourse":if("Apply"===e.tiding_type)return window.open("/courses/".concat(e.belong_container_id,"/teachers"));if("System"===e.tiding_type)return window.open("/courses/".concat(e.belong_container_id,"/students"));case"DealCourse":case"TeacherJoinCourse":return window.open("/courses/".concat(e.belong_container_id,"/shixun_homeworks/").concat(e.container_id));case"Course":if("Delete"===e.tiding_type)return;return window.open("/courses/".concat(e.belong_container_id,"/shixun_homeworks/").concat(e.container_id));case"ArchiveCourse":return window.open("/courses/".concat(e.belong_container_id,"/shixun_homeworks/").concat(e.container_id));case"Shixun":return window.open("/shixuns/".concat(e.identifier,"/challenges"));case"Subject":return window.open("/paths/".concat(e.container_id));case"JournalsForMessage":switch(e.parent_container_type){case"Principal":return"";case"HomeworkCommon":return"normal"===e.homework_type?window.open("/courses/".concat(e.belong_container_id,"/common_homeworks/").concat(e.parent_container_id,"/question")):"group"===e.homework_type?window.open("/courses/".concat(e.belong_container_id,"/group_homeworks/").concat(e.parent_container_id,"/question")):"practice"===e.homework_type?window.open("/courses/".concat(e.belong_container_id,"/shixun_homeworks/").concat(e.parent_container_id,"/list?tab=1")):"";case"GraduationTopic":return window.open("/courses/".concat(e.belong_container_id,"/graduation_topics/").concat(e.parent_container_id,"/detail"));case"StudentWorksScore":return"normal"===e.homework_type?window.open("/courses/".concat(e.belong_container_id,"/common_homeworks/").concat(e.parent_container_id,"/question")):"group"===e.homework_type?window.open("/courses/".concat(e.belong_container_id,"/group_homeworks/").concat(e.parent_container_id,"/question")):"practice"===e.homework_type?window.open("/courses/".concat(e.belong_container_id,"/shixun_homeworks/").concat(e.parent_container_id,"/list?tab=1")):""}case"Memo":return window.open("/forums/".concat(e.parent_container_id));case"Message":return window.open("/forums/");case"Watcher":return window.open("/users/".concat(e.trigger_user.login,"/courses"));case"PraiseTread":case"Grade":return"";case"JoinProject":case"ReporterJoinProject":case"DealProject":case"ManagerJoinProject":return window.open("/projects/".concat(e.container_id));case"Poll":switch(e.parent_container_type){case"CommitPoll":default:return window.open("\t/courses/".concat(e.belong_container_id,"/polls/").concat(e.container_id))}case"Exercise":switch(e.parent_container_type){case"CommitExercise":case"ExerciseScore":return window.open("\t/courses/".concat(e.belong_container_id,"/exercises/").concat(e.container_id,"/student_exercise_list?tab=0"));default:return window.open("/courses/".concat(e.belong_container_id,"/exercises/").concat(e.container_id,"/student_exercise_list?tab=0"))}case"StudentGraduationTopic":case"DealStudentTopicSelect":return window.open("/courses/".concat(e.belong_container_id,"/graduation_topics/").concat(e.parent_container_id,"/detail"));case"GraduationTask":case"GraduationWork":return window.open("/courses/".concat(e.belong_container_id,"/graduation_tasks/").concat(e.container_id));case"GraduationWorkScore":return window.open("/courses/".concat(e.belong_container_id,"/graduation_tasks/").concat(e.parent_container_id));case"HomeworkCommon":switch(e.parent_container_type){case"AnonymousCommentFail":if("normal"===e.homework_type)return window.open("/courses/".concat(e.belong_container_id,"/common_homeworks/").concat(e.parent_container_id,"/list"));if("group"===e.homework_type)return window.open("/courses/".concat(e.belong_container_id,"/group_homeworks/").concat(e.parent_container_id,"/list"));if("practice"===e.homework_type)return window.open("/courses/".concat(e.belong_container_id,"/shixun_homeworks/").concat(e.parent_container_id,"/list?tab=0"));case"HomeworkPublish":if("normal"===e.homework_type)return window.open("/courses/".concat(e.belong_container_id,"/common_homeworks/").concat(e.parent_container_id,"/list"));if("group"===e.homework_type)return window.open("/courses/".concat(e.belong_container_id,"/group_homeworks/").concat(e.parent_container_id,"/list"));if("practice"===e.homework_type)return window.open("/courses/".concat(e.belong_container_id,"/shixun_homeworks/").concat(e.parent_container_id,"/list?tab=0"));case"AnonymousAppeal":if("normal"===e.homework_type)return window.open("/courses/".concat(e.belong_container_id,"/common_homeworks/").concat(e.parent_container_id,"/list"));if("group"===e.homework_type)return window.open("/courses/".concat(e.belong_container_id,"/group_homeworks/").concat(e.parent_container_id,"/list"));if("practice"===e.homework_type)return window.open("/courses/".concat(e.belong_container_id,"/shixun_homeworks/").concat(e.parent_container_id,"/list?tab=0"));default:if("normal"===e.homework_type)return window.open("/courses/".concat(e.belong_container_id,"/common_homeworks/").concat(e.parent_container_id,"/list"));if("group"===e.homework_type)return window.open("/courses/".concat(e.belong_container_id,"/group_homeworks/").concat(e.parent_container_id,"/list"));if("practice"===e.homework_type)return window.open("/courses/".concat(e.belong_container_id,"/shixun_homeworks/").concat(e.parent_container_id,"/list?tab=0"))}case"StudentWork":if("normal"===e.homework_type)return window.open("/courses/".concat(e.belong_container_id,"/common_homeworks/").concat(e.parent_container_id,"/").concat(e.container_id,"/appraise"));if("group"===e.homework_type)return window.open("/courses/".concat(e.belong_container_id,"/group_homeworks/").concat(e.parent_container_id,"/").concat(e.container_id,"/appraise"));if("practice"===e.homework_type)return window.open("/courses/".concat(e.belong_container_id,"/shixun_homeworks/").concat(e.parent_container_id,"/list?tab=0"));case"StudentWorksScore":case"StudentWorksScoresAppeal":return window.open("/courses/".concat(e.belong_container_id,"/common_homeworks/").concat(e.trigger_user.id,"/").concat(e.parent_container_id,"/appraise"));case"ChallengeWorkScore":return"";case"SendMessage":return window.open("/managements/mirror_repository");case"Journal":return window.open("/issues/".concat(e.parent_container_id));case"Issue":return window.open("/issues/".concat(e.container_id));case"PullRequest":return window.open("/projects/".concat(e.parent_container_id,"/pull_requests"));case"Department":return window.open("/account/profile");case"Library":if("Apply"===e.tiding_type)return window.open("/admins/library_applies");if("System"===e.tiding_type)return window.open("/moop_cases/".concat(e.container_id));case"ProjectPackage":if("Destroyed"===e.tiding_type)return;return"Destroyed_end"===e.tiding_type?void 0:"Apply"===e.tiding_type?window.open("/admins/project_package_applies"):window.open("/crowdsourcing/".concat(e.container_id));case"Discuss":return"Hack"===e.parent_container_type&&e.extra?window.open("/myproblems/".concat(e.extra,"/comment")):window.open("/shixuns/".concat(e.identifier,"/shixun_discuss"));case"Video":return"Apply"===e.tiding_type?window.open("/admins/video_applies"):"System"===e.tiding_type?window.open("/users/".concat(t.props.current_user.login,"/videos")):"";case"PublicCourseStart":return window.open("/courses/".concat(e.container_id,"/informs"));case"SubjectStartCourse":return window.open("/paths/".concat(e.container_id));case"ResubmitStudentWork":if("normal"===e.homework_type)return window.open("/courses/".concat(e.belong_container_id,"/common_homeworks/").concat(e.parent_container_id,"/").concat(e.container_id,"/appraise"));if("group"===e.homework_type)return window.open("/courses/".concat(e.belong_container_id,"/group_homeworks/").concat(e.parent_container_id,"/").concat(e.container_id,"/appraise"));case"AdjustScore":if("normal"===e.homework_type)return window.open("/courses/".concat(e.belong_container_id,"/common_homeworks/").concat(e.parent_container_id));if("group"===e.homework_type)return window.open("/courses/".concat(e.belong_container_id,"/group_homeworks/").concat(e.parent_container_id));case"LiveLink":return window.open("/courses/".concat(e.belong_container_id,"/course_videos?open=live"));case"Hack":if(e.extra&&"HackDelete"!==e.parent_container_type)return window.open("/problems/".concat(e.extra,"/edit"));default:return}},t.state={page:1,limit:10,typeysl:"",count:0,isSpin:!1,data:void 0},t}return Object(p.a)(n,e),Object(r.a)(n,[{key:"componentDidMount",value:function(){this.getdata("",this.state.page);try{this.props.Mtab(1)}catch(e){}this.props.triggerRef(this)}},{key:"componentWillUnmount",value:function(){this.setState=function(e,n){}}},{key:"render",value:function(){var e=this,n=this.state,t=n.page,i=n.limit,r=n.typeysl,c=n.count,s=n.isSpin,p=n.data;return u.a.createElement("div",{className:"clearfix ml20"},u.a.createElement("ul",{className:"pl10 ridingNav clearfix edu-back-white"},u.a.createElement("li",{className:""===r?"active":""},u.a.createElement("a",{onClick:function(){return e.getdata("",1)}},"\u5168\u90e8")),u.a.createElement("li",{className:r&&"course"===r?"active":""},u.a.createElement("a",{onClick:function(){return e.getdata("course",1)}},"\u8bfe\u5802\u63d0\u9192")),u.a.createElement("li",{className:r&&"project"===r?"active":""},u.a.createElement("a",{onClick:function(){return e.getdata("project",1)}},"\u9879\u76ee\u63d0\u9192")),u.a.createElement("li",{className:r&&"interaction"===r?"active":""},u.a.createElement("a",{onClick:function(){return e.getdata("interaction",1)}},"\u4e92\u52a8\u63d0\u9192")),u.a.createElement("li",{className:r&&"apply"===r?"active":""},u.a.createElement("a",{onClick:function(){return e.getdata("apply",1)}},"\u5ba1\u6838")),u.a.createElement("li",{className:r&&"notice"===r?"active":""},u.a.createElement("a",{onClick:function(){return e.getdata("notice",1)}},"\u901a\u77e5"))),u.a.createElement("div",{className:"bor-top-greyE mycenter"},u.a.createElement("div",{className:"myw100baifenbi"},u.a.createElement(a.a,{size:"large",className:"myw100baifenbi mt10",spinning:s},void 0===p||0===p.length?u.a.createElement(w.a,null):p.map((function(n,t){var o=!0;return"PraiseTread"!==n.container_type&&"Grade"!==n.container_type&&"ChallengeWorkScore"!==n.container_type||(o=!1),"JournalsForMessage"===n.container_type&&("Principal"===n.parent_container_type&&(o=!1),"HomeworkCommon"===n.parent_container_type&&(null!==n.homework_type&&void 0!==n.homework_type||(o=!1))),"ProjectPackage"===n.container_type&&("Destroyed_end"===n.tiding_type&&(o=!1),"Destroyed"===n.tiding_type&&(o=!1)),"Course"===n.container_type&&"Delete"===n.tiding_type&&(o=!1),"DeleteCourse"===n.container_type&&"System"===n.tiding_type&&(o=!1),"DeleteCourseMember"===n.container_type&&"System"===n.tiding_type&&(o=!1),u.a.createElement("div",{className:"pl25 ridinglist edu-back-white",key:t},u.a.createElement("div",{className:!0===o?"ridinglist-sub clearfix df tiding_item":"ridinglist-subs clearfix df tiding_item",onClick:function(){return e.gettourl(n)}},u.a.createElement("img",{onMouseDown:function(){return e.myCome(n)},src:Object(m.L)("images/"+n.trigger_user.image_url),className:"radius mr10 fl myimgw48 myimgh48"}),u.a.createElement("div",{className:"fl flex1"},u.a.createElement("p",null,u.a.createElement("a",{className:"mr20 private_message_a",onMouseDown:function(){return e.myCome(n)}},n.trigger_user.name),u.a.createElement("span",{className:"color-grey-c"},n.time),"Apply"===n.tiding_type&&0===n.status?u.a.createElement("span",{className:"edu-filter-btn ml20 edu-filter-btn-red"},"\u5f85\u5904\u7406"):"","Apply"===n.tiding_type&&1===n.status?u.a.createElement("span",{className:"edu-filter-btn ml20 edu-filter-btn-green"},"\u5df2\u5904\u7406"):""),u.a.createElement("style",null,".yslspansk span{\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t color: #FF9966!important;\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t \t"),u.a.createElement("p",{className:"color-grey-6 yslspansk markdown-body mt10",style:{wordBreak:"break-word"},dangerouslySetInnerHTML:{__html:Object(m.Z)(n.content).replace(/\u2581/g,"\u2581\u2581\u2581")}})),u.a.createElement("span",{className:!0===n.new_tiding?"new-point fr mr40 mt22":""})))}))),void 0!==p&&10<c?u.a.createElement("div",{style:{textAlign:"center"},className:"new_expand mt10"},u.a.createElement("div",{className:"edu-txt-center mt30"},u.a.createElement(o.a,{showQuickJumper:!0,current:t,onChange:this.paginationonChanges,pageSize:i,total:c}))):"")))}}]),n}(d.Component);n.default=g},496:function(e,n,t){"use strict";t.d(n,"a",(function(){return r}));var o=t(0),a=t.n(o),i=t(134);function r(e){var n=[];return a.a.Children.forEach(e,(function(e){Object(i.isFragment)(e)&&e.props?n=n.concat(r(e.props.children)):n.push(e)})),n}}}]);