|
|
@ -1,5 +1,5 @@
|
|
|
|
import React,{ Component } from "react";
|
|
|
|
import React,{ Component } from "react";
|
|
|
|
import {Checkbox,Radio, Input,InputNumber} from "antd";
|
|
|
|
import {Checkbox,Radio, Input,InputNumber,Spin} from "antd";
|
|
|
|
|
|
|
|
|
|
|
|
import '../css/members.css'
|
|
|
|
import '../css/members.css'
|
|
|
|
import '../css/busyWork.css'
|
|
|
|
import '../css/busyWork.css'
|
|
|
@ -75,7 +75,10 @@ class ExerciseReviewAndAnswer extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
Id:undefined,
|
|
|
|
Id:undefined,
|
|
|
|
// 试卷总分
|
|
|
|
// 试卷总分
|
|
|
|
exerciseTotalScore:undefined
|
|
|
|
exerciseTotalScore:undefined,
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 加载效果
|
|
|
|
|
|
|
|
isSpin:false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
componentDidUpdate (prevProps) {
|
|
|
|
componentDidUpdate (prevProps) {
|
|
|
@ -163,7 +166,8 @@ class ExerciseReviewAndAnswer extends Component{
|
|
|
|
getInfo=()=>{
|
|
|
|
getInfo=()=>{
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
courseName:this.props.current_user.course_name,
|
|
|
|
courseName:this.props.current_user.course_name,
|
|
|
|
userName:this.props.current_user.username
|
|
|
|
userName:this.props.current_user.username,
|
|
|
|
|
|
|
|
isSpin:true
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
let eId=this.props.match.params.Id;
|
|
|
|
let eId=this.props.match.params.Id;
|
|
|
@ -187,7 +191,8 @@ class ExerciseReviewAndAnswer extends Component{
|
|
|
|
exercise_questions:result.data.exercise_questions,
|
|
|
|
exercise_questions:result.data.exercise_questions,
|
|
|
|
user_exercise_status:1,
|
|
|
|
user_exercise_status:1,
|
|
|
|
Id:result.data.exercise_answer_user.user_id,
|
|
|
|
Id:result.data.exercise_answer_user.user_id,
|
|
|
|
exerciseTotalScore:result.data.exercise_answer_user.score
|
|
|
|
exerciseTotalScore:result.data.exercise_answer_user.score,
|
|
|
|
|
|
|
|
isSpin:false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}).catch((error)=>{
|
|
|
|
}).catch((error)=>{
|
|
|
@ -210,7 +215,8 @@ class ExerciseReviewAndAnswer extends Component{
|
|
|
|
exercise_questions:result.data.exercise_questions,
|
|
|
|
exercise_questions:result.data.exercise_questions,
|
|
|
|
user_exercise_status:result.data.exercise.user_exercise_status,
|
|
|
|
user_exercise_status:result.data.exercise.user_exercise_status,
|
|
|
|
time:result.data.exercise.left_time,
|
|
|
|
time:result.data.exercise.left_time,
|
|
|
|
exerciseTotalScore:result.data.user_score
|
|
|
|
exerciseTotalScore:result.data.user_score,
|
|
|
|
|
|
|
|
isSpin:false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
if(result.data.exercise.left_time != null){
|
|
|
|
if(result.data.exercise.left_time != null){
|
|
|
|
this.remainTime();
|
|
|
|
this.remainTime();
|
|
|
@ -498,7 +504,8 @@ class ExerciseReviewAndAnswer extends Component{
|
|
|
|
ModalCancel,
|
|
|
|
ModalCancel,
|
|
|
|
ModalSave,
|
|
|
|
ModalSave,
|
|
|
|
Loadtype,
|
|
|
|
Loadtype,
|
|
|
|
exerciseTotalScore
|
|
|
|
exerciseTotalScore,
|
|
|
|
|
|
|
|
isSpin
|
|
|
|
}=this.state
|
|
|
|
}=this.state
|
|
|
|
let isAdmin = this.props.isAdmin();
|
|
|
|
let isAdmin = this.props.isAdmin();
|
|
|
|
let isStudent =this.props.isStudent();
|
|
|
|
let isStudent =this.props.isStudent();
|
|
|
@ -506,6 +513,7 @@ class ExerciseReviewAndAnswer extends Component{
|
|
|
|
console.log(data&&data.exercise.user_name)
|
|
|
|
console.log(data&&data.exercise.user_name)
|
|
|
|
return(
|
|
|
|
return(
|
|
|
|
<div className="newMain" style={{paddingTop:"0px"}}>
|
|
|
|
<div className="newMain" style={{paddingTop:"0px"}}>
|
|
|
|
|
|
|
|
<Spin size="large" spinning={isSpin}>
|
|
|
|
<style>{`
|
|
|
|
<style>{`
|
|
|
|
.inputNumber30{
|
|
|
|
.inputNumber30{
|
|
|
|
height:30px;
|
|
|
|
height:30px;
|
|
|
@ -834,6 +842,7 @@ class ExerciseReviewAndAnswer extends Component{
|
|
|
|
</p>:""
|
|
|
|
</p>:""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</Spin>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|