|
|
|
@ -9,44 +9,12 @@ class OfficialAcademicTranscript extends Component {
|
|
|
|
|
super(props);
|
|
|
|
|
this.state = {
|
|
|
|
|
loadingstate:true,
|
|
|
|
|
datas:undefined
|
|
|
|
|
datas:undefined,
|
|
|
|
|
customsids:undefined
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
myjumptopic=(e)=>{
|
|
|
|
|
console.log("获取到值");
|
|
|
|
|
console.log(e);
|
|
|
|
|
this.props.jumptopic(e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
editgame_scores=(score,id)=>{
|
|
|
|
|
if(score!=null&&score!=undefined&&score!=""){
|
|
|
|
|
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.getdatalist()
|
|
|
|
|
this.props.showNotification(result.data.message);
|
|
|
|
|
}else{
|
|
|
|
|
this.props.showNotification(result.data.message);
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.props.showNotification("调分为空将不会修改之前的分数");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
|
|
|
|
|
let {data}=this.props;
|
|
|
|
|
|
|
|
|
|
let datas=[];
|
|
|
|
@ -65,8 +33,70 @@ class OfficialAcademicTranscript extends Component {
|
|
|
|
|
// adjustmentminute:asdasd
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
datas:datas
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
myjumptopic=(e)=>{
|
|
|
|
|
console.log("获取到值");
|
|
|
|
|
console.log(e);
|
|
|
|
|
this.props.jumptopic(e);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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<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`
|
|
|
|
|
axios.post(url,{
|
|
|
|
|
type:"report",
|
|
|
|
|
score:score,
|
|
|
|
|
challenge_id:id
|
|
|
|
|
}).then((result)=>{
|
|
|
|
|
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,
|
|
|
|
|
customsids:undefined
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.props.showNotification(result.data.message);
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
this.props.showNotification("调分为空将不会修改之前的分数");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let {datas,customsids}=this.state;
|
|
|
|
|
|
|
|
|
|
let columns=[{
|
|
|
|
|
title: '关卡',
|
|
|
|
@ -84,9 +114,11 @@ class OfficialAcademicTranscript extends Component {
|
|
|
|
|
className:"TaskForms",
|
|
|
|
|
render: (text, record) => (
|
|
|
|
|
<span>
|
|
|
|
|
<span className={"task-hide"} style={{color:"#676767"}}><a className="tasknameName font-14" onClick={()=>this.myjumptopic("id"+record.customs)} title={record.taskname.name.length>56?record.taskname.name:""} >
|
|
|
|
|
{record.taskname.name}{record.taskname.complete_status===2?<span className={"tasknamebox ml10"}>延时</span>:record.taskname.complete_status===3?<span className={"tasknameboxs ml10"}>延时</span>:""}
|
|
|
|
|
</a></span>
|
|
|
|
|
<span className={"task-hide linhe15"} style={{color:"#676767"}}><a className="tasknameName font-14" onClick={()=>this.myjumptopic("id"+record.customs)} title={record.taskname.name.length>15?record.taskname.name:""} >
|
|
|
|
|
{record.taskname.name}
|
|
|
|
|
</a>
|
|
|
|
|
{record.taskname.complete_status===2?<span className={"tasknamebox ml10"}>延时</span>:record.taskname.complete_status===3?<span className={"tasknameboxs ml10"}>延时</span>:""}
|
|
|
|
|
</span>
|
|
|
|
|
</span>
|
|
|
|
|
),
|
|
|
|
|
}, {
|
|
|
|
@ -159,9 +191,9 @@ class OfficialAcademicTranscript extends Component {
|
|
|
|
|
|
|
|
|
|
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><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>
|
|
|
|
|
{/*<a style={{textAlign: "center"}} className="color-blue font-14 mr20">查看</a>*/}
|
|
|
|
|
</span>
|
|
|
|
@ -224,11 +256,11 @@ class OfficialAcademicTranscript extends Component {
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
max-width: 450px;
|
|
|
|
|
max-width: 225px;
|
|
|
|
|
text-align: left !important;
|
|
|
|
|
}
|
|
|
|
|
.TaskForms{
|
|
|
|
|
max-width: 450px;
|
|
|
|
|
max-width: 260px;
|
|
|
|
|
text-align: left !important;
|
|
|
|
|
padding: 16px !important;
|
|
|
|
|
}
|
|
|
|
@ -241,6 +273,9 @@ class OfficialAcademicTranscript extends Component {
|
|
|
|
|
border-radius: 0px;
|
|
|
|
|
width: 66px;
|
|
|
|
|
}
|
|
|
|
|
.linhe15{
|
|
|
|
|
line-height: 15px;
|
|
|
|
|
}
|
|
|
|
|
`}
|
|
|
|
|
</style>
|
|
|
|
|
{datas===undefined?"":<Table
|
|
|
|
|