|
|
|
@ -4,7 +4,7 @@ import {
|
|
|
|
|
Pagination,
|
|
|
|
|
} from "antd";
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import {getImageUrl} from 'educoder';
|
|
|
|
|
import {getImageUrl,markdownToHTML} from 'educoder';
|
|
|
|
|
import "../css/messagemy.css"
|
|
|
|
|
//消息页面
|
|
|
|
|
class MessagSub extends Component{
|
|
|
|
@ -212,35 +212,37 @@ class MessagSub extends Component{
|
|
|
|
|
return '';
|
|
|
|
|
case "HomeworkCommon" :
|
|
|
|
|
//学生作业页 homework = parent_container_id
|
|
|
|
|
if(item.homework_type===1){
|
|
|
|
|
if(item.homework_type==="normal"){
|
|
|
|
|
//普通作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/question`)
|
|
|
|
|
}
|
|
|
|
|
if(item.homework_type===3){
|
|
|
|
|
if(item.homework_type==="group"){
|
|
|
|
|
//分组作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/question`)
|
|
|
|
|
}
|
|
|
|
|
if(item.homework_type===4){
|
|
|
|
|
if(item.homework_type==="practice"){
|
|
|
|
|
//实训作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/`)
|
|
|
|
|
}
|
|
|
|
|
return "";
|
|
|
|
|
case "GraduationTopic" :
|
|
|
|
|
// 毕业目标页 parent_container_id
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/graduation_topics/${item.parent_container_id}/detail`)
|
|
|
|
|
case "StudentWorksScore" :
|
|
|
|
|
//学生作业页
|
|
|
|
|
if(item.homework_type===1){
|
|
|
|
|
if(item.homework_type==="normal"){
|
|
|
|
|
//普通作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/question`)
|
|
|
|
|
}
|
|
|
|
|
if(item.homework_type===3){
|
|
|
|
|
if(item.homework_type==="group"){
|
|
|
|
|
//分组作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/question`)
|
|
|
|
|
}
|
|
|
|
|
if(item.homework_type===4){
|
|
|
|
|
if(item.homework_type==="practice"){
|
|
|
|
|
//实训作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/`)
|
|
|
|
|
}
|
|
|
|
|
return "";
|
|
|
|
|
}
|
|
|
|
|
case "Memo" :
|
|
|
|
|
// 交流问答页 :id = parent_container_id
|
|
|
|
@ -308,100 +310,103 @@ class MessagSub extends Component{
|
|
|
|
|
switch (item.parent_container_type) {
|
|
|
|
|
case "AnonymousCommentFail" :
|
|
|
|
|
// 课堂-作业列表 homework = container_id
|
|
|
|
|
if(item.homework_type===1){
|
|
|
|
|
if(item.homework_type==="normal"){
|
|
|
|
|
//普通作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
|
|
|
|
|
}
|
|
|
|
|
if(item.homework_type===3){
|
|
|
|
|
if(item.homework_type==="group"){
|
|
|
|
|
//分组作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
|
|
|
|
|
}
|
|
|
|
|
if(item.homework_type===4){
|
|
|
|
|
if(item.homework_type==="practice"){
|
|
|
|
|
//实训作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
|
|
|
|
|
}
|
|
|
|
|
case "HomeworkPublish" :
|
|
|
|
|
if(item.homework_type===1){
|
|
|
|
|
if(item.homework_type==="normal"){
|
|
|
|
|
//普通作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
|
|
|
|
|
}
|
|
|
|
|
if(item.homework_type===3){
|
|
|
|
|
if(item.homework_type==="group"){
|
|
|
|
|
//分组作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
|
|
|
|
|
}
|
|
|
|
|
if(item.homework_type===4){
|
|
|
|
|
if(item.homework_type==="practice"){
|
|
|
|
|
//实训作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
|
|
|
|
|
}
|
|
|
|
|
case "AnonymousAppeal" :
|
|
|
|
|
if(item.homework_type===1){
|
|
|
|
|
if(item.homework_type==="normal"){
|
|
|
|
|
//普通作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
|
|
|
|
|
}
|
|
|
|
|
if(item.homework_type===3){
|
|
|
|
|
if(item.homework_type==="group"){
|
|
|
|
|
//分组作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
|
|
|
|
|
}
|
|
|
|
|
if(item.homework_type===4){
|
|
|
|
|
if(item.homework_type==="practice"){
|
|
|
|
|
//实训作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
|
|
|
|
|
}
|
|
|
|
|
default :
|
|
|
|
|
// 课堂-作业列表 homework = container_id
|
|
|
|
|
if(item.homework_type===1){
|
|
|
|
|
if(item.homework_type==="normal"){
|
|
|
|
|
//普通作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
|
|
|
|
|
}
|
|
|
|
|
if(item.homework_type===3){
|
|
|
|
|
if(item.homework_type==="group"){
|
|
|
|
|
//分组作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
|
|
|
|
|
}
|
|
|
|
|
if(item.homework_type===4){
|
|
|
|
|
if(item.homework_type==="practice"){
|
|
|
|
|
//实训作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
case "StudentWork" :
|
|
|
|
|
//课堂-作业 :id = container_id
|
|
|
|
|
if(item.homework_type===1){
|
|
|
|
|
if(item.homework_type==="normal"){
|
|
|
|
|
//普通作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.container_id}/list`)
|
|
|
|
|
}
|
|
|
|
|
if(item.homework_type===3){
|
|
|
|
|
if(item.homework_type==="group"){
|
|
|
|
|
//分组作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.container_id}/list`)
|
|
|
|
|
}
|
|
|
|
|
if(item.homework_type===4){
|
|
|
|
|
if(item.homework_type==="practice"){
|
|
|
|
|
//实训作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.container_id}/list?tab=0`)
|
|
|
|
|
}
|
|
|
|
|
case "StudentWorksScore" :
|
|
|
|
|
//课堂-作业 :id = parent_container_id
|
|
|
|
|
if(item.homework_type===1){
|
|
|
|
|
//普通作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
|
|
|
|
|
}
|
|
|
|
|
if(item.homework_type===3){
|
|
|
|
|
//分组作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
|
|
|
|
|
}
|
|
|
|
|
if(item.homework_type===4){
|
|
|
|
|
//实训作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
|
|
|
|
|
}
|
|
|
|
|
// if(item.homework_type==="normal"){
|
|
|
|
|
// //普通作业
|
|
|
|
|
// return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
|
|
|
|
|
// }
|
|
|
|
|
// if(item.homework_type==="group"){
|
|
|
|
|
// //分组作业
|
|
|
|
|
// return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
|
|
|
|
|
// }
|
|
|
|
|
// if(item.homework_type==="practice"){
|
|
|
|
|
// //实训作业
|
|
|
|
|
// return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
|
|
|
|
|
// }
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.trigger_user.id}/${item.parent_container_id}/appraise`);
|
|
|
|
|
|
|
|
|
|
case "StudentWorksScoresAppeal" :
|
|
|
|
|
if(item.homework_type===1){
|
|
|
|
|
//普通作业
|
|
|
|
|
return window.open(`courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
|
|
|
|
|
}
|
|
|
|
|
if(item.homework_type===3){
|
|
|
|
|
//分组作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
|
|
|
|
|
}
|
|
|
|
|
if(item.homework_type===4){
|
|
|
|
|
//实训作业
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
|
|
|
|
|
}
|
|
|
|
|
// if(item.homework_type==="normal"){
|
|
|
|
|
// //普通作业
|
|
|
|
|
// return window.open(`courses/${item.belong_container_id}/common_homeworks/${item.parent_container_id}/list`)
|
|
|
|
|
// }
|
|
|
|
|
// if(item.homework_type==="group"){
|
|
|
|
|
// //分组作业
|
|
|
|
|
// return window.open(`/courses/${item.belong_container_id}/group_homeworks/${item.parent_container_id}/list`)
|
|
|
|
|
// }
|
|
|
|
|
// if(item.homework_type==="practice"){
|
|
|
|
|
// //实训作业
|
|
|
|
|
// return window.open(`/courses/${item.belong_container_id}/shixun_homeworks/${item.parent_container_id}/list?tab=0`)
|
|
|
|
|
// }
|
|
|
|
|
return window.open(`/courses/${item.belong_container_id}/common_homeworks/${item.trigger_user.id}/${item.parent_container_id}/appraise`);
|
|
|
|
|
case "ChallengeWorkScore" :
|
|
|
|
|
return '';
|
|
|
|
|
case "SendMessage" :
|
|
|
|
@ -412,7 +417,7 @@ class MessagSub extends Component{
|
|
|
|
|
return window.open(`/projects/${item.parent_container_id}/issues?remote=true`)
|
|
|
|
|
case "Issue" :
|
|
|
|
|
//项目Issue页 :id = container_id
|
|
|
|
|
return window.open(`/projects/${item.container_id}/issues?remote=true`)
|
|
|
|
|
return window.open(`/issues/${item.container_id}`)
|
|
|
|
|
case "PullRequest" :
|
|
|
|
|
// 项目pull request页 :id = parent_container_id
|
|
|
|
|
return window.open(`/projects/${item.parent_container_id}/pull_requests`)
|
|
|
|
@ -441,6 +446,8 @@ class MessagSub extends Component{
|
|
|
|
|
return window.open(`/crowdsourcing/${item.container_id}`)
|
|
|
|
|
// }
|
|
|
|
|
}
|
|
|
|
|
case "Discuss":
|
|
|
|
|
return window.open(`/shixuns/${item.identifier}/shixun_discuss`);
|
|
|
|
|
default :
|
|
|
|
|
return window.open("/")
|
|
|
|
|
}
|
|
|
|
@ -462,11 +469,11 @@ class MessagSub extends Component{
|
|
|
|
|
|
|
|
|
|
<li className={typeysl&&typeysl==="project_package"?"active":""}><a onClick={(s,i)=>this.getdata("project_package",1)}>众包提醒</a></li>
|
|
|
|
|
|
|
|
|
|
<li className={typeysl&&typeysl==="interactive"?"active":""}><a onClick={(s,i)=>this.getdata("interactive",1)}>互动提醒</a></li>
|
|
|
|
|
<li className={typeysl&&typeysl==="interaction"?"active":""}><a onClick={(s,i)=>this.getdata("interaction",1)}>互动提醒</a></li>
|
|
|
|
|
|
|
|
|
|
<li className={typeysl&&typeysl==="apply"?"active":""}><a onClick={(s,i)=>this.getdata("apply",1)}>审核</a></li>
|
|
|
|
|
|
|
|
|
|
<li className={typeysl&&typeysl==="system"?"active":""}><a onClick={(s,i)=>this.getdata("system",1)}>通知</a></li>
|
|
|
|
|
<li className={typeysl&&typeysl==="notice"?"active":""}><a onClick={(s,i)=>this.getdata("notice",1)}>通知</a></li>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -495,6 +502,11 @@ class MessagSub extends Component{
|
|
|
|
|
if(item.parent_container_type==="Principal"){
|
|
|
|
|
boolps=false;
|
|
|
|
|
}
|
|
|
|
|
if(item.parent_container_type==="HomeworkCommon"){
|
|
|
|
|
if(item.homework_type===null||item.homework_type===undefined){
|
|
|
|
|
boolps=false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// if(item.container_type==="HomeworkCommon"){
|
|
|
|
|
// if(item.parent_container_type==="AnonymousAppeal"){
|
|
|
|
@ -532,7 +544,7 @@ class MessagSub extends Component{
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<p className="color-grey-6 break_word_firefox yslspansk markdown-body" style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html:item.content}}></p>
|
|
|
|
|
<p className="color-grey-6 break_word_firefox yslspansk markdown-body" style={{wordBreak: "break-word"}} dangerouslySetInnerHTML={{__html: markdownToHTML(item.content).replace(/▁/g, "▁▁▁")}} ></p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<span className={item.new_tiding===true?"new-point fr mr40 mt22":""}></span>
|
|
|
|
|