立即发布 截止时间

competitions
杨树林 5 years ago
parent 6df91dab7f
commit 5c7bd64e6a

@ -23,8 +23,7 @@ class PublishRightnow extends Component{
Savesname:undefined, Savesname:undefined,
Cancel:undefined, Cancel:undefined,
Saves:undefined, Saves:undefined,
Topvalright:undefined, Topvalright:undefined
starttimesend:undefined,
} }
} }
open = (usingCheckBeforePost) => { open = (usingCheckBeforePost) => {
@ -84,8 +83,7 @@ class PublishRightnow extends Component{
StudentList_value:undefined, StudentList_value:undefined,
addname:undefined, addname:undefined,
addnametype:false, addnametype:false,
addnametab:undefined, addnametab:undefined
starttimesend:undefined,
}) })
} }
@ -152,12 +150,9 @@ class PublishRightnow extends Component{
this.setState({ visible : false }) this.setState({ visible : false })
return; return;
} }
const dataformat = 'YYYY-MM-DD HH:mm';
this.showDialog() this.showDialog()
this.setState({ this.setState({
course_groups: response.data.course_groups, course_groups: response.data.course_groups,
starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:moment(response.data.end_time, dataformat),
}) })
}) })
.catch(function (error) { .catch(function (error) {
@ -208,7 +203,6 @@ class PublishRightnow extends Component{
usingCheckBeforePost= {this.usingCheckBeforePost} usingCheckBeforePost= {this.usingCheckBeforePost}
onToPublishClick={this.props.onToPublishClick} onToPublishClick={this.props.onToPublishClick}
typs={this.state.typs} typs={this.state.typs}
starttimesend={this.state.starttimesend}
/>:""} />:""}
{ showActionButton && <a href="javascript:void(0)" className="color-grey-9" onClick={this.homeworkstart}>{ isPublish ? "立即发布" : "立即截止" }</a> } { showActionButton && <a href="javascript:void(0)" className="color-grey-9" onClick={this.homeworkstart}>{ isPublish ? "立即发布" : "立即截止" }</a> }
</div> </div>

Loading…
Cancel
Save