From a14ece2093d06306543caa171a5e1af3bdaa61ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 22 Oct 2019 17:06:10 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/courses/busyWork/PublishRightnow.js | 8 ++++---- .../modules/courses/coursesPublic/HomeworkModal.js | 8 ++++++-- .../courses/coursesPublic/OneSelfOrderModal.js | 14 ++++++++------ .../courses/shixunHomework/ShixunhomeWorkItem.js | 2 +- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/PublishRightnow.js b/public/react/src/modules/courses/busyWork/PublishRightnow.js index 42701babf..ff0a1bbd3 100644 --- a/public/react/src/modules/courses/busyWork/PublishRightnow.js +++ b/public/react/src/modules/courses/busyWork/PublishRightnow.js @@ -46,17 +46,17 @@ class PublishRightnow extends Component{ } - showDialog = () => { + showDialog = (course_groups) => { const isPublish = this.props.isPublish; const isPublishtype = this.props.isPublishtype; const dateFormat = 'YYYY-MM-DD HH:mm'; - let showdatatype=isPublish===false||isPublishtype===undefined; + let showdatatype=isPublish===true&&isPublishtype===undefined; let showdatatypes=isPublish===true||isPublishtype===1; // getNextHalfHourOfMoment const startMoment = (moment()); this.setState({ modalname: showdatatypes ? "立即发布" : "立即截止", - modaltype:1, + modaltype:course_groups.length> 0 ? 1 : 2, visible:showdatatype?false:true, OneSelftype:showdatatype?true:false, Topval:showdatatypes ? "学生将立即收到作业" : "学生将不能再提交作品", @@ -172,7 +172,7 @@ class PublishRightnow extends Component{ this.setState({ visible : false }) return; } - this.showDialog() + this.showDialog(response.data.course_groups) this.setState({ course_groups: response.data.course_groups, starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:response.data.end_time, diff --git a/public/react/src/modules/courses/coursesPublic/HomeworkModal.js b/public/react/src/modules/courses/coursesPublic/HomeworkModal.js index ee19745c9..69eb937ff 100644 --- a/public/react/src/modules/courses/coursesPublic/HomeworkModal.js +++ b/public/react/src/modules/courses/coursesPublic/HomeworkModal.js @@ -235,10 +235,14 @@ class HomeworkModal extends Component{ @@ -251,7 +255,7 @@ class HomeworkModal extends Component{
  • + :

    {/**/} {/*发布时间:*/} {/*{this.props.starttime}*/} @@ -366,16 +366,17 @@ class OneSelfOrderModal extends Component{ onChange={this.onChangeTimeend} className={ this.state.endtimetype===true?"noticeTip":""} /> - {this.state.endtimetype===true?

    {this.state.endtimetypevalue}
    :""} + {/*
    (仅支持半点和整点)
    */} :""} +

    } {/* usingCheckBeforePost 为true的时候 全选所有分班 */}