|
|
|
@ -9,7 +9,8 @@ class OfficialAcademicTranscript extends Component {
|
|
|
|
|
super(props);
|
|
|
|
|
this.state = {
|
|
|
|
|
loadingstate:true,
|
|
|
|
|
datas:undefined
|
|
|
|
|
datas:undefined,
|
|
|
|
|
customsids:undefined
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -52,8 +53,14 @@ class OfficialAcademicTranscript extends Component {
|
|
|
|
|
if(score!=null&&score!=undefined&&score!=""){
|
|
|
|
|
if(score<0){
|
|
|
|
|
this.props.showNotification("调分不能小于0");
|
|
|
|
|
this.setState({
|
|
|
|
|
customsids:id
|
|
|
|
|
})
|
|
|
|
|
}else if(score>maxsum){
|
|
|
|
|
this.props.showNotification(`调分不能大于${maxsum}`);
|
|
|
|
|
this.setState({
|
|
|
|
|
customsids:id
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
let work_id=this.props.data.work_id;
|
|
|
|
|
let url=`/student_works/${work_id}/adjust_review_score.json`
|
|
|
|
@ -72,7 +79,8 @@ class OfficialAcademicTranscript extends Component {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.setState({
|
|
|
|
|
datas:newdatas
|
|
|
|
|
datas:newdatas,
|
|
|
|
|
customsids:undefined
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.props.showNotification(result.data.message);
|
|
|
|
@ -88,7 +96,7 @@ class OfficialAcademicTranscript extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let {datas}=this.state;
|
|
|
|
|
let {datas,customsids}=this.state;
|
|
|
|
|
|
|
|
|
|
let columns=[{
|
|
|
|
|
title: '关卡',
|
|
|
|
@ -183,7 +191,7 @@ class OfficialAcademicTranscript extends Component {
|
|
|
|
|
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
<a><InputNumber size="small" className="color-red" defaultValue={record.game_scores.game_score}
|
|
|
|
|
<a><InputNumber size="small" className={customsids===record.challenge_id.id?"bor-red":""} defaultValue={record.game_scores.game_score}
|
|
|
|
|
onBlur={(e) => this.editgame_scores(e,record.challenge_id.id,record.game_scores.game_score_full)}
|
|
|
|
|
// min={0} max={record.game_scores.game_score_full}
|
|
|
|
|
/></a>
|
|
|
|
|