dev_forum
杨树林 6 years ago
parent e2d8bbea66
commit 7be953025f

@ -26,17 +26,11 @@ class CommitSummary extends Component{
data:undefined, data:undefined,
cancels:false, cancels:false,
} }
// console.log("CommitSummary");
// console.log(this.props);
} }
componentDidMount() { componentDidMount() {
this.Getsubmissionsummaryinterface(); this.Getsubmissionsummaryinterface();
// this.props.form.setFieldsValue({
// description:"result.data.selected_data.tea_id",
//
// });
this.getTrainingjobsetting();
let query = this.props.location.pathname; let query = this.props.location.pathname;
const type = query.split('/'); const type = query.split('/');
this.setState({ this.setState({
@ -44,36 +38,6 @@ class CommitSummary extends Component{
}) })
} }
// saveFormData = () => {
// form.validateFields((err, values) => {
// if (err) {
// return;
// }
// var worksid=this.state.data.homeworkid;
// // console.log(values);
// // console.log(homeworkid);
// console.log(worksid);
// // 在这里执行保存到服务器的操作使用axios
// // message.success('保存成功!')
// var url = `/student_works/${worksid}/update_des.json`;
// axios.post(url,{
// description:values,
// }).then((result) => {
// if (result.status === 200) {
// // console.log(url)
// // console.log("提交总结接口")
// // console.log(JSON.stringify(result))
// // message.success(result.data.message);
// }
// if(result.status === 403){
//
// }
// }).catch((error) => {
// console.log(error)
// })
// });
// }
//获取提交总结接口 //获取提交总结接口
Getsubmissionsummaryinterface=()=>{ Getsubmissionsummaryinterface=()=>{
@ -183,20 +147,6 @@ class CommitSummary extends Component{
<span className="color-red mt20">*</span> <span className="color-red mt20">*</span>
内容</span> 内容</span>
</div> </div>
{/*<Form.Item*/}
{/*>*/}
{/* {getFieldDecorator('description', {*/}
{/* rules: [{*/}
{/* required: true, message: '请输入帖子内容',*/}
{/* }, {*/}
{/* max: 5000, message: '最大限制为5000个字符',*/}
{/* }],*/}
{/* })(*/}
{/* <TPMMDEditor ref={this.mdRef} placeholder={'请在此输入帖子详情最大限制为5000个字符'}*/}
{/* mdID={'courseMessageMD'} initValue={this.editTopic ? this.editTopic.content : ''} className="courseMessageMD"></TPMMDEditor>*/}
{/* )}*/}
{/*</Form.Item>*/}
{/*<SeoCreateForm homeworkid={this.props.match.params.homeworkid} description={this.state.description} data={this.state.data=== undefined?undefined:this.state.data}/>*/}
<div className="new-wrap"> <div className="new-wrap">
<Form labelCol={{span: 5}}layout='vertical' onSubmit={this.handleSubmit} wrapperCol={{span: 12}}> <Form labelCol={{span: 5}}layout='vertical' onSubmit={this.handleSubmit} wrapperCol={{span: 12}}>
<Form.Item <Form.Item
@ -231,16 +181,6 @@ class CommitSummary extends Component{
</div> </div>
{/*<Form.Item wrapperCol={{span: 12, offset: 5}}>*/}
{/* <div className="clearfix mt30 mb30">*/}
{/* <Button type="primary" htmlType="submit" className="defalutSubmitbtn fl mr20">*/}
{/* 提交*/}
{/* </Button>*/}
{/* /!*<a className="defalutSubmitbtn fl mr20">提交</a>*!/*/}
{/* <a className="defalutCancelbtn fl" onClick={this.goback}>取消</a>*/}
{/* </div>*/}
{/*</Form.Item>*/}
</div> </div>
{/*</Form>*/} {/*</Form>*/}
</div> </div>

@ -92,6 +92,7 @@ class Listofworks extends Component {
unlimitedtwo: 1, unlimitedtwo: 1,
code_review: false, code_review: false,
boolgalist:true, boolgalist:true,
challenges_count:0,
columns: [ columns: [
{ {
title: '序号', title: '序号',
@ -179,7 +180,13 @@ class Listofworks extends Component {
align: 'center', align: 'center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{"color": '#07111B', "text-align": "center"}}>{record.completion}</a>
<Tooltip placement="bottom" title={<div>
<div>已通过{record.completion}{this.state.challenges_count}</div>
</div>}>
<a style={{"color": '#07111B', "text-align": "center"}}>{record.completion+"/"+this.state.challenges_count}</a>
</Tooltip>
</span> </span>
) )
}, },
@ -210,6 +217,31 @@ class Listofworks extends Component {
align: 'center', align: 'center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
{
record.efficiencyscore&& record.efficiencyscore=== "--"?(
record.submitstate==="按时提交"?
<Tooltip placement="bottom" title={<div>
<div>作业截止时系统根据学生在课堂成员中的效率表现自动评分</div>
</div>}>
<a style={{color:"#9A9A9A"}}>
--
</a>
</Tooltip>
:
record.submitstate==="延时提交"?
<Tooltip placement="bottom" title={<div>
<div>补交结束时系统根据学生在课堂成员中的效率表现自动评分</div>
</div>}>
<a style={{color:"#9A9A9A"}}>
--
</a>
</Tooltip>
:
<a style={{color:"#9A9A9A"}}>
--
</a>
)
:
<a style={parseInt(record.efficiencyscore) <= 60 ? { <a style={parseInt(record.efficiencyscore) <= 60 ? {
"color": '#747A7F', "color": '#747A7F',
"text-align": "center" "text-align": "center"
@ -220,6 +252,8 @@ class Listofworks extends Component {
"color": '#DD1717', "color": '#DD1717',
"text-align": "center" "text-align": "center"
} : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore}</a> } : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore}</a>
}
</span> </span>
) )
}, },
@ -230,6 +264,20 @@ class Listofworks extends Component {
align: 'center', align: 'center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
{
record.ultimate_score=== true?
<Tooltip placement="bottom" title={<div>
<div>{record.user_name}{record.user_login}</div>
<div>{record.finalscore === "--"?<span>最终调整成绩0</span> :<span>{record.finalscore}</span>}</div>
</div>}>
{
record.finalscore&&record.finalscore==="--"?
<a style=
{{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.finalscore}</a>
:
<a style={parseInt(record.finalscore) <= 60 ? { <a style={parseInt(record.finalscore) <= 60 ? {
"color": '#747A7F', "color": '#747A7F',
"text-align": "center" "text-align": "center"
@ -240,6 +288,38 @@ class Listofworks extends Component {
"color": '#747A7F', "color": '#747A7F',
"text-align": "center" "text-align": "center"
}}>{record.finalscore}</a> }}>{record.finalscore}</a>
}
</Tooltip>
:
<Tooltip placement="bottom" title={<div>
<div>{record.user_name}{record.user_login}</div>
<div>{record.levelscore === "--"?<span>关卡得分0</span> :<span>{record.levelscore}</span>}</div>
<div>{record.efficiencyscore === "--"?<span>效率评分0</span> :<span>{record.efficiencyscore}</span>}</div>
<div>{record.late_penalty === "--"?<span>迟交扣分0</span> :<span>{record.late_penalty}</span>}</div>
<div>{record.finalscore === "--"?<span>最终成绩0</span> :<span>{record.finalscore}</span>}</div>
</div>}>
{
record.finalscore&&record.finalscore==="--"?
<a style=
{{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.finalscore}</a>
:
<a style={parseInt(record.finalscore) <= 60 ? {
"color": '#747A7F',
"text-align": "center"
} : parseInt(record.finalscore) < 90 ? {
"color": '#FF6800',
"text-align": "center"
} : parseInt(record.finalscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
}}>{record.finalscore}</a>
}
</Tooltip>
}
</span> </span>
) )
}, },
@ -251,10 +331,15 @@ class Listofworks extends Component {
align: 'center', align: 'center',
width:'93px', width:'93px',
render: (text, record) => ( render: (text, record) => (
record.submitstate === "未提交" ? "--" : record.submitstate === "未提交" ? <span style={{ color: '#9A9A9A'}}>--</span> :
<span> <span>
<Tooltip placement="bottom" title={<div>
<div>直接调整最终成绩的分数</div>
<div>其它评分全部作废</div>
</div>}>
<a style={this.props.isNotMember() === true ? this.state.mystyles : this.state.mystyle} <a style={this.props.isNotMember() === true ? this.state.mystyles : this.state.mystyle}
onClick={() => this.Viewstudenttraininginformations(record)}>调分</a> onClick={() => this.Viewstudenttraininginformations(record)}>调分</a>
</Tooltip>
<a style={{"text-align": "center"}} className="color-blue" <a style={{"text-align": "center"}} className="color-blue"
onClick={() => this.Viewstudenttraininginformation(record)}>{record.operating}</a> onClick={() => this.Viewstudenttraininginformation(record)}>{record.operating}</a>
</span> </span>
@ -320,7 +405,8 @@ class Listofworks extends Component {
publish_immediately: result.data.publish_immediately, publish_immediately: result.data.publish_immediately,
work_efficiency: result.data.work_efficiency, work_efficiency: result.data.work_efficiency,
end_immediately: result.data.end_immediately, end_immediately: result.data.end_immediately,
code_review: result.data.code_review code_review: result.data.code_review,
challenges_count:result.data.challenges_count,
}) })
this.seacthdata(); this.seacthdata();
} }
@ -371,6 +457,7 @@ class Listofworks extends Component {
task_status: result.data.task_status, task_status: result.data.task_status,
course_group_info: result.data.course_group_info, course_group_info: result.data.course_group_info,
loadingstate: false, loadingstate: false,
challenges_count:result.data.challenges_count,
}) })
this.seacthdata(); this.seacthdata();
@ -420,11 +507,15 @@ class Listofworks extends Component {
// updatetime:this.state.teacherdata.student_works[i].update_time, // updatetime:this.state.teacherdata.student_works[i].update_time,
// updatetime:"", // updatetime:"",
updatetime: timedata === "Invalid date" ? "--" : timedata, updatetime: timedata === "Invalid date" ? "--" : timedata,
completion: this.state.teacherdata.student_works[i].complete_count === 4 ? "4/4" : this.state.teacherdata.student_works[i].complete_count === 3 ? "3/4" : this.state.teacherdata.student_works[i].complete_count === 2 ? "2/4" : this.state.teacherdata.student_works[i].complete_count === 1 ? "1/4" : this.state.teacherdata.student_works[i].complete_count === 0 ? "0/0" :this.state.teacherdata.student_works[i].complete_count == null ? "0/0" :this.state.teacherdata.student_works[i].complete_count == undefined ? "0/0": 0, completion: this.state.teacherdata.student_works[i].complete_count === null ? "0" :this.state.teacherdata.student_works[i].complete_count === undefined ? "0": this.state.teacherdata.student_works[i].complete_count,
levelscore: this.state.teacherdata.student_works[i].final_score, levelscore: this.state.teacherdata.student_works[i].final_score,
efficiencyscore: this.state.teacherdata.student_works[i].eff_score, efficiencyscore: this.state.teacherdata.student_works[i].eff_score,
finalscore: this.state.teacherdata.student_works[i].work_score, finalscore: this.state.teacherdata.student_works[i].work_score,
operating: "查看", operating: "查看",
late_penalty: this.state.teacherdata.student_works[i].late_penalty=== null?"0":this.state.teacherdata.student_works[i].late_penalty === undefined?"0":this.state.teacherdata.student_works[i].late_penalty,
ultimate_score:this.state.teacherdata.student_works[i].ultimate_score,
user_name: this.state.teacherdata.student_works[i].user_name,
user_login: this.state.teacherdata.student_works[i].user_login,
}) })
} }
@ -435,6 +526,185 @@ class Listofworks extends Component {
current: this.state.page, current: this.state.page,
} }
if (this.state.work_efficiency === false) { if (this.state.work_efficiency === false) {
if(JSON.stringify(this.state.course_group_info) === "[]" ? "" : this.state.course_group_info === undefined ? "" :this.state.course_group_info === null){
columns = [
{
title: '序号',
dataIndex: 'number',
key: 'number',
align: 'center',
width:'96px',
render: (text, record) => (
<span>
<a style={{"color": '#07111B', "text-align": "center"}}>{record.number}</a>
</span>
)
},
{
title: '姓名',
dataIndex: 'name',
key: 'name',
align: 'center',
width:'147px',
render: (text, record) => (
<span>
<a style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
</span>
)
},
{
title: '学号',
dataIndex: 'stduynumber',
key: 'stduynumber',
align: 'center',
width:'200px',
render: (text, record) => (
<span>
<a style={{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber}</a>
</span>
),
},
{
title: '提交状态',
dataIndex: 'submitstate',
key: 'submitstate',
align: 'center',
render: (text, record) => (
<span>
<a style={record.submitstate === "延时提交" ? {
"color": '#DD1717',
"text-align": "center"
} : record.submitstate === "按时提交" ? {"color": '#29BD8B', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
}}>{record.submitstate}</a>
</span>
)
},
{
title: '更新时间',
dataIndex: 'updatetime',
key: 'updatetime',
align: 'center',
render: (text, record) => (
<span>
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.updatetime}</a>
</span>
),
},
{
title: '完成情况',
dataIndex: 'completion',
key: 'completion',
align: 'center',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={<div>
<div>已通过{record.completion}{this.state.challenges_count}</div>
</div>}>
<a style={{"color": '#07111B', "text-align": "center"}}>{record.completion+"/"+this.state.challenges_count}</a>
</Tooltip>
</span>
)
},
{
title: '最终成绩',
dataIndex: 'finalscore',
key: 'finalscore',
align: 'center',
render: (text, record) => (
<span>
{
record.ultimate_score=== true?
<Tooltip placement="bottom" title={<div>
<div>{record.user_name}{record.user_login}</div>
<div>{record.finalscore === "--"?<span>最终调整成绩0</span> :<span>{record.finalscore}</span>}</div>
</div>}>
{
record.finalscore&&record.finalscore==="--"?
<a style=
{{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.finalscore}</a>
:
<a style={parseInt(record.finalscore) <= 60 ? {
"color": '#747A7F',
"text-align": "center"
} : parseInt(record.finalscore) < 90 ? {
"color": '#FF6800',
"text-align": "center"
} : parseInt(record.finalscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
}}>{record.finalscore}</a>
}
</Tooltip>
:
<Tooltip placement="bottom" title={<div>
<div>{record.user_name}{record.user_login}</div>
<div>{record.levelscore === "--"?<span>关卡得分0</span> :<span>{record.levelscore}</span>}</div>
<div>{record.efficiencyscore === "--"?<span>效率评分0</span> :<span>{record.efficiencyscore}</span>}</div>
<div>{record.late_penalty === "--"?<span>迟交扣分0</span> :<span>{record.late_penalty}</span>}</div>
<div>{record.finalscore === "--"?<span>最终成绩0</span> :<span>{record.finalscore}</span>}</div>
</div>}>
{
record.finalscore&&record.finalscore==="--"?
<a style=
{{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.finalscore}</a>
:
<a style={parseInt(record.finalscore) <= 60 ? {
"color": '#747A7F',
"text-align": "center"
} : parseInt(record.finalscore) < 90 ? {
"color": '#FF6800',
"text-align": "center"
} : parseInt(record.finalscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
}}>{record.finalscore}</a>
}
</Tooltip>
}
</span>
)
},
{
title: '操作',
dataIndex: 'operating',
key: 'operating',
display: 'block',
align: 'center',
width:'96px',
render: (text, record) => (
record.submitstate === "未提交" ? <span style={{color:'#9A9A9A'}}>--</span>:
<span>
<Tooltip placement="bottom" title={<div>
<div>直接调整最终成绩的分数</div>
<div>其它评分全部作废</div>
</div>}>
<a style={this.props.isNotMember() === true ? this.state.mystyles : this.state.mystyle}
onClick={() => this.Viewstudenttraininginformations(record)}>调分</a>
</Tooltip>
<a style={{"display": "block", "text-align": "center"}} className="color-blue"
onClick={() => this.Viewstudenttraininginformation(record)}>{record.operating}</a>
</span>
)
},
]
}else{
columns = [ columns = [
{ {
title: '序号', title: '序号',
@ -482,7 +752,12 @@ class Listofworks extends Component {
align: 'center', align: 'center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{"color": '#07111B', "text-align": "center"}}>{record.classroom}</a> {
record.classroom&&record.classroom==="--"?
<a style={{"color": '#9A9A9A', "text-align": "center"}}></a>
:
<a style={{"color": '#07111B', "text-align": "center"}}></a>
}
</span> </span>
) )
}, },
@ -523,7 +798,13 @@ class Listofworks extends Component {
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{"color": '#07111B', "text-align": "center"}}>{record.completion}</a>
<Tooltip placement="bottom" title={<div>
<div>已通过{record.completion}{this.state.challenges_count}</div>
</div>}>
<a style={{"color": '#07111B', "text-align": "center"}}>{record.completion+"/"+this.state.challenges_count}</a>
</Tooltip>
</span> </span>
) )
}, },
@ -534,6 +815,20 @@ class Listofworks extends Component {
align: 'center', align: 'center',
render: (text, record) => ( render: (text, record) => (
<span> <span>
{
record.ultimate_score=== true?
<Tooltip placement="bottom" title={<div>
<div>{record.user_name}{record.user_login}</div>
<div>{record.finalscore === "--"?<span>最终调整成绩0</span> :<span>{record.finalscore}</span>}</div>
</div>}>
{
record.finalscore&&record.finalscore==="--"?
<a style=
{{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.finalscore}</a>
:
<a style={parseInt(record.finalscore) <= 60 ? { <a style={parseInt(record.finalscore) <= 60 ? {
"color": '#747A7F', "color": '#747A7F',
"text-align": "center" "text-align": "center"
@ -544,7 +839,38 @@ class Listofworks extends Component {
"color": '#747A7F', "color": '#747A7F',
"text-align": "center" "text-align": "center"
}}>{record.finalscore}</a> }}>{record.finalscore}</a>
}
</Tooltip>
:
<Tooltip placement="bottom" title={<div>
<div>{record.user_name}{record.user_login}</div>
<div>{record.levelscore === "--"?<span>关卡得分0</span> :<span>{record.levelscore}</span>}</div>
<div>{record.efficiencyscore === "--"?<span>效率评分0</span> :<span>{record.efficiencyscore}</span>}</div>
<div>{record.late_penalty === "--"?<span>迟交扣分0</span> :<span>{record.late_penalty}</span>}</div>
<div>{record.finalscore === "--"?<span>最终成绩0</span> :<span>{record.finalscore}</span>}</div>
</div>}>
{
record.finalscore&&record.finalscore==="--"?
<a style=
{{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.finalscore}</a>
:
<a style={parseInt(record.finalscore) <= 60 ? {
"color": '#747A7F',
"text-align": "center"
} : parseInt(record.finalscore) < 90 ? {
"color": '#FF6800',
"text-align": "center"
} : parseInt(record.finalscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
}}>{record.finalscore}</a>
}
</Tooltip>
}
</span> </span>
) )
}, },
@ -558,14 +884,267 @@ class Listofworks extends Component {
render: (text, record) => ( render: (text, record) => (
record.submitstate === "未提交" ? <span style={{color:'#9A9A9A'}}>--</span>: record.submitstate === "未提交" ? <span style={{color:'#9A9A9A'}}>--</span>:
<span> <span>
<Tooltip placement="bottom" title={<div>
<div>直接调整最终成绩的分数</div>
<div>其它评分全部作废</div>
</div>}>
<a style={this.props.isNotMember() === true ? this.state.mystyles : this.state.mystyle} <a style={this.props.isNotMember() === true ? this.state.mystyles : this.state.mystyle}
onClick={() => this.Viewstudenttraininginformations(record)}>调分</a> onClick={() => this.Viewstudenttraininginformations(record)}>调分</a>
</Tooltip>
<a style={{"display": "block", "text-align": "center"}} className="color-blue" <a style={{"display": "block", "text-align": "center"}} className="color-blue"
onClick={() => this.Viewstudenttraininginformation(record)}>{record.operating}</a> onClick={() => this.Viewstudenttraininginformation(record)}>{record.operating}</a>
</span> </span>
) )
}, },
] ]
}
}else {
if(JSON.stringify(this.state.course_group_info) === "[]" ? "" : this.state.course_group_info === undefined ? "" : this.state.course_group_info === null){
columns=[
{
title: '序号',
dataIndex: 'number',
key: 'number',
align: 'center',
width:'96px',
render: (text, record) => (
<span>
<a style={{"color": '#07111B', "text-align": "center"}}>{record.number}</a>
</span>
)
},
{
title: '姓名',
dataIndex: 'name',
key: 'name',
align: 'center',
Width:'147px',
render: (text, record) => (
<span>
<a style={{"color": '#07111B', "text-align": "center"}}>{record.name}</a>
</span>
)
},
{
title: '学号',
dataIndex: 'stduynumber',
key: 'stduynumber',
align: 'center',
width:'200px',
render: (text, record) => (
<span>
<a style={{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.stduynumber === undefined ? "--" : record.stduynumber === null ? "--" : record.stduynumber === "" ? "--" : record.stduynumber}</a>
</span>
),
},
{
title: '提交状态',
dataIndex: 'submitstate',
key: 'submitstate',
align: 'center',
render: (text, record) => (
<span>
<a style={record.submitstate === "延时提交" ? {
"color": '#DD1717',
"text-align": "center"
} : record.submitstate === "按时提交" ? {"color": '#29BD8B', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
}}>{record.submitstate}</a>
</span>
)
},
{
title: '更新时间',
dataIndex: 'updatetime',
key: 'updatetime',
align: 'center',
render: (text, record) => (
<span>
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.updatetime}</a>
</span>
),
},
{
title: '完成情况',
dataIndex: 'completion',
key: 'completion',
align: 'center',
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={<div>
<div>已通过{record.completion}{this.state.challenges_count}</div>
</div>}>
<a style={{"color": '#07111B', "text-align": "center"}}>{record.completion+"/"+this.state.challenges_count}</a>
</Tooltip>
</span>
)
},
{
title: '关卡得分',
dataIndex: 'levelscore',
key: 'levelscore',
align: 'center',
render: (text, record) => (
<span>
<a style={parseInt(record.levelscore) <= 60 ? {
"color": '#747A7F',
"text-align": "center"
} : parseInt(record.levelscore) < 90 ? {
"color": '#FF6800',
"text-align": "center"
} : parseInt(record.levelscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
}}>{record.levelscore}</a>
</span>
)
},
{
title: '效率分',
dataIndex: 'efficiencyscore',
key: 'efficiencyscore',
align: 'center',
render: (text, record) => (
<span>
{
record.efficiencyscore&& record.efficiencyscore=== "--"?(
record.submitstate==="按时提交"?
<Tooltip placement="bottom" title={<div>
<div>作业截止时系统根据学生在课堂成员中的效率表现自动评分</div>
</div>}>
<a style={{color:"#9A9A9A"}}>
--
</a>
</Tooltip>
:
record.submitstate==="延时提交"?
<Tooltip placement="bottom" title={<div>
<div>补交结束时系统根据学生在课堂成员中的效率表现自动评分</div>
</div>}>
<a style={{color:"#9A9A9A"}}>
--
</a>
</Tooltip>
:
<a style={{color:"#9A9A9A"}}>
--
</a>
)
:
<a style={parseInt(record.efficiencyscore) <= 60 ? {
"color": '#747A7F',
"text-align": "center"
} : parseInt(record.efficiencyscore) < 90 ? {
"color": '#FF6800',
"text-align": "center"
} : parseInt(record.efficiencyscore) >= 90 ? {
"color": '#DD1717',
"text-align": "center"
} : {"color": '#747A7F', "text-align": "center"}}>{record.efficiencyscore}</a>
}
</span>
)
},
{
title: '最终成绩',
dataIndex: 'finalscore',
key: 'finalscore',
align: 'center',
render: (text, record) => (
<span>
{
record.ultimate_score=== true?
<Tooltip placement="bottom" title={<div>
<div>{record.user_name}{record.user_login}</div>
<div>{record.finalscore === "--"?<span>最终调整成绩0</span> :<span>{record.finalscore}</span>}</div>
</div>}>
{
record.finalscore&&record.finalscore==="--"?
<a style=
{{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.finalscore}</a>
:
<a style={parseInt(record.finalscore) <= 60 ? {
"color": '#747A7F',
"text-align": "center"
} : parseInt(record.finalscore) < 90 ? {
"color": '#FF6800',
"text-align": "center"
} : parseInt(record.finalscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
}}>{record.finalscore}</a>
}
</Tooltip>
:
<Tooltip placement="bottom" title={<div>
<div>{record.user_name}{record.user_login}</div>
<div>{record.levelscore === "--"?<span>关卡得分0</span> :<span>{record.levelscore}</span>}</div>
<div>{record.efficiencyscore === "--"?<span>效率评分0</span> :<span>{record.efficiencyscore}</span>}</div>
<div>{record.late_penalty === "--"?<span>迟交扣分0</span> :<span>{record.late_penalty}</span>}</div>
<div>{record.finalscore === "--"?<span>最终成绩0</span> :<span>{record.finalscore}</span>}</div>
</div>}>
{
record.finalscore&&record.finalscore==="--"?
<a style=
{{
"color": '#9A9A9A',
"text-align": "center"
}}>{record.finalscore}</a>
:
<a style={parseInt(record.finalscore) <= 60 ? {
"color": '#747A7F',
"text-align": "center"
} : parseInt(record.finalscore) < 90 ? {
"color": '#FF6800',
"text-align": "center"
} : parseInt(record.finalscore) >= 90 ? {"color": '#DD1717', "text-align": "center"} : {
"color": '#747A7F',
"text-align": "center"
}}>{record.finalscore}</a>
}
</Tooltip>
}
</span>
)
},
{
title: '操作',
dataIndex: 'operating',
key: 'operating',
display: 'block',
align: 'center',
width:'93px',
render: (text, record) => (
record.submitstate === "未提交" ? <span style={{ color: '#9A9A9A'}}>--</span> :
<span>
<Tooltip placement="bottom" title={<div>
<div>直接调整最终成绩的分数</div>
<div>其它评分全部作废</div>
</div>}>
<a style={this.props.isNotMember() === true ? this.state.mystyles : this.state.mystyle}
onClick={() => this.Viewstudenttraininginformations(record)}>调分</a>
</Tooltip>
<a style={{"text-align": "center"}} className="color-blue"
onClick={() => this.Viewstudenttraininginformation(record)}>{record.operating}</a>
</span>
)
},
]
}
} }
} else { } else {

@ -91,8 +91,8 @@ class Listofworksstudentone extends Component {
search: "", search: "",
order: "", order: "",
b_order: "asc", b_order: "asc",
page:1, page: 1,
limit:20, limit: 20,
work_status: "", work_status: "",
course_group: "", course_group: "",
} }
@ -165,7 +165,7 @@ class Listofworksstudentone extends Component {
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error)
this.setState({ this.setState({
loadingstate:false loadingstate: false
}) })
}) })
} }
@ -450,7 +450,7 @@ class Listofworksstudentone extends Component {
} }
axios.post(urll, data).then((result) => { axios.post(urll, data).then((result) => {
if(result !== undefined){ if (result !== undefined) {
// console.log("学生公开的作品列表") // console.log("学生公开的作品列表")
// console.log(JSON.stringify(result)) // console.log(JSON.stringify(result))
this.setState({ this.setState({
@ -495,20 +495,38 @@ class Listofworksstudentone extends Component {
} }
render() { render() {
let {visibles, game_list, limit, viewtrainingdata, teacherdata,page, data, jobsettingsdata,styletable, datas, order, loadingstate} = this.state; let {visibles, game_list, limit, viewtrainingdata, teacherdata, page, data, jobsettingsdata, styletable, datas, order, loadingstate} = this.state;
let columns = [ let columns = [
{ {
title: '序号', title: '序号',
dataIndex: 'number', dataIndex: 'number',
key: 'number', key: 'number',
align: "center", align: "center",
width:'96px', width: '96px',
render: (text, record) => ( render: (text, record) => (
<span> <span>
{record.number === undefined ?
<a style={{
"color": '#9A9A9A',
"text-align": "center"
}}> --</a>
: record.number === "" ?
<a style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--</a>
: record.number === "--" ?
<a style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--</a>
:
<a style={{ <a style={{
"color": '#07111B', "color": '#07111B',
"text-align": "center" "text-align": "center"
}}>{record.number === undefined ? "--" : record.number === "" ? "--" : record.number}</a> }}> {record.number}</a>
}
</span> </span>
), ),
}, },
@ -517,13 +535,39 @@ class Listofworksstudentone extends Component {
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
align: "center", align: "center",
width:'147px', width: '147px',
render: (text, record) => ( render: (text, record) => (
<span> <span>
{record.name === undefined ?
<a style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--</a>
:
record.name === "" ?
<a style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--</a>
:
record.name === null ?
<a style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--</a>
:
record.name === "--" ?
<a style={{
"color": '#9A9A9A',
"text-align": "center"
}}>--</a>
:
<a style={{ <a style={{
"color": '#07111B', "color": '#07111B',
"text-align": "center" "text-align": "center"
}}>{record.name === undefined ? "--" : record.name === "" ? "--" : record.name === null ? "--" : record.name}</a> }}>{record.name}</a>
}
</span> </span>
), ),
}, },
@ -532,7 +576,7 @@ class Listofworksstudentone extends Component {
dataIndex: 'stduynumber', dataIndex: 'stduynumber',
key: 'stduynumber', key: 'stduynumber',
align: "center", align: "center",
width:'200px', width: '200px',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{ <a style={{
@ -609,6 +653,10 @@ class Listofworksstudentone extends Component {
align: "center", align: "center",
render: (text, record) => ( render: (text, record) => (
<span> <span>
{
record.levelscore && record.levelscore === "--"?
<a style={{"color": '#9A9A9A', "text-align": "center"}}>{record.levelscore}</a>
:
<a style={parseInt(record.levelscore) > 90 ? { <a style={parseInt(record.levelscore) > 90 ? {
"color": '#DD1717', "color": '#DD1717',
"text-align": "center" "text-align": "center"
@ -620,6 +668,8 @@ class Listofworksstudentone extends Component {
"color": '#747A7F', "color": '#747A7F',
"text-align": "center" "text-align": "center"
} : {"color": '#747A7F', "text-align": "center"}}>{record.levelscore}</a> } : {"color": '#747A7F', "text-align": "center"}}>{record.levelscore}</a>
}
</span> </span>
), ),
}, },
@ -628,11 +678,11 @@ class Listofworksstudentone extends Component {
dataIndex: 'operating', dataIndex: 'operating',
key: 'operating', key: 'operating',
align: "center", align: "center",
width:'96px', width: '96px',
render: (text, record) => ( render: (text, record) => (
<span> <span>
{ {
record.submitstate === "未提交" ? "--" record.submitstate === "未提交" ?<span style={{ color: '#9A9A9A'}}>--</span>
: :
<a style={{"text-align": "center"}} <a style={{"text-align": "center"}}
className="color-blue" className="color-blue"
@ -683,12 +733,12 @@ class Listofworksstudentone extends Component {
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<ActionBtn <ActionBtn
className=" btn colorgrey fl hovercolorblue " className=" btn colorgrey fl hovercolorblue "
to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id===undefined?"" :jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn> to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id === undefined ? "" : jobsettingsdata.data.category.category_id}`}>{jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_name}</ActionBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn className="fl">作业详情</WordsBtn> <WordsBtn className="fl">作业详情</WordsBtn>
</p> </p>
</div> </div>
<div className="educontent mb30" style={{width:"1250px"}}> <div className="educontent mb30" style={{width: "1250px"}}>
<p className=" fl color-black summaryname"> <p className=" fl color-black summaryname">
{teacherdata === undefined ? "" : teacherdata.homework_name} {teacherdata === undefined ? "" : teacherdata.homework_name}
</p> </p>
@ -696,11 +746,11 @@ class Listofworksstudentone extends Component {
typelist={teacherdata === undefined ? [""] : teacherdata.homework_status} typelist={teacherdata === undefined ? [""] : teacherdata.homework_status}
/> />
<a className="color-grey-9 fr font-16 summaryname ml20 mr20" <a className="color-grey-9 fr font-16 summaryname ml20 mr20"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" :jobsettingsdata.data.category.category_id===undefined?"":jobsettingsdata.data.category.category_id}`}>返回</a> href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${jobsettingsdata === undefined ? "" : jobsettingsdata.data.category.category_id === undefined ? "" : jobsettingsdata.data.category.category_id}`}>返回</a>
<p className="color-grey-9 fr font-16"></p> <p className="color-grey-9 fr font-16"></p>
</div> </div>
<div className="edu-back-white" style={{width:"1250px"}}> <div className="edu-back-white" style={{width: "1250px"}}>
<div className="stud-class-set bor-bottom-greyE "> <div className="stud-class-set bor-bottom-greyE ">
<div className=" clearfix edu-back-white poll_list"> <div className=" clearfix edu-back-white poll_list">
<Link className="active" <Link className="active"
@ -742,11 +792,12 @@ class Listofworksstudentone extends Component {
<span className="fl color-grey-6 font-12"><span <span className="fl color-grey-6 font-12"><span
className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count}</span><span className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count}</span><span
className="ml10">{teacherdata === undefined ? "" : teacherdata.uncommit_count}</span><span></span> className="ml10">{teacherdata === undefined ? "" : teacherdata.uncommit_count}</span><span></span>
{teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" :teacherdata.left_time === null ? "" : {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" :
<span className="ml20">{teacherdata.left_time.status}</span> <span className="ml20">{teacherdata.left_time.status}</span>
} }
{teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" : {teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" :
<span className="ml20" style={{"color": '#FF6800'}}>{teacherdata.left_time.time}</span> <span className="ml20"
style={{"color": '#FF6800'}}>{teacherdata.left_time.time}</span>
} }
</span> </span>
@ -888,8 +939,11 @@ class Listofworksstudentone extends Component {
<span className="fl color-grey-6 font-12"><span <span className="fl color-grey-6 font-12"><span
className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count}</span><span className="color-orange-tip">{teacherdata === undefined ? "" : teacherdata.commit_count === undefined ? "" : teacherdata.commit_count}</span><span
className="ml10">{teacherdata === undefined ? "" : teacherdata.uncommit_count}</span><span></span> className="ml10">{teacherdata === undefined ? "" : teacherdata.uncommit_count}</span><span></span>
{teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" :<span className="ml20">{teacherdata.left_time.status}</span>} {teacherdata === undefined ? "" : teacherdata.left_time === undefined ? "" : teacherdata.left_time === null ? "" :
{teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" :teacherdata.left_time === null ? "0" :<span className="ml20" style={{"color": '#FF6800'}}>{teacherdata.left_time.time}</span> } <span className="ml20">{teacherdata.left_time.status}</span>}
{teacherdata === undefined ? "0" : teacherdata.left_time === undefined ? "0" : teacherdata.left_time === null ? "0" :
<span className="ml20"
style={{"color": '#FF6800'}}>{teacherdata.left_time.time}</span>}
</span> </span>
<div className="fr color-grey-6 edu-menu-panel"> <div className="fr color-grey-6 edu-menu-panel">
@ -899,9 +953,12 @@ class Listofworksstudentone extends Component {
{order === "updated_at" ? "时间" : order === "work_score" ? "成绩" : order === "student_id" ? "学号" : ""}排序</a> {order === "updated_at" ? "时间" : order === "work_score" ? "成绩" : order === "student_id" ? "学号" : ""}排序</a>
<i className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i> <i className="iconfont icon-xiajiantou ml5 font-12 color-grey-6"></i>
<ul className="edu-position-hide undis mt10"> <ul className="edu-position-hide undis mt10">
<li> <a onClick={(e) => this.funorder("updated_at")} data-remote="true" className="color-grey-6 font-12" style={{"text-align": "center "}}>更新时间</a></li> <li><a onClick={(e) => this.funorder("updated_at")} data-remote="true"
<li> <a onClick={(e) => this.funorder("work_score")} data-remote="true" className="color-grey-6 font-12" style={{"text-align": "center "}}>最终成绩</a></li> className="color-grey-6 font-12" style={{"text-align": "center "}}>更新时间</a></li>
<li> <a onClick={(e) => this.funorder("student_id")} data-remote="true" className="color-grey-6 font-12" style={{"text-align": "center "}}>学生学号</a></li> <li><a onClick={(e) => this.funorder("work_score")} data-remote="true"
className="color-grey-6 font-12" style={{"text-align": "center "}}>最终成绩</a></li>
<li><a onClick={(e) => this.funorder("student_id")} data-remote="true"
className="color-grey-6 font-12" style={{"text-align": "center "}}>学生学号</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>

@ -136,6 +136,7 @@ class TraineetraininginformationModal extends Component {
dataIndex: 'number', dataIndex: 'number',
key: 'number', key: 'number',
align: "center", align: "center",
width: "117px",
render: (text, record) => ( render: (text, record) => (
<span > <span >
<a style={{"color":'#07111B', "text-align": "center"}}>{record.number}</a> <a style={{"color":'#07111B', "text-align": "center"}}>{record.number}</a>
@ -146,7 +147,7 @@ class TraineetraininginformationModal extends Component {
title: '完成时间', title: '完成时间',
dataIndex: 'name', dataIndex: 'name',
key: 'name', key: 'name',
width: 178, width: "203px",
align: "center", align: "center",
render: (text, record) => ( render: (text, record) => (
<span > <span >
@ -159,6 +160,7 @@ class TraineetraininginformationModal extends Component {
dataIndex: 'stduynumber', dataIndex: 'stduynumber',
key: 'stduynumber', key: 'stduynumber',
align: "center", align: "center",
width: "117px",
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{"color":'#989898', "text-align": "center"}}>{record.stduynumber}</a> <a style={{"color":'#989898', "text-align": "center"}}>{record.stduynumber}</a>
@ -170,6 +172,7 @@ class TraineetraininginformationModal extends Component {
key: 'classroom', key: 'classroom',
dataIndex: 'classroom', dataIndex: 'classroom',
align: "center", align: "center",
width: "117px",
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a style={{"color":'#29BD8B', "text-align": "center"}}>{record.classroom}</a> <a style={{"color":'#29BD8B', "text-align": "center"}}>{record.classroom}</a>

@ -305,6 +305,10 @@ class Trainingjobsetting extends Component {
}) })
return return
}else { }else {
if(!this.state.flagPageEditsthrees === false){
if (moment(this.state.end_time, "YYYY-MM-DD HH:mm") <= moment()) { if (moment(this.state.end_time, "YYYY-MM-DD HH:mm") <= moment()) {
//截止时间小于当前时间 //截止时间小于当前时间
this.scrollToAnchor("publishtimeid"); this.scrollToAnchor("publishtimeid");
@ -326,6 +330,7 @@ class Trainingjobsetting extends Component {
return return
} }
} }
}
if (this.state.allowreplenishment === "允许补交") { if (this.state.allowreplenishment === "允许补交") {
@ -489,6 +494,7 @@ class Trainingjobsetting extends Component {
if (this.state.completionefficiencyscore === true) { if (this.state.completionefficiencyscore === true) {
latedeductiontwos = this.state.latedeductiontwo; latedeductiontwos = this.state.latedeductiontwo;
} }
if(challenge_scoredata.length>0){
var len = 0; var len = 0;
for (var k = 0; k < challenge_scoredata.length; k++) { for (var k = 0; k < challenge_scoredata.length; k++) {
len = len + challenge_scoredata[k]; len = len + challenge_scoredata[k];
@ -502,6 +508,8 @@ class Trainingjobsetting extends Component {
this.props.showNotification(`总分值+效率占比分之和要等于100现在分值为` + max); this.props.showNotification(`总分值+效率占比分之和要等于100现在分值为` + max);
return; return;
} }
}
var url = `/homework_commons/${homeworkid}/update_settings.json`; var url = `/homework_commons/${homeworkid}/update_settings.json`;
var data = undefined; var data = undefined;
// console.log("this.state.unified_setting") // console.log("this.state.unified_setting")
@ -1939,7 +1947,7 @@ class Trainingjobsetting extends Component {
</div> </div>
<div className={"mb20 mt15"}> <div className={"mb20 mt15"}>
<Checkbox disabled={!flagPageEdit} className="ml40" onChange={this.onChangepublicwork} <Checkbox disabled={!flagPageEdit} className="ml40" onChange={this.onChangepublicwork}
checked={this.state.publicwork} style={{"color":"#666666"}}>公开作品</Checkbox> checked={this.state.publicwork} style={{"color":"#666666"}}>公开成绩</Checkbox>
<span className={"font-14 color-grey-9 font-14 "} style={{"text-align":"left"}}>(选中则在作业截止/补交结束时间之后已提交作品的学生可以查看其它学生的成绩否则只能查看自己的成绩)</span> <span className={"font-14 color-grey-9 font-14 "} style={{"text-align":"left"}}>(选中则在作业截止/补交结束时间之后已提交作品的学生可以查看其它学生的成绩否则只能查看自己的成绩)</span>
</div> </div>

Loading…
Cancel
Save