调整时间

problem_set
杨树明 6 years ago
parent 6dde2ef6d5
commit a14ece2093

@ -46,17 +46,17 @@ class PublishRightnow extends Component{
} }
showDialog = () => { showDialog = (course_groups) => {
const isPublish = this.props.isPublish; const isPublish = this.props.isPublish;
const isPublishtype = this.props.isPublishtype; const isPublishtype = this.props.isPublishtype;
const dateFormat = 'YYYY-MM-DD HH:mm'; 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; let showdatatypes=isPublish===true||isPublishtype===1;
// getNextHalfHourOfMoment // getNextHalfHourOfMoment
const startMoment = (moment()); const startMoment = (moment());
this.setState({ this.setState({
modalname: showdatatypes ? "立即发布" : "立即截止", modalname: showdatatypes ? "立即发布" : "立即截止",
modaltype:1, modaltype:course_groups.length> 0 ? 1 : 2,
visible:showdatatype?false:true, visible:showdatatype?false:true,
OneSelftype:showdatatype?true:false, OneSelftype:showdatatype?true:false,
Topval:showdatatypes ? "学生将立即收到作业" : "学生将不能再提交作品", Topval:showdatatypes ? "学生将立即收到作业" : "学生将不能再提交作品",
@ -172,7 +172,7 @@ class PublishRightnow extends Component{
this.setState({ visible : false }) this.setState({ visible : false })
return; return;
} }
this.showDialog() this.showDialog(response.data.course_groups)
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:response.data.end_time, starttimesend:response.data.end_time===undefined||response.data.end_time===null||response.data.end_time===""?undefined:response.data.end_time,

@ -235,10 +235,14 @@ class HomeworkModal extends Component{
<style> <style>
{ {
` `
.ant-checkbox-wrapper { .HomeworkModal .ant-checkbox-wrapper {
margin-top: 0px; margin-top: 0px;
float: left; float: left;
} }
.width300{
width:300px;
display: inline-block;
}
` `
} }
</style> </style>
@ -251,7 +255,7 @@ class HomeworkModal extends Component{
<div className="clearfix edu-txt-center lineh-40" key={key}> <div className="clearfix edu-txt-center lineh-40" key={key}>
<li style={{ width: '100%',padding: "0px 10px"}}> <li style={{ width: '100%',padding: "0px 10px"}}>
<Checkbox <Checkbox
className="task-hide edu-txt-left" className="task-hide edu-txt-left width300"
name="shixun_homework[]" name="shixun_homework[]"
value={item.id} value={item.id}
key={item.id} key={item.id}

@ -276,7 +276,7 @@ class OneSelfOrderModal extends Component{
render(){ render(){
let {group_ids,endtime,course_groups}=this.state; let {group_ids,endtime,course_groups}=this.state;
// console.log(course_groups) console.log(this.props.modaltype)
let course_groupstype=course_groups===undefined||course_groups.length===0; let course_groupstype=course_groups===undefined||course_groups.length===0;
// TODO course_groups为空时的处理 // TODO course_groups为空时的处理
return( return(
@ -344,7 +344,7 @@ class OneSelfOrderModal extends Component{
{this.props.starttime===undefined|| {this.props.starttime===undefined||
this.props.starttime===""?"" this.props.starttime===""?""
: <p className="task-popup-text-center font-16 mt10 mb10"> : <p className="task-popup-text-center font-16 mt20 mb10">
{/*<span className={"font-14 mr20 color979797"}>*/} {/*<span className={"font-14 mr20 color979797"}>*/}
{/*<span className={"mr10"}>发布时间:</span>*/} {/*<span className={"mr10"}>发布时间:</span>*/}
{/*{this.props.starttime}</span>*/} {/*{this.props.starttime}</span>*/}
@ -366,16 +366,17 @@ class OneSelfOrderModal extends Component{
onChange={this.onChangeTimeend} onChange={this.onChangeTimeend}
className={ this.state.endtimetype===true?"noticeTip":""} className={ this.state.endtimetype===true?"noticeTip":""}
/> />
{this.state.endtimetype===true?<div className={"color-red fr mr90 mt5"}>{this.state.endtimetypevalue}</div>:""}
{/*<div className={"fr mr90 mt5"}>(仅支持半点和整点)</div>*/} {/*<div className={"fr mr90 mt5"}>(仅支持半点和整点)</div>*/}
</span>:""} </span>:""}
</p>} </p>}
{/* usingCheckBeforePost 为true的时候 全选所有分班 */} {/* usingCheckBeforePost 为true的时候 全选所有分班 */}
<style> <style>
{ {
` `
.ant-checkbox-wrapper { .HomeworkModal .ant-checkbox-wrapper {
margin-top: 0px; margin-top: 0px;
float: left; float: left;
} }
@ -407,7 +408,7 @@ class OneSelfOrderModal extends Component{
{ <Checkbox.Group style={{ width: '100%' }} value={group_ids} onChange={this.shixunhomeworkedit}> { <Checkbox.Group style={{ width: '100%' }} value={group_ids} onChange={this.shixunhomeworkedit}>
{ {
course_groups===undefined?"":course_groups.map((item,key)=>{ course_groups===undefined||course_groups.length===0?"":course_groups.map((item,key)=>{
return( return(
<div className="clearfix edu-txt-center lineh-40 mb10" key={key}> <div className="clearfix edu-txt-center lineh-40 mb10" key={key}>
@ -444,8 +445,9 @@ class OneSelfOrderModal extends Component{
</ul> </ul>
} }
{this.state.endtimetype===true&&course_groupstype===true?<div className={"color-red"} style={{'text-align': 'center'}}>{this.state.endtimetypevalue}</div>:""}
{this.state.endtimetypeid!=undefined&&this.state.endtimetype===true?<div className={"color-red fl ml10 mb20"}>{this.state.endtimetypevalue}</div>:""} {this.state.endtimetypeid!=undefined&&this.state.endtimetype===true?<div className={"color-red fl ml10 mb20"}>{this.state.endtimetypevalue}</div>:""}
{course_groupstype===true?<div className="clearfix mt30 edu-txt-center mb10"> {course_groupstype===true?<div className={this.state.endtimetype===true&&course_groupstype===true?"clearfix mt10 edu-txt-center mb10":"clearfix mt20 edu-txt-center mb10"}>
<a className="task-btn color-white mr30" onClick={this.props.Cancel}>{this.props.Cancelname}</a> <a className="task-btn color-white mr30" onClick={this.props.Cancel}>{this.props.Cancelname}</a>
<a className="task-btn task-btn-orange" onClick={()=>this.propsSaves(group_ids,this.state.endtime)}>{this.props.Savesname}</a> <a className="task-btn task-btn-orange" onClick={()=>this.propsSaves(group_ids,this.state.endtime)}>{this.props.Savesname}</a>
</div>:<div className="clearfix mt30 edu-txt-center mb10"> </div>:<div className="clearfix mt30 edu-txt-center mb10">

@ -414,7 +414,7 @@ class ShixunhomeWorkItem extends Component{
{ {
discussMessage && discussMessage.upper_category_name && discussMessage && discussMessage.upper_category_name &&
<ConditionToolTip title={discussMessage.upper_category_name} condition={ discussMessage.upper_category_name.length > 22 }> <ConditionToolTip title={discussMessage.upper_category_name} condition={ discussMessage.upper_category_name.length > 22 }>
{ <div className=" color-grey9 task-hide fr" style={discussMessage.time_status===1||discussMessage.time_status===2||discussMessage.time_status===3||discussMessage.time_status===4||discussMessage.time_status===5||discussMessage.time_status===6?{"maxWidth":"268px"}:{"maxWidth":"625px"}} title={discussMessage.upper_category_name}>所属目录{discussMessage.upper_category_name}</div>} { <div className=" color-grey9 task-hide fr" style={discussMessage.time_status===1||discussMessage.time_status===2||discussMessage.time_status===3||discussMessage.time_status===4||discussMessage.time_status===5||discussMessage.time_status===6?{"maxWidth":"268px"}:{"maxWidth":"550px"}} title={discussMessage.upper_category_name}>所属目录{discussMessage.upper_category_name}</div>}
</ConditionToolTip> </ConditionToolTip>
} }

Loading…
Cancel
Save