|
|
|
@ -114,7 +114,7 @@ class Collaborators extends Component {
|
|
|
|
|
})
|
|
|
|
|
let admintype = this.props.identity;
|
|
|
|
|
if (admintype > 4) {
|
|
|
|
|
this.props.showSnackbar("您没有权限");
|
|
|
|
|
this.props.showNotification("您没有权限");
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
if (type === "cooperation") {
|
|
|
|
@ -287,7 +287,7 @@ class Collaborators extends Component {
|
|
|
|
|
user_ids: user_ids
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
this.updatacomponentDiddata();
|
|
|
|
|
this.props.showSnackbar(response.data.message);
|
|
|
|
|
this.props.showNotification(response.data.message);
|
|
|
|
|
this.setState({
|
|
|
|
|
Collaboratorsvisibleadmin: false,
|
|
|
|
|
Collaboratorslist: [],
|
|
|
|
@ -316,7 +316,7 @@ class Collaborators extends Component {
|
|
|
|
|
Collaboratorslist: [],
|
|
|
|
|
Searchadmin: []
|
|
|
|
|
});
|
|
|
|
|
this.props.showSnackbar("所选人员为空,没有更换成功");
|
|
|
|
|
this.props.showNotification("所选人员为空,没有更换成功");
|
|
|
|
|
this.CollaboratorsshowModal("admin")
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
@ -331,7 +331,7 @@ class Collaborators extends Component {
|
|
|
|
|
Searchadmin: []
|
|
|
|
|
});
|
|
|
|
|
this.updatacomponentDiddata();
|
|
|
|
|
this.props.showSnackbar(response.data.message);
|
|
|
|
|
this.props.showNotification(response.data.message);
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
console.log(error)
|
|
|
|
|
});
|
|
|
|
@ -356,7 +356,7 @@ class Collaborators extends Component {
|
|
|
|
|
this.props.history.push('/shixuns')
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.props.showSnackbar(response.data.message);
|
|
|
|
|
this.props.showNotification(response.data.message);
|
|
|
|
|
this.updatacomponentDiddata();
|
|
|
|
|
this.setState({
|
|
|
|
|
collaborators_deletetype: false
|
|
|
|
@ -420,7 +420,12 @@ class Collaborators extends Component {
|
|
|
|
|
onChangepageNumber=(pageNumber)=>{
|
|
|
|
|
this.updatacomponentDiddata(pageNumber);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
toggleHover=(type,key)=>{
|
|
|
|
|
this.setState({
|
|
|
|
|
hovertype:type,
|
|
|
|
|
hoverkey:type===false?undefined:key
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
render() {
|
|
|
|
|
let {
|
|
|
|
|
collaboratorList,
|
|
|
|
@ -617,13 +622,13 @@ class Collaborators extends Component {
|
|
|
|
|
</div>
|
|
|
|
|
<div className="mt10 clearfix">
|
|
|
|
|
|
|
|
|
|
<span className="fl mr15">
|
|
|
|
|
<Checkbox className="fl" checked={allChangechecked} onChange={this.allChange}>全选</Checkbox>
|
|
|
|
|
<div className="fl" style={{height: '27px'}}>
|
|
|
|
|
<span className="color-orange fl" id="add_teacher_notice"
|
|
|
|
|
style={{display: Collaboratorslisttype === true ? 'inline' : 'none'}}>请至少选择一个用户</span>
|
|
|
|
|
</div>
|
|
|
|
|
</span>
|
|
|
|
|
<span className="fl mr15">
|
|
|
|
|
<Checkbox className="fl" checked={allChangechecked} onChange={this.allChange}>全选</Checkbox>
|
|
|
|
|
<div className="fl" style={{height: '27px'}}>
|
|
|
|
|
<span className="color-orange fl" id="add_teacher_notice"
|
|
|
|
|
style={{display: Collaboratorslisttype === true ? 'inline' : 'none'}}>请至少选择一个用户</span>
|
|
|
|
|
</div>
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
@ -653,18 +658,23 @@ class Collaborators extends Component {
|
|
|
|
|
<a href={item.user.user_url} target="_blank" className="mr20 fl edu-position">
|
|
|
|
|
<img alt="用户头像" className="radius" height="48" src={getImageUrl("images/" + item.user.image_url)}
|
|
|
|
|
width="48"/>
|
|
|
|
|
<span className={item && item.user && item.user.shixun_manager === true ? "ml20 yslusercjz newyslusercjz" : "none "}
|
|
|
|
|
<span className={item && item.user && item.user.shixun_manager === true&&this.props.power === true ? "ml20 yslusercjz newyslusercjz" : "none "}
|
|
|
|
|
// style={{display: this.props.power === false ? "none" : "inline-block"}}
|
|
|
|
|
>
|
|
|
|
|
<p
|
|
|
|
|
className="yslusercjztest newyslusercjztest">{item.user.shixun_manager === true ? "创建者" : ""}</p></span>
|
|
|
|
|
<p className="yslusercjztest newyslusercjztest">{item.user.shixun_manager === true ? "创建者" : ""}</p></span>
|
|
|
|
|
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div className="fl collaborators-item-middles">
|
|
|
|
|
<p className="mb10 ">
|
|
|
|
|
<p className="mb10 sortinxdirection space-between hezuozhe634">
|
|
|
|
|
<a href={item.user.user_url} target="_blank" className="yslusername">{item.user.name}</a>
|
|
|
|
|
|
|
|
|
|
{item.user.shixun_manager === true ? "" : <span>
|
|
|
|
|
<i className={this.state.hovertype===true&&key===this.state.hoverkey?"fontnewreds iconfont icon-shanchu_moren":"fontneweees iconfont icon-shanchu_moren"}
|
|
|
|
|
style={{display: this.props.power === false ? "none" : "block"}}
|
|
|
|
|
onClick={() => this.collaborators_delete(item.user.user_id)}
|
|
|
|
|
onMouseEnter={()=>this.toggleHover(true,key)}
|
|
|
|
|
onMouseLeave={()=>this.toggleHover(false,key)}
|
|
|
|
|
></i></span> }
|
|
|
|
|
{/*<span*/}
|
|
|
|
|
{/* className={item && item.user && item.user.shixun_manager === true ? "ml20 yslusercjz " : "ml20"}*/}
|
|
|
|
|
{/* style={{display: this.props.power === false ? "none" : "inline-block"}}><p*/}
|
|
|
|
@ -745,6 +755,7 @@ class Collaborators extends Component {
|
|
|
|
|
<Pagination showQuickJumper defaultCurrent={1} total={collaboratorList && collaboratorList.member_count} onChange={this.onChangepageNumber} />
|
|
|
|
|
</div>:""}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</React.Fragment>
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
|