From eaff51442161e0cee7c02b2f29aee9beede72c18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 25 Jul 2019 20:26:38 +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 | 33 +++++++++---------- 1 file changed, 15 insertions(+), 18 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index 8b0a6bf23..b07392153 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -598,26 +598,23 @@ class Trainingjobsetting extends Component { }else{ // //非统一配置 // console.log("非统一设置"); - // let rulesdata=this.state.rulesdata; - // - // rulesdata.map((item,key)=>{ - // - // if(item.publish_time==="Invalid date"){ - // item.publish_time="" - // } - // if(item.end_time==="Invalid date"){ - // item.end_time="" - // } - // if(item.publiend_timesh_time==="Invalid date"){ - // item.publiend_timesh_time="" - // } - // }) - - let {rules}=this.state; - var mydatas=[]; + let rulesdata=this.state.rulesdata; + + let newlist=[] + + rulesdata.map((item,key)=>{ + + if(item.publish_time==="Invalid date"||item.end_time==="Invalid date"||item.publiend_timesh_time==="Invalid date"){ + + }else{ + newlist.push(item) + } + + }) + data = { unified_setting: this.state.unifiedsetting, //非统一配置 - group_settings: rules, + group_settings: newlist, allow_late: this.state.allowreplenishment, //补交 late_penalty: parseInt(this.state.latededuction), //迟交扣分 late_time: moment(this.state.late_time).format('YYYY-MM-DD HH:mm'), //结束时间