|
|
@ -17,6 +17,7 @@ import { getImageUrl, toPath } from 'educoder'
|
|
|
|
import axios from 'axios';
|
|
|
|
import axios from 'axios';
|
|
|
|
|
|
|
|
|
|
|
|
import './Collaborators.css';
|
|
|
|
import './Collaborators.css';
|
|
|
|
|
|
|
|
import SchoolSelect from "../../../courses/members/modal/AddStudentModal";
|
|
|
|
|
|
|
|
|
|
|
|
const $ = window.$;
|
|
|
|
const $ = window.$;
|
|
|
|
|
|
|
|
|
|
|
@ -40,7 +41,9 @@ class Collaborators extends Component {
|
|
|
|
collaborators_deletevalue: null,
|
|
|
|
collaborators_deletevalue: null,
|
|
|
|
onSearchcalue:"",
|
|
|
|
onSearchcalue:"",
|
|
|
|
collaboratorListsum:10,
|
|
|
|
collaboratorListsum:10,
|
|
|
|
collaboratorListsumtype:true
|
|
|
|
collaboratorListsumtype:true,
|
|
|
|
|
|
|
|
user_name:undefined,
|
|
|
|
|
|
|
|
school_name:undefined
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
componentDidMount() {
|
|
|
|
componentDidMount() {
|
|
|
@ -151,34 +154,37 @@ class Collaborators extends Component {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
onSearchadmin = (value) => {
|
|
|
|
onSearchadmin = (value) => {
|
|
|
|
let {collaboratorList} = this.state;
|
|
|
|
let {collaboratorList,user_name,school_name} = this.state;
|
|
|
|
if (value === "") {
|
|
|
|
// if (value === "") {
|
|
|
|
this.setState({
|
|
|
|
// this.setState({
|
|
|
|
Searchadmin: [],
|
|
|
|
// Searchadmin: [],
|
|
|
|
collaboratorList: collaboratorList
|
|
|
|
// collaboratorList: collaboratorList
|
|
|
|
})
|
|
|
|
// })
|
|
|
|
} else {
|
|
|
|
// } else {
|
|
|
|
let id = this.props.match.params.shixunId;
|
|
|
|
//
|
|
|
|
let url = "/shixuns/" + id + "/add_collaborators.json?search=" + value;
|
|
|
|
// }
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
let id = this.props.match.params.shixunId;
|
|
|
|
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
|
|
|
|
let url = "/shixuns/" + id + "/add_collaborators.json";
|
|
|
|
|
|
|
|
axios.get(url,{params:{
|
|
|
|
}else{
|
|
|
|
user_name:user_name ,
|
|
|
|
let newlist = response.data;
|
|
|
|
school_name:school_name,
|
|
|
|
for (var i = 0; i < newlist.length; i++) {
|
|
|
|
}}).then((response) => {
|
|
|
|
newlist[i].checked = false
|
|
|
|
if (response.data.status === 403||response.data.status === 401||response.data.status === 500) {
|
|
|
|
}
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
}else{
|
|
|
|
Searchadmin: newlist,
|
|
|
|
let newlist = response.data;
|
|
|
|
collaboratorList: collaboratorList
|
|
|
|
for (var i = 0; i < newlist.length; i++) {
|
|
|
|
})
|
|
|
|
newlist[i].checked = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
}).catch((error) => {
|
|
|
|
Searchadmin: newlist,
|
|
|
|
console.log(error)
|
|
|
|
collaboratorList: collaboratorList
|
|
|
|
});
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
|
|
|
console.log(error)
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
selectChangenickname = (e, key) => {
|
|
|
|
selectChangenickname = (e, key) => {
|
|
|
@ -342,7 +348,9 @@ class Collaborators extends Component {
|
|
|
|
collaborators_deletetype,
|
|
|
|
collaborators_deletetype,
|
|
|
|
onSearchcalue,
|
|
|
|
onSearchcalue,
|
|
|
|
collaboratorListsum,
|
|
|
|
collaboratorListsum,
|
|
|
|
collaboratorListsumtype
|
|
|
|
collaboratorListsumtype,
|
|
|
|
|
|
|
|
user_name,
|
|
|
|
|
|
|
|
school_name
|
|
|
|
} = this.state;
|
|
|
|
} = this.state;
|
|
|
|
let {loadingContent} = this.props;
|
|
|
|
let {loadingContent} = this.props;
|
|
|
|
const radioStyle = {
|
|
|
|
const radioStyle = {
|
|
|
@ -415,20 +423,33 @@ class Collaborators extends Component {
|
|
|
|
closable={false}
|
|
|
|
closable={false}
|
|
|
|
footer={null}
|
|
|
|
footer={null}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<Search
|
|
|
|
{/*<Search*/}
|
|
|
|
placeholder="输入用户的姓名、昵称、邮箱进行搜索"
|
|
|
|
{/*placeholder="输入用户的姓名、昵称、邮箱进行搜索"*/}
|
|
|
|
value={onSearchcalue}
|
|
|
|
{/*value={onSearchcalue}*/}
|
|
|
|
onSearch={(value) => this.onSearchadmin(value)}
|
|
|
|
{/*onSearch={(value) => this.onSearchadmin(value)}*/}
|
|
|
|
onInput={this.onSearchadmins}
|
|
|
|
{/*onInput={this.onSearchadmins}*/}
|
|
|
|
style={{width: '100%'}}
|
|
|
|
{/*style={{width: '100%'}}*/}
|
|
|
|
/>
|
|
|
|
{/*/>*/}
|
|
|
|
|
|
|
|
<span className="mr10">姓名:</span>
|
|
|
|
<div className="mt20" style={{background: '#f7f9fd'}}>
|
|
|
|
|
|
|
|
<p className="clearfix pl35">
|
|
|
|
<Input allowClear placeholder="请输入真实姓名" value={user_name} onInput={(e) => {this.setState({user_name: e.target.value})}}
|
|
|
|
<span className="fl edu-txt-w80 task-hide font-bd ml30">姓名</span>
|
|
|
|
style={{ width: '130px'}}
|
|
|
|
<span className="fl edu-txt-w80 task-hide font-bd">职位</span>
|
|
|
|
></Input>
|
|
|
|
<span className="fl edu-txt-w180 task-hide font-bd">单位</span>
|
|
|
|
<span className="label ml10 " style={{ minWidth: '36px' }}>单位:</span>
|
|
|
|
</p>
|
|
|
|
<Input allowClear placeholder="请输入单位名称" className="ml10" value={school_name} onInput={(e) => {this.setState({school_name: e.target.value})}}
|
|
|
|
|
|
|
|
style={{ width: '135px'}}>
|
|
|
|
|
|
|
|
</Input>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<a className="task-btn task-btn-orange" onClick={() => this.onSearchadmin()}
|
|
|
|
|
|
|
|
style={{ height: '30px', lineHeight: '30px', marginLeft: '10px', 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>
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<div className="mt5" style={{background: '#f7f9fd'}}>
|
|
|
|
|
|
|
|
|
|
|
|
<div className="clearfix">
|
|
|
|
<div className="clearfix">
|
|
|
|
<ul className="upload_select_box fl" id="search_not_teachers_list">
|
|
|
|
<ul className="upload_select_box fl" id="search_not_teachers_list">
|
|
|
|
{Searchadmin.length === 0 ? <li style={{textAlign: 'center'}}>
|
|
|
|
{Searchadmin.length === 0 ? <li style={{textAlign: 'center'}}>
|
|
|
@ -454,7 +475,7 @@ class Collaborators extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
<div className="mt10 clearfix">
|
|
|
|
<div className="mt10 clearfix">
|
|
|
|
|
|
|
|
|
|
|
|
<span className="fl mr15 ml10">
|
|
|
|
<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'}}>
|
|
|
|
<span className="color-orange fl" id="add_teacher_notice"
|
|
|
|
<span className="color-orange fl" id="add_teacher_notice"
|
|
|
|