Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_aliyun_beta
cxt 5 years ago
commit 545dd2a3e5

@ -154,11 +154,11 @@ class ShixunWorkReport extends Component {
<div style={{ width:'100%',height:'75px'}} >
<p className=" fl color-black mt25 summaryname">{data&&data.shixun_name}</p>
{/*{this.props.isAdmin()?<a className=" fr font-14 ml30 mt10 mr20 color-grey-9 ">导出实训报告数据</a>:""}*/}
{/*{this.props.isAdmin() ? <a*/}
{/*className="fr color-blue font-16"*/}
{/*onClick={()=>this.confirmysl(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)}*/}
{/*>导出实训报告数据</a> : ""}*/}
<a onClick={this.goback} className="color-grey-6 fr font-16 ml30 mt15 mr20">返回</a>
{this.props.isAdmin() ? <a
className=" color-blue font-16 fr ml30 mt15 mr20"
onClick={()=>this.confirmysl(`/student_works/${homeworkid}/export_shixun_work_report.pdf`)}
>导出实训报告数据</a> : ""}
</div>
<div className="stud-class-set">
@ -179,6 +179,7 @@ class ShixunWorkReport extends Component {
<div className="font-16 color-dark-21 shixunreporttitle ml20 pd20">阶段成绩</div>
<OfficialAcademicTranscript
{...this.props}
data={data}
jumptopic={this.jumptopic}
/>

@ -17,6 +17,7 @@ class ConclusionEvaluation extends Component {
render() {
let {data}=this.props;
let columns=[{
title: '总评',
dataIndex: 'type',
@ -34,7 +35,38 @@ class ConclusionEvaluation extends Component {
</span>
),
}, {
title: '作业成绩',
title: '关卡得分',
dataIndex: 'challenge_scores',
key: 'challenge_scores',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={
<pre>
分数{record.challenge_scores.challenge_score}/总分{record.challenge_scores.challenge_score_full}
</pre>
}>
<span style={{color:'#FF6800'}}>{record.challenge_scores.challenge_score}</span><span className={"color-grey-9"}>/{record.challenge_scores.challenge_score_full}</span>
</Tooltip>
</span>
),
},
{
title: '效率分',
dataIndex: 'eff_scores',
key: 'eff_scores',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={
<pre>
分数{record.eff_scores.eff_score}/总分{record.eff_score_full}
</pre>
}>
<span style={{color:'#FF6800'}}>{record.eff_scores.eff_score}</span><span className={"color-grey-9"}>/{record.eff_scores.eff_score_full}</span>
</Tooltip>
</span>
),
},{
title: '最终成绩',
dataIndex: 'grade',
key: 'grade',
render: (text, record) => (
@ -71,12 +103,31 @@ class ConclusionEvaluation extends Component {
let datas=[];
if(data&&data.eff_score_full===undefined){
columns.some((item,key)=> {
if (item.title === "关卡得分") {
columns.splice(key, 1)
return true
}
}
)
columns.some((item,key)=> {
if (item.title === "效率分") {
columns.splice(key, 1)
return true
}
}
)
}
datas.push({
type: data&&data.overall_appraisal,
empirical: {minute:data&&data.myself_experience,total:data&&data.total_experience},
grade: {minute:data&&data.work_score,total:data&&data.all_work_score},
elapsed: data&&data.time_consuming,
time:data&&data.evaluate_count
time:data&&data.evaluate_count,
eff_scores:{eff_score:data&&data.eff_score,eff_score_full:data&&data.eff_score_full},
challenge_scores:{challenge_score:data&&data.challenge_score,challenge_score_full:data&&data.challenge_score_full}
})
return (
<div>

@ -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

Loading…
Cancel
Save