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