diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js index e8442ee48..f22e6b9a7 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js @@ -61,7 +61,7 @@ class Coursesleftnav extends Component{ } // updataleftNav=()=>{ - // + // // let id=this.props.match.params.coursesId; // let url ="/courses/"+id+"/left_banner.json" // axios.get(url).then((response) => { @@ -272,11 +272,11 @@ class Coursesleftnav extends Component{ let {url}=this.state; if(urls!=url){ - + this.props.history.replace(urls); this.props.updataleftNavfun(); }else{ - + if (key === this.props.indexs) { this.props.unlocationNavfun(undefined) } else { @@ -681,7 +681,7 @@ class Coursesleftnav extends Component{ } showsandians=(e,key,urls,num)=> { - + let {url}=this.state; if (key === this.props.indexs) { this.props.unlocationNavfun(undefined) diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js index f28f982b7..ea955b5b1 100644 --- a/public/react/src/modules/tpm/TPMBanner.js +++ b/public/react/src/modules/tpm/TPMBanner.js @@ -245,7 +245,9 @@ class TPMBanner extends Component { Searchvalue:"", pages:1 }) - window.location.href = response.data.url; + // window.location.href = response.data.url; + // response.data.course_id + this.props.history.replace("/courses"); }).catch((error) => { console.log(error) diff --git a/public/react/src/modules/tpm/shixunchild/Collaborators/Collaborators.js b/public/react/src/modules/tpm/shixunchild/Collaborators/Collaborators.js index 94036f5c0..07c9f960f 100644 --- a/public/react/src/modules/tpm/shixunchild/Collaborators/Collaborators.js +++ b/public/react/src/modules/tpm/shixunchild/Collaborators/Collaborators.js @@ -17,6 +17,7 @@ import { getImageUrl, toPath } from 'educoder' import axios from 'axios'; import './Collaborators.css'; +import SchoolSelect from "../../../courses/members/modal/AddStudentModal"; const $ = window.$; @@ -40,7 +41,9 @@ class Collaborators extends Component { collaborators_deletevalue: null, onSearchcalue:"", collaboratorListsum:10, - collaboratorListsumtype:true + collaboratorListsumtype:true, + user_name:undefined, + school_name:undefined } } componentDidMount() { @@ -151,34 +154,37 @@ class Collaborators extends Component { }) } onSearchadmin = (value) => { - let {collaboratorList} = this.state; - if (value === "") { - this.setState({ - Searchadmin: [], - collaboratorList: collaboratorList - }) - } else { - let id = this.props.match.params.shixunId; - let url = "/shixuns/" + id + "/add_collaborators.json?search=" + value; - axios.get(url).then((response) => { - if (response.data.status === 403||response.data.status === 401||response.data.status === 500) { - - }else{ - let newlist = response.data; - for (var i = 0; i < newlist.length; i++) { - newlist[i].checked = false - } - this.setState({ - Searchadmin: newlist, - collaboratorList: collaboratorList - }) - } - - }).catch((error) => { - console.log(error) - }); - } - + let {collaboratorList,user_name,school_name} = this.state; + // if (value === "") { + // this.setState({ + // Searchadmin: [], + // collaboratorList: collaboratorList + // }) + // } else { + // + // } + let id = this.props.match.params.shixunId; + let url = "/shixuns/" + id + "/add_collaborators.json"; + axios.get(url,{params:{ + user_name:user_name , + school_name:school_name, + }}).then((response) => { + if (response.data.status === 403||response.data.status === 401||response.data.status === 500) { + + }else{ + let newlist = response.data; + for (var i = 0; i < newlist.length; i++) { + newlist[i].checked = false + } + this.setState({ + Searchadmin: newlist, + collaboratorList: collaboratorList + }) + } + + }).catch((error) => { + console.log(error) + }); } selectChangenickname = (e, key) => { @@ -342,7 +348,9 @@ class Collaborators extends Component { collaborators_deletetype, onSearchcalue, collaboratorListsum, - collaboratorListsumtype + collaboratorListsumtype, + user_name, + school_name } = this.state; let {loadingContent} = this.props; const radioStyle = { @@ -415,20 +423,33 @@ class Collaborators extends Component { closable={false} footer={null} > - this.onSearchadmin(value)} - onInput={this.onSearchadmins} - style={{width: '100%'}} - /> - -
-

- 姓名 - 职位 - 单位 -

+ {/* this.onSearchadmin(value)}*/} + {/*onInput={this.onSearchadmins}*/} + {/*style={{width: '100%'}}*/} + {/*/>*/} + 姓名: + + {this.setState({user_name: e.target.value})}} + style={{ width: '130px'}} + > + 单位: + {this.setState({school_name: e.target.value})}} + style={{ width: '135px'}}> + + + this.onSearchadmin()} + style={{ height: '30px', lineHeight: '30px', marginLeft: '10px', width: '70px'}} + >搜索 +

+ 姓名 + 呢称 + 单位 +

+
+
    {Searchadmin.length === 0 ?
  • @@ -454,7 +475,7 @@ class Collaborators extends Component {
    - + 全选