|
|
@ -14,7 +14,8 @@ class addCollaborators extends Component{
|
|
|
|
search:'',
|
|
|
|
search:'',
|
|
|
|
partnerListid:[],
|
|
|
|
partnerListid:[],
|
|
|
|
checkAll: false,
|
|
|
|
checkAll: false,
|
|
|
|
optionss:[]
|
|
|
|
optionss:[],
|
|
|
|
|
|
|
|
useristrue:false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
addBox=()=>{
|
|
|
|
addBox=()=>{
|
|
|
@ -70,6 +71,13 @@ class addCollaborators extends Component{
|
|
|
|
let {partnerListid} =this.state;
|
|
|
|
let {partnerListid} =this.state;
|
|
|
|
let id=this.props.match.params.pathId;
|
|
|
|
let id=this.props.match.params.pathId;
|
|
|
|
let url="/paths/"+id+"/add_subject_members.json"
|
|
|
|
let url="/paths/"+id+"/add_subject_members.json"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(partnerListid.length===0){
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
useristrue:true
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
axios.post(url,{
|
|
|
|
axios.post(url,{
|
|
|
|
user_ids:partnerListid
|
|
|
|
user_ids:partnerListid
|
|
|
|
}).then((response) => {
|
|
|
|
}).then((response) => {
|
|
|
@ -87,9 +95,17 @@ class addCollaborators extends Component{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
addCollaboratorsid=(id)=>{
|
|
|
|
addCollaboratorsid=(id)=>{
|
|
|
|
this.setState({
|
|
|
|
if(id.length===0){
|
|
|
|
partnerListid:id
|
|
|
|
this.setState({
|
|
|
|
})
|
|
|
|
partnerListid:id,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
partnerListid:id,
|
|
|
|
|
|
|
|
useristrue:false
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
onCheckAllChange = (e) => {
|
|
|
|
onCheckAllChange = (e) => {
|
|
|
@ -145,7 +161,7 @@ class addCollaborators extends Component{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
render(){
|
|
|
|
render(){
|
|
|
|
let {addPartner,search,partnerList,optionss,checkAll,partnerListid} = this.state;
|
|
|
|
let {addPartner,search,partnerList,optionss,checkAll,partnerListid,useristrue} = this.state;
|
|
|
|
|
|
|
|
|
|
|
|
return(
|
|
|
|
return(
|
|
|
|
this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_add_member===true?
|
|
|
|
this.props.detailInfoList===undefined?"":this.props.detailInfoList.allow_add_member===true?
|
|
|
@ -199,6 +215,7 @@ class addCollaborators extends Component{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</CheckboxGroup>
|
|
|
|
</CheckboxGroup>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
{useristrue===true?<span className={"color-red"}>请先选择用户</span>:""}
|
|
|
|
<div className="mt20 marginauto clearfix edu-txt-center">
|
|
|
|
<div className="mt20 marginauto clearfix edu-txt-center">
|
|
|
|
<a onClick={this.hideAddBox} className="pop_close task-btn mr30">取消</a>
|
|
|
|
<a onClick={this.hideAddBox} className="pop_close task-btn mr30">取消</a>
|
|
|
|
<a className="task-btn task-btn-orange" onClick={this.SaveAddBox} id="submit_send_shixun">确定</a>
|
|
|
|
<a className="task-btn task-btn-orange" onClick={this.SaveAddBox} id="submit_send_shixun">确定</a>
|
|
|
|