|
|
|
@ -2,6 +2,7 @@ import '../katex.css';
|
|
|
|
|
import '../css/Courses.css';
|
|
|
|
|
import React,{Component} from "react";
|
|
|
|
|
import {markdownToHTML, ImageLayer2 } from 'educoder';
|
|
|
|
|
import {Button, Row, Col} from "antd";
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
import Modals from '../../modals/Modals';
|
|
|
|
|
import moment from 'moment';
|
|
|
|
@ -19,10 +20,10 @@ class CommonWorkAppraise extends Component{
|
|
|
|
|
course_name:"",
|
|
|
|
|
homework_name:"",
|
|
|
|
|
search: '',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
get_next_work:undefined,
|
|
|
|
|
attachments: [],
|
|
|
|
|
revise_attachments: [],
|
|
|
|
|
get_next_worktype:false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
getWork = () => {
|
|
|
|
@ -87,6 +88,34 @@ class CommonWorkAppraise extends Component{
|
|
|
|
|
this.getReviseAttachments()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get_next_works=(id)=>{
|
|
|
|
|
let workId =this.props.match.params.workId;
|
|
|
|
|
let url
|
|
|
|
|
if(id){
|
|
|
|
|
url=`/homework_commons/${workId}/get_next_work.json?work_id=${id}`;
|
|
|
|
|
}else{
|
|
|
|
|
url=`/homework_commons/${workId}/get_next_work.json`;
|
|
|
|
|
}
|
|
|
|
|
axios.get(url).then((result)=> {
|
|
|
|
|
this.setState({
|
|
|
|
|
get_next_work:result.data,
|
|
|
|
|
get_next_worktype:true
|
|
|
|
|
})
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
console.log(error)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
gotoget_next_work=(id)=>{
|
|
|
|
|
if(this.props.match.path===`/classrooms/:coursesId/common_homeworks/:workId/:studentWorkId/appraise`){
|
|
|
|
|
this.props.history.replace(`/classrooms/${this.props.match.params.coursesId}/common_homeworks/${this.props.match.params.workId}/${id}/appraise`);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(this.props.match.path===`/classrooms/:coursesId/group_homeworks/:workId/:studentWorkId/appraise`){
|
|
|
|
|
this.props.history.replace(`/classrooms/${this.props.match.params.coursesId}/common_homeworks/${this.props.match.params.workId}/${id}/appraise`);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
onAttachmentRemove = (id) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
Modalstype:true,
|
|
|
|
@ -128,22 +157,21 @@ class CommonWorkAppraise extends Component{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render(){
|
|
|
|
|
const dateFormat = 'YYYY-MM-DD HH:mm';
|
|
|
|
|
|
|
|
|
|
let {course_name, homework_name, search, page, loadingstate, homework_status, reference_answer,
|
|
|
|
|
attachments, homework_id, project_info, work_members, is_evaluation,
|
|
|
|
|
let {course_name, get_next_work,get_next_worktype,
|
|
|
|
|
attachments, project_info, work_members, is_evaluation,
|
|
|
|
|
description, update_user_name, commit_user_name, update_time, commit_time, author_name,
|
|
|
|
|
revise_attachments, revise_reason, atta_update_user, atta_update_time, atta_update_user_login,
|
|
|
|
|
Modalstype,Modalstopval,ModalCancel,ModalSave,loadtype, is_leader_work
|
|
|
|
|
} =this.state;
|
|
|
|
|
|
|
|
|
|
let courseId=this.props.match.params.coursesId;
|
|
|
|
|
let category_id=this.props.match.params.category_id;
|
|
|
|
|
// let courseId=this.props.match.params.coursesId;
|
|
|
|
|
// let category_id=this.props.match.params.category_id;
|
|
|
|
|
let studentWorkId=this.props.match.params.studentWorkId;
|
|
|
|
|
const isAdmin = this.props.isAdmin()
|
|
|
|
|
|
|
|
|
|
document.title=course_name&&course_name;
|
|
|
|
|
return(
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
|
|
<WorkDetailPageHeader
|
|
|
|
|
{...this.props} {...this.state}
|
|
|
|
|
noTab={true}
|
|
|
|
@ -271,12 +299,60 @@ class CommonWorkAppraise extends Component{
|
|
|
|
|
<CommonWorkAppraiseReply {...this.props} task_id={studentWorkId}
|
|
|
|
|
onReplySuccess={this.onReplySuccess} {...this.state}
|
|
|
|
|
wrappedComponentRef={(ref) => {this.commonWorkAppraiseReply = ref}}
|
|
|
|
|
get_next_works={()=>this.get_next_works()}
|
|
|
|
|
></CommonWorkAppraiseReply>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</WorkDetailPageHeader>
|
|
|
|
|
{isAdmin===true&&get_next_worktype===true?<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.newFooter{
|
|
|
|
|
display:none !important;
|
|
|
|
|
}
|
|
|
|
|
.-task-sidebar{
|
|
|
|
|
display:none !important;
|
|
|
|
|
}
|
|
|
|
|
.educontent{
|
|
|
|
|
margin-bottom: 0px !important;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>:""}
|
|
|
|
|
|
|
|
|
|
{isAdmin===true&&get_next_worktype===true?<div className="clearfix bor-bottom-greyE edu-back-white orderingbox newshixunbottombtn">
|
|
|
|
|
|
|
|
|
|
<div className={"educontent mt5"}>
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
|
|
<Row>
|
|
|
|
|
<Col span={12} className={"mt13"}>
|
|
|
|
|
{get_next_work&&get_next_work.work_id===null?
|
|
|
|
|
<Row type="flex" justify="start">
|
|
|
|
|
<Col span={8}><div style={{color:"#333333"}}>已全部评阅完</div></Col>
|
|
|
|
|
</Row>:<Row type="flex" justify="start">
|
|
|
|
|
<Col span={8}><div style={{color:"#333333"}}>{get_next_work&&get_next_work?`下一位待评阅人员:${get_next_work&&get_next_work.user_name}`:""}</div></Col>
|
|
|
|
|
<Col span={4}><a className={"ml10 color-blue font-15"} onClick={()=>this.get_next_works(get_next_work&&get_next_work.work_id)}>跳过</a></Col>
|
|
|
|
|
</Row>}
|
|
|
|
|
</Col>
|
|
|
|
|
{get_next_work&&get_next_work.work_id===null?"":<Col span={12} className={"mt8"}>
|
|
|
|
|
<Row type="flex" justify="end">
|
|
|
|
|
<Col span={4}>
|
|
|
|
|
<Button className={"newshixunmode "} type="primary"
|
|
|
|
|
onClick={()=>this.gotoget_next_work(get_next_work&&get_next_work.work_id)}
|
|
|
|
|
// loading={this.state.hometypepvisible}
|
|
|
|
|
>评阅</Button>
|
|
|
|
|
</Col>
|
|
|
|
|
</Row>
|
|
|
|
|
</Col>}
|
|
|
|
|
</Row>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>:""}
|
|
|
|
|
</div>
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|