|
|
|
@ -16,8 +16,10 @@ import { getImageUrl, toPath } from 'educoder'
|
|
|
|
|
|
|
|
|
|
import axios from 'axios';
|
|
|
|
|
|
|
|
|
|
import NoneData from "../../../courses/coursesPublic/NoneData";
|
|
|
|
|
|
|
|
|
|
import './Collaborators.css';
|
|
|
|
|
import SchoolSelect from "../../../courses/members/modal/AddStudentModal";
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const $ = window.$;
|
|
|
|
|
|
|
|
|
@ -88,6 +90,7 @@ class Collaborators extends Component {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
CollaboratorsshowModal = (type) => {
|
|
|
|
|
|
|
|
|
|
if (type === "cooperation") {
|
|
|
|
|
this.setState({
|
|
|
|
|
Collaboratorsvisibleadmin: false,
|
|
|
|
@ -108,9 +111,10 @@ class Collaborators extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
showCollaboratorsvisible = (type) => {
|
|
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
Collaboratorslist: [],
|
|
|
|
|
Searchadmin:[],
|
|
|
|
|
Searchadmin:undefined,
|
|
|
|
|
onSearchcalue:""
|
|
|
|
|
})
|
|
|
|
|
let admintype = this.props.identity;
|
|
|
|
@ -160,7 +164,7 @@ class Collaborators extends Component {
|
|
|
|
|
|
|
|
|
|
let {collaboratorList,user_name,school_name} = this.state;
|
|
|
|
|
this.setState({
|
|
|
|
|
Searchadmin: [],
|
|
|
|
|
// Searchadmin: undefined,
|
|
|
|
|
spinnings:true,
|
|
|
|
|
})
|
|
|
|
|
// if (value === "") {
|
|
|
|
@ -199,6 +203,7 @@ class Collaborators extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
selectChangenickname = (e, key) => {
|
|
|
|
|
|
|
|
|
|
let {Searchadmin} = this.state;
|
|
|
|
|
let newlist = Searchadmin;
|
|
|
|
|
for (var i = 0; i < newlist.length; i++) {
|
|
|
|
@ -235,6 +240,7 @@ class Collaborators extends Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
allChange = (e) => {
|
|
|
|
|
|
|
|
|
|
let {Searchadmin} = this.state;
|
|
|
|
|
let newlist = Searchadmin;
|
|
|
|
|
for (var i = 0; i < newlist.length; i++) {
|
|
|
|
@ -246,6 +252,7 @@ class Collaborators extends Component {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
submit_add_collaborators_form = () => {
|
|
|
|
|
|
|
|
|
|
let id = this.props.match.params.shixunId;
|
|
|
|
|
let {Searchadmin,collaboratorList} = this.state;
|
|
|
|
|
let newlist = Searchadmin;
|
|
|
|
@ -300,6 +307,7 @@ class Collaborators extends Component {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
submit_addadminredio = () => {
|
|
|
|
|
|
|
|
|
|
let {addadminrediovalue} = this.state;
|
|
|
|
|
|
|
|
|
|
let id = this.props.match.params.shixunId;
|
|
|
|
@ -371,6 +379,7 @@ class Collaborators extends Component {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
contentViewScrolledit=(e)=>{
|
|
|
|
|
|
|
|
|
|
//滑动到底判断
|
|
|
|
|
let newscrollTop=parseInt(e.currentTarget.scrollTop);
|
|
|
|
|
let allclientHeight=e.currentTarget.clientHeight+newscrollTop;
|
|
|
|
@ -395,7 +404,6 @@ class Collaborators extends Component {
|
|
|
|
|
newSearchadmin.push(newlist[i])
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
console.log(newSearchadmin)
|
|
|
|
|
this.setState({
|
|
|
|
|
Searchadmin: newSearchadmin,
|
|
|
|
|
collaboratorList: collaboratorList,
|
|
|
|
@ -495,7 +503,7 @@ class Collaborators extends Component {
|
|
|
|
|
|
|
|
|
|
</Modal>
|
|
|
|
|
|
|
|
|
|
<Modal
|
|
|
|
|
{Collaboratorsvisibleadmin===true?<Modal
|
|
|
|
|
keyboard={false}
|
|
|
|
|
title="添加合作者"
|
|
|
|
|
visible={Collaboratorsvisibleadmin}
|
|
|
|
@ -535,7 +543,7 @@ class Collaborators extends Component {
|
|
|
|
|
<ul className="upload_select_box fl" id="search_not_teachers_list" onScroll={this.contentViewScrolledit}>
|
|
|
|
|
{Searchadmin === undefined ? <li style={{textAlign: 'center'}}>
|
|
|
|
|
<span>请试试搜索一下</span>
|
|
|
|
|
</li>:Searchadmin.length === 0 ? "": Searchadmin.map((item, key) => {
|
|
|
|
|
</li>:Searchadmin.length === 0 ?<NoneData/>: Searchadmin.map((item, key) => {
|
|
|
|
|
return (
|
|
|
|
|
<li key={key} style={{display: item.identify === "专业人士" ? "none" : "block"}}>
|
|
|
|
|
<Checkbox className="fl mr20" checked={item.checked}
|
|
|
|
@ -575,7 +583,7 @@ class Collaborators extends Component {
|
|
|
|
|
<a className="task-btn task-btn-orange"
|
|
|
|
|
onClick={() => this.submit_add_collaborators_form()}>确定</a>
|
|
|
|
|
</div>
|
|
|
|
|
</Modal>
|
|
|
|
|
</Modal>:""}
|
|
|
|
|
|
|
|
|
|
<div className="pl20" id="collaborators_list_info">
|
|
|
|
|
{
|
|
|
|
|