hjm 6 years ago
commit 6fb5c8cce9

@ -67,7 +67,7 @@
<!-- <link rel="stylesheet" type="text/css" href="https://www.educoder.net/stylesheets/css/font-awesome.css?1510652321"> -->
<link rel="stylesheet" type="text/css" href="/stylesheets/educoder/iconfont/iconfont.css">
<link rel="stylesheet" type="text/css" href="http://47.96.87.25:48080/stylesheets/educoder/iconfont/iconfont.css">
<link rel="stylesheet" type="text/css" href="/css/iconfont.css">
<style>
/*<!--去除浏览器点击操作后有蓝色的底块-->*/

@ -734,13 +734,6 @@ class GraduationTaskssettinglist extends Component{
),
}, {
// finalscore: {work_score:worklists[i].final_score.work_score === null ? "--" : worklists[i].final_score.work_score,
// teacher_comment_score:worklists[i].teacher_comment_score,
// cross_comment_score:worklists[i].cross_comment_score,
// late_penalty:worklists[i].late_penalty
// },
title: '最终成绩',
key: 'finalscore',
dataIndex: 'finalscore',
@ -748,11 +741,11 @@ class GraduationTaskssettinglist extends Component{
render: (text, record) => (
<span>
<Tooltip placement="bottom" title={record.finalscore==="--"?"未评阅": <pre>
{record.final_score.username}{(record.final_score.login)}<br/>
{record.ultimate_score===true?"":"教师评分:"+record.final_score.teacher_comment_score+"分"}<br/>
{taskslistdata.cross_comment===true?"":"交叉评分:"+record.final_score.cross_comment_score+"分"}<br/>
{record.final_score.late_penalty===undefined?"":"迟交扣分:"+record.final_score.late_penalty+"分"}<br/>
最终成绩{record.final_score.work_score}<br/>
{record.finalscore.final_score.username}({record.finalscore.final_score.login})<br/>
{record.finalscore.ultimate_score===true?"":"教师评分:"+record.finalscore.teacher_comment_score+"分"}<br/>
{record.finalscore.cross_comment_score===undefined?"":"交叉评分:"+record.finalscore.cross_comment_score+"分"+<br/>}
{record.finalscore.late_penalty===undefined?"":"迟交扣分:"+record.finalscore.late_penalty+"分"+<br/>}
最终成绩{record.finalscore.work_score}<br/>
</pre>}>
<a style={{color:parseInt(record.finalscore.work_score)>90?'#DD1717':parseInt(record.finalscore.work_score)>60&&parseInt(record.finalscore.work_score)<90?"#FF6800":'#747A7F'}}>{record.finalscore.work_score==="--"?"--":record.finalscore.work_score}</a>
</Tooltip>

@ -779,13 +779,13 @@ class PollNew extends Component {
}
}
if (maxtie < 2) {
if (maxtie < 3) {
if (object.question.question_type === 1) {
this.props.showNotification(`选项不能少于2个!`);
this.props.showNotification(`选项不能少于3个!`);
return
} else if (object.question.question_type === 2) {
this.props.showNotification(`选项不能少于2个!`);
this.props.showNotification(`选项不能少于3个!`);
return
}
@ -1259,12 +1259,12 @@ class PollNew extends Component {
}
}
if (maxtie < 2) {
if (maxtie < 3) {
if (object.question.question_type === 1) {
this.props.showNotification('选项不能少于2个!');
this.props.showNotification('选项不能少于3个!');
return
} else if (object.question.question_type === 2) {
this.props.showNotification('选项不能少于2个!');
this.props.showNotification('选项不能少于3个!');
return
}
@ -2061,8 +2061,8 @@ class PollNew extends Component {
// console.log(this.state.adddom);
}
//提交题目//没有就创建新的题库,新建问题和保存题目不一样不能同时保存 这里只是新建 和编辑 标题和须知
submitQuestionnaire = () => {
//提交题目//没有就创建新的题库,新建问newz题和保存题目不一样不能同时保存 这里只是新建 和编辑 标题和须知
submitQuestionnaire = (mews) => {
console.log("调用了submitQuestionnaire")
if (this.state.Newedit === true) {
@ -2084,6 +2084,12 @@ class PollNew extends Component {
pollid = this.state.pollid;
}
if(mews ==="new"){
if(this.state.poll_questions&&this.state.poll_questions.length===0){
this.props.showNotification("至少创建1个题目");
return;
}
}
var url = `/polls/${pollid}.json`;
axios.put(url, {
@ -2483,7 +2489,7 @@ class PollNew extends Component {
}
</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>*/}
{item.question.question_type === 1 ?
(<RadioGroup defaultChecked={false} disabled>
@ -2494,7 +2500,7 @@ class PollNew extends Component {
{/*<pre className={"break_word flex1 fl"}*/}
{/* 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={" 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>
)
@ -2506,7 +2512,7 @@ class PollNew extends Component {
return (
<div className="mt10 mt20 mb20 " style={{"clear": "both"}}>
<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*/}
{/* className={"break_word flex1 fl"} style={{"text-align": "left"}}><pre*/}
@ -2804,9 +2810,9 @@ class PollNew extends Component {
}}
>
<li className="clearfix mt30 mb50">
<a type="primary" className="defalutSubmitbtn fl mr20"
onClick={() => this.submitQuestionnaire()}>提交</a>
<a className="defalutCancelbtn fl" onClick={() => this.props.history.goBack()}>取消</ a>
<a className="defalutCancelbtn fl mr20" onClick={() => this.props.history.goBack()}>取消</a>
<a type="primary" className="defalutSubmitbtn fl"
onClick={() => this.submitQuestionnaire(this.props.match.params.news)}>提交</a>
</li>
@ -2823,9 +2829,9 @@ class PollNew extends Component {
}}
>
<li className="clearfix mt30 mb50">
<a className="defalutSubmitbtn fl mr20"onClick={() => this.props.history.goBack()}>取消</a>
<a type="primary" className="defalutCancelbtn fl"
onClick={() => this.submitQuestionnaire()}>提交</a>
<a className="defalutCancelbtn fl mr20"onClick={() => this.props.history.goBack()}>取消</a>
<a type="primary" className=" defalutSubmitbtn fl"
onClick={() => this.submitQuestionnaire(this.props.match.params.news)}>提交</a>
</li>
</div>
}

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

Loading…
Cancel
Save