新分支改动

competitions
杨树林 5 years ago
parent 2eaa58c44b
commit f351a96ccd

@ -46,10 +46,16 @@ class HomeworkModal extends Component{
} }
if(this.props.starttimes!=undefined&&this.props.starttimes!=""){ if(this.props.starttimes!=undefined&&this.props.starttimes!=""){
if(this.props.starttimesend!=undefined&&this.props.starttimesend!=""){
this.setState({
endtime:this.props.starttimesend,
})
}else {
this.setState({
endtime:moment(moment(handleDateString(this.props.starttimes)).add(1, 'week')).format("YYYY-MM-DD HH:mm")
})
}
this.setState({
endtime:moment(moment(handleDateString(this.props.starttimes)).add(1, 'week')).format("YYYY-MM-DD HH:mm")
})
} }
} }
componentDidUpdate=(prevProps)=>{ componentDidUpdate=(prevProps)=>{
@ -69,9 +75,16 @@ class HomeworkModal extends Component{
if(prevProps.starttimes!=this.props.starttimes){ if(prevProps.starttimes!=this.props.starttimes){
if(this.props.starttimes!=undefined&&this.props.starttimes!=""){ if(this.props.starttimes!=undefined&&this.props.starttimes!=""){
this.setState({ if(this.props.starttimesend!=undefined&&this.props.starttimesend!=""){
endtime:moment(moment(handleDateString(this.props.starttimes)).add(1, 'week')).format("YYYY-MM-DD HH:mm") this.setState({
}) endtime:this.props.starttimesend,
})
}else{
this.setState({
endtime:moment(moment(handleDateString(this.props.starttimes)).add(1, 'week')).format("YYYY-MM-DD HH:mm")
})
}
} }
} }
} }

@ -80,6 +80,7 @@ class Listofworksstudentone extends Component {
teacherdata: undefined, teacherdata: undefined,
task_status: [], task_status: [],
visibles: false, visibles: false,
starttimesend:undefined,
course_group_info: [], course_group_info: [],
styletable: { styletable: {
"display": "none" "display": "none"
@ -2789,6 +2790,7 @@ class Listofworksstudentone extends Component {
axios.get(url).then((response) => { axios.get(url).then((response) => {
if (response.status === 200) { if (response.status === 200) {
const dataformat = 'YYYY-MM-DD HH:mm';
let starttime = this.props.getNowFormatDates(1); let starttime = this.props.getNowFormatDates(1);
let endtime = this.props.getNowFormatDates(2); let endtime = this.props.getNowFormatDates(2);
this.setState({ this.setState({
@ -2801,6 +2803,7 @@ class Listofworksstudentone extends Component {
starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
endtime: "截止时间:" + endtime, endtime: "截止时间:" + endtime,
starttimes:starttime, starttimes:starttime,
starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:moment(response.data.end_time, dataformat),
typs:"start", typs:"start",
Cancelname: "暂不发布", Cancelname: "暂不发布",
Savesname: "立即发布", Savesname: "立即发布",
@ -2949,6 +2952,7 @@ class Listofworksstudentone extends Component {
course_groupyslstwo: undefined, course_groupyslstwo: undefined,
typs:undefined, typs:undefined,
starttimes:undefined, starttimes:undefined,
starttimesend:undefined,
}) })
} }
@ -3170,6 +3174,7 @@ class Listofworksstudentone extends Component {
course_groups={this.state.course_groups} course_groups={this.state.course_groups}
getcourse_groupslist={(id) => this.getcourse_groupslist(id)} getcourse_groupslist={(id) => this.getcourse_groupslist(id)}
starttimes={this.state.starttimes} starttimes={this.state.starttimes}
starttimesend={this.state.starttimesend}
typs={this.state.typs} typs={this.state.typs}
/> />
{ {

@ -74,6 +74,7 @@ class ShixunStudentWork extends Component {
DownloadType:false, DownloadType:false,
DownloadMessageval:undefined, DownloadMessageval:undefined,
lunxun:true, lunxun:true,
starttimesend:undefined,
} }
} }
@ -432,6 +433,7 @@ class ShixunStudentWork extends Component {
Saves:this.homeworkstartend, Saves:this.homeworkstartend,
course_groups:response.data.course_groups, course_groups:response.data.course_groups,
starttimes:starttime, starttimes:starttime,
starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:moment(response.data.end_time, dataformat),
typs:"start", typs:"start",
}) })
} }
@ -754,6 +756,7 @@ class ShixunStudentWork extends Component {
course_groups={this.state.course_groups} course_groups={this.state.course_groups}
getcourse_groupslist={(id)=>this.getcourse_groupslist(id)} getcourse_groupslist={(id)=>this.getcourse_groupslist(id)}
starttimes={this.state.starttimes} starttimes={this.state.starttimes}
starttimesend={this.state.starttimesend}
typs={this.state.typs} typs={this.state.typs}
/> />
<div className={"educontent "}> <div className={"educontent "}>

@ -120,7 +120,7 @@ class Trainingjobsetting extends Component {
showmodel:false, showmodel:false,
code_review:false, code_review:false,
testscripttiptype:false, testscripttiptype:false,
starttimesend:undefined,
end_timebool:false, end_timebool:false,
late_timesbool:false, late_timesbool:false,
work_efficiencys:false, work_efficiencys:false,
@ -1536,7 +1536,8 @@ class Trainingjobsetting extends Component {
Botval:`本操作只对"未发布"的分班有效`, Botval:`本操作只对"未发布"的分班有效`,
starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"), starttime: "发布时间:" + moment(moment(new Date())).format("YYYY-MM-DD HH:mm"),
starttimes:starttime, starttimes:starttime,
typs:"start", starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:moment(response.data.end_time, dataformat),
typs:"start",
endtime: "截止时间:" + endtime, endtime: "截止时间:" + endtime,
Cancelname: "暂不发布", Cancelname: "暂不发布",
Savesname: "立即发布", Savesname: "立即发布",
@ -1668,6 +1669,7 @@ class Trainingjobsetting extends Component {
addnametab: undefined, addnametab: undefined,
typs:undefined, typs:undefined,
starttimes:undefined, starttimes:undefined,
starttimesend:undefined,
}) })
} }
cancelBox=()=>{ cancelBox=()=>{
@ -2120,7 +2122,8 @@ class Trainingjobsetting extends Component {
course_groups={this.state.course_groups} course_groups={this.state.course_groups}
getcourse_groupslist={(id) => this.getcourse_groupslist(id)} getcourse_groupslist={(id) => this.getcourse_groupslist(id)}
starttimes={this.state.starttimes} starttimes={this.state.starttimes}
typs={this.state.typs} starttimesend={this.state.starttimesend}
typs={this.state.typs}
/> />
<Modals <Modals
modalsType={modalsType} modalsType={modalsType}

@ -77,7 +77,8 @@ class Workquestionandanswer extends Component {
polls_descriptiontest: "作业说明...", polls_descriptiontest: "作业说明...",
jobdescriptiondisplay: "none", jobdescriptiondisplay: "none",
score_open: false, score_open: false,
code_review: false code_review: false,
starttimesend:undefined,
} }
} }
@ -173,6 +174,7 @@ class Workquestionandanswer extends Component {
Saves: this.homeworkstartend, Saves: this.homeworkstartend,
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
starttimes: starttime, starttimes: starttime,
starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:moment(response.data.end_time, dataformat),
typs: "start", typs: "start",
}) })
} }
@ -441,6 +443,7 @@ class Workquestionandanswer extends Component {
course_groups={this.state.course_groups} course_groups={this.state.course_groups}
getcourse_groupslist={(id) => this.getcourse_groupslist(id)} getcourse_groupslist={(id) => this.getcourse_groupslist(id)}
starttimes={this.state.starttimes} starttimes={this.state.starttimes}
starttimesend={this.state.starttimesend}
typs={this.state.typs} typs={this.state.typs}
/> />
<div className={"educontent "}> <div className={"educontent "}>

Loading…
Cancel
Save