实训报告调整

dev_aliyun_beta
杨树明 6 years ago
parent b461eef525
commit 4247bedad7

@ -134,6 +134,17 @@ class ShixunWorkReport extends Component {
goback = () => { goback = () => {
this.props.history.replace(`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.state.data.homework_common_id}/list?tab=0`); this.props.history.replace(`/courses/${this.props.match.params.coursesId}/shixun_homeworks/${this.state.data.homework_common_id}/list?tab=0`);
} }
setupdalist=(challenge_score,overall_appraisal,work_score)=>{
let {data}=this.state;
let newdata=data;
newdata.challenge_score=challenge_score;
newdata.overall_appraisal=overall_appraisal;
newdata.work_score=work_score;
this.setState({
data:newdata
})
}
render() { render() {
let{data} =this.state; let{data} =this.state;
console.log(data) console.log(data)
@ -199,6 +210,7 @@ class ShixunWorkReport extends Component {
data={data} data={data}
jumptopic={this.jumptopic} jumptopic={this.jumptopic}
getdatalist={()=>this.getdatalist()} getdatalist={()=>this.getdatalist()}
setupdalist={(challenge_score,overall_appraisal,work_score)=>this.setupdalist(challenge_score,overall_appraisal,work_score)}
/> />
</div> </div>

@ -22,7 +22,8 @@ class OfficialAcademicTranscript extends Component {
this.props.jumptopic(e); this.props.jumptopic(e);
} }
editgame_scores=(score,id)=>{ editgame_scores=(e,id)=>{
let score=e.target.value;
if(score!=null&&score!=undefined&&score!=""){ if(score!=null&&score!=undefined&&score!=""){
let work_id=this.props.data.work_id; let work_id=this.props.data.work_id;
let url=`/student_works/${work_id}/adjust_review_score.json` let url=`/student_works/${work_id}/adjust_review_score.json`
@ -34,6 +35,8 @@ class OfficialAcademicTranscript extends Component {
if(result.data.status===0){ if(result.data.status===0){
this.props.getdatalist() this.props.getdatalist()
this.props.showNotification(result.data.message); this.props.showNotification(result.data.message);
this.props.setupdalist(result.data.challenge_score,result.data.overall_appraisal,result.data.work_score)
}else{ }else{
this.props.showNotification(result.data.message); this.props.showNotification(result.data.message);
} }
@ -84,9 +87,11 @@ class OfficialAcademicTranscript extends Component {
className:"TaskForms", className:"TaskForms",
render: (text, record) => ( render: (text, record) => (
<span> <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:""} > <span className={"task-hide linhe15"} 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>:""} {record.taskname.name}
</a></span> </a>
{record.taskname.complete_status===2?<span className={"tasknamebox ml10"}>延时</span>:record.taskname.complete_status===3?<span className={"tasknameboxs ml10"}></span>:""}
</span>
</span> </span>
), ),
}, { }, {
@ -160,7 +165,7 @@ class OfficialAcademicTranscript extends Component {
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a><InputNumber size="small" defaultValue={record.game_scores.game_score} <a><InputNumber size="small" defaultValue={record.game_scores.game_score}
onChange={(e) => this.editgame_scores(e,record.challenge_id.id)} onBlur={(e) => this.editgame_scores(e,record.challenge_id.id)}
min={0} max={record.game_scores.game_score_full} min={0} max={record.game_scores.game_score_full}
/></a> /></a>
{/*<a style={{textAlign: "center"}} className="color-blue font-14 mr20">查看</a>*/} {/*<a style={{textAlign: "center"}} className="color-blue font-14 mr20">查看</a>*/}
@ -224,11 +229,11 @@ class OfficialAcademicTranscript extends Component {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
max-width: 450px; max-width: 225px;
text-align: left !important; text-align: left !important;
} }
.TaskForms{ .TaskForms{
max-width: 450px; max-width: 260px;
text-align: left !important; text-align: left !important;
padding: 16px !important; padding: 16px !important;
} }
@ -241,6 +246,9 @@ class OfficialAcademicTranscript extends Component {
border-radius: 0px; border-radius: 0px;
width: 66px; width: 66px;
} }
.linhe15{
line-height: 15px;
}
`} `}
</style> </style>
{datas===undefined?"":<Table {datas===undefined?"":<Table

Loading…
Cancel
Save