|
|
|
@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react'
|
|
|
|
|
import { trigger } from 'educoder'
|
|
|
|
|
import { Input, Checkbox } from "antd";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
/**
|
|
|
|
|
arg_course_groups 选中的id数组
|
|
|
|
|
joinCourseGroup 选中时触发 joinCourseGroup(checkedValues, item, index) 传入item:数据对象,index: 数据对象index
|
|
|
|
|
checkAllValue 是否全选
|
|
|
|
@ -33,13 +33,13 @@ function CourseGroupChooser({ course_groups, isAdminOrCreator = true, item, inde
|
|
|
|
|
that.setState({groupSearchValue: e.target.value})
|
|
|
|
|
|
|
|
|
|
that.onCheckAllChange(e, item, index) - onCheckAllChange(e, item, index)
|
|
|
|
|
that.joinCourseGroup(checkedValues, item, index) - joinCourseGroup(checkedValues, item, index)
|
|
|
|
|
that.joinCourseGroup(checkedValues, item, index) - joinCourseGroup(checkedValues, item, index)
|
|
|
|
|
|
|
|
|
|
that.state.checkAllArray[index] - checkAllValue
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
console.log('arg_course_groups', arg_course_groups)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const urlStyle = {"left":"unset", minWidth: '262px'};
|
|
|
|
|
if (alwaysShow == true) {
|
|
|
|
@ -54,17 +54,18 @@ function CourseGroupChooser({ course_groups, isAdminOrCreator = true, item, inde
|
|
|
|
|
</p>):
|
|
|
|
|
''
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
<Checkbox.Group onChange={(checkedValues) => joinCourseGroup(checkedValues, item, index)}
|
|
|
|
|
|
|
|
|
|
<Checkbox.Group onChange={(checkedValues) => joinCourseGroup(checkedValues, item, index)}
|
|
|
|
|
value={arg_course_groups.length && arg_course_groups[0].id ? arg_course_groups.map(item => item.id): arg_course_groups}
|
|
|
|
|
disabled={!isAdminOrCreator} className="mainGroup"
|
|
|
|
|
>
|
|
|
|
|
{course_groups && course_groups.length > 1 && <li key={'_all' + index} >
|
|
|
|
|
{/* 防止被外面group包裹 */}
|
|
|
|
|
<Checkbox.Group onChange={(e) => onCheckAllChange(e, item, index)} value={[checkAllValue]}>
|
|
|
|
|
<Checkbox
|
|
|
|
|
<Checkbox
|
|
|
|
|
value={true}
|
|
|
|
|
style={{ marginRight: '6px' }} onClick={() => {}}
|
|
|
|
|
disabled={!isAdminOrCreator}
|
|
|
|
|
style={{ marginRight: '6px' }} onClick={() => {}}
|
|
|
|
|
>全选</Checkbox>
|
|
|
|
|
</Checkbox.Group>
|
|
|
|
|
</li>}
|
|
|
|
@ -84,7 +85,7 @@ function CourseGroupChooser({ course_groups, isAdminOrCreator = true, item, inde
|
|
|
|
|
)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</Checkbox.Group>
|
|
|
|
|
<p className="drop_down_btn">
|
|
|
|
|
<a href="javascript:void(0)" className="color-grey-6"
|
|
|
|
|