From c36be3f87f192497998f12eef08588da3a8fffcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Mon, 23 Mar 2020 18:25:43 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shixunHomework/Trainingjobsetting.js | 178 +++++++++--------- 1 file changed, 89 insertions(+), 89 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index e14ad1408..6f41869ef 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -329,6 +329,7 @@ class Trainingjobsetting extends Component { //跳转道描点的地方 scrollToAnchor = (anchorName) => { + debugger if (anchorName) { // 找到锚点 let anchorElement = document.getElementById(anchorName); @@ -547,8 +548,9 @@ class Trainingjobsetting extends Component { } } else { + //不是统一设置 //分班设置 - // console.log("分班设置"); + console.log("分班设置"); // console.log(this.$pollDetailTabForthRules); const result=this.$pollDetailTabForthRules.notUnifiedSettingCheck(this.state.rules); @@ -561,11 +563,76 @@ 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; + // console.log(rulesdata); + //开启了补交 + if(this.state.allowreplenishment===true){ + //补交结束时间不为空 + if(this.state.late_time){ + // 分班设置数组不为空 + if(rulesdata){ + for(var i=0;i { - if (result.data.status == 0) { - // console.log(JSON.stringify(result)); - this.getTrainingjobsetting(true); - this.props.showNotification(`更新成功`); - this.setState({ - flagPageEditsbox: false, - flagPageEdit: false, - flagPageEditstwo: false, - flagPageEditsthrees: false, - flagPageEditsfor: false, - whethertopay: false, - completionefficiencyscore: false, - }) - this.refs.targetElementTrainingjobsetting.scrollIntoView() + if(result){ + if(result.data){ + if (result.data.status == 0) { + // console.log(JSON.stringify(result)); + this.getTrainingjobsetting(true); + this.props.showNotification(`更新成功`); + this.setState({ + flagPageEditsbox: false, + flagPageEdit: false, + flagPageEditstwo: false, + flagPageEditsthrees: false, + flagPageEditsfor: false, + whethertopay: false, + completionefficiencyscore: false, + }) + this.refs.targetElementTrainingjobsetting.scrollIntoView() + } + } } + }).catch((error) => { console.log(error); }) @@ -2577,7 +2649,7 @@ class Trainingjobsetting extends Component { {/*补交设置*/} -
+
补交设置
@@ -2660,7 +2732,7 @@ class Trainingjobsetting extends Component {

{ this.state.hand__e_tip && this.state.hand__e_tip != "" ? - {this.state.hand__e_tip} : "" + {this.state.hand__e_tip} : "" }

@@ -2929,75 +3001,3 @@ class Trainingjobsetting extends Component { } export default Trainingjobsetting; -//
-//
-// this.ChangeTab(0)}>作品列表 -// this.ChangeTab(1)}>作业问答 -// {this.props.isAdmin()?this.state.code_review===true||jobsettingsdata === undefined ? [""] : jobsettingsdata.data.homework_status[0]==="未发布"?"": this.ChangeTab(2)}>代码查重 : ""} -// -// this.ChangeTab(3)} -// >设置 -// -// {this.props.isAdmin() ?
  • -// 导出 -// -//
  • : ""} -// {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.end_immediately===true? -// 立即截止 -// : "": ""} -// {this.props.isAdmin() ?jobsettingsdata&&jobsettingsdata.data.publish_immediately===true? -// 立即发布: "" : ""} -// {this.props.isAdmin()? -// jobsettingsdata&&jobsettingsdata.data.code_review===true? -// 代码查重: "":""} -// { -// jobsettingsdata&& jobsettingsdata&&jobsettingsdata.data === undefined ? "" -// : jobsettingsdata&& jobsettingsdata.data.commit_des === null || jobsettingsdata&& jobsettingsdata.data.commit_des === undefined ? "" : -// { jobsettingsdata&& jobsettingsdata.data.commit_des} -// } -// { jobsettingsdata&&jobsettingsdata.data === undefined ? "" : } -{/*
    */ -} -{/*
    */ -}