|
|
|
@ -547,8 +547,9 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
//不是统一设置
|
|
|
|
|
//分班设置
|
|
|
|
|
// console.log("分班设置");
|
|
|
|
|
console.log("分班设置");
|
|
|
|
|
// console.log(this.$pollDetailTabForthRules);
|
|
|
|
|
|
|
|
|
|
const result=this.$pollDetailTabForthRules.notUnifiedSettingCheck(this.state.rules);
|
|
|
|
@ -561,13 +562,81 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
let rulesdata = this.state.rulesdata;
|
|
|
|
|
|
|
|
|
|
if (rulesdata.length === 0) {
|
|
|
|
|
this.props.showNotification(`分班发布设置不能为空`);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
// console.log("分班设置");
|
|
|
|
|
var mylate_times=false;
|
|
|
|
|
if (this.state.unifiedsetting === false) {
|
|
|
|
|
///非统一设置
|
|
|
|
|
let rulesdata = this.state.rulesdata;
|
|
|
|
|
//开启了补交
|
|
|
|
|
if(this.state.allowreplenishment===true){
|
|
|
|
|
//补交结束时间不为空
|
|
|
|
|
if(this.state.late_time){
|
|
|
|
|
// 分班设置数组不为空
|
|
|
|
|
if(rulesdata){
|
|
|
|
|
for(var i=0;i<rulesdata.length-1;i++){
|
|
|
|
|
let item=rulesdata[i];
|
|
|
|
|
if(item.end_time!=="Invalid date"){
|
|
|
|
|
let emdtimes=null;
|
|
|
|
|
try {
|
|
|
|
|
emdtimes= moment(item.end_time, "YYYY-MM-DD HH:mm")
|
|
|
|
|
}catch (e) {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if(emdtimes){
|
|
|
|
|
if(moment(this.state.late_time, "YYYY-MM-DD HH:mm") <= emdtimes){
|
|
|
|
|
mylate_times=true;
|
|
|
|
|
let kus=i+1;
|
|
|
|
|
this.setState({
|
|
|
|
|
hand__e_tip: "补交时间必须晚于发布规则" +kus+ "的截止时间",
|
|
|
|
|
hand_flags: true,
|
|
|
|
|
handclass: "bor-reds",
|
|
|
|
|
});
|
|
|
|
|
this.props.showNotification(`补交结束时间必须晚于截止时间`);
|
|
|
|
|
break;
|
|
|
|
|
}else{
|
|
|
|
|
mylate_times=false;
|
|
|
|
|
this.setState({
|
|
|
|
|
hand__e_tip: "",
|
|
|
|
|
hand_flags: false,
|
|
|
|
|
handclass: undefined,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(mylate_times){
|
|
|
|
|
this.scrollToAnchor("late_timeids");
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
///统一设置
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (this.state.allowreplenishment === true) {
|
|
|
|
|
if (this.state.latededuction === undefined) {
|
|
|
|
@ -787,6 +856,8 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
// console.log(JSON.stringify(data));
|
|
|
|
|
axios.post(url, data)
|
|
|
|
|
.then((result) => {
|
|
|
|
|
if(result){
|
|
|
|
|
if(result.data){
|
|
|
|
|
if (result.data.status == 0) {
|
|
|
|
|
// console.log(JSON.stringify(result));
|
|
|
|
|
this.getTrainingjobsetting(true);
|
|
|
|
@ -801,8 +872,11 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
completionefficiencyscore: false,
|
|
|
|
|
})
|
|
|
|
|
this.refs.targetElementTrainingjobsetting.scrollIntoView()
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error);
|
|
|
|
|
})
|
|
|
|
@ -2577,7 +2651,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
{/*补交设置*/}
|
|
|
|
|
<div className="stud-class-set bor-bottom-greyE edu-back-white">
|
|
|
|
|
<div className="stud-class-set bor-bottom-greyE edu-back-white" id={"late_timeids"}>
|
|
|
|
|
<div className=" clearfix edu-back-white poll_list mt10">
|
|
|
|
|
<div className={"font-16 color-dark fl pl20 mt10 "} style={{color: "#05101A"}}>补交设置</div>
|
|
|
|
|
</div>
|
|
|
|
@ -2660,7 +2734,7 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
<p className="color-red lineh-25 clearfix ml70" style={{height: "25px"}}>
|
|
|
|
|
{
|
|
|
|
|
this.state.hand__e_tip && this.state.hand__e_tip != "" ?
|
|
|
|
|
<span className="fl">{this.state.hand__e_tip}</span> : ""
|
|
|
|
|
<span className="fl ml10">{this.state.hand__e_tip}</span> : ""
|
|
|
|
|
}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
@ -2929,75 +3003,3 @@ class Trainingjobsetting extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default Trainingjobsetting;
|
|
|
|
|
// <div className="stud-class-set bor-bottom-greyE ">
|
|
|
|
|
// <div className=" clearfix edu-back-white poll_list">
|
|
|
|
|
// <a onClick={(e)=>this.ChangeTab(0)}>作品列表</a>
|
|
|
|
|
// <a onClick={(e)=>this.ChangeTab(1)}>作业问答</a>
|
|
|
|
|
// {this.props.isAdmin()?this.state.code_review===true||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"?"": <a onClick={(e)=>this.ChangeTab(2)}>代码查重</a> : ""}
|
|
|
|
|
// <style>{
|
|
|
|
|
// `
|
|
|
|
|
// .poll_list a.active:after {
|
|
|
|
|
// content: '';
|
|
|
|
|
// width: 57px;
|
|
|
|
|
// left: 10px;
|
|
|
|
|
// bottom: 0px;
|
|
|
|
|
// height: 2px;
|
|
|
|
|
// background-color: #4CACFF;
|
|
|
|
|
// position: absolute;
|
|
|
|
|
// }
|
|
|
|
|
// `
|
|
|
|
|
// }</style>
|
|
|
|
|
// <a className="active"
|
|
|
|
|
// onClick={(e)=>this.ChangeTab(3)}
|
|
|
|
|
// >设置</a>
|
|
|
|
|
// <style>{`
|
|
|
|
|
// .drop_down_menu li a {
|
|
|
|
|
// padding: 0px;
|
|
|
|
|
// font-size: 14px;
|
|
|
|
|
// }
|
|
|
|
|
// .drop_down_menu {
|
|
|
|
|
// width: 93px;
|
|
|
|
|
// }
|
|
|
|
|
// .drop_down_menu li {
|
|
|
|
|
// overflow: visible;
|
|
|
|
|
// width: 93px;
|
|
|
|
|
// }
|
|
|
|
|
// .drop_down_menu, .drop_down_normal {
|
|
|
|
|
// padding-top: 10px;
|
|
|
|
|
// padding-bottom: 8px;
|
|
|
|
|
// }
|
|
|
|
|
// a:hover {
|
|
|
|
|
// color:#1A0B00 !important;
|
|
|
|
|
// }
|
|
|
|
|
// `}</style>
|
|
|
|
|
// {this.props.isAdmin() ? <li className="li_line drop_down fr color-blue font-16 mr8 mt20" style={{"padding": "0 20px"}}>
|
|
|
|
|
// 导出<i className="iconfont icon-xiajiantou font-12 ml2"></i>
|
|
|
|
|
// <ul className="drop_down_menu" style={{"right": "-0px", "left": "unset", "height": "auto"}}>
|
|
|
|
|
// <li><a onClick={()=>this.confirmysl(`/zip/shixun_report?homework_common_id=${this.props.match.params.homeworkid}`)}>实训报告</a>
|
|
|
|
|
// </li>
|
|
|
|
|
// <li><a onClick={()=>this.confirmysl(`/homework_commons/${this.props.match.params.homeworkid}/works_list.xlsx`)}>学生成绩</a>
|
|
|
|
|
// </li>
|
|
|
|
|
// </ul>
|
|
|
|
|
// </li>: ""}
|
|
|
|
|
// {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true?
|
|
|
|
|
// <a className="fr color-blue font-16" onClick={this.homeworkends}>立即截止</a>
|
|
|
|
|
// : "": ""}
|
|
|
|
|
// {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true?
|
|
|
|
|
// <a className="fr color-blue font-16" onClick={this.homeworkstart}>立即发布</a>: "" : ""}
|
|
|
|
|
// {this.props.isAdmin()?
|
|
|
|
|
// jobsettingsdata&&jobsettingsdata.data.code_review===true?
|
|
|
|
|
// <a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>: "":""}
|
|
|
|
|
// {
|
|
|
|
|
// jobsettingsdata&& jobsettingsdata&&jobsettingsdata.data === undefined ? ""
|
|
|
|
|
// : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" :
|
|
|
|
|
// <a className="fr color-blue font-16"
|
|
|
|
|
// href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${ jobsettingsdata&& jobsettingsdata.data === undefined ? "" : jobsettingsdata&& jobsettingsdata.data.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{ jobsettingsdata&& jobsettingsdata.data.commit_des}</a>
|
|
|
|
|
// }
|
|
|
|
|
// { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : <Startshixuntask
|
|
|
|
|
// {...this.props}
|
|
|
|
|
// data={ jobsettingsdata&& jobsettingsdata.data}
|
|
|
|
|
// />}
|
|
|
|
|
{/* </div>*/
|
|
|
|
|
}
|
|
|
|
|
{/*</div>*/
|
|
|
|
|
}
|
|
|
|
|