|
|
|
@ -1,8 +1,8 @@
|
|
|
|
|
import React, {Component} from "react";
|
|
|
|
|
import {WordsBtn} from 'educoder';
|
|
|
|
|
import {Table} from "antd";
|
|
|
|
|
import {Table,InputNumber,Tooltip} from "antd";
|
|
|
|
|
import {Link,Switch,Route,Redirect} from 'react-router-dom';
|
|
|
|
|
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
class OfficialAcademicTranscript extends Component {
|
|
|
|
|
|
|
|
|
|
constructor(props) {
|
|
|
|
@ -22,6 +22,26 @@ class OfficialAcademicTranscript extends Component {
|
|
|
|
|
this.props.jumptopic(e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
editgame_scores=(score,id)=>{
|
|
|
|
|
if(score!=null&&score!=undefined){
|
|
|
|
|
let work_id=this.props.data.work_id;
|
|
|
|
|
let url=`/student_works/${work_id}/adjust_review_score.json`
|
|
|
|
|
axios.post(url,{
|
|
|
|
|
type:"report",
|
|
|
|
|
score:score,
|
|
|
|
|
challenge_id:id
|
|
|
|
|
}).then((result)=>{
|
|
|
|
|
if(result.data.status===0){
|
|
|
|
|
this.props.showNotification(result.data.message);
|
|
|
|
|
}else{
|
|
|
|
|
this.props.showNotification(result.data.message);
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
|
|
|
|
|
let {data}=this.props;
|
|
|
|
@ -37,13 +57,14 @@ class OfficialAcademicTranscript extends Component {
|
|
|
|
|
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 columns=[{
|
|
|
|
|
title: '关卡',
|
|
|
|
|
dataIndex: 'customs',
|
|
|
|
@ -111,26 +132,54 @@ class OfficialAcademicTranscript extends Component {
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
<span style={{color:'#29BD8B'}}>{record.empvalue.myself}</span><span className={"color-grey-9"}>/{record.empvalue.experience}</span>
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},{
|
|
|
|
|
title: '关卡得分',
|
|
|
|
|
key: 'game_scores',
|
|
|
|
|
dataIndex: 'game_scores',
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
<Tooltip placement="bottom" title={
|
|
|
|
|
<pre>
|
|
|
|
|
关卡得分:{record.game_scores.game_score}/关卡满分:{record.game_scores.game_score_full}
|
|
|
|
|
</pre>
|
|
|
|
|
}>
|
|
|
|
|
<span style={{color:'#29BD8B'}}>{record.game_scores.game_score}</span><span className={"color-grey-9"}>/{record.game_scores.game_score_full}</span>
|
|
|
|
|
</Tooltip>
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
},{
|
|
|
|
|
title: '调分',
|
|
|
|
|
key: 'adjustmentminute',
|
|
|
|
|
dataIndex: 'adjustmentminute',
|
|
|
|
|
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
<a><InputNumber size="small" defaultValue={record.game_scores.game_score}
|
|
|
|
|
onChange={(e) => this.editgame_scores(e,record.challenge_id.id)}
|
|
|
|
|
min={0} max={record.game_scores.game_score_full}
|
|
|
|
|
/></a>
|
|
|
|
|
{/*<a style={{textAlign: "center"}} className="color-blue font-14 mr20">查看</a>*/}
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
}];
|
|
|
|
|
// {
|
|
|
|
|
// title: '调分',
|
|
|
|
|
// key: 'adjustmentminute',
|
|
|
|
|
// dataIndex: 'adjustmentminute',
|
|
|
|
|
//
|
|
|
|
|
// render: (text, record) => (
|
|
|
|
|
// <span>
|
|
|
|
|
// <a>6小时 50分钟 6秒</a>
|
|
|
|
|
// </span>
|
|
|
|
|
// ),
|
|
|
|
|
// },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(this.props.isAdmin()===false){
|
|
|
|
|
columns.some((item,key)=> {
|
|
|
|
|
if (item.title === "调分") {
|
|
|
|
|
columns.splice(key, 1)
|
|
|
|
|
return true
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
)
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
{/*{data===undefined?"":""}*/}
|
|
|
|
|
|
|
|
|
|
<style>{`
|
|
|
|
|
.ant-table-thead > tr > th{
|
|
|
|
|
text-align: center;
|
|
|
|
@ -176,7 +225,7 @@ class OfficialAcademicTranscript extends Component {
|
|
|
|
|
text-align: left !important;
|
|
|
|
|
}
|
|
|
|
|
.TaskForms{
|
|
|
|
|
width: 500px;
|
|
|
|
|
width: 450px;
|
|
|
|
|
text-align: left !important;
|
|
|
|
|
padding: 16px !important;
|
|
|
|
|
}
|
|
|
|
@ -184,6 +233,11 @@ class OfficialAcademicTranscript extends Component {
|
|
|
|
|
width: 100%;
|
|
|
|
|
text-align: center;
|
|
|
|
|
}
|
|
|
|
|
.ant-input-number{
|
|
|
|
|
// margin-right: 20px;
|
|
|
|
|
border-radius: 0px;
|
|
|
|
|
width: 66px;
|
|
|
|
|
}
|
|
|
|
|
`}
|
|
|
|
|
</style>
|
|
|
|
|
{datas===undefined?"":<Table
|
|
|
|
|