|
|
|
@ -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,6 +410,9 @@ class Collaborators extends Component {
|
|
|
|
|
lineHeight: '30px',
|
|
|
|
|
};
|
|
|
|
|
// console.log(collaboratorList)
|
|
|
|
|
|
|
|
|
|
const antIcon = <Icon type="loading" style={{ fontSize: 24 }} spin />;
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
<p className="clearfix mt30"
|
|
|
|
@ -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,26 +485,27 @@ 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'}}>
|
|
|
|
|
|
|
|
|
|
<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'}}>
|
|
|
|
@ -518,10 +529,9 @@ class Collaborators extends Component {
|
|
|
|
|
}
|
|
|
|
|
</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'}}>
|
|
|
|
|