|
|
|
@ -95,6 +95,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
datasheettwo: undefined,
|
|
|
|
|
publicwork: undefined,
|
|
|
|
|
publish_time: undefined,
|
|
|
|
|
publish_timebool:false,
|
|
|
|
|
end_time: undefined,
|
|
|
|
|
late_time: undefined,
|
|
|
|
|
endOpen: false,
|
|
|
|
@ -115,6 +116,8 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
showmodel:false,
|
|
|
|
|
code_review:false,
|
|
|
|
|
testscripttiptype:false,
|
|
|
|
|
end_timebool:false,
|
|
|
|
|
late_timesbool:false,
|
|
|
|
|
}
|
|
|
|
|
// console.log("获取到的值")
|
|
|
|
|
// console.log("Trainingjobsetting")
|
|
|
|
@ -217,8 +220,32 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
publish_timebool:publish_timebools,
|
|
|
|
|
end_timebool:end_timebools,
|
|
|
|
|
late_timesbool:late_timess,
|
|
|
|
|
rules:array,
|
|
|
|
|
rulest:arrays,
|
|
|
|
|
rulesdata:rulesdatas,
|
|
|
|
@ -361,6 +388,8 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
return;
|
|
|
|
|
} else {
|
|
|
|
|
// 补交结束时间不能早于截止时间
|
|
|
|
|
if(!this.state.flagPageEditsfor ===false){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (moment(this.state.late_time, "YYYY-MM-DD HH:mm") <= moment()) {
|
|
|
|
|
//结束时间小于当前时间
|
|
|
|
@ -396,8 +425,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
})
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1736,7 +1764,9 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const dataformat = 'YYYY-MM-DD HH:mm';
|
|
|
|
|
let {flagPageEdit,testscripttiptype,flagPageEdits,flagPageEditstwo,flagPageEditsbox,whethertopay,handclass,flagPageEditsthrees, flagPageEditsfor,rules,rulest,unifiedsetting,group_settings, course_group,unit_e_tip, borreds,borredss,unit_p_tip, end_time, late_time, score_open, publish_time, starttimetype, modalsType, modalsTopval, loadtype, modalSave, endtimetype, latetimetype, allowlate, latepenaltytype, jobsettingsdata, endOpen, mystyle, mystyles} = this.state;
|
|
|
|
|
let {flagPageEdit,testscripttiptype,publish_timebool,end_timebool,late_timesbool,flagPageEdits,flagPageEditstwo,flagPageEditsbox,whethertopay,handclass,flagPageEditsthrees, flagPageEditsfor,rules,rulest,unifiedsetting,group_settings, course_group,unit_e_tip, borreds,borredss,unit_p_tip, end_time, late_time, score_open, publish_time, starttimetype, modalsType, modalsTopval, loadtype, modalSave, endtimetype, latetimetype, allowlate, latepenaltytype, jobsettingsdata, endOpen, mystyle, mystyles} = this.state;
|
|
|
|
|
console.log(publish_timebool);
|
|
|
|
|
console.log(!flagPageEditstwo);
|
|
|
|
|
const radioStyle = {
|
|
|
|
|
display: 'block',
|
|
|
|
|
height: '30px',
|
|
|
|
@ -1840,7 +1870,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
<div>
|
|
|
|
|
<div className="clearfix mb5 ml15">
|
|
|
|
|
<span className="font-16 fl mt3" style={{"color":"#999999"}}>发布时间:</span>
|
|
|
|
|
<Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditstwo === true ? "发布时间已过,则不能修改" : ""}>
|
|
|
|
|
<Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditstwo === true && publish_timebool === true?"发布时间已过,则不能修改": ""}>
|
|
|
|
|
<div className="fl">
|
|
|
|
|
<DatePicker
|
|
|
|
|
showToday={false}
|
|
|
|
@ -1873,7 +1903,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
</p>
|
|
|
|
|
<div className="clearfix ml15 mb5">
|
|
|
|
|
<span className=" fl mt3 font-16" style={{"color":"#999999"}}>截止时间:</span>
|
|
|
|
|
<Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditsthrees === true ? "截止时间已过,则不能修改" : ""}>
|
|
|
|
|
<Tooltip placement="bottom" title={this.props.isSuperAdmin() ? "" : !flagPageEditsthrees === true&&end_timebool===true?"截止时间已过,则不能修改": ""}>
|
|
|
|
|
<div className="fl">
|
|
|
|
|
<DatePicker
|
|
|
|
|
showToday={false}
|
|
|
|
@ -1946,7 +1976,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
`
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|
<InputNumber disabled={!whethertopay} min={0} max={1000} className="mr10 h40 color-grey-9"
|
|
|
|
|
<InputNumber disabled={!flagPageEditsfor || !whethertopay} min={0} max={1000} className="mr10 h40 color-grey-9"
|
|
|
|
|
onChange={this.changeTopicName}
|
|
|
|
|
style={{"color":"#999999","height": "40px"}}
|
|
|
|
|
value={this.state.latededuction}/>
|
|
|
|
|