dev_forum
caishi 6 years ago
parent 4d4cf9183b
commit 736857f387

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

@ -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>
) )
} }

@ -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";
@ -586,6 +586,8 @@ class PollDetailTabForth extends Component{
<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">
<Tooltip placement="bottom" title={un_change_unified ? "发布时间已过,不能再修改":""}>
<span>
<DatePicker <DatePicker
showToday={false} showToday={false}
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
@ -600,6 +602,8 @@ class PollDetailTabForth extends Component{
value={publish_time && moment(publish_time,dataformat)} value={publish_time && moment(publish_time,dataformat)}
disabled={un_change_unified == true ? true : !flagPageEdit } disabled={un_change_unified == true ? true : !flagPageEdit }
></DatePicker> ></DatePicker>
</span>
</Tooltip>
<p className="color-red lineh-25 clearfix" style={{height:"25px"}}> <p className="color-red lineh-25 clearfix" style={{height:"25px"}}>
{ {
unit_p_tip && unit_p_tip != "" ? <span className="fl">{ unit_p_tip }</span>:"" unit_p_tip && unit_p_tip != "" ? <span className="fl">{ unit_p_tip }</span>:""
@ -611,6 +615,8 @@ class PollDetailTabForth extends Component{
<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">
<Tooltip placement="bottom" title={un_change_end ? "截止时间已过,不能再修改":""}>
<span>
<DatePicker <DatePicker
showToday={false} showToday={false}
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
@ -627,6 +633,8 @@ class PollDetailTabForth extends Component{
disabled={un_change_end == true ? true : !flagPageEdit } disabled={un_change_end == true ? true : !flagPageEdit }
> >
</DatePicker> </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,6 +390,8 @@ class PollDetailTabForthRules extends Component{
</div> </div>
</div> </div>
<div className="fl pr20 with25"> <div className="fl pr20 with25">
<Tooltip placement="bottom" title={rule.e_timeflag ? "发布时间已过,不能再修改":""}>
<span>
<DatePicker <DatePicker
showToday={false} showToday={false}
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
@ -404,6 +406,8 @@ class PollDetailTabForthRules extends Component{
disabled={ rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.p_timeflag == true ? true : !flagPageEdit} disabled={ rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.p_timeflag == true ? true : !flagPageEdit}
style={{"height":"42px",width:'100%'}} style={{"height":"42px",width:'100%'}}
></DatePicker> ></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,6 +415,8 @@ class PollDetailTabForthRules extends Component{
</p> </p>
</div> </div>
<div className="fl mr20"> <div className="fl mr20">
<Tooltip placement="bottom" title={rule.e_timeflag ? "截止时间已过,不能再修改":""}>
<span>
<DatePicker <DatePicker
showToday={false} showToday={false}
dropdownClassName="hideDisable" dropdownClassName="hideDisable"
@ -425,6 +431,8 @@ class PollDetailTabForthRules extends Component{
disabled={ rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.e_timeflag == true ? true : !flagPageEdit} disabled={ rule.e_timeflag ===undefined?rule.publish_time===null?false:!flagPageEdit:rule.e_timeflag == true ? true : !flagPageEdit}
style={{"height":"42px"}} style={{"height":"42px"}}
></DatePicker> ></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,10 +185,12 @@ 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);
} }
}
//提交主观题 //提交主观题
commitText=(key,q_id)=>{ commitText=(key,q_id)=>{
@ -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">
{ {

Loading…
Cancel
Save