ecloud_sso
caicai8 5 years ago
parent fa329c5daa
commit cfc4676c5b

@ -495,7 +495,8 @@ class CoursesBanner extends Component {
setHistoryFun=(url)=>{
this.props.history.replace(url)
this.updatabanner();
this.props.history.replace(url);
}

@ -38,7 +38,7 @@ function CourseGroupChooser({ course_groups, isAdminOrCreator = true, item, inde
that.state.checkAllArray[index] - checkAllValue
*/
console.log('arg_course_groups', arg_course_groups)
// console.log('arg_course_groups', arg_course_groups)
const urlStyle = {"left":"unset", minWidth: '262px'};

@ -41,7 +41,6 @@ function CourseGroupChooserModal({ course_groups = [], isAdminOrCreator, item, i
setCheckAllValue(!checkAllValue)
}
const onOk = async () => {
console.log(checkAllValue, arg_course_groups)
let approval = 1
const courseId = props.match.params.coursesId
let url = `/courses/${courseId}/teacher_application_review.json`
@ -51,13 +50,13 @@ function CourseGroupChooserModal({ course_groups = [], isAdminOrCreator, item, i
approval: approval,
group_id: arg_course_groups
}).then((result) => {
if (result.data.status === 0) {
props.showNotification(`${approval == 1? '同意' : '拒绝'}`)
fetchAll(1)
modalEl.current.setVisible(false)
window.location.reload();
}})
if (result.data.status === 0) {
props.showNotification(`${approval == 1? '同意' : '拒绝'}`)
fetchAll(1)
modalEl.current.setVisible(false)
// window.location.reload();
}})
// fetchAll(1);
}
return (
<ModalWrapper

@ -206,8 +206,8 @@ function buildColumns(that) {
title: '',
dataIndex: 'course_member_id',
key: 'course_member_id',
render: (content, item, index) => {
return content ? <Checkbox value={content}></Checkbox> : ''
render: (content, item, key) => {
return content ? <Checkbox value={content} key={content}></Checkbox> : ''
}
})
}
@ -401,7 +401,6 @@ class studentsList extends Component{
}
fetchAll = async (argPage,filterKey) => {
let { searchValue }=this.state
this.setState({
isSpin:true
})
@ -434,32 +433,28 @@ class studentsList extends Component{
if(searchValue!=""){
url+='&search='+searchValue;
}
const { updatabanners } = this.props;
updatabanners && updatabanners();
const result = await axios.get(encodeURI(url))
// axios.get((url)).then((result)=>{
if (result.data.teacher_list) {
this.setState({
teachers: result.data.teacher_list,
total_count: result.data.teacher_list_size,
application_list: result.data.application_list || [],
is_admin: result.data.is_admin,
apply_size: result.data.apply_size,
isSpin:false
})
} else if (result.data.application_list) {
this.setState({
total_count: result.data.teacher_list_size,
application_list: result.data.application_list || [],
is_admin: result.data.is_admin,
apply_size: result.data.apply_size,
isSpin:false
})
}
// }).catch((error)=>{
// console.log(error);
// this.setState({
// isSpin:false
// })
// })
if (result.data.teacher_list) {
this.setState({
teachers: result.data.teacher_list,
total_count: result.data.teacher_list_size,
application_list: result.data.application_list || [],
is_admin: result.data.is_admin,
apply_size: result.data.apply_size,
isSpin:false
})
} else if (result.data.application_list) {
this.setState({
total_count: result.data.teacher_list_size,
application_list: result.data.application_list || [],
is_admin: result.data.is_admin,
apply_size: result.data.apply_size,
isSpin:false
})
}
}
getGroupList(){
let id = this.props.match.params.coursesId
@ -536,7 +531,7 @@ class studentsList extends Component{
})
} else {
this.setState({
checkBoxValues: _.difference(this.state.checkBoxValues, values)
checkBoxValues: _.difference(this.state.checkBoxValues, values),
})
}
}
@ -632,7 +627,7 @@ class studentsList extends Component{
});
};
clearSelection = () => {
this.setState({ checkBoxValues: [] })
this.setState({ checkBoxValues: []})
}
selectedStatus=(e)=>{
this.clearSelection()
@ -652,10 +647,9 @@ class studentsList extends Component{
const isAdmin = this.props.isAdmin()
const columns = buildColumns(this)
let {
searchValue, checkBoxValues, checkAllValue, course_groups,
searchValue, checkBoxValues,checkAllValue, course_groups,
groupList, total_count, teachers, order, page, apply_size, filterKey
}=this.state
let currentOrderName = '加入时间排序'
if (order == ORDER_BY_NAME) {
currentOrderName = '姓名排序'

Loading…
Cancel
Save