时间调整

dev_forum
杨树明 5 years ago
parent 7f12ef4a34
commit e990fa51c5

@ -378,7 +378,7 @@ class ShixunModal extends Component{
</div> </div>
</div> </div>
</Spin> </Spin>
{this.state.shixunmodelchke===true?<span className={"color-red"}>{this.state.chekicmessage}</span>:""} <span className={this.state.shixunmodelchke===true?"none":"color-red"}>{this.state.chekicmessage}</span>
<div className="mt20 marginauto clearfix edu-txt-center"> <div className="mt20 marginauto clearfix edu-txt-center">
<a className="pop_close task-btn mr30 margin-tp26" onClick={this.hidecouseShixunModal}>取消</a> <a className="pop_close task-btn mr30 margin-tp26" onClick={this.hidecouseShixunModal}>取消</a>
<a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.savecouseShixunModal}>确定</a> <a className="task-btn task-btn-orange margin-tp26" id="submit_send_shixun" onClick={this.savecouseShixunModal}>确定</a>

@ -232,7 +232,7 @@ class ShixunsHome extends Component {
<p className="clearfix mt8 font-12 color-grey-B4"> <p className="clearfix mt8 font-12 color-grey-B4">
<Tooltip placement="bottom" title={"章节"}> <Tooltip placement="bottom" title={"章节"}>
<span className="mr10 fl squareIconSpan"> <span className="mr10 fl squareIconSpan">
<i className="iconfont icon-zhangjie fl mr3 iconfontzhangjie"></i>{item.stages_count} <i className="iconfont icon-zhangjie1 fl mr3 iconfontzhangjie"></i>{item.stages_count}
</span> </span>
</Tooltip> </Tooltip>

@ -161,7 +161,20 @@ function updatamakedown(id){
}, 200) }, 200)
} }
function range(start, end) {
const result = [];
for (let i = start; i < end; i++) {
result.push(i);
}
return result;
}
function disabledDateTime() {
return {
// disabledHours: () => range(0, 24).splice(4, 20),
disabledMinutes: () => range(1, 30).concat(range(31, 60)),
// disabledSeconds: () => [0, 60],
};
}
export default class TPMsettings extends Component { export default class TPMsettings extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
@ -1307,7 +1320,7 @@ export default class TPMsettings extends Component {
<div className="width15 fl mr20" <div className="width15 fl mr20"
// onMouseLeave={operateauthority?this.bigopens:""} // onMouseLeave={operateauthority?this.bigopens:""}
> >
<Select placeholder="请更新主类别" value={choice_main_type === "" ? undefined : choice_main_type} <Select placeholder="请选择主类别" value={choice_main_type === "" ? undefined : choice_main_type}
style={{width: 180}} style={{width: 180}}
onChange={operateauthority?this.bigClass:""} onChange={operateauthority?this.bigClass:""}
// onMouseEnter={this.bigopen} // onMouseEnter={this.bigopen}
@ -1822,10 +1835,11 @@ export default class TPMsettings extends Component {
<span className="fl mt5"> <span className="fl mt5">
<DatePicker <DatePicker
showToday={false} showToday={false}
showTime showTime={{ format: 'HH:mm' }}
format="YYYY-MM-DD HH:mm"
width={178} width={178}
locale={locale} locale={locale}
format={dateFormat} disabledTime={disabledDateTime}
placeholder="请选择开启时间" placeholder="请选择开启时间"
value={opening_time===null||opening_time===""?"":moment(opening_time, dateFormat)} value={opening_time===null||opening_time===""?"":moment(opening_time, dateFormat)}
onChange={this.onChangeTimePicker} onChange={this.onChangeTimePicker}

@ -2,7 +2,7 @@ import React, {Component} from 'react';
import {TPMIndexHOC} from '../TPMIndexHOC'; import {TPMIndexHOC} from '../TPMIndexHOC';
import {SnackbarHOC} from 'educoder'; import {SnackbarHOC,handleDateString} from 'educoder';
import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form,notification} from 'antd'; import {Input, Select, Radio, Checkbox, Modal, Icon, DatePicker,Upload,Button,message,Form,notification} from 'antd';
@ -146,7 +146,20 @@ function create_editorMD(id, width, high, placeholder, imageUrl, callback) {
return editorName; return editorName;
} }
function range(start, end) {
const result = [];
for (let i = start; i < end; i++) {
result.push(i);
}
return result;
}
function disabledDateTime() {
return {
// disabledHours: () => range(0, 24).splice(4, 20),
disabledMinutes: () => range(1, 30).concat(range(31, 60)),
// disabledSeconds: () => [0, 60],
};
}
class Newshixuns extends Component { class Newshixuns extends Component {
constructor(props) { constructor(props) {
super(props) super(props)
@ -669,7 +682,7 @@ class Newshixuns extends Component {
onChangeTimePicker = (value, dateString) => { onChangeTimePicker = (value, dateString) => {
this.setState({ this.setState({
TimePickervalue: dateString TimePickervalue: handleDateString(dateString)
}) })
} }
// 附件相关 START // 附件相关 START
@ -892,7 +905,7 @@ class Newshixuns extends Component {
<div className="width15 fl mr20" <div className="width15 fl mr20"
// onMouseLeave={this.bigopens} // onMouseLeave={this.bigopens}
> >
<Select placeholder="请更新主类别" <Select placeholder="请选择主类别"
style={{width: 180}} style={{width: 180}}
onChange={this.bigClass} onChange={this.bigClass}
// onMouseEnter={this.bigopen} // onMouseEnter={this.bigopen}
@ -930,7 +943,7 @@ class Newshixuns extends Component {
<label className="fl mt10 "><span <label className="fl mt10 "><span
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label> className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<textarea className="fl task-form-80 task-height-150" <textarea className="fl task-form-80 task-height-150"
style={{width:'89%'}} style={{width:'89%',height:'100px'}}
onInput={this.setlanguagewrite} onInput={this.setlanguagewrite}
value={languagewrite} value={languagewrite}
placeholder="请填写该镜像是基于什么语言示例Python" placeholder="请填写该镜像是基于什么语言示例Python"
@ -941,6 +954,7 @@ class Newshixuns extends Component {
className="color-red fl mt3">*</span>&nbsp;&nbsp;</label> className="color-red fl mt3">*</span>&nbsp;&nbsp;</label>
<textarea className="fl task-form-80 task-height-150 " <textarea className="fl task-form-80 task-height-150 "
onInput={this.setsystemenvironment} onInput={this.setsystemenvironment}
style={{height:'100px'}}
value={systemenvironment} value={systemenvironment}
placeholder="请填写该镜像是基于什么linux系统环境,代码运行环境" placeholder="请填写该镜像是基于什么linux系统环境,代码运行环境"
id="demand_info"></textarea> id="demand_info"></textarea>
@ -953,6 +967,7 @@ class Newshixuns extends Component {
<textarea className="fl task-form-80 task-height-150 " <textarea className="fl task-form-80 task-height-150 "
onInput={this.settestcoderunmode} onInput={this.settestcoderunmode}
value={testcoderunmode} value={testcoderunmode}
style={{height:'100px'}}
placeholder="请填写该镜像中测试代码运行方式" placeholder="请填写该镜像中测试代码运行方式"
id="demand_info"></textarea> id="demand_info"></textarea>
</li> </li>
@ -993,14 +1008,11 @@ class Newshixuns extends Component {
</li> </li>
<li className="edu-txt-center clearfix "> <li className="edu-txt-center clearfix ">
<a className="pop_close task-btn mr30"
<Form.Item>
<a className="pop_close task-btn mr30 mb30 mt35"
onClick={() => this.sendhideModaly()} onClick={() => this.sendhideModaly()}
>取消</a> >取消</a>
<Button type="primary" onClick={()=>this.sendsure_apply()} <Button type="primary" onClick={()=>this.sendsure_apply()}
className="task-btn task-btn-orange mb30 mt35">确定</Button> className="task-btn task-btn-orange">确定</Button>
</Form.Item>
</li> </li>
<div className="cl"></div> <div className="cl"></div>
</div> </div>
@ -1203,10 +1215,12 @@ class Newshixuns extends Component {
showToday={false} showToday={false}
showTime showTime
locale={locale} locale={locale}
showTime={{ format: 'HH:mm' }}
style={{"width": "184px"}} style={{"width": "184px"}}
format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD HH:mm"
placeholder="请选择开启时间" placeholder="请选择开启时间"
onChange={this.onChangeTimePicker} onChange={this.onChangeTimePicker}
disabledTime={disabledDateTime}
/> />
<label style={{top: '6px'}} className="color-grey-6 ml10"> <label style={{top: '6px'}} className="color-grey-6 ml10">
为空则学员在实训发布后能随时开启实训挑战否则学员在开启时间后才能开启实训挑战 为空则学员在实训发布后能随时开启实训挑战否则学员在开启时间后才能开启实训挑战

Loading…
Cancel
Save