|
|
|
@ -14,7 +14,29 @@ class OfficialAcademicTranscript extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
let {data}=this.props;
|
|
|
|
|
|
|
|
|
|
let datas=[];
|
|
|
|
|
if(data!=undefined){
|
|
|
|
|
data.stage_list===undefined?"":data.stage_list.forEach((item,key)=>{
|
|
|
|
|
datas.push({
|
|
|
|
|
customs: key+1,
|
|
|
|
|
taskname:{name:item.name,complete_status:item.complete_status},
|
|
|
|
|
openingtime:item.open_time,
|
|
|
|
|
evaluating: item.evaluate_count,
|
|
|
|
|
finishtime:item.finished_time,
|
|
|
|
|
elapsedtime:item.time_consuming,
|
|
|
|
|
empvalue:{myself:item.myself_experience,experience:item.experience},
|
|
|
|
|
game_scores:{game_score:item.game_score,game_score_full:item.game_score_full},
|
|
|
|
|
challenge_id:{id:item.challenge_id}
|
|
|
|
|
// adjustmentminute:asdasd
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
datas:datas
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
myjumptopic=(e)=>{
|
|
|
|
|
console.log("获取到值");
|
|
|
|
@ -22,9 +44,17 @@ class OfficialAcademicTranscript extends Component {
|
|
|
|
|
this.props.jumptopic(e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
editgame_scores=(e,id)=>{
|
|
|
|
|
editgame_scores=(e,id,maxsum)=>{
|
|
|
|
|
let{datas}=this.state;
|
|
|
|
|
let newdatas=datas;
|
|
|
|
|
let score=e.target.value;
|
|
|
|
|
|
|
|
|
|
if(score!=null&&score!=undefined&&score!=""){
|
|
|
|
|
if(score<maxsum){
|
|
|
|
|
this.props.showNotification("调分不能小于0");
|
|
|
|
|
}else if(score>maxsum){
|
|
|
|
|
this.props.showNotification(`调分不能大于${maxsum}`);
|
|
|
|
|
}else{
|
|
|
|
|
let work_id=this.props.data.work_id;
|
|
|
|
|
let url=`/student_works/${work_id}/adjust_review_score.json`
|
|
|
|
|
axios.post(url,{
|
|
|
|
@ -35,41 +65,30 @@ class OfficialAcademicTranscript extends Component {
|
|
|
|
|
if(result.data.status===0){
|
|
|
|
|
// this.props.getdatalist()
|
|
|
|
|
this.props.showNotification(result.data.message);
|
|
|
|
|
|
|
|
|
|
this.props.setupdalist(result.data.challenge_score,result.data.overall_appraisal,result.data.work_score)
|
|
|
|
|
newdatas.map((item,key)=>{
|
|
|
|
|
if(item.challenge_id.id===id){
|
|
|
|
|
item.game_scores.game_score=score
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
this.setState({
|
|
|
|
|
datas:newdatas
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.props.showNotification(result.data.message);
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
this.props.showNotification("调分为空将不会修改之前的分数");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
|
|
|
|
|
let {data}=this.props;
|
|
|
|
|
|
|
|
|
|
let datas=[];
|
|
|
|
|
if(data!=undefined){
|
|
|
|
|
data.stage_list===undefined?"":data.stage_list.forEach((item,key)=>{
|
|
|
|
|
datas.push({
|
|
|
|
|
customs: key+1,
|
|
|
|
|
taskname:{name:item.name,complete_status:item.complete_status},
|
|
|
|
|
openingtime:item.open_time,
|
|
|
|
|
evaluating: item.evaluate_count,
|
|
|
|
|
finishtime:item.finished_time,
|
|
|
|
|
elapsedtime:item.time_consuming,
|
|
|
|
|
empvalue:{myself:item.myself_experience,experience:item.experience},
|
|
|
|
|
game_scores:{game_score:item.game_score,game_score_full:item.game_score_full},
|
|
|
|
|
challenge_id:{id:item.challenge_id}
|
|
|
|
|
// adjustmentminute:asdasd
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let {datas}=this.state;
|
|
|
|
|
|
|
|
|
|
let columns=[{
|
|
|
|
|
title: '关卡',
|
|
|
|
@ -165,7 +184,7 @@ class OfficialAcademicTranscript extends Component {
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
<a><InputNumber size="small" defaultValue={record.game_scores.game_score}
|
|
|
|
|
onBlur={(e) => this.editgame_scores(e,record.challenge_id.id)}
|
|
|
|
|
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>
|
|
|
|
|
{/*<a style={{textAlign: "center"}} className="color-blue font-14 mr20">查看</a>*/}
|
|
|
|
|