dev_forum
hjm 6 years ago
parent e1f190a775
commit a18a3a63d6

@ -139,10 +139,9 @@ class CommonWorkItem extends Component{
}
<div className="flex1" onClick={() => this.props.onItemClick(Object.assign({}, item, {id: item.homework_id})) }>
<p className="clearfix mb20">
{/* 放开点击进入进入后弹框canNotLink ? () => {} : */}
<a title={item.name}
className="fl font-16 font-bd mt2 comnonwidth580" style={{cursor: canNotLink ? 'normal' : 'poninter'}}
onClick={() => this.onItemClick(item)}
className="fl font-16 font-bd mt2 comnonwidth580" style={{cursor: canNotLink ? 'default' : 'poninter'}}
onClick={ canNotLink ? () => {} : () => this.onItemClick(item)}
>{item.name}</a>
{/* 只有非课堂成员且作业是私有的情况下才会为true */}

@ -22,8 +22,10 @@ class PollListItem extends Component{
const IsAdmin =this.props.isAdmin();
const isStudent = this.props.isStudent();
const isNotMember = this.props.isNotMember();
const isAdminOrStudent = this.props.isAdminOrStudent();
let t= item.end_time ? moment(item.end_time) - moment() : 0;
let canNotLink = !isAdminOrStudent && item.lock_status == 0
return(
<div className="workList_Item polllisthover" style={{padding:"30px"}}>
@ -35,7 +37,9 @@ class PollListItem extends Component{
}
<div className="flex1 pr">
<p className="clearfix mb30">
<Link to={`/courses/${coursesId}/polls/${item.id}/detail`} className="fl font-16 font-bd mt2 color-grey-3 task-hide" style={{"maxWidth":"600px"}} title={item.polls_name}>{item.polls_name}</Link>
{ canNotLink ? <a className="fl font-16 font-bd mt2 color-grey-3 task-hide" style={{"maxWidth":"600px", "cursor": "default"}} title={item.polls_name}>{item.polls_name}</a> :
<Link to={`/courses/${coursesId}/polls/${item.id}/detail`} className="fl font-16 font-bd mt2 color-grey-3 task-hide" style={{"maxWidth":"600px"}} title={item.polls_name}>{item.polls_name}</Link>
}
{
item.lock_status === 0 ?
<Tooltip title={`${courseType.user_permission == 0 ? "私有属性,非课堂成员不能访问" : "私有属性"}`}>

Loading…
Cancel
Save