|
|
|
@ -279,6 +279,26 @@ class commonWork extends Component{
|
|
|
|
|
console.log(error)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
connectSuccess = () => {
|
|
|
|
|
let {page,search,order}=this.state;
|
|
|
|
|
this.getList(page,search,order);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
cancelConnectionProject = (work) => {
|
|
|
|
|
let workId=this.props.match.params.workId;
|
|
|
|
|
let courseId=this.props.match.params.coursesId;
|
|
|
|
|
|
|
|
|
|
const url = `/homework_commons/${work.homework_id}/student_works/cancel_relate_project.json`
|
|
|
|
|
axios.get(url).then((response)=> {
|
|
|
|
|
if (response.data.status == 0) {
|
|
|
|
|
let {page,search,order}=this.state;
|
|
|
|
|
this.getList(page,search,order);
|
|
|
|
|
this.props.showNotification('取消关联成功')
|
|
|
|
|
}
|
|
|
|
|
}).catch((error)=>{
|
|
|
|
|
console.log(error)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render(){
|
|
|
|
@ -341,7 +361,7 @@ class commonWork extends Component{
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div> */}
|
|
|
|
|
<ConnectProject ref="connectProject" {...this.props}></ConnectProject>
|
|
|
|
|
<ConnectProject ref="connectProject" {...this.props} connectSuccess={this.connectSuccess}></ConnectProject>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<Titlesearchsection
|
|
|
|
@ -425,6 +445,7 @@ class commonWork extends Component{
|
|
|
|
|
<Checkbox.Group style={{"width":"100%"}} onChange={this.onChangeSelect} value={checkBoxValues}>
|
|
|
|
|
<CommonWorkItem mainList={mainList} {...this.props} workType={workType} onItemClick={this.onItemClick}
|
|
|
|
|
openConnectionProject={this.openConnectionProject}
|
|
|
|
|
cancelConnectionProject={this.cancelConnectionProject}
|
|
|
|
|
></CommonWorkItem>
|
|
|
|
|
</Checkbox.Group>
|
|
|
|
|
</Spin>
|
|
|
|
|