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="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"> <link rel="stylesheet" type="text/css" href="/css/iconfont.css">
<style> <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: '最终成绩', title: '最终成绩',
key: 'finalscore', key: 'finalscore',
dataIndex: 'finalscore', dataIndex: 'finalscore',
@ -748,11 +741,11 @@ class GraduationTaskssettinglist extends Component{
render: (text, record) => ( render: (text, record) => (
<span> <span>
<Tooltip placement="bottom" title={record.finalscore==="--"?"未评阅": <pre> <Tooltip placement="bottom" title={record.finalscore==="--"?"未评阅": <pre>
{record.final_score.username}{(record.final_score.login)}<br/> {record.finalscore.final_score.username}({record.finalscore.final_score.login})<br/>
{record.ultimate_score===true?"":"教师评分:"+record.final_score.teacher_comment_score+"分"}<br/> {record.finalscore.ultimate_score===true?"":"教师评分:"+record.finalscore.teacher_comment_score+"分"}<br/>
{taskslistdata.cross_comment===true?"":"交叉评分:"+record.final_score.cross_comment_score+"分"}<br/> {record.finalscore.cross_comment_score===undefined?"":"交叉评分:"+record.finalscore.cross_comment_score+"分"+<br/>}
{record.final_score.late_penalty===undefined?"":"迟交扣分:"+record.final_score.late_penalty+"分"}<br/> {record.finalscore.late_penalty===undefined?"":"迟交扣分:"+record.finalscore.late_penalty+"分"+<br/>}
最终成绩{record.final_score.work_score}<br/> 最终成绩{record.finalscore.work_score}<br/>
</pre>}> </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> <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> </Tooltip>

@ -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
} }
@ -2061,8 +2061,8 @@ class PollNew extends Component {
// console.log(this.state.adddom); // console.log(this.state.adddom);
} }
//提交题目//没有就创建新的题库,新建问题和保存题目不一样不能同时保存 这里只是新建 和编辑 标题和须知 //提交题目//没有就创建新的题库,新建问newz题和保存题目不一样不能同时保存 这里只是新建 和编辑 标题和须知
submitQuestionnaire = () => { submitQuestionnaire = (mews) => {
console.log("调用了submitQuestionnaire") console.log("调用了submitQuestionnaire")
if (this.state.Newedit === true) { if (this.state.Newedit === true) {
@ -2084,6 +2084,12 @@ class PollNew extends Component {
pollid = this.state.pollid; 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`; var url = `/polls/${pollid}.json`;
axios.put(url, { axios.put(url, {
@ -2483,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>
@ -2494,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>
) )
@ -2506,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*/}
@ -2804,9 +2810,9 @@ class PollNew extends Component {
}} }}
> >
<li className="clearfix mt30 mb50"> <li className="clearfix mt30 mb50">
<a type="primary" className="defalutSubmitbtn fl mr20" <a className="defalutCancelbtn fl mr20" onClick={() => this.props.history.goBack()}>取消</a>
onClick={() => this.submitQuestionnaire()}>提交</a> <a type="primary" className="defalutSubmitbtn fl"
<a className="defalutCancelbtn fl" onClick={() => this.props.history.goBack()}>取消</ a> onClick={() => this.submitQuestionnaire(this.props.match.params.news)}>提交</a>
</li> </li>
@ -2823,9 +2829,9 @@ class PollNew extends Component {
}} }}
> >
<li className="clearfix mt30 mb50"> <li className="clearfix mt30 mb50">
<a className="defalutSubmitbtn fl mr20"onClick={() => this.props.history.goBack()}>取消</a> <a className="defalutCancelbtn fl mr20"onClick={() => this.props.history.goBack()}>取消</a>
<a type="primary" className="defalutCancelbtn fl" <a type="primary" className=" defalutSubmitbtn fl"
onClick={() => this.submitQuestionnaire()}>提交</a> onClick={() => this.submitQuestionnaire(this.props.match.params.news)}>提交</a>
</li> </li>
</div> </div>
} }

@ -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: '关卡',

Loading…
Cancel
Save