Merge remote-tracking branch 'origin/master'

dev_forum
杨树明 6 years ago
commit e2a40cf205

@ -78,6 +78,7 @@ class BoardsNew extends Component{
if (data) { if (data) {
this.editTopic = data; this.editTopic = data;
this.props.form.setFieldsValue({ this.props.form.setFieldsValue({
sticky: !!data.sticky,
content: data.content, content: data.content,
subject: data.subject, subject: data.subject,
select_board_id: data.board_id // TODO 没返回给前端 select_board_id: data.board_id // TODO 没返回给前端
@ -309,6 +310,14 @@ class BoardsNew extends Component{
label="标题" label="标题"
className="topicTitle " className="topicTitle "
> >
{getFieldDecorator('sticky', {
valuePropName: 'checked',
})(
<Checkbox style={{ right: '0px',
top: '-50px',
position: 'absolute'
}}>置顶</Checkbox>
)}
{getFieldDecorator('subject', { {getFieldDecorator('subject', {
rules: [{ rules: [{
required: true, message: '请输入标题', required: true, message: '请输入标题',
@ -347,7 +356,7 @@ class BoardsNew extends Component{
)} )}
</Form.Item> </Form.Item>
{ isAdmin && <Form.Item {/* { isAdmin && <Form.Item
label="" label=""
style={{ display: 'inline-block', marginLeft: "14px" }} style={{ display: 'inline-block', marginLeft: "14px" }}
> >
@ -355,7 +364,7 @@ class BoardsNew extends Component{
})( })(
<Checkbox>置顶</Checkbox> <Checkbox>置顶</Checkbox>
)} )}
</Form.Item> } </Form.Item> } */}
</div> </div>
<style>{` <style>{`
@ -380,6 +389,7 @@ class BoardsNew extends Component{
<Form.Item <Form.Item
label="内容" label="内容"
className="mdInForm"
> >
{getFieldDecorator('content', { {getFieldDecorator('content', {
rules: [{ rules: [{

@ -1028,9 +1028,11 @@ class CommonWorkSetting extends Component{
<React.Fragment> <React.Fragment>
<div className={"h20 mb30 ml30"}> <div className={"h20 mb30 ml30"}>
<span>发布时间</span> <span>发布时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":publish_time_type===true?"发布时间已过,则不能修改":""}> {/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":publish_time_type===true?"":""}>
</Tooltip> */}
<ConditionToolTip condition={moment(this.state.init_publish_time) < moment()} title={"时间已过,不能再修改"}>
<span> <span>
<ConditionToolTip condition={moment(this.state.init_publish_time) < moment()} title={"时间已过,不能再修改"}>
<DatePicker <DatePicker
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
@ -1051,17 +1053,18 @@ class CommonWorkSetting extends Component{
// return publish_time && publish_time < moment().add(-1, 'days'); } // return publish_time && publish_time < moment().add(-1, 'days'); }
// } // }
/> />
</ConditionToolTip>
</span> </span>
</Tooltip> </ConditionToolTip>
<span className={"font-14 color-grey-9 ml10"}>学生收到作业的时间</span> <span className={"font-14 color-grey-9 ml10"}>学生收到作业的时间</span>
</div> </div>
<div className={"h20 mb30 ml30"}> <div className={"h20 mb30 ml30"}>
<span>截止时间</span> <span>截止时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":end_time_type===true?"截止时间已过,则不能修改":""}> {/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":end_time_type===true?"":""}>
<span> </Tooltip> */}
<ConditionToolTip condition={moment(this.state.init_end_time) < moment()} title={"时间已过,不能再修改"}> <ConditionToolTip condition={moment(this.state.init_end_time) < moment()} title={"时间已过,不能再修改"}>
<span>
<DatePicker <DatePicker
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
showTime={{ format: 'HH:mm' }} showTime={{ format: 'HH:mm' }}
@ -1087,9 +1090,9 @@ class CommonWorkSetting extends Component{
// return end_time.valueOf() < moment(publish_time, dateFormat).valueOf(); } // return end_time.valueOf() < moment(publish_time, dateFormat).valueOf(); }
// } // }
/> />
</ConditionToolTip>
</span> </span>
</Tooltip> </ConditionToolTip>
<span className={"font-14 color-grey-9 ml10"}>学生按时提交作品的时间截点</span> <span className={"font-14 color-grey-9 ml10"}>学生按时提交作品的时间截点</span>
</div> </div>
@ -1133,6 +1136,7 @@ class CommonWorkSetting extends Component{
<div className={" mb10 ml30"}> <div className={" mb10 ml30"}>
<span>结束时间</span> <span>结束时间</span>
<ConditionToolTip condition={moment(init_late_time) < moment()} title={"时间已过,不能再修改"}> <ConditionToolTip condition={moment(init_late_time) < moment()} title={"时间已过,不能再修改"}>
<span>
<DatePicker <DatePicker
showToday={false} showToday={false}
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
@ -1153,6 +1157,7 @@ class CommonWorkSetting extends Component{
// return late_time < moment(end_time, dateFormat).add(-1, 'days'); } // return late_time < moment(end_time, dateFormat).add(-1, 'days'); }
// } // }
/> />
</span>
</ConditionToolTip> </ConditionToolTip>
<span className={"font-14 color-grey-9 ml10"}>学生延时提交作品的时间截点</span> <span className={"font-14 color-grey-9 ml10"}>学生延时提交作品的时间截点</span>
{<div className={"latetimetype color-red "}>{latetimetype}</div>} {<div className={"latetimetype color-red "}>{latetimetype}</div>}
@ -1178,8 +1183,8 @@ class CommonWorkSetting extends Component{
<div className={"h20 mb30 ml60"}> <div className={"h20 mb30 ml60"}>
<span>开启时间</span> <span>开启时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"发布时间已过,则不能修改":""}> <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"发布时间已过,则不能修改":""}>
<ConditionToolTip condition={moment(init_evaluation_start) < moment()} title={"时间已过,不能再修改"}>
<span> <span>
<ConditionToolTip condition={moment(init_evaluation_start) < moment()} title={"时间已过,不能再修改"}>
<DatePicker <DatePicker
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
showTime={{ format: 'HH:mm' }} showTime={{ format: 'HH:mm' }}
@ -1200,16 +1205,17 @@ class CommonWorkSetting extends Component{
// return evaluation_start.valueOf() < moment(end_time, dateFormat).valueOf(); } // return evaluation_start.valueOf() < moment(end_time, dateFormat).valueOf(); }
// } // }
/> />
</ConditionToolTip>
</span> </span>
</ConditionToolTip>
</Tooltip> </Tooltip>
<span className={"font-14 color-grey-9 ml10"}>匿评开始时间之前提交作品的学生参与匿评</span> <span className={"font-14 color-grey-9 ml10"}>匿评开始时间之前提交作品的学生参与匿评</span>
</div> </div>
<div className={"h20 mb30 ml60"}> <div className={"h20 mb30 ml60"}>
<span>结束时间</span> <span>结束时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"发布时间已过,则不能修改":""}> <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"发布时间已过,则不能修改":""}>
<ConditionToolTip condition={moment(init_evaluation_end) < moment()} title={"时间已过,不能再修改"}>
<span> <span>
<ConditionToolTip condition={moment(init_evaluation_end) < moment()} title={"时间已过,不能再修改"}>
<DatePicker <DatePicker
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
showTime={{ format: 'HH:mm' }} showTime={{ format: 'HH:mm' }}
@ -1230,15 +1236,18 @@ class CommonWorkSetting extends Component{
// return evaluation_end.valueOf() < moment(evaluation_start, dateFormat).valueOf(); } // return evaluation_end.valueOf() < moment(evaluation_start, dateFormat).valueOf(); }
// } // }
/> />
</ConditionToolTip>
<span className={"font-14 color-grey-9 ml10"}>学生匿评TA人作品的时间截点</span>
</span> </span>
</ConditionToolTip>
<span className={"font-14 color-grey-9 ml10"}>学生匿评TA人作品的时间截点</span>
</Tooltip> </Tooltip>
<span className={"font-14 color-grey-9 ml10"}></span> <span className={"font-14 color-grey-9 ml10"}></span>
</div> </div>
{<div className={" anonymous_comment_time_tip color-red ml60"} style={{marginTop: '-6px'}}>{anonymous_comment_time_tip}</div>} {/* marginTop: '-6px' */}
{<div className={" anonymous_comment_time_tip color-red ml60"} style={{}}>{anonymous_comment_time_tip}</div>}
{/* 匿评数量 */} {/* 匿评数量 */}
<div className={"h20 mb30 ml60"}> <div className={"h20 mb30 ml60"}>
@ -1301,9 +1310,10 @@ class CommonWorkSetting extends Component{
{/* 启用匿评申述 结束时间: */} {/* 启用匿评申述 结束时间: */}
<div className={"h20 mb30 ml60"}> <div className={"h20 mb30 ml60"}>
<span>结束时间</span> <span>结束时间</span>
<Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"发布时间已过,则不能修改":""}> {/* <Tooltip placement="bottom" title={this.props.isSuperAdmin()?"":starttimetype===true?"":""}>
</Tooltip> */}
<ConditionToolTip condition={moment(init_appeal_time) < moment()} title={"时间已过,不能再修改"}>
<span> <span>
<ConditionToolTip condition={moment(init_appeal_time) < moment()} title={"时间已过,不能再修改"}>
<DatePicker <DatePicker
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
showTime={{ format: 'HH:mm' }} showTime={{ format: 'HH:mm' }}
@ -1318,9 +1328,9 @@ class CommonWorkSetting extends Component{
onChange={this.appeal_time_change} onChange={this.appeal_time_change}
disabled={ (anonymous_appeal && !noAuth ? false : true) || moment(init_appeal_time) < moment()} disabled={ (anonymous_appeal && !noAuth ? false : true) || moment(init_appeal_time) < moment()}
/> />
</ConditionToolTip>
</span> </span>
</Tooltip> </ConditionToolTip>
<span className={"font-14 color-grey-9 ml10"}>学生提交匿评申诉的时间截点</span> <span className={"font-14 color-grey-9 ml10"}>学生提交匿评申诉的时间截点</span>
</div> </div>

@ -41,13 +41,20 @@ class CheckAllGroup extends Component{
const { checkAll, checkedValues } = this.state; const { checkAll, checkedValues } = this.state;
return ( return (
<li className="clearfix"> <li className="clearfix">
<style>{`
.groupList .ant-checkbox-group-item{
margin-bottom:5px;
}
`}</style>
<span className="fl mr10 color-grey-8">{label}</span> <span className="fl mr10 color-grey-8">{label}</span>
<span className="fl mr25"> <span className="fl mr25">
<a href="javascript:void(0);" id="comment_no_limit" className={`pl10 pr10 ${checkAll ? 'check_on' : ''}`} onClick={this.onCheckAll}>不限</a> <a href="javascript:void(0);" id="comment_no_limit" className={`pl10 pr10 ${checkAll ? 'check_on' : ''}`} onClick={this.onCheckAll}>不限</a>
</span> </span>
{ <div className="fl groupList" style={{maxWidth:"990px"}}>
options.length > 1 && <CheckboxGroup options={options} onChange={this.onChange} value={checkedValues} style={checkboxGroupStyle}/> {
} options.length > 1 && <CheckboxGroup options={options} onChange={this.onChange} value={checkedValues} style={checkboxGroupStyle}/>
}
</div>
</li> </li>
) )
} }

@ -945,11 +945,20 @@ a.white-btn.use_scope-btn:hover{
font-size: 12px !important; font-size: 12px !important;
} }
/* md编辑器在form中时使用这个样式可以把错误信息绝对定位 */ /* md编辑器在form中时使用这个样式可以把错误信息绝对定位 */
/* 去掉form下边距 */
.mdInForm.ant-form-item {
margin-bottom: 0px;
}
.mdInForm .has-error .ant-form-explain { .mdInForm .has-error .ant-form-explain {
position: absolute; position: absolute;
margin-top: -2px; margin-top: -2px;
margin-left: -7px; margin-left: -7px;
} }
/* 课堂下统一的form样式前缀 courseForm */
.courseForm .ant-select-selection--single, .courseForm .ant-select-selection__rendered{
height: 40px;
line-height: 40px;
}
/*新建课堂*/ /*新建课堂*/

@ -1,7 +1,7 @@
import React,{ Component } from "react"; import React,{ Component } from "react";
import {Form,Checkbox,DatePicker,Button,Input,Select,Tooltip} from "antd"; import {Form,Checkbox,DatePicker,Button,Input,Select,Tooltip} from "antd";
import { handleDateString } from 'educoder'; import { handleDateString,ConditionToolTip } from 'educoder';
import PollDetailTabForthRules from './PollDetailTabForthRules' import PollDetailTabForthRules from './PollDetailTabForthRules'
import HomeworkModal from "../coursesPublic/HomeworkModal"; import HomeworkModal from "../coursesPublic/HomeworkModal";
@ -585,48 +585,56 @@ class PollDetailTabForth extends Component{
<div> <div>
<div className="clearfix mb5"> <div className="clearfix mb5">
<span className="font-16 mr15 fl mt6">发布时间</span> <span className="font-16 mr15 fl mt6">发布时间</span>
<div className="fl"> <div className="fl">
<DatePicker <Tooltip placement="bottom" title={un_change_unified ? "发布时间已过,不能再修改":""}>
showToday={false} <span>
dropdownClassName="hideDisable" <DatePicker
showTime={{ format: 'HH:mm' }} showToday={false}
placeholder="请选择发布时间" dropdownClassName="hideDisable"
locale={locale} showTime={{ format: 'HH:mm' }}
className={unit_p_tip && unit_p_tip != "" ?"noticeTip winput-240-40":"winput-240-40" } placeholder="请选择发布时间"
style={{"height":"42px"}} locale={locale}
format="YYYY-MM-DD HH:mm" className={unit_p_tip && unit_p_tip != "" ?"noticeTip winput-240-40":"winput-240-40" }
disabledTime={disabledDateTime} style={{"height":"42px"}}
onChange={this.onChangeTimepublish} format="YYYY-MM-DD HH:mm"
value={publish_time && moment(publish_time,dataformat)} disabledTime={disabledDateTime}
disabled={un_change_unified == true ? true : !flagPageEdit } onChange={this.onChangeTimepublish}
></DatePicker> value={publish_time && moment(publish_time,dataformat)}
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}> disabled={un_change_unified == true ? true : !flagPageEdit }
{ ></DatePicker>
unit_p_tip && unit_p_tip != "" ? <span className="fl">{ unit_p_tip }</span>:"" </span>
} </Tooltip>
</p> <p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
</div> {
unit_p_tip && unit_p_tip != "" ? <span className="fl">{ unit_p_tip }</span>:""
}
</p>
</div>
<span className="color-grey-c ml20 fl mt10 font-14">学生收到问卷的时间</span> <span className="color-grey-c ml20 fl mt10 font-14">学生收到问卷的时间</span>
</div> </div>
<div className="clearfix"> <div className="clearfix">
<span className="mr15 fl mt10 font-16">截止时间</span> <span className="mr15 fl mt10 font-16">截止时间</span>
<div className="fl"> <div className="fl">
<DatePicker <Tooltip placement="bottom" title={un_change_end ? "截止时间已过,不能再修改":""}>
showToday={false} <span>
dropdownClassName="hideDisable" <DatePicker
showTime={{ format: 'HH:mm' }} showToday={false}
locale={locale} dropdownClassName="hideDisable"
placeholder="请选择截止时间" showTime={{ format: 'HH:mm' }}
style={{"height":"42px"}} locale={locale}
className={unit_e_tip && unit_e_tip != "" ? "noticeTip winput-240-40 mr20":"winput-240-40 mr20" } placeholder="请选择截止时间"
width={"240px"} style={{"height":"42px"}}
format="YYYY-MM-DD HH:mm" className={unit_e_tip && unit_e_tip != "" ? "noticeTip winput-240-40 mr20":"winput-240-40 mr20" }
disabledTime={disabledDateTime} width={"240px"}
onChange={this.onChangeTimeEnd} format="YYYY-MM-DD HH:mm"
value={ end_time && moment(end_time,dataformat) } disabledTime={disabledDateTime}
disabled={un_change_end == true ? true : !flagPageEdit } onChange={this.onChangeTimeEnd}
> value={ end_time && moment(end_time,dataformat) }
</DatePicker> disabled={un_change_end == true ? true : !flagPageEdit }
>
</DatePicker>
</span>
</Tooltip>
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}> <p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
{ {
unit_e_tip && unit_e_tip != "" ? <span className="fl">{ unit_e_tip }</span>:"" unit_e_tip && unit_e_tip != "" ? <span className="fl">{ unit_e_tip }</span>:""

@ -390,20 +390,24 @@ class PollDetailTabForthRules extends Component{
</div> </div>
</div> </div>
<div className="fl pr20 with25"> <div className="fl pr20 with25">
<DatePicker <Tooltip placement="bottom" title={rule.e_timeflag ? "发布时间已过,不能再修改":""}>
showToday={false} <span>
dropdownClassName="hideDisable" <DatePicker
placeholder="请选择发布时间" showToday={false}
locale={locale} dropdownClassName="hideDisable"
className={rule.publish_flag && rule.publish_flag!=""?"noticeTip winput-240-40":"winput-240-40"} placeholder="请选择发布时间"
value={rule.publish_time && moment(rule.publish_time,dataformat)} locale={locale}
onChange={(e, date)=>this.changeRulePublishTime(e, date,r)} className={rule.publish_flag && rule.publish_flag!=""?"noticeTip winput-240-40":"winput-240-40"}
showTime={{ format: 'HH:mm' }} value={rule.publish_time && moment(rule.publish_time,dataformat)}
format="YYYY-MM-DD HH:mm" onChange={(e, date)=>this.changeRulePublishTime(e, date,r)}
disabledTime={disabledDateTime} showTime={{ format: 'HH:mm' }}
disabled={ rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.p_timeflag == true ? true : !flagPageEdit} format="YYYY-MM-DD HH:mm"
style={{"height":"42px",width:'100%'}} disabledTime={disabledDateTime}
></DatePicker> disabled={ rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.p_timeflag == true ? true : !flagPageEdit}
style={{"height":"42px",width:'100%'}}
></DatePicker>
</span>
</Tooltip>
<p className="color-orange-tip lineh-25 clearfix" style={{height:"25px"}}> <p className="color-orange-tip lineh-25 clearfix" style={{height:"25px"}}>
{ {
rule.publish_flag && rule.publish_flag!=""?<span className="fl color-red mt10">{rule.publish_flag}</span>:"" rule.publish_flag && rule.publish_flag!=""?<span className="fl color-red mt10">{rule.publish_flag}</span>:""
@ -411,20 +415,24 @@ class PollDetailTabForthRules extends Component{
</p> </p>
</div> </div>
<div className="fl mr20"> <div className="fl mr20">
<DatePicker <Tooltip placement="bottom" title={rule.e_timeflag ? "截止时间已过,不能再修改":""}>
showToday={false} <span>
dropdownClassName="hideDisable" <DatePicker
placeholder="请选择截止时间" showToday={false}
locale={locale} dropdownClassName="hideDisable"
className={rule.end_flag && rule.end_flag !="" ? "noticeTip winput-240-40":"winput-240-40" } placeholder="请选择截止时间"
value={rule.end_time && moment(rule.end_time,dataformat)} locale={locale}
onChange={(e, date)=>this.changeRuleEndTime(e, date,r)} className={rule.end_flag && rule.end_flag !="" ? "noticeTip winput-240-40":"winput-240-40" }
showTime={{ format: 'HH:mm' }} value={rule.end_time && moment(rule.end_time,dataformat)}
format="YYYY-MM-DD HH:mm" onChange={(e, date)=>this.changeRuleEndTime(e, date,r)}
disabledTime={disabledDateTime} showTime={{ format: 'HH:mm' }}
disabled={ rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.e_timeflag == true ? true : !flagPageEdit} format="YYYY-MM-DD HH:mm"
style={{"height":"42px"}} disabledTime={disabledDateTime}
></DatePicker> disabled={ rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.e_timeflag == true ? true : !flagPageEdit}
style={{"height":"42px"}}
></DatePicker>
</span>
</Tooltip>
<p className="color-orange-tip lineh-25 clearfix" style={{height:"25px"}}> <p className="color-orange-tip lineh-25 clearfix" style={{height:"25px"}}>
{ {
rule.end_flag && rule.end_flag!=""?<span className="fl color-red mt10">{rule.end_flag}</span>:"" rule.end_flag && rule.end_flag!=""?<span className="fl color-red mt10">{rule.end_flag}</span>:""

@ -70,9 +70,9 @@ class PollDetailTabThird extends Component{
<div className="previewList"> <div className="previewList">
<p className="pl30 pr30 pt30 pb15 font-16 clearfix"> <p className="pl30 pr30 pt30 pb15 font-16 clearfix">
<span className="color-blue mr8 fl">{item.question.question_number}{map[item.question.question_type]}</span> <span className="color-blue mr8 fl">{item.question.question_number}{map[item.question.question_type]}</span>
{ item.question.is_necessary==1 ? <span className="mustAnswer fl ml10 mr10">必答</span>:"" } { item.question.is_necessary==1 ? <span className="mustAnswer fl ml10 mr10">必答</span>:<span className="mustAnswer fl ml10 mr10"></span> }
{ item.question.question_type == 2 ? { item.question.question_type == 2 ?
<span className="color-grey-9"> <span className="color-grey-9 font-14 fl mt2">
{ {
item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" : item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" :
"可选"+item.question.min_choices+"-"+item.question.max_choices+"项" "可选"+item.question.min_choices+"-"+item.question.max_choices+"项"

@ -185,9 +185,11 @@ class PollInfo extends Component{
flag=answers.indexOf(a_id) > -1?true:false; flag=answers.indexOf(a_id) > -1?true:false;
answers= type == 1 ? answers[0] : answers; answers= type == 1 ? answers[0] : answers;
}else{ }else{
flag=answers==a_id?true:false; flag = answers==a_id?true:false;
}
if(answers && (answers.length>0 || answers !="")){
this.postAnswer(q_id,answers,flag ? inputs.text : "",key);
} }
this.postAnswer(q_id,answers,flag ? inputs.text : "",key);
} }
//提交主观题 //提交主观题
@ -379,13 +381,21 @@ class PollInfo extends Component{
<div className="previewList" id={'Anchor_'+`${key}`}> <div className="previewList" id={'Anchor_'+`${key}`}>
<div className="pl30 pr30 mt30 mb10 clearfix"> <div className="pl30 pr30 mt30 mb10 clearfix">
<span className="color-blue fl font-16">{item.question.question_number}{map[item.question.question_type]}</span> <span className="color-blue fl font-16">{item.question.question_number}{map[item.question.question_type]}</span>
{ item.question.is_necessary==1 ? <span className="mustAnswer fl ml10 mt5">必答</span>:"" } { item.question.is_necessary==1 ? <span className="mustAnswer fl ml10 mr10 mt5">必答</span>:<span className="mustAnswer fl ml10 mr10 mt5"></span> }
{ item.question.question_type == 2 ?
<span className="color-grey-9 font-14 fl mt2">
{
item.question.min_choices == item.question.max_choices ? "可选"+item.question.max_choices+"项" :
"可选"+item.question.min_choices+"-"+item.question.max_choices+"项"
}
</span>:""
}
</div> </div>
<li className="pl30 pr30 mb10 lineh-20">{item.question.question_title}</li> <li className="pl30 pr30 mb10 lineh-20">{item.question.question_title}</li>
{ {
//单选 //单选
item.question.question_type==1 && item.question.question_type==1 &&
<Radio.Group disabled={isAdmin?true:false} className="answerList" defaultValue={item.question.poll_answer_ids[0]} name={[item.question.id,key]} onChange={this.ChangeOptionSingle}> <Radio.Group disabled={isAdmin || (isStudent && poll && poll.user_poll_status == 1)?true:false} className="answerList" defaultValue={item.question.poll_answer_ids[0]} name={[item.question.id,key]} onChange={this.ChangeOptionSingle}>
{ {
item.question.answers && item.question.answers.map((i,k)=>{ item.question.answers && item.question.answers.map((i,k)=>{
return( return(
@ -422,7 +432,12 @@ class PollInfo extends Component{
{ {
//多选 //多选
item.question.question_type==2 && item.question.question_type==2 &&
<Checkbox.Group onChange={(value)=>this.ChangeOptionMuntil(value,item.question.id,key)} disabled={isAdmin?true:false} defaultValue={item.question.poll_answer_ids} className="answerList" name={key}> <Checkbox.Group
onChange={(value)=>this.ChangeOptionMuntil(value,item.question.id,key)}
disabled={isAdmin || (isStudent && poll && poll.user_poll_status == 1)?true:false}
defaultValue={item.question.poll_answer_ids}
className="answerList"
name={key}>
{ {
item.question.answers && item.question.answers.map((i,k)=>{ item.question.answers && item.question.answers.map((i,k)=>{
return( return(
@ -466,14 +481,13 @@ class PollInfo extends Component{
<React.Fragment> <React.Fragment>
{ {
j.id == item.question.id ? j.id == item.question.id ?
<textarea placeholder="在此填入答案" disabled={isAdmin?true:false} value={j.text && j.text} className="winput-100-130" name={key} onInput={this.blurTxt} onBlur={()=>this.commitText(key,item.question.id)}></textarea> <textarea placeholder="在此填入答案" disabled={isAdmin || (isStudent && poll && poll.user_poll_status == 1) ? true:false} value={j.text && j.text} className="winput-100-130" name={key} onInput={this.blurTxt} onBlur={()=>this.commitText(key,item.question.id)}></textarea>
: "" : ""
} }
</React.Fragment> </React.Fragment>
) )
}) })
} }
</div> </div>
} }

@ -45,6 +45,10 @@ class PollListItem extends Component{
item.lock_status === 0 ? <Tooltip title="私有属性,非课堂成员不能访问"><i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl"></i></Tooltip>:"" item.lock_status === 0 ? <Tooltip title="私有属性,非课堂成员不能访问"><i className="iconfont icon-guansuo color-grey-c ml10 font-16 fl"></i></Tooltip>:""
} }
<CoursesListType typelist={[polls_status[`${item.polls_status}`]]} typesylename={""}></CoursesListType> <CoursesListType typelist={[polls_status[`${item.polls_status}`]]} typesylename={""}></CoursesListType>
{
isStudent && ((item.polls_status == 1 && (item.current_status ==0 ||item.current_status ==2)) || (item.polls_status==3 && item.current_status==2)) ?
<span className="edu-filter-btn edu-filter-btn-84B6EB ml15 fl typestyle">未提交</span>:""
}
</p> </p>
<p className="color-grey-9 clearfix"> <p className="color-grey-9 clearfix">
{ {

@ -779,13 +779,13 @@ class PollNew extends Component {
} }
} }
if (maxtie < 2) { if (maxtie < 3) {
if (object.question.question_type === 1) { if (object.question.question_type === 1) {
this.props.showNotification(`选项不能少于2个!`); this.props.showNotification(`选项不能少于3个!`);
return return
} else if (object.question.question_type === 2) { } else if (object.question.question_type === 2) {
this.props.showNotification(`选项不能少于2个!`); this.props.showNotification(`选项不能少于3个!`);
return return
} }
@ -1259,12 +1259,12 @@ class PollNew extends Component {
} }
} }
if (maxtie < 2) { if (maxtie < 3) {
if (object.question.question_type === 1) { if (object.question.question_type === 1) {
this.props.showNotification('选项不能少于2个!'); this.props.showNotification('选项不能少于3个!');
return return
} else if (object.question.question_type === 2) { } else if (object.question.question_type === 2) {
this.props.showNotification('选项不能少于2个!'); this.props.showNotification('选项不能少于3个!');
return return
} }
@ -2489,7 +2489,7 @@ class PollNew extends Component {
} }
</p> </p>
<p className="mt20"> <span className="font-16 flex1" style={item.question.question_type === 1?{"white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1116px"}:item.question.question_type === 2? {"white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1120px"}: {"white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word"}}>{item.question.question_title}</span></p> <p className="mt20"> <span className="font-16 flex1" style={{"white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word"}}>{item.question.question_title}</span></p>
{/*<pre className="mt20 mb20 font-16 break_word flex1">{item.question.question_title}</pre>*/} {/*<pre className="mt20 mb20 font-16 break_word flex1">{item.question.question_title}</pre>*/}
{item.question.question_type === 1 ? {item.question.question_type === 1 ?
(<RadioGroup defaultChecked={false} disabled> (<RadioGroup defaultChecked={false} disabled>
@ -2500,7 +2500,7 @@ class PollNew extends Component {
{/*<pre className={"break_word flex1 fl"}*/} {/*<pre className={"break_word flex1 fl"}*/}
{/* style={{"text-align": "left"}}>{items.answer_text}</pre>*/} {/* style={{"text-align": "left"}}>{items.answer_text}</pre>*/}
{/*<span className={"break_word flex1"}><pre className={"break_word flex1"}>{items.answer_text}</pre> </span>*/} {/*<span className={"break_word flex1"}><pre className={"break_word flex1"}>{items.answer_text}</pre> </span>*/}
<span className={" flex1 "} style={{"text-align": "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word"}} >{items.answer_text}</span> <span className={" flex1 "} style={{"text-align": "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1116px"}} >{items.answer_text}</span>
</div> </div>
) )
@ -2512,7 +2512,7 @@ class PollNew extends Component {
return ( return (
<div className="mt10 mt20 mb20 " style={{"clear": "both"}}> <div className="mt10 mt20 mb20 " style={{"clear": "both"}}>
<Checkbox value={i} className={"fl"} style={{"text-align": "left"}}></Checkbox> <Checkbox value={i} className={"fl"} style={{"text-align": "left"}}></Checkbox>
<span className={" flex1"} style={{"text-align": "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word"}}>{items.answer_text}</span> <span className={" flex1"} style={{"text-align": "left","white-space":"pre-wrap","word-break": "break-all","word-wrap": "break-word","float": "left","width":"1120px"}}>{items.answer_text}</span>
{/*<span*/} {/*<span*/}
{/* className={"break_word flex1 fl"} style={{"text-align": "left"}}><pre*/} {/* className={"break_word flex1 fl"} style={{"text-align": "left"}}><pre*/}

@ -36,7 +36,6 @@ class TraineetraininginformationModal extends Component {
props: this.props, props: this.props,
userids: this.props.userids, userids: this.props.userids,
game_list:this.props.game_list, game_list:this.props.game_list,
boolgalist:this.props.boolgalist,
experience:this.props.experience, experience:this.props.experience,
}) })
@ -52,26 +51,26 @@ class TraineetraininginformationModal extends Component {
// this.seacthdata(); // this.seacthdata();
} }
componentWillReceiveProps(nextProps) { // componentWillReceiveProps(nextProps) {
// console.log("46"); // // console.log("46");
// console.log(nextProps); // // console.log(nextProps);
// console.log(this.props); // // console.log(this.props);
if (nextProps.boolgalist != this.props.boolgalist) { // if (nextProps.boolgalist != this.props.boolgalist) {
// console.log("50"); // // console.log("50");
// console.log(nextProps.user); // // console.log(nextProps.user);
if (nextProps.boolgalist !== undefined) { // if (nextProps.boolgalist !== undefined) {
// console.log("53"); // // console.log("53");
// console.log(nextProps.user); // // console.log(nextProps.user);
this.setState({ // this.setState({
boolgalist: nextProps.boolgalist, // boolgalist: nextProps.boolgalist,
}) // })
} // }
//
//
} // }
//
//
} // }
LimitNumber=(txt)=> { LimitNumber=(txt)=> {
var str = txt; var str = txt;
if(str.length>25){ if(str.length>25){
@ -81,7 +80,7 @@ class TraineetraininginformationModal extends Component {
} }
render() { render() {
var columns; var columns;
if(this.state.boolgalist&&this.state.boolgalist === true) { if(this.props.boolgalist&&this.props.boolgalist === true) {
columns = [ columns = [
{ {
title: '关卡', title: '关卡',

@ -33,8 +33,10 @@ if (!window['indexHOCLoaded']) {
$('head').append($('<link rel="stylesheet" type="text/css" />') $('head').append($('<link rel="stylesheet" type="text/css" />')
.attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?1525440977`)); .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?1525440977`));
$('head').append($('<link rel="stylesheet" type="text/css" />') // index.html有加载
.attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?1525440977`)); // $('head').append($('<link rel="stylesheet" type="text/css" />')
// .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?1525440977`));
// $('head').append($('<link rel="stylesheet" type="text/css" />') // $('head').append($('<link rel="stylesheet" type="text/css" />')
// .attr('href', `${_url_origin}/stylesheets/educoder/css_min_all.css?1525440977`)); // .attr('href', `${_url_origin}/stylesheets/educoder/css_min_all.css?1525440977`));

@ -302,8 +302,8 @@ export default class TPMMDEditor extends Component {
</div> </div>
</div> </div>
<div className={"fr rememberTip"}> <div className={"fr rememberTip"}>
{noStorage == true ? '' : <p id={`e_tip_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"></p>} {noStorage == true ? ' ' : <p id={`e_tip_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"></p>}
{noStorage == true ? '' : <p id={`e_tips_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"></p>} {noStorage == true ? ' ' : <p id={`e_tips_mdEditor_${mdID}`} className="edu-txt-right color-grey-cd font-12"></p>}
</div> </div>
</React.Fragment> </React.Fragment>
) )

Loading…
Cancel
Save