dev_forum
hjm 6 years ago
parent bf01ea8b98
commit 8c0e2c1d37

@ -40,8 +40,9 @@ function buildColumns(that) {
dataIndex: 'name', dataIndex: 'name',
key: 'index', key: 'index',
render: (content, item, index) => { render: (content, item, index) => {
return item.isApply == true ? '' : <a href="javascript:;">{(that.state.page - 1) * 20 + index + 1 return index + 1
- (that.state.application_list ? that.state.application_list.length : 0)} </a> // return item.isApply == true ? '' : <a href="javascript:;">{(that.state.page - 1) * 20 + index + 1
// - (that.state.application_list ? that.state.application_list.length : 0)} </a>
} }
} }
// ,{ // ,{
@ -354,7 +355,7 @@ class studentsList extends Component{
console.log(error); console.log(error);
}); });
} }
fetchAll = (argPage) => { fetchAll = async (argPage) => {
this.setState({ this.setState({
isSpin:true isSpin:true
}) })
@ -387,12 +388,13 @@ class studentsList extends Component{
if(searchValue!=""){ if(searchValue!=""){
url+='&search='+searchValue; url+='&search='+searchValue;
} }
axios.get((url)).then((result)=>{ const result = await axios.get(url)
// axios.get((url)).then((result)=>{
if (result.data.teacher_list) { if (result.data.teacher_list) {
this.setState({ this.setState({
teachers: result.data.teacher_list, teachers: result.data.teacher_list,
total_count: result.data.teacher_list_size, total_count: result.data.teacher_list_size,
// application_list: result.data.application_list || [], application_list: result.data.application_list || [],
is_admin: result.data.is_admin, is_admin: result.data.is_admin,
apply_size: result.data.apply_size, apply_size: result.data.apply_size,
isSpin:false isSpin:false
@ -406,12 +408,12 @@ class studentsList extends Component{
isSpin:false isSpin:false
}) })
} }
}).catch((error)=>{ // }).catch((error)=>{
console.log(error); // console.log(error);
this.setState({ // this.setState({
isSpin:false // isSpin:false
}) // })
}) // })
} }
getGroupList(){ getGroupList(){
let id = this.props.match.params.coursesId let id = this.props.match.params.coursesId

Loading…
Cancel
Save