|
|
|
@ -67,7 +67,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
//
|
|
|
|
|
// });
|
|
|
|
|
this.state = {
|
|
|
|
|
flagPageEdit: undefined,
|
|
|
|
|
flagPageEdit: true,
|
|
|
|
|
flagPageEdits: false,
|
|
|
|
|
flagPageEditstwo:false,
|
|
|
|
|
flagPageEditsthrees:false,
|
|
|
|
@ -137,7 +137,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
console.log("Trainingjobsetting");
|
|
|
|
|
console.log("componentDidMount");
|
|
|
|
|
this.getTrainingjobsetting();
|
|
|
|
|
this.getTrainingjobsetting(true);
|
|
|
|
|
let query = this.props.location.pathname;
|
|
|
|
|
const type = query.split('/');
|
|
|
|
|
this.setState({
|
|
|
|
@ -165,7 +165,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
// 获取数据地方
|
|
|
|
|
getTrainingjobsetting = () => {
|
|
|
|
|
getTrainingjobsetting = (bool) => {
|
|
|
|
|
// console.log("getTrainingjobsetting")
|
|
|
|
|
var homeworkid = this.props.match.params.homeworkid;
|
|
|
|
|
// console.log(homeworkid)
|
|
|
|
@ -241,26 +241,26 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
console.log("220");
|
|
|
|
|
// console.log("220");
|
|
|
|
|
var publish_timebools=false;
|
|
|
|
|
if(result.data.publish_time){
|
|
|
|
|
publish_timebools= moment(result.data.publish_time,"YYYY-MM-DD HH:mm")<=moment();
|
|
|
|
|
}
|
|
|
|
|
console.log("228");
|
|
|
|
|
console.log(publish_timebools);
|
|
|
|
|
// console.log("228");
|
|
|
|
|
// console.log(publish_timebools);
|
|
|
|
|
|
|
|
|
|
var end_timebools =false;
|
|
|
|
|
if(result.data.end_time){
|
|
|
|
|
end_timebools == moment(result.data.end_time,"YYYY-MM-DD HH:mm")<=moment();
|
|
|
|
|
}
|
|
|
|
|
console.log("233");
|
|
|
|
|
console.log(end_timebools);
|
|
|
|
|
// console.log("233");
|
|
|
|
|
// console.log(end_timebools);
|
|
|
|
|
var late_timess=false;
|
|
|
|
|
if(result.data.late_time){
|
|
|
|
|
late_timess== moment(result.data.end_time,"YYYY-MM-DD HH:mm")<=moment();
|
|
|
|
|
}
|
|
|
|
|
console.log("240");
|
|
|
|
|
console.log(late_timess);
|
|
|
|
|
// console.log("240");
|
|
|
|
|
// console.log(late_timess);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
@ -293,6 +293,14 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
code_review:result.data.code_review
|
|
|
|
|
})
|
|
|
|
|
this.props.Getdataback(result,result.data);
|
|
|
|
|
|
|
|
|
|
if(bool===true){
|
|
|
|
|
if(this.props.isAdmin() !== undefined){
|
|
|
|
|
if(this.props.isAdmin() === true){
|
|
|
|
|
this.editSettings(result);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
@ -1592,7 +1600,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
description:result.data.message
|
|
|
|
|
});
|
|
|
|
|
this.homeworkhide();
|
|
|
|
|
this.getTrainingjobsetting();
|
|
|
|
|
this.getTrainingjobsetting(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
@ -1623,7 +1631,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
// message:"提示",
|
|
|
|
|
// description:response.data.message
|
|
|
|
|
// });
|
|
|
|
|
this.getTrainingjobsetting();
|
|
|
|
|
this.getTrainingjobsetting(false);
|
|
|
|
|
this.homeworkhide()
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
@ -1797,6 +1805,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
modalSave: this.cancelBox
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
// debugger
|
|
|
|
|
var releasetime =true;
|
|
|
|
|
var deadline = true;
|
|
|
|
|
var endtime =true;
|
|
|
|
@ -1814,7 +1823,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
if(moment(datas.data.late_time,"YYYY-MM-DD HH:mm")<=moment()){
|
|
|
|
|
endtime=false;
|
|
|
|
|
}
|
|
|
|
|
if(datas.data.allowreplenishment === false){
|
|
|
|
|
if(datas.data.allow_late === false){
|
|
|
|
|
whethertopays=false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1829,19 +1838,23 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
flagPageEditsfor:endtime,
|
|
|
|
|
completionefficiencyscore:true,
|
|
|
|
|
work_efficiencys:true,
|
|
|
|
|
unifiedsetting:datas.data.unifiedsetting,
|
|
|
|
|
unifiedsetting:datas.data.unified_setting,
|
|
|
|
|
latedeductiontwo:20,
|
|
|
|
|
});
|
|
|
|
|
//均分比例
|
|
|
|
|
// result.data.shixun_evaluation === 0 ? "均分比例" : result.data.shixun_evaluation === 1 ? "经验值比例" : result.data.shixun_evaluation === 2 ?
|
|
|
|
|
try {
|
|
|
|
|
if(datas.data.proportion==="均分比例"){
|
|
|
|
|
if(datas.data.shixun_evaluation === 0){
|
|
|
|
|
this.Equalproportion(20);
|
|
|
|
|
|
|
|
|
|
}else if(datas.data.proportion==="经验值比例"){
|
|
|
|
|
}else if(datas.data.shixun_evaluation === 1){
|
|
|
|
|
this.Empiricalvalueratio(20);
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}catch (e) {
|
|
|
|
|
console.log(1);
|
|
|
|
|
console.log(e);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1853,9 +1866,9 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
flagPageEditstwo:releasetime,
|
|
|
|
|
flagPageEditsthrees:deadline,
|
|
|
|
|
flagPageEditsfor:endtime,
|
|
|
|
|
unifiedsetting:datas.data.unifiedsetting,
|
|
|
|
|
unifiedsetting:datas.data.unified_setting,
|
|
|
|
|
});
|
|
|
|
|
if(datas.data.work_efficiencys===true){
|
|
|
|
|
if(datas.data.work_efficiency===true){
|
|
|
|
|
this.setState({
|
|
|
|
|
completionefficiencyscore:true,
|
|
|
|
|
})
|
|
|
|
@ -1866,6 +1879,8 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}catch (e) {
|
|
|
|
|
console.log(2);
|
|
|
|
|
console.log(e);
|
|
|
|
|
this.setState({
|
|
|
|
|
flagPageEditsbox:true,
|
|
|
|
|
flagPageEdit: true,
|
|
|
|
@ -1873,9 +1888,9 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
flagPageEditstwo:releasetime,
|
|
|
|
|
flagPageEditsthrees:deadline,
|
|
|
|
|
flagPageEditsfor:endtime,
|
|
|
|
|
unifiedsetting:datas.data.unifiedsetting,
|
|
|
|
|
unifiedsetting:datas.data.unified_setting,
|
|
|
|
|
});
|
|
|
|
|
if(datas.data.work_efficiencys===true){
|
|
|
|
|
if(datas.data.work_efficiency===true){
|
|
|
|
|
this.setState({
|
|
|
|
|
completionefficiencyscore:true,
|
|
|
|
|
})
|
|
|
|
@ -1886,7 +1901,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(datas.data.proportion === "自定义分值"){
|
|
|
|
|
if(datas.data.shixun_evaluation === 2){
|
|
|
|
|
this.setState({
|
|
|
|
|
boolUnitetwoname:"自定义分值",
|
|
|
|
|
boolUnitetwo: false,
|
|
|
|
@ -1896,9 +1911,10 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
} catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
console.log(3);
|
|
|
|
|
console.log(e);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
//取消编辑
|
|
|
|
|
cancelEdit = () => {
|
|
|
|
|
this.setState({
|
|
|
|
@ -1920,7 +1936,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
unit_e_tip: "",
|
|
|
|
|
})
|
|
|
|
|
this.refs.targetElementTrainingjobsetting.scrollIntoView();
|
|
|
|
|
this.getTrainingjobsetting();
|
|
|
|
|
this.getTrainingjobsetting(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
rulesCheckInfo=(rules)=>{
|
|
|
|
@ -2108,7 +2124,24 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
loadtype={loadtype}
|
|
|
|
|
modalSave={modalSave}
|
|
|
|
|
></Modals>
|
|
|
|
|
<div className={"educontent "}>
|
|
|
|
|
|
|
|
|
|
<div className={"educontent"}>
|
|
|
|
|
{
|
|
|
|
|
!flagPageEdit && this.props.isAdmin() === true ?
|
|
|
|
|
""
|
|
|
|
|
:
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.yskspickers
|
|
|
|
|
.ant-input, .ant-input .ant-input-suffix{
|
|
|
|
|
background-color: #fff !important;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<div className="edu-back-white" style={{paddingTop: "20px"}}>
|
|
|
|
|
{/*发布设置*/}
|
|
|
|
|
<div className="stud-class-set bor-bottom-greyE edu-back-white">
|
|
|
|
@ -2146,7 +2179,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
<div className="clearfix mb5 ml15">
|
|
|
|
|
<span className="font-16 fl mt3" style={{"color":"#999999"}}>发布时间:</span>
|
|
|
|
|
<Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditstwo === true && publish_timebool === true?"发布时间已过,则不能修改": ""}>
|
|
|
|
|
<div className="fl">
|
|
|
|
|
<div className="fl yskspickers">
|
|
|
|
|
<DatePicker
|
|
|
|
|
showToday={false}
|
|
|
|
|
id={"publishtimeid"}
|
|
|
|
@ -2179,7 +2212,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
<div className="clearfix ml15 mb5">
|
|
|
|
|
<span className=" fl mt3 font-16" style={{"color":"#999999"}}>截止时间:</span>
|
|
|
|
|
<Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditsthrees === true&&end_timebool===true?"截止时间已过,则不能修改": ""}>
|
|
|
|
|
<div className="fl">
|
|
|
|
|
<div className="fl yskspickers">
|
|
|
|
|
<DatePicker
|
|
|
|
|
showToday={false}
|
|
|
|
|
id={"end_timeid"}
|
|
|
|
@ -2252,7 +2285,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<InputNumber disabled={!flagPageEditsfor || !whethertopay} min={0} max={1000} className="mr10 h40 color-grey-9"
|
|
|
|
|
<InputNumber disabled={!whethertopay} min={0} max={1000} className="mr10 h40 color-grey-9"
|
|
|
|
|
onChange={this.changeTopicName}
|
|
|
|
|
style={{"color":"#999999","height": "40px"}}
|
|
|
|
|
value={this.state.latededuction}/>
|
|
|
|
@ -2260,8 +2293,21 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
<span className="ml15 color-grey-c" style={{"text-align":"left","font-size":"14px"}}>(延时提交作品时,学生成绩将被扣减的分值)</span>
|
|
|
|
|
{/*{latepenaltytype===true?<div className={"color-red ml40"}></div>:""}*/}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className={"h20 mb20 "}>
|
|
|
|
|
{
|
|
|
|
|
whethertopay&& whethertopay === true ?
|
|
|
|
|
<style>
|
|
|
|
|
{
|
|
|
|
|
`
|
|
|
|
|
.yskspickerss
|
|
|
|
|
.ant-input, .ant-input .ant-input-suffix{
|
|
|
|
|
background-color: #fff !important;
|
|
|
|
|
}
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
:""
|
|
|
|
|
}
|
|
|
|
|
<div className={"h20 mb20 yskspickerss"}>
|
|
|
|
|
<span style={{"width": "100px","color":"#999999"}}>结束时间:</span>
|
|
|
|
|
<DatePicker
|
|
|
|
|
showToday={false}
|
|
|
|
@ -2277,7 +2323,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
onOk={this.ontimeonokthree}
|
|
|
|
|
showTime={{ format: 'HH:mm' }}
|
|
|
|
|
width={"210px"}
|
|
|
|
|
disabled={!flagPageEditsfor || !whethertopay}
|
|
|
|
|
disabled={ !whethertopay}
|
|
|
|
|
dropdownClassName="hideDisable"
|
|
|
|
|
className={handclass}
|
|
|
|
|
/>
|
|
|
|
@ -2394,7 +2440,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
</span>
|
|
|
|
|
</div>
|
|
|
|
|
<p className="ml20 mt15 c_grey font-13 " style={{"color":"#666666"}}> 关卡名称<span
|
|
|
|
|
className="color-grey-c font-10 ml10">(需要学生完成的任务请选中)</span></p>
|
|
|
|
|
className="color-grey-c font-12 ml10">(需要学生完成的任务请选中)</span></p>
|
|
|
|
|
<div className="ml40 mt15" >
|
|
|
|
|
{this.state.challenge_settings === undefined ? "" : this.state.challenge_settings.map((object, index) => {
|
|
|
|
|
return (
|
|
|
|
@ -2424,7 +2470,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
|
|
|
|
|
<RadioGroup className="ml40 mt20" onChange={this.onChangeslevel} value={this.state.level}>
|
|
|
|
|
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey" value={"扣分"}>按查看答案级别扣分<span
|
|
|
|
|
className="color-grey-c font-14 ml15" style={{"text-align":"left"}}>根据学员选择查看的实训答案级别(解题思路、完整答案),扣减相应的分值</span></Radio>
|
|
|
|
|
className="color-grey-c font-14 ml15" style={{"text-align":"left"}}>(根据学员选择查看的实训答案级别(解题思路、完整答案),扣减相应的分值)</span></Radio>
|
|
|
|
|
<Radio style={radioStyle} disabled={!flagPageEdit} className="c_grey mt15"
|
|
|
|
|
value={"满分"}>不扣分 </Radio>
|
|
|
|
|
</RadioGroup>
|
|
|
|
|