From e89d3e8de87a332ea93d4a5a9a44a5b4716fe173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Tue, 27 Aug 2019 17:26:42 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A2=98=E5=BA=93=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tasks/GraduationTaskssettinglist.js | 69 ++++++++++++++----- .../modules/tpm/challengesnew/TPMquestion.js | 32 +++++---- .../tpm/challengesnew/TpmQuestionNew.js | 4 +- 3 files changed, 70 insertions(+), 35 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 4e2c58bb8..1b25a5717 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -711,8 +711,12 @@ class GraduationTaskssettinglist extends Component{ title: '姓名', dataIndex: 'name', key: 'name', - - className:'edu-txt-center' + className:'edu-txt-center', + render: (text, record) => ( + +
{record.name}
+
+ ), }, { title: '学号', dataIndex: 'stduynumber', @@ -720,7 +724,7 @@ class GraduationTaskssettinglist extends Component{ className:'edu-txt-center', render: (text, record) => ( - {record.stduynumber} +
{record.stduynumber}
), }, { @@ -935,6 +939,7 @@ class GraduationTaskssettinglist extends Component{ if(taskslistdata&&taskslistdata.have_grouping===false){ + columns.some((item,key)=> { if (item.title === "分组") { columns.splice(key, 1) @@ -964,10 +969,35 @@ class GraduationTaskssettinglist extends Component{ .ant-table-tbody>tr>td, .ant-table-thead>tr>th{ padding: 16px 10px } + ` } + {taskslistdata&&taskslistdata.have_grouping===true|| + taskslistdata&&taskslistdata.have_project===true|| + taskslistdata&&taskslistdata.cross_comment===true?:""} {/*提示*/} 分班情况: +
+ this.groupgroup([])}>不限 +
+
+ this.groupgroup(e,taskslistdata.search_assistants&&taskslistdata.search_assistants.course_group_info.length)} style={{width: '1000px', paddingTop: '4px'}}> + + + {taskslistdata.search_assistants&&taskslistdata.search_assistants.course_group_info.map((item,key)=>{ + return( + + {item.group_group_name} + ({item.count}) + + + ) + })} + +
- this.groupgroup(e,taskslistdata.search_assistants&&taskslistdata.search_assistants.course_group_info.length)} style={{width: '1000px', paddingTop: '4px'}}> - - this.groupgroup([])}>不限 - - - {taskslistdata.search_assistants&&taskslistdata.search_assistants.course_group_info.map((item,key)=>{ - return( - - {item.group_group_name} - ({item.count}) - - - ) - })} - :""} diff --git a/public/react/src/modules/tpm/challengesnew/TPMquestion.js b/public/react/src/modules/tpm/challengesnew/TPMquestion.js index 82d94f787..9eacd99ce 100644 --- a/public/react/src/modules/tpm/challengesnew/TPMquestion.js +++ b/public/react/src/modules/tpm/challengesnew/TPMquestion.js @@ -411,9 +411,7 @@ export default class TPMquestion extends Component { window.location.href = '/shixuns/'+this.props.match.params.shixunId+'/challenges/'+this.props.match.params.checkpointId+'/editquestion'; } questionadd=()=>{ - $('html').animate({ - scrollTop: 10 - }, 200); + let{questionaddarray}=this.state; let questionaddsums=questionaddarray.length; @@ -431,15 +429,13 @@ export default class TPMquestion extends Component { } }) - - questionaddarrays.push({type:0,choose_id:0}); this.setState({ activetype:0, questionaddarray:questionaddarrays, questionaddtype:true, + editquestionaddtype:false, newquestionaddtype:true, - editquestionaddtype:false, questionlists:[{str:"A",val:"",type:false},{str:"B",val:"",type:false},{str:"C",val:"",type:false},{str:"D",val:"",type:false}], answeshixunsGroup: 1, answeoptions:[10,20], @@ -447,17 +443,17 @@ export default class TPMquestion extends Component { shixunssanswerkillvalue:"", shixunsskillanswerlist:[], contentMdRefval:"", - newquestioMDMdContval:"" + newquestioMDMdContval:"", }) - // setTimeout(() => { - // this.newquestioMDMdCont.current.setValue('') - // this.newquestioMDMdRef.current.setValue('') - // - // }, 2000) - - this.shixunsautoHeight() + setTimeout(() => { + this.newquestioMDMdRef.current.setValue('') + }, 1000) + setTimeout(() => { + this.newquestioMDMdCont.current.setValue('') + }, 1500) + // this.shixunsautoHeight() } editquestionlists=(newquestionlists)=>{ @@ -592,6 +588,10 @@ export default class TPMquestion extends Component { } answer_subit=(sumtype,challenge_choose_id)=>{ + $('html').animate({ + scrollTop:10 + }, 500); + let {challenge_id,questionlists,shixunsskillanswerlist,answeonshixunsmark,answeshixunsGroup,questionaddarray} =this.state; if(challenge_id===undefined){ message.error("关卡id为空"); @@ -817,7 +817,8 @@ export default class TPMquestion extends Component { neweditanswerRefval:'', editanswersRefval:'' }) - + this.newquestioMDMdRef.current.setValue('') + this.newquestioMDMdCont.current.setValue('') }else{ let id = this.props.match.params.shixunId; let url ='/shixuns/'+id+'/challenges/'+challenge_id+'/edit_choose_question.json?choose_id='+challenge_choose_id; @@ -920,6 +921,7 @@ export default class TPMquestion extends Component { ) }) + return (
diff --git a/public/react/src/modules/tpm/challengesnew/TpmQuestionNew.js b/public/react/src/modules/tpm/challengesnew/TpmQuestionNew.js index 855f6ce53..861c4f879 100644 --- a/public/react/src/modules/tpm/challengesnew/TpmQuestionNew.js +++ b/public/react/src/modules/tpm/challengesnew/TpmQuestionNew.js @@ -35,7 +35,7 @@ export default class TpmQuestionNew extends Component { *
+ needRecreate={true} watch={true} className="courseMessageMD" initValue={this.props.contentMdRefval}>
@@ -108,7 +108,7 @@ export default class TpmQuestionNew extends Component {
+ needRecreate={true} watch={true} className="courseMessageMD" initValue={this.props.newquestioMDMdContval}>
必填项