dev_forum
杨树林 5 years ago
parent bfe5e24935
commit c3b2e8eefd

@ -136,7 +136,7 @@ class CommonWorkDetailIndex extends Component{
DownloadMessageval:undefined
})
}
bindRef = ref => { this.child = ref };
render() {
@ -171,8 +171,10 @@ class CommonWorkDetailIndex extends Component{
let params = {}
if (isListModule) {
// TODO
// params = this.refs.commonWorkList._getRequestParams()
params =this.child._getRequestParams()!==undefined?this.child._getRequestParams():{};
}
// console.log("普通作业176176176");
// console.log(params);
let exportUrl = `/homework_commons/${workId}/works_list.zip?${queryString.stringify(params)}`
let exportResultUrl = `/homework_commons/${workId}/works_list.xlsx?${queryString.stringify(params)}`
return (
@ -356,7 +358,7 @@ class CommonWorkDetailIndex extends Component{
{/* 作品列表 */}
<Route exact path="/courses/:coursesId/common_homeworks/:workId/list"
render={
(props) => (<CommonWorkList ref="commonWorkList" {...this.props} {...props} {...this.state} {...commonHandler}/>)
(props) => (<CommonWorkList ref="commonWorkList" triggerRef={this.bindRef} {...this.props} {...props} {...this.state} {...commonHandler}/>)
}
></Route>

@ -401,7 +401,7 @@ class CommonWorkList extends Component{
this.fetchList()
on('commonwork_fetch_all', this.fetchAllListener)
$("html").animate({ scrollTop: $('html').scrollTop() - 100 })
this.props.triggerRef(this);
}
componentWillUnmount() {
off('commonwork_fetch_all', this.fetchAllListener)

Loading…
Cancel
Save