dev_forum
hjm 6 years ago
parent 01fd748038
commit 268baa136d

@ -104,6 +104,7 @@ class CommonWorkItem extends Component{
let coursesId = this.props.match.params.coursesId;
const isStudent = this.props.isStudent()
const isAdmin = this.props.isAdmin()
const isAdminOrStudent = this.props.isAdminOrStudent()
return(
<div className="workList">
@ -128,19 +129,20 @@ class CommonWorkItem extends Component{
</style>
{
mainList && mainList.homeworks.length>0 && mainList.homeworks.map((item,index)=>{
let canNotLink = !isAdminOrStudent && item.private_icon == true
return(
<div className="mt20 edu-back-white padding02010" key={index} >
<div className="clearfix">
<div className="workList_Item">
{
mainList && mainList.course_identity < 5 &&
mainList && isAdmin &&
<span className="fl mr12"><Checkbox value={item.homework_id}></Checkbox></span>
}
<div className="flex1" onClick={() => this.props.onItemClick(Object.assign({}, item, {id: item.homework_id})) }>
<p className="clearfix mb20">
<a title={item.name}
className="fl font-16 font-bd mt2 comnonwidth580"
onClick={() => this.onItemClick(item)}
className="fl font-16 font-bd mt2 comnonwidth580" style={{cursor: canNotLink ? 'normal' : 'poninter'}}
onClick={canNotLink ? () => {} : () => this.onItemClick(item)}
>{item.name}</a>
{/* 只有非课堂成员且作业是私有的情况下才会为true */}
@ -155,7 +157,7 @@ class CommonWorkItem extends Component{
<CoursesListType typelist={item.status} />
</span>
{
mainList && mainList.course_identity < 5 &&
mainList && isAdmin &&
<li className="fr drop_down">
<i className="iconfont icon-caidan font-16 color-grey-c"></i>
<ul className="drop_down_normal" style={{ textAlign: 'center'}}>

Loading…
Cancel
Save