对非课堂成员隐藏学号列(问卷、毕设选题)

dev_forum
caishi 6 years ago
parent e253218735
commit d48804e940

@ -200,7 +200,7 @@ class shixunAnswer extends Component{
className:"edu-txt-center", className:"edu-txt-center",
render:(testCount,item,index)=>{ render:(testCount,item,index)=>{
return( return(
<span>{ item.testCount ? item.testCount : "--" }</span> <span>{ item.testCount ? item.testCount : <span className="color-grey-9">--</span> }</span>
) )
} }
}, { }, {
@ -210,7 +210,7 @@ class shixunAnswer extends Component{
className:"edu-txt-center", className:"edu-txt-center",
render:(endTime,item,index)=>{ render:(endTime,item,index)=>{
return( return(
<span>{ item.endTime ? item.endTime : "--" }</span> <span>{ item.endTime ? item.endTime : <span className="color-grey-9">--</span> }</span>
) )
} }
}, { }, {
@ -220,7 +220,7 @@ class shixunAnswer extends Component{
className:"edu-txt-center", className:"edu-txt-center",
render:(needTime,item,index)=>{ render:(needTime,item,index)=>{
return( return(
<span>{ item.needTime ? item.needTime : "--" }</span> <span>{ item.needTime ? item.needTime : <span className="color-grey-9">--</span> }</span>
) )
} }
}, { }, {
@ -259,7 +259,7 @@ class shixunAnswer extends Component{
step={0.1} step={0.1}
precision={1} precision={1}
value={item.input_score} value={item.input_score}
style={{width:"60px",marginRight:"5px"}} style={{width:"60px",marginLeft:"5px"}}
placeholder="请输入分数" placeholder="请输入分数"
onChange={(value)=>{this.changeThis(value,index)}} onChange={(value)=>{this.changeThis(value,index)}}
onBlur={(value)=>this.changeThisScore(value,item.id,index)} onBlur={(value)=>this.changeThisScore(value,item.id,index)}
@ -269,9 +269,9 @@ class shixunAnswer extends Component{
} }
{ {
item.operation ? item.operation ?
<a className={isAdmin ? "color-blue ml20":"color-blue"} target="_blank" href='javascript:void(0)' onClick={()=>this.scrollToAnchor(`${questionType.question_id}${index+1}`)}>查看</a> <a className={isAdmin ? "color-blue mt5 fr":"color-blue"} target="_blank" href='javascript:void(0)' onClick={()=>this.scrollToAnchor(`${questionType.question_id}${index+1}`)}>查看</a>
: :
<a className={isAdmin ? "color-grey-9 ml20":"color-grey-9"} target="_blank" href='javascript:void(0)'>--</a> <span className={isAdmin ? "color-grey-9 mt5 fr":"color-grey-9"} >--</span>
} }
</span> </span>
) )
@ -279,28 +279,38 @@ class shixunAnswer extends Component{
}]; }];
return( return(
<div> <div>
<style>
{`
.resetTableStyle .ant-table-tbody > tr > td{
padding:10px 5px!important;
}
.resetCodeMirrorStyle .CodeMirror{
height:auto!important;
}
`}
</style>
{ exercise && ((exercise.student_commit_status && exercise.student_commit_status != 0) || (exercise.user_exercise_status && exercise.user_exercise_status !=0) ) ? { exercise && ((exercise.student_commit_status && exercise.student_commit_status != 0) || (exercise.user_exercise_status && exercise.user_exercise_status !=0) ) ?
<div> <div>
<p className="padding20-30 font-16 color-grey-6 pl30">阶段成绩</p> <p className="padding20-30 font-16 color-grey-6 pl30">阶段成绩</p>
<div className="stageTable"> <div className={challenge && challenge.length > 0 ? "pl30 pr30 resetTableStyle":"pl30 pr30 resetTableStyle stageTable"}>
{ data && data.length>0 ? <Table columns={columns} dataSource={data} pagination={false}></Table> : "" } { data && data.length>0 ? <Table columns={columns} dataSource={data} pagination={false}></Table> : "" }
</div> </div>
{ {
challenge && challenge.length > 0 && challenge && challenge.length > 0 &&
<div> <div>
<p className="padding20-30 font-16 color-grey-6 pl30">实训详情</p> <p className="mt20 pr30 font-16 color-grey-6 pl30">实训详情</p>
{ {
challenge.map((item,key)=>{ challenge.map((item,key)=>{
return( return(
<div className="pl30 pr30" id={`challenge_${questionType.question_id}${key+1}`}> <div className="pl30 pr30 mt20" id={`challenge_${questionType.question_id}${key+1}`}>
<p className="clearfix mb20"> <p className="clearfix mb20">
<span className="panel-inner-icon mr15 fl mt3 backgroud4CACFF"> <span className="panel-inner-icon mr15 fl mt3 backgroud4CACFF">
<i className="fa fa-code font-16 color_white"></i> <i className="fa fa-code font-16 color_white"></i>
</span> </span>
<span className="fl mt3 font-14"> <span className="fl mt3 font-16">
<span className="font-bd mr15">{item[0].position}</span> <span className="font-bd mr15">{item[0].position}</span>
<Link to={"/shixuns/"+item[0].game_identifier+"/challenges"}> <Link to={"/shixuns/"+item[0].game_identifier+"/challenges"}>
<span className={"font-14"}>{item[0].name}</span> <span className={"font-16"}>{item[0].name}</span>
</Link> </Link>
</span> </span>
</p> </p>
@ -308,7 +318,7 @@ class shixunAnswer extends Component{
{...this.props} {...this.state} challenge={item[0].outputs} {...this.props} {...this.state} challenge={item[0].outputs}
></ShixunAnswerDetail> ></ShixunAnswerDetail>
{ item[0].st===0 ? <div className="font-16 color-dark-21 mb10"> { item[0].st===0 ? <div className="font-16 color-dark-21">
<div className="bor-grey-e mt15"> <div className="bor-grey-e mt15">
<p className="clearfix pt5 pb5 pl15 pr15 back-f6-grey codebox"> <p className="clearfix pt5 pb5 pl15 pr15 back-f6-grey codebox">
<span className="fl">最近通过的代码</span> <span className="fl">最近通过的代码</span>
@ -316,7 +326,7 @@ class shixunAnswer extends Component{
</p> </p>
<div className="test-code bor-top-greyE"> <div className="test-code bor-top-greyE">
<li className="clearfix"> <li className="clearfix resetCodeMirrorStyle">
<CodeMirror <CodeMirror
value={item[0].passed_code} value={item[0].passed_code}
options={{ options={{

@ -103,7 +103,7 @@ class GraduateTopicDetail extends Component{
return( return(
<div className="newMain"> <div className="newMain">
<div className="educontent mt10 mb50"> <div className="educontent mt10 mb50">
<p className="clearfix mb10"> <p className="clearfix mb15 lineh-20">
<WordsBtn style="grey" className="fl" to={`/courses/${tableData.course_id}`}>{tableData && tableData.course_name}</WordsBtn> <WordsBtn style="grey" className="fl" to={`/courses/${tableData.course_id}`}>{tableData && tableData.course_name}</WordsBtn>
<span className="color-grey-9 fl ml3 mr3">&gt;</span> <span className="color-grey-9 fl ml3 mr3">&gt;</span>
<WordsBtn style="grey" className="fl" to={`/courses/${tableData.course_id}/graduation_topics/${tableData.graduation_id}`}>{tableData.graduation_name}</WordsBtn> <WordsBtn style="grey" className="fl" to={`/courses/${tableData.course_id}/graduation_topics/${tableData.graduation_id}`}>{tableData.graduation_name}</WordsBtn>
@ -111,9 +111,9 @@ class GraduateTopicDetail extends Component{
<span>选题详情</span> <span>选题详情</span>
</p> </p>
<p className="clearfix mb20 lineh-25"> <p className="clearfix mb20 lineh-25">
<span className="color-grey-3 font-24 fl task-hide" style={{lineHeight:"30px",maxWidth:"900px"}}>{tableData && tableData.graduation_topic_name}</span> <span className="color-grey-3 font-24 fl task-hide" style={{lineHeight:"25px",maxWidth:"900px"}}>{tableData && tableData.graduation_topic_name}</span>
<span className="fl mt4" style={{height:"25px"}}><CoursesListType typelist={[`${tableData && tableData.status_name}`]} typesylename={""} /></span> <span className="fl mt1" style={{height:"25px"}}><CoursesListType typelist={[`${tableData && tableData.status_name}`]} typesylename={""} /></span>
<WordsBtn className="fr font-16 mt2" style="grey" onClick={()=>this.props.history.goBack()}>返回</WordsBtn> <WordsBtn className="fr font-16 mt1" style="grey" onClick={()=>this.props.history.goBack()}>返回</WordsBtn>
</p> </p>
<div> <div>
<div className="clearfix edu-back-white bor-bottom-greyE" > <div className="clearfix edu-back-white bor-bottom-greyE" >

@ -169,6 +169,7 @@ class GraduateTopicDetailTable extends Component{
} = this.state } = this.state
const isAdmin =this.props.isAdmin(); const isAdmin =this.props.isAdmin();
const isStudent =this.props.isStudent(); const isStudent =this.props.isStudent();
const isNotMember=this.props.isNotMember();
console.log(un_addClass_notice) console.log(un_addClass_notice)
return( return(
<div className="minH-560 edu-back-white"> <div className="minH-560 edu-back-white">
@ -176,7 +177,7 @@ class GraduateTopicDetailTable extends Component{
<div className="topHead edu-txt-center"> <div className="topHead edu-txt-center">
<span style={{"width":"5%"}}>序号</span> <span style={{"width":"5%"}}>序号</span>
<span style={{"width":"12%"}}>姓名</span> <span style={{"width":"12%"}}>姓名</span>
<span style={{"width":"13%"}}>学号</span> {isNotMember ?"" :<span style={{"width":"13%"}}>学号</span>}
<span style={{"width":"15%"}}>分班</span> <span style={{"width":"15%"}}>分班</span>
<span style={{"width":"15%"}}>选题时间</span> <span style={{"width":"15%"}}>选题时间</span>
<span style={{"width":"12%"}} className="fr">操作</span> <span style={{"width":"12%"}} className="fr">操作</span>
@ -260,7 +261,7 @@ class GraduateTopicDetailTable extends Component{
<li className="color-grey-9 clearfix" key={key}> <li className="color-grey-9 clearfix" key={key}>
<span style={{"width":"5%"}} className="color-grey-6">{parseInt(key+1)+(parseInt(page-1)*15)}</span> <span style={{"width":"5%"}} className="color-grey-6">{parseInt(key+1)+(parseInt(page-1)*15)}</span>
<span style={{"width":"12%"}} className="color-grey-3">{item.student_name}</span> <span style={{"width":"12%"}} className="color-grey-3">{item.student_name}</span>
<span style={{"width":"13%"}}>{item.student_id}</span> {isNotMember ?"" :<span style={{"width":"13%"}}>{item.student_id}</span>}
<span style={{"width":"15%"}}>{item.class_group_name || "--"}</span> <span style={{"width":"15%"}}>{item.class_group_name || "--"}</span>
<span style={{"width":"15%"}}>{item.selected_time}</span> <span style={{"width":"15%"}}>{item.selected_time}</span>
{ {
@ -288,6 +289,9 @@ class GraduateTopicDetailTable extends Component{
isAdmin && isAdmin &&
<span style={{"width":"12%"}} className={item.result === "已拒绝"?"fr color-orange-tip":"fr"}>{item.result=== "待确认"?"--":item.result}</span> <span style={{"width":"12%"}} className={item.result === "已拒绝"?"fr color-orange-tip":"fr"}>{item.result=== "待确认"?"--":item.result}</span>
} }
{
isNotMember && <span style={{"width":"12%"}} className="fr color-grey-9">--</span>
}
</li> </li>
) )

@ -70,9 +70,9 @@ class GraduateTopicItem extends Component{
`}</style> `}</style>
<h6> <h6>
{ {
isNotMember?discussMessage.private_icon===true? isNotMember && discussMessage.private_icon===true ?
<a className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:<a onClick={() => this.toDetailPage(`${discussMessage.id}`)} <a className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:
className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>:"" <a onClick={() => this.toDetailPage(`${discussMessage.id}`)} className="fl mt3 font-16 font-bd color-dark maxwidth580">{discussMessage.name}</a>
} }
{ {

@ -192,7 +192,12 @@ class PollDetailTabFirst extends Component{
key: 'classes', key: 'classes',
dataIndex: 'classes', dataIndex: 'classes',
width:160, width:160,
className:poll_types && poll_types.groups_count > 0 ? "edu-txt-center":"edu-txt-center none" className:poll_types && poll_types.groups_count > 0 ? "edu-txt-center":"edu-txt-center none",
render:(classes,item,index)=>{
return(
item.classes ? <span>{item.classes}</span> : <span className="color-grey-9">--</span>
)
}
}, { }, {
title: '提交状态', title: '提交状态',
dataIndex: 'status', dataIndex: 'status',
@ -212,22 +217,42 @@ class PollDetailTabFirst extends Component{
width:160, width:160,
render:(time,item,index)=>{ render:(time,item,index)=>{
return( return(
item.time == null ? "--" : moment(item.time).format('YYYY-MM-DD HH:mm') item.time == null ? <span className="color-grey-9">--</span> : moment(item.time).format('YYYY-MM-DD HH:mm')
) )
} }
},{ },{
title: '操作', title: '操作',
dataIndex: 'operation', dataIndex: 'operation',
key: 'operation', key: 'operation',
className:poll_types && poll_types.un_anonymous ? "edu-txt-center":"edu-txt-center none", className:"edu-txt-center",
width:120, width:120,
render:(operation,item,index)=>{ render:(operation,item,index)=>{
return( return(
item.status == 1 ? <WordsBtn style="blue" to={`/courses/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollId}/users/${item.login}`}>查看</WordsBtn>:<span>--</span> item.status == 1 ? <WordsBtn style="blue" to={`/courses/${this.props.match.params.coursesId}/polls/${this.props.match.params.pollId}/users/${item.login}`}>查看</WordsBtn>:<span className="color-grey-9">--</span>
) )
} }
}]; }];
// 非课堂成员不显示学号列
let isNotMember =this.props.isNotMember();
if(isNotMember){
columns.some((item,key)=> {
if (item.title === "学号") {
columns.splice(key, 1)
return true
}
}
)
}
// un_anonymous true为实名问卷显示操作列否则隐藏 // un_anonymous true为实名问卷显示操作列否则隐藏
if(poll_types && (isNotMember || poll_types.un_anonymous == false)){
columns.some((item,key)=> {
if (item.title === "操作") {
columns.splice(key, 1)
return true
}
}
)
}
return( return(
<div> <div>
{ {

Loading…
Cancel
Save