分班设置 时间

dev_forum
hjm 6 years ago
parent fffcdd6270
commit 8791b8edf1

@ -271,8 +271,8 @@ class CommonWorkSetting extends Component{
absence_penalty = 2 absence_penalty = 2
} }
} else { } else {
evaluation_start = '' evaluation_start = null
evaluation_end = '' evaluation_end = null
evaluation_num = 0 evaluation_num = 0
absence_penalty = 0 absence_penalty = 0
} }
@ -484,6 +484,7 @@ class CommonWorkSetting extends Component{
publish_time_type, end_time_type publish_time_type, end_time_type
} = this.state; } = this.state;
let group_settings_param = [] let group_settings_param = []
let max_un_unified_setting_end_time = null
if (!unified_setting) { if (!unified_setting) {
const result = this.refs.pollDetailTabForthRules.notUnifiedSettingCheck(this.state.rules); const result = this.refs.pollDetailTabForthRules.notUnifiedSettingCheck(this.state.rules);
this.setState({ this.setState({
@ -494,6 +495,9 @@ class CommonWorkSetting extends Component{
return false; return false;
} }
group_settings_param = result.rules.map(item => { group_settings_param = result.rules.map(item => {
if (!max_un_unified_setting_end_time || moment(item.end_time) > moment(max_un_unified_setting_end_time)) {
max_un_unified_setting_end_time = item.end_time;
}
return { return {
group_id: item.course_group_id, group_id: item.course_group_id,
publish_time: item.publish_time, publish_time: item.publish_time,
@ -517,7 +521,9 @@ class CommonWorkSetting extends Component{
return false return false
} }
let temp_publish_time
let temp_end_time
if (unified_setting) {
let temp_publish_time = publish_time let temp_publish_time = publish_time
let temp_end_time = end_time let temp_end_time = end_time
if (!temp_publish_time) { if (!temp_publish_time) {
@ -527,6 +533,10 @@ class CommonWorkSetting extends Component{
if (!temp_end_time) { if (!temp_end_time) {
temp_end_time = moment(handleDateString(temp_publish_time)).add(1, 'months').format(dateFormat) temp_end_time = moment(handleDateString(temp_publish_time)).add(1, 'months').format(dateFormat)
} }
} else {
temp_end_time = max_un_unified_setting_end_time
}
// 已发布的不检查 // 已发布的不检查
const isUnPublish= homework_status.indexOf(STATUS_UN_PUBLISH) != -1 const isUnPublish= homework_status.indexOf(STATUS_UN_PUBLISH) != -1
const isAdmin = this.props.isAdmin() const isAdmin = this.props.isAdmin()
@ -534,6 +544,7 @@ class CommonWorkSetting extends Component{
const publish_time_editable = isUnPublish; const publish_time_editable = isUnPublish;
const end_time_editable = isAdmin || !end_time || moment(end_time) > current; const end_time_editable = isAdmin || !end_time || moment(end_time) > current;
if (unified_setting) {
if (publish_time_editable && temp_publish_time && moment(temp_publish_time) < moment()) { if (publish_time_editable && temp_publish_time && moment(temp_publish_time) < moment()) {
this.setState({ this.setState({
publicTimeTip: '发布时间不能小于当前时间' publicTimeTip: '发布时间不能小于当前时间'
@ -549,6 +560,7 @@ class CommonWorkSetting extends Component{
scrollTo('.publicTimeTip') scrollTo('.publicTimeTip')
return false return false
} }
}
this.setState({ this.setState({
publicTimeTip: '' publicTimeTip: ''
}) })
@ -1201,7 +1213,7 @@ class CommonWorkSetting extends Component{
<span className={"font-14 color-grey-9 ml10"}></span> <span className={"font-14 color-grey-9 ml10"}></span>
</div> </div>
{anonymous_comment_time_tip && <div className={" anonymous_comment_time_tip color-red ml60"} style={{marginTop: '-6px'}}>{anonymous_comment_time_tip}</div>} {<div className={" anonymous_comment_time_tip color-red ml60"} style={{marginTop: '-6px'}}>{anonymous_comment_time_tip}</div>}
{/* 匿评数量 */} {/* 匿评数量 */}
<div className={"h20 mb30 ml60"}> <div className={"h20 mb30 ml60"}>

@ -49,7 +49,7 @@ function buildColumns(that) {
width: 160, width: 160,
key: 'name', key: 'name',
render: (name, record) => { render: (name, record) => {
return <a href={`login/${record.login}`} target="_blank">{name}</a> return <a href={`/login/${record.login}`} target="_blank">{name}</a>
} }
}, { }, {
title: '角色', title: '角色',

Loading…
Cancel
Save