From 224b8db1695346184e6a1ae4db86d1c6d408139e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 21 Aug 2019 18:46:35 +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 | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js index d7164037a..9cb2bd973 100644 --- a/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js +++ b/public/react/src/modules/courses/shixunHomework/Trainingjobsetting.js @@ -51,6 +51,7 @@ function disabledDate(current) { return current && current < moment().endOf('day').subtract(1, 'days'); } + class Trainingjobsetting extends Component { //unifiedsetting 统一设置 //allowreplenishment 允许补交 @@ -1286,15 +1287,15 @@ class Trainingjobsetting extends Component { }) return; } - if (moment(value, "YYYY-MM-DD HH:mm") <= moment()) { - this.setState({ - unit_p_tip: "发布时间不能早于当前时间", - p_flag: true, - borreds:"bor-reds", - releasetime:undefined, - publish_time:undefined, - }) - } else { + // if (moment(value, "YYYY-MM-DD HH:mm") <= moment()) { + // this.setState({ + // unit_p_tip: "发布时间不能早于当前时间", + // p_flag: true, + // borreds:"bor-reds", + // releasetime:undefined, + // publish_time:undefined, + // }) + // } else { try { this.setState({ @@ -1312,7 +1313,7 @@ class Trainingjobsetting extends Component { // this.onChangedata('publish_time', value, dateString); this.setState({ publish_time:moment(moment(handleDateString(dateString))).format("YYYY-MM-DD HH:mm"), - }) + }); if(this.state.allowreplenishment === true) { if(this.state.end_time=== undefined || this.state.end_time===""){ @@ -1352,7 +1353,7 @@ class Trainingjobsetting extends Component { } } - } + // } } onEndChange = (value, dateString) => { @@ -1366,15 +1367,15 @@ class Trainingjobsetting extends Component { }) return; } - if (moment(value, "YYYY-MM-DD HH:mm") <= moment()) { - this.setState({ - unit_e_tip: "截止时间不能早于当前时间", - p_flag: true, - borredss:"bor-reds", - end_time:undefined, - deadline:undefined, - }) - } else { + // if (moment(value, "YYYY-MM-DD HH:mm") <= moment()) { + // this.setState({ + // unit_e_tip: "截止时间不能早于当前时间", + // p_flag: true, + // borredss:"bor-reds", + // end_time:undefined, + // deadline:undefined, + // }) + // } else { // console.log(moment(value, "YYYY-MM-DD HH:mm")); // console.log(moment(this.state.publish_time, "YYYY-MM-DD HH:mm")); if (moment(value, "YYYY-MM-DD HH:mm") <= moment(this.state.publish_time, "YYYY-MM-DD HH:mm")) { @@ -1399,7 +1400,7 @@ class Trainingjobsetting extends Component { } this.setState({ - end_time:moment(handleDateString(dateString)) + end_time:moment(moment(handleDateString(dateString))).format("YYYY-MM-DD HH:mm"), }) // this.onChangedata('end_time', value, dateString); if(this.state.allowreplenishment === true){ @@ -1410,7 +1411,7 @@ class Trainingjobsetting extends Component { }) } - } + // } } onEndChangeys = (value, dateString) => { @@ -1952,7 +1953,6 @@ class Trainingjobsetting extends Component {