problem_set
杨树明 5 years ago
parent 38c92f8d45
commit 5d5be45eee

@ -34,7 +34,8 @@ class PublishRightnow extends Component{
homeworkstart=()=>{
const isPublish = this.props.isPublish;
let showdatatypes=isPublish===true||isPublish===1;
const isPublishtype = this.props.isPublishtype;
let showdatatypes=isPublish===true||isPublishtype===1;
if (!this.props.checkBoxValues || this.props.checkBoxValues.length == 0) {
this.props.showNotification(`请先选择要立即${showdatatypes? "发布" : "截止"}的作业`)
@ -47,9 +48,10 @@ class PublishRightnow extends Component{
}
showDialog = () => {
const isPublish = this.props.isPublish;
const isPublishtype = this.props.isPublishtype;
const dateFormat = 'YYYY-MM-DD HH:mm';
let showdatatype=isPublish===true&&isPublish!=1;
let showdatatypes=isPublish===true||isPublish===1;
let showdatatype=isPublish===false||isPublishtype===undefined;
let showdatatypes=isPublish===true||isPublishtype===1;
// getNextHalfHourOfMoment
const startMoment = (moment());
this.setState({
@ -127,8 +129,8 @@ class PublishRightnow extends Component{
detail:true
}
}
let showdatatypes=isPublish===true||isPublish===1;
const isPublishtype = this.props.isPublishtype;
let showdatatypes=isPublish===true||isPublishtype===1;
let coursesId=this.props.match.params.coursesId;
const url = `/courses/${coursesId}/homework_commons/${showdatatypes ? "publish_homework" : "end_homework"}.json`
axios.post(url, data)
@ -152,7 +154,8 @@ class PublishRightnow extends Component{
// }
fetchCourseGroups = () => {
const isPublish = this.props.isPublish;
let showdatatypes=isPublish===true||isPublish===1;
const isPublishtype = this.props.isPublishtype;
let showdatatypes=isPublish===true||isPublishtype===1;
let coursesId=this.props.match.params.coursesId;
// TODO 这里要改成单选作业,接口使用这个 https://www.showdoc.cc/127895880302646?page_id=2035541497546668
// /homework_commons/:id/publish_groups.json
@ -182,7 +185,9 @@ class PublishRightnow extends Component{
render(){
const isPublish = this.props.isPublish;
let showdatatypes=isPublish===true||isPublish===1;
const isPublishtype = this.props.isPublishtype;
let showdatatypes=isPublish===true||isPublishtype===1;
let{
Topvalright,
modalname,

@ -431,7 +431,9 @@ class commonWork extends Component{
></Titlesearchsection>
<PublishRightnow ref="publishModalRef" showActionButton={true} {...this.props} checkBoxValues={checkBoxValues}
showActionButton={false}
isPublish={1} doWhenSuccess={this.doWhenSuccess} fromListPage={true}></PublishRightnow>
isPublish={true}
isPublishtype={1}
doWhenSuccess={this.doWhenSuccess} fromListPage={true}></PublishRightnow>
{
mainList && mainList.course_identity < 5 && mainList.homeworks.length>0 &&
<div className="mt20 edu-back-white padding20-30">

@ -168,7 +168,7 @@ class OneSelfOrderModal extends Component{
endtimetypeid:undefined
})
}
if(moment(items.end_time,"YYYY-MM-DD HH:mm") <= moment(this.props.starttime,"YYYY-MM-DD HH:mm")){}else{
if(moment(dateString,"YYYY-MM-DD HH:mm") <= moment(this.props.starttime,"YYYY-MM-DD HH:mm")){}else{
if(date!=null){
this.setState({
endtimetypeid:undefined

Loading…
Cancel
Save