|
|
|
@ -2,7 +2,7 @@ import React, { Component } from 'react';
|
|
|
|
|
|
|
|
|
|
import { Redirect } from 'react-router';
|
|
|
|
|
|
|
|
|
|
import {Modal, Button, Radio, Input, Checkbox,message} from 'antd';
|
|
|
|
|
import {Modal, Button, Radio, Input, Checkbox,message,Spin, Icon} from 'antd';
|
|
|
|
|
|
|
|
|
|
import { BrowserRouter as Router, Route, Link, Switch } from "react-router-dom";
|
|
|
|
|
|
|
|
|
@ -44,7 +44,8 @@ class Collaborators extends Component {
|
|
|
|
|
collaboratorListsum:10,
|
|
|
|
|
collaboratorListsumtype:true,
|
|
|
|
|
user_name:undefined,
|
|
|
|
|
school_name:undefined
|
|
|
|
|
school_name:undefined,
|
|
|
|
|
spinnings:false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
componentDidMount() {
|
|
|
|
@ -155,9 +156,11 @@ class Collaborators extends Component {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
onSearchadmin = (value) => {
|
|
|
|
|
|
|
|
|
|
let {collaboratorList,user_name,school_name} = this.state;
|
|
|
|
|
this.setState({
|
|
|
|
|
Searchadmin: [],
|
|
|
|
|
spinnings:true,
|
|
|
|
|
})
|
|
|
|
|
// if (value === "") {
|
|
|
|
|
// this.setState({
|
|
|
|
@ -174,7 +177,9 @@ class Collaborators extends Component {
|
|
|
|
|
school_name:school_name,
|
|
|
|
|
}}).then((response) => {
|
|
|
|
|
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
spinnings:false
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
let newlist = response.data.users;
|
|
|
|
|
for (var i = 0; i < newlist.length; i++) {
|
|
|
|
@ -182,7 +187,8 @@ class Collaborators extends Component {
|
|
|
|
|
}
|
|
|
|
|
this.setState({
|
|
|
|
|
Searchadmin: newlist,
|
|
|
|
|
collaboratorList: collaboratorList
|
|
|
|
|
collaboratorList: collaboratorList,
|
|
|
|
|
spinnings:false
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -404,7 +410,10 @@ class Collaborators extends Component {
|
|
|
|
|
lineHeight: '30px',
|
|
|
|
|
};
|
|
|
|
|
// console.log(collaboratorList)
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
|
|
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
<p className="clearfix mt30"
|
|
|
|
|
style={{display:this.props.identity<5?"block":"none"}}
|
|
|
|
@ -412,7 +421,7 @@ class Collaborators extends Component {
|
|
|
|
|
<a onClick={() => this.showCollaboratorsvisible("cooperation")}
|
|
|
|
|
className="edu-default-btn edu-greenback-btn fr mr20 height40"
|
|
|
|
|
data-remote="true">
|
|
|
|
|
+ 添加合作者
|
|
|
|
|
<span className={"line27"}>+ </span>添加合作者
|
|
|
|
|
</a>
|
|
|
|
|
<a onClick={() => this.showCollaboratorsvisible("admin")}
|
|
|
|
|
style={{display:this.props.identity===1?"block":"none"}}
|
|
|
|
@ -467,6 +476,7 @@ class Collaborators extends Component {
|
|
|
|
|
visible={Collaboratorsvisibleadmin}
|
|
|
|
|
closable={false}
|
|
|
|
|
footer={null}
|
|
|
|
|
width={800}
|
|
|
|
|
>
|
|
|
|
|
{/*<Search*/}
|
|
|
|
|
{/*placeholder="输入用户的姓名、昵称、邮箱进行搜索"*/}
|
|
|
|
@ -475,53 +485,53 @@ class Collaborators extends Component {
|
|
|
|
|
{/*onInput={this.onSearchadmins}*/}
|
|
|
|
|
{/*style={{width: '100%'}}*/}
|
|
|
|
|
{/*/>*/}
|
|
|
|
|
<span className="mr10">姓名:</span>
|
|
|
|
|
<span className="mr10">姓名或手机号:</span>
|
|
|
|
|
|
|
|
|
|
<Input allowClear placeholder="请输入真实姓名" value={user_name} onInput={(e) => {this.setState({user_name: e.target.value})}}
|
|
|
|
|
style={{ width: '130px'}}
|
|
|
|
|
<Input placeholder="请输入姓名或手机号码搜索" value={user_name} onInput={(e) => {this.setState({user_name: e.target.value})}}
|
|
|
|
|
style={{ width: '215px'}}
|
|
|
|
|
></Input>
|
|
|
|
|
<span className="label ml10 " style={{ minWidth: '36px' }}>单位:</span>
|
|
|
|
|
<Input allowClear placeholder="请输入单位名称" className="ml10" value={school_name} onInput={(e) => {this.setState({school_name: e.target.value})}}
|
|
|
|
|
style={{ width: '135px'}}>
|
|
|
|
|
<Input placeholder="请输入单位名称" className="ml10" value={school_name} onInput={(e) => {this.setState({school_name: e.target.value})}}
|
|
|
|
|
style={{ width: '215px'}}
|
|
|
|
|
>
|
|
|
|
|
</Input>
|
|
|
|
|
|
|
|
|
|
<a className="task-btn task-btn-orange" onClick={() => this.onSearchadmin()}
|
|
|
|
|
style={{ height: '30px', lineHeight: '30px', marginLeft: '10px', width: '70px'}}
|
|
|
|
|
<a className="task-btn task-btn-orange ml20" onClick={() => this.onSearchadmin()}
|
|
|
|
|
style={{ height: '30px', lineHeight: '30px', width: '70px'}}
|
|
|
|
|
>搜索</a>
|
|
|
|
|
<p className="clearfix pl35 mt20">
|
|
|
|
|
<span className="fl edu-txt-w80 task-hide font-bd ml10 edu-txt-left">姓名</span>
|
|
|
|
|
<span className="fl edu-txt-w80 task-hide font-bd">职业</span>
|
|
|
|
|
<span className="fl edu-txt-w180 task-hide font-bd ml50">单位</span>
|
|
|
|
|
<span className="fl edu-txt-w100 task-hide font-bd ml10 edu-txt-left">姓名</span>
|
|
|
|
|
<span className="fl edu-txt-w100 task-hide font-bd">职业</span>
|
|
|
|
|
<span className="fl edu-txt-w180 task-hide font-bd ml80">单位</span>
|
|
|
|
|
</p>
|
|
|
|
|
<div className="mt5" style={{background: '#f7f9fd'}}>
|
|
|
|
|
|
|
|
|
|
<div className="clearfix">
|
|
|
|
|
<ul className="upload_select_box fl" id="search_not_teachers_list" onScroll={this.contentViewScrolledit}>
|
|
|
|
|
{Searchadmin.length === 0 ? <li style={{textAlign: 'center'}}>
|
|
|
|
|
<span>请试试搜索一下</span>
|
|
|
|
|
</li> : Searchadmin.map((item, key) => {
|
|
|
|
|
return (
|
|
|
|
|
<li key={key} style={{display: item.identify === "专业人士" ? "none" : "block"}}>
|
|
|
|
|
<Checkbox className="fl mr20" checked={item.checked}
|
|
|
|
|
onChange={(e) => this.selectChangenickname(e, key)}
|
|
|
|
|
id={item.user_id}></Checkbox>
|
|
|
|
|
<a className="task-hide color-grey3 fl span1 edu-txt-w80 edu-txt-left">{item.nickname}</a>
|
|
|
|
|
<span className="task-hide fl color-grey edu-txt-w80 span2">{item.identify}</span>
|
|
|
|
|
<span
|
|
|
|
|
title={item.school_name}
|
|
|
|
|
style={{width: '150px'}}
|
|
|
|
|
className="span3 color-grey fl edu-txt-w260 task-hide ml50 task-hide" >{item.school_name}</span>
|
|
|
|
|
</li>
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
<Spin indicator={antIcon} spinning={this.state.spinnings}>
|
|
|
|
|
<div className="clearfix">
|
|
|
|
|
<ul className="upload_select_box fl" id="search_not_teachers_list" onScroll={this.contentViewScrolledit}>
|
|
|
|
|
{Searchadmin.length === 0 ? <li style={{textAlign: 'center'}}>
|
|
|
|
|
<span>请试试搜索一下</span>
|
|
|
|
|
</li> : Searchadmin.map((item, key) => {
|
|
|
|
|
return (
|
|
|
|
|
<li key={key} style={{display: item.identify === "专业人士" ? "none" : "block"}}>
|
|
|
|
|
<Checkbox className="fl mr20" checked={item.checked}
|
|
|
|
|
onChange={(e) => this.selectChangenickname(e, key)}
|
|
|
|
|
id={item.user_id}></Checkbox>
|
|
|
|
|
<a className="task-hide color-grey3 fl span1 edu-txt-w80 edu-txt-left">{item.nickname}</a>
|
|
|
|
|
<span className="task-hide fl color-grey edu-txt-w80 span2">{item.identify}</span>
|
|
|
|
|
<span
|
|
|
|
|
title={item.school_name}
|
|
|
|
|
style={{width: '150px'}}
|
|
|
|
|
className="span3 color-grey fl edu-txt-w260 task-hide ml50 task-hide" >{item.school_name}</span>
|
|
|
|
|
</li>
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
</Spin>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="mt10 clearfix">
|
|
|
|
|
|
|
|
|
|
<span className="fl mr15">
|
|
|
|
|
<Checkbox className="fl" checked={allChangechecked} onChange={this.allChange}>全选</Checkbox>
|
|
|
|
|
<div className="fl" style={{height: '27px'}}>
|
|
|
|
|