dev_forum
杨树林 6 years ago
parent ae520fe158
commit 9a8669ae53

@ -1357,12 +1357,14 @@ class Listofworks extends Component {
let url = "/homework_commons/"+homeworkid+"/update_score.json"; let url = "/homework_commons/"+homeworkid+"/update_score.json";
axios.get(url).then((response) => { axios.get(url).then((response) => {
this.props.showNotification(`${response.data.message}`); if(response){
this.props.showNotification(response.data.message);
this.setState({ this.setState({
loadingstate: true loadingstate: true
}) })
this.Startsorting(this.state.order, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit); this.Startsorting(this.state.order, this.state.course_groupyslstwo, this.state.checkedValuesineinfo, this.state.searchtext, 1, this.state.limit);
}).catch((error) => { }
}).catch((error) => {
console.log(error) console.log(error)
}); });
@ -1542,11 +1544,16 @@ class Listofworks extends Component {
<li className="clearfix "> <li className="clearfix ">
<span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span> <span className="fl mr10 color-grey-6 ">计算成绩时间{teacherdata&&teacherdata.calculation_time==null?"--": moment(teacherdata&&teacherdata.calculation_time).format('YYYY-MM-DD HH:mm')}</span>
<span> <span>
{this.props.teacherdata&&this.props.teacherdata.publish_immediately===false&&computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}> {teacherdata&&teacherdata.publish_immediately===false&&computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩 计算成绩
</div>:<div className={"computeTimes font-13"} onClick={this.setComputeTime}> </div>:
计算成绩 <div>
</div>} {teacherdata&&teacherdata.homework_status[0]=== "未发布"? "":
<div className={"computeTimes font-13"}>
计算成绩
</div>
}
</div>}
</span> </span>
<div className="fr mr5 search-newysl" style={{marginBottom: '1px'}}> <div className="fr mr5 search-newysl" style={{marginBottom: '1px'}}>

@ -985,9 +985,15 @@ class Listofworksstudentone extends Component {
{teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":<span> {teacherdata&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}> {computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩 计算成绩
</div>:<div className={"computeTimes font-13"} onClick={this.setComputeTime}> </div>:
计算成绩 <div>
</div>} {teacherdata&&teacherdata.homework_status[0]=== "未发布"? "":
<div className={"computeTimes font-13"}>
计算成绩
</div>
}
</div>
}
</span>} </span>}
</div> </div>
@ -1137,9 +1143,15 @@ class Listofworksstudentone extends Component {
{teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":<span> {teacherdata&&teacherdata.task_operation&&teacherdata.task_operation[0]==="开启挑战"?"":<span>
{computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}> {computeTimetype===true?<div className={"computeTime font-13"} onClick={this.setComputeTime}>
计算成绩 计算成绩
</div>:<div className={"computeTimes font-13"} onClick={this.setComputeTime}> </div>:
计算成绩 <div>
</div>} {teacherdata&&teacherdata.homework_status[0]=== "未发布"? "":
<div className={"computeTimes font-13"}>
计算成绩
</div>
}
</div>
}
</span>} </span>}
</div> </div>

@ -95,6 +95,7 @@ class Trainingjobsetting extends Component {
datasheettwo: undefined, datasheettwo: undefined,
publicwork: undefined, publicwork: undefined,
publish_time: undefined, publish_time: undefined,
publish_timebool:false,
end_time: undefined, end_time: undefined,
late_time: undefined, late_time: undefined,
endOpen: false, endOpen: false,
@ -115,6 +116,8 @@ class Trainingjobsetting extends Component {
showmodel:false, showmodel:false,
code_review:false, code_review:false,
testscripttiptype:false, testscripttiptype:false,
end_timebool:false,
late_timesbool:false,
} }
// console.log("获取到的值") // console.log("获取到的值")
// console.log("Trainingjobsetting") // 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({ this.setState({
publish_timebool:publish_timebools,
end_timebool:end_timebools,
late_timesbool:late_timess,
rules:array, rules:array,
rulest:arrays, rulest:arrays,
rulesdata:rulesdatas, rulesdata:rulesdatas,
@ -1737,7 +1764,9 @@ class Trainingjobsetting extends Component {
const dataformat = 'YYYY-MM-DD HH:mm'; 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 = { const radioStyle = {
display: 'block', display: 'block',
height: '30px', height: '30px',
@ -1841,7 +1870,7 @@ class Trainingjobsetting extends Component {
<div> <div>
<div className="clearfix mb5 ml15"> <div className="clearfix mb5 ml15">
<span className="font-16 fl mt3" style={{"color":"#999999"}}>发布时间</span> <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"> <div className="fl">
<DatePicker <DatePicker
showToday={false} showToday={false}
@ -1874,7 +1903,7 @@ class Trainingjobsetting extends Component {
</p> </p>
<div className="clearfix ml15 mb5"> <div className="clearfix ml15 mb5">
<span className=" fl mt3 font-16" style={{"color":"#999999"}}>截止时间</span> <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"> <div className="fl">
<DatePicker <DatePicker
showToday={false} showToday={false}

Loading…
Cancel
Save