dev_aliyun2
caicai8 5 years ago committed by harry
parent 17584e84f9
commit 774eb23637

@ -495,7 +495,8 @@ class CoursesBanner extends Component {
setHistoryFun=(url)=>{ 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 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'}; const urlStyle = {"left":"unset", minWidth: '262px'};

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

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

Loading…
Cancel
Save