dev_forum
caishi 6 years ago
parent 4d4cf9183b
commit 736857f387

@ -30,8 +30,8 @@ export function initAxiosInterceptors(props) {
var proxy = "http://localhost:3000"
// proxy = "http://testbdweb.trustie.net"
// proxy = "http://testbdweb.educoder.net"
proxy = "https://testeduplus2.educoder.net"
//proxy="http://47.96.87.25:48080"
//proxy = "https://testeduplus2.educoder.net"
proxy="http://47.96.87.25:48080"
// 在这里使用requestMap控制避免用户通过双击等操作发出重复的请求
// 如果需要支持重复的请求考虑config里面自定义一个allowRepeat参考来控制

@ -41,13 +41,20 @@ class CheckAllGroup extends Component{
const { checkAll, checkedValues } = this.state;
return (
<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 mr25">
<a href="javascript:void(0);" id="comment_no_limit" className={`pl10 pr10 ${checkAll ? 'check_on' : ''}`} onClick={this.onCheckAll}>不限</a>
</span>
{
options.length > 1 && <CheckboxGroup options={options} onChange={this.onChange} value={checkedValues} style={checkboxGroupStyle}/>
}
<div className="fl groupList" style={{maxWidth:"990px"}}>
{
options.length > 1 && <CheckboxGroup options={options} onChange={this.onChange} value={checkedValues} style={checkboxGroupStyle}/>
}
</div>
</li>
)
}

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

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

@ -185,9 +185,11 @@ class PollInfo extends Component{
flag=answers.indexOf(a_id) > -1?true:false;
answers= type == 1 ? answers[0] : answers;
}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="pl30 pr30 mt30 mb10 clearfix">
<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>
<li className="pl30 pr30 mb10 lineh-20">{item.question.question_title}</li>
{
//单选
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)=>{
return(
@ -422,7 +432,12 @@ class PollInfo extends Component{
{
//多选
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)=>{
return(
@ -466,14 +481,13 @@ class PollInfo extends Component{
<React.Fragment>
{
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>
)
})
}
</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>:""
}
<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 className="color-grey-9 clearfix">
{

Loading…
Cancel
Save