|
|
@ -15,7 +15,7 @@ class ShixunWorkModal extends Component{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
componentDidMount() {
|
|
|
|
componentDidMount() {
|
|
|
|
let {group_list}=this.state;
|
|
|
|
let {group_list}=this.state;
|
|
|
|
let url="/homework_commons/"+this.props.match.params.homeworkid+"/group_list.json";
|
|
|
|
let url="/homework_commons/"+this.props.match.params.homeworkid+"/group_list.json";
|
|
|
|
axios.get(url,{params:{
|
|
|
|
axios.get(url,{params:{
|
|
|
|
limit:10,
|
|
|
|
limit:10,
|
|
|
|
page:1,
|
|
|
|
page:1,
|
|
|
@ -32,7 +32,6 @@ class ShixunWorkModal extends Component{
|
|
|
|
newgroup_list.push(item)
|
|
|
|
newgroup_list.push(item)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
if( response.data.ungroup_list!== undefined || response.data.ungroup_list !== null){
|
|
|
|
if( response.data.ungroup_list!== undefined || response.data.ungroup_list !== null){
|
|
|
|
console.log()
|
|
|
|
|
|
|
|
newgroup_list.push(response.data.ungroup_list)
|
|
|
|
newgroup_list.push(response.data.ungroup_list)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
@ -50,7 +49,7 @@ class ShixunWorkModal extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
//勾选实训
|
|
|
|
//勾选实训
|
|
|
|
shixunhomeworkedit=(checkedValues)=>{
|
|
|
|
shixunhomeworkedit=(checkedValues)=>{
|
|
|
|
let types=false
|
|
|
|
let types=false
|
|
|
|
let{group_list}=this.state;
|
|
|
|
let{group_list}=this.state;
|
|
|
|
group_list.map((item,key)=>{
|
|
|
|
group_list.map((item,key)=>{
|
|
|
|
if(item!=undefined){
|
|
|
|
if(item!=undefined){
|
|
|
@ -88,7 +87,6 @@ class ShixunWorkModal extends Component{
|
|
|
|
let {page,limit,group_list}=this.state;
|
|
|
|
let {page,limit,group_list}=this.state;
|
|
|
|
let newpage=page+1;
|
|
|
|
let newpage=page+1;
|
|
|
|
let newgroup_list=group_list;
|
|
|
|
let newgroup_list=group_list;
|
|
|
|
debugger
|
|
|
|
|
|
|
|
let url="/homework_commons/"+this.props.match.params.homeworkid+"/group_list.json";
|
|
|
|
let url="/homework_commons/"+this.props.match.params.homeworkid+"/group_list.json";
|
|
|
|
|
|
|
|
|
|
|
|
axios.get(url,{params:{
|
|
|
|
axios.get(url,{params:{
|
|
|
@ -134,30 +132,30 @@ class ShixunWorkModal extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
let {data}=this.props;
|
|
|
|
let {data}=this.props;
|
|
|
|
if(e.target.checked===true){
|
|
|
|
if(e.target.checked===true){
|
|
|
|
if(data&&data.length===0){
|
|
|
|
if(data&&data.length===0){
|
|
|
|
let id=[]
|
|
|
|
let id=[]
|
|
|
|
group_list.forEach((item,key)=>{
|
|
|
|
group_list.forEach((item,key)=>{
|
|
|
|
id.push(item.id)
|
|
|
|
id.push(item.id)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
group_ids:id,
|
|
|
|
|
|
|
|
onChangetype:e.target.checked
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
let id=[]
|
|
|
|
|
|
|
|
group_list.forEach((item,key)=>{
|
|
|
|
|
|
|
|
id.push(item.id)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
group_ids:id,
|
|
|
|
|
|
|
|
onChangetype:e.target.checked
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
this.setState({
|
|
|
|
group_ids:[],
|
|
|
|
group_ids:id,
|
|
|
|
onChangetype:e.target.checked
|
|
|
|
onChangetype:e.target.checked
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
let id=[]
|
|
|
|
|
|
|
|
group_list.forEach((item,key)=>{
|
|
|
|
|
|
|
|
id.push(item.id)
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
group_ids:id,
|
|
|
|
|
|
|
|
onChangetype:e.target.checked
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
group_ids:[],
|
|
|
|
|
|
|
|
onChangetype:e.target.checked
|
|
|
|
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -187,7 +185,7 @@ class ShixunWorkModal extends Component{
|
|
|
|
message:"提示",
|
|
|
|
message:"提示",
|
|
|
|
description: response.data.message
|
|
|
|
description: response.data.message
|
|
|
|
});
|
|
|
|
});
|
|
|
|
console.log(this.props)
|
|
|
|
console.log(this.props)
|
|
|
|
}else if(response.data.status === -1){
|
|
|
|
}else if(response.data.status === -1){
|
|
|
|
notification.open({
|
|
|
|
notification.open({
|
|
|
|
message:"提示",
|
|
|
|
message:"提示",
|
|
|
@ -222,7 +220,7 @@ class ShixunWorkModal extends Component{
|
|
|
|
render(){
|
|
|
|
render(){
|
|
|
|
let {course_groups,group_ids,onChangetype,group_list}=this.state;
|
|
|
|
let {course_groups,group_ids,onChangetype,group_list}=this.state;
|
|
|
|
// let {data}=this.props;
|
|
|
|
// let {data}=this.props;
|
|
|
|
// console.log(group_list)
|
|
|
|
// console.log(group_list)
|
|
|
|
// console.log(course_groups)
|
|
|
|
// console.log(course_groups)
|
|
|
|
return(
|
|
|
|
return(
|
|
|
|
<div>
|
|
|
|
<div>
|
|
|
@ -251,59 +249,59 @@ class ShixunWorkModal extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
{course_groups===undefined?"":
|
|
|
|
{course_groups===undefined?"":
|
|
|
|
<ul className="upload_select_box fl clearfix mt10 mb10" tyle={{"overflow-y":"auto"}}id="search_not_members_list"
|
|
|
|
<ul className="upload_select_box fl clearfix mt10 mb10" tyle={{"overflow-y":"auto"}}id="search_not_members_list"
|
|
|
|
onScroll={this.contentViewScroll}
|
|
|
|
onScroll={this.contentViewScroll}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit} value={group_ids}>
|
|
|
|
<Checkbox.Group style={{ width: '100%' }} onChange={this.shixunhomeworkedit} value={group_ids}>
|
|
|
|
{
|
|
|
|
{
|
|
|
|
group_list===undefined?course_groups.ungroup_list.work_count===0?"":
|
|
|
|
group_list===undefined?course_groups.ungroup_list.work_count===0?"":
|
|
|
|
|
|
|
|
|
|
|
|
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE">
|
|
|
|
<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE">
|
|
|
|
<li className="fl task-hide" style={{width: '240px'}}>
|
|
|
|
<li className="fl task-hide" style={{width: '240px'}}>
|
|
|
|
<Checkbox
|
|
|
|
<Checkbox
|
|
|
|
className="fl task-hide edu-txt-left"
|
|
|
|
className="fl task-hide edu-txt-left"
|
|
|
|
name="shixun_homework[]"
|
|
|
|
name="shixun_homework[]"
|
|
|
|
value={course_groups.ungroup_list.id}
|
|
|
|
value={course_groups.ungroup_list.id}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<label style={{"textAlign": "left", "color": "#05101A"}}
|
|
|
|
<label style={{"textAlign": "left", "color": "#05101A"}}
|
|
|
|
className="task-hide color-grey-name" title="frerere">{course_groups.ungroup_list.name}</label>
|
|
|
|
className="task-hide color-grey-name" title="frerere">{course_groups.ungroup_list.name}</label>
|
|
|
|
</Checkbox>
|
|
|
|
</Checkbox>
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
<li className="fl" style={{width: '100px'}}>
|
|
|
|
<li className="fl" style={{width: '100px'}}>
|
|
|
|
{course_groups.ungroup_list.work_count}
|
|
|
|
{course_groups.ungroup_list.work_count}
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
<li className="fl" style={{width: '160px'}}>
|
|
|
|
<li className="fl" style={{width: '160px'}}>
|
|
|
|
{course_groups.ungroup_list.last_review_time}
|
|
|
|
{course_groups.ungroup_list.last_review_time}
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
:
|
|
|
|
:
|
|
|
|
group_list&&group_list.map((item,key)=>{
|
|
|
|
group_list&&group_list.map((item,key)=>{
|
|
|
|
return(
|
|
|
|
return(
|
|
|
|
item.work_count===0?"":<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}>
|
|
|
|
item.work_count===0?"":<div className="clearfix edu-txt-center lineh-40 bor-bottom-greyE" key={key}>
|
|
|
|
<li className="fl task-hide" style={{width: '240px'}}>
|
|
|
|
<li className="fl task-hide" style={{width: '240px'}}>
|
|
|
|
<Checkbox
|
|
|
|
<Checkbox
|
|
|
|
className="fl task-hide edu-txt-left"
|
|
|
|
className="fl task-hide edu-txt-left"
|
|
|
|
name="shixun_homework[]"
|
|
|
|
name="shixun_homework[]"
|
|
|
|
value={item=== undefined?"":item.id}
|
|
|
|
value={item=== undefined?"":item.id}
|
|
|
|
>
|
|
|
|
>
|
|
|
|
<label style={{"textAlign": "left", "color": "#05101A"}}
|
|
|
|
<label style={{"textAlign": "left", "color": "#05101A"}}
|
|
|
|
className="task-hide color-grey-name" title="frerere">{item===undefined?"":item.name}</label>
|
|
|
|
className="task-hide color-grey-name" title="frerere">{item===undefined?"":item.name}</label>
|
|
|
|
</Checkbox>
|
|
|
|
</Checkbox>
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
<li className="fl" style={{width: '100px'}}>
|
|
|
|
<li className="fl" style={{width: '100px'}}>
|
|
|
|
{item===undefined?"":item.works_count===undefined?item.work_count:item.works_count}
|
|
|
|
{item===undefined?"":item.works_count===undefined?item.work_count:item.works_count}
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
<li className="fl" style={{width: '160px'}}>
|
|
|
|
<li className="fl" style={{width: '160px'}}>
|
|
|
|
{item===undefined?"":item.last_review_time}
|
|
|
|
{item===undefined?"":item.last_review_time}
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
})
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</Checkbox.Group>
|
|
|
|
</Checkbox.Group>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
}
|
|
|
|
}
|
|
|
|
<div className={"clearfix"}>
|
|
|
|
<div className={"clearfix"}>
|
|
|
|
<Checkbox checked={onChangetype} onChange={this.onChange} className={"ml10"}>{onChangetype===true?"清除":"全选"}</Checkbox>
|
|
|
|
<Checkbox checked={onChangetype} onChange={this.onChange} className={"ml10"}>{onChangetype===true?"清除":"全选"}</Checkbox>
|
|
|
|