|
|
|
@ -442,16 +442,17 @@ class CommonWorkList extends Component{
|
|
|
|
|
if (val === ""||val===undefined) {
|
|
|
|
|
this.setState({
|
|
|
|
|
search: undefined,
|
|
|
|
|
searchtypes:false
|
|
|
|
|
searchtypes:false,
|
|
|
|
|
page:1
|
|
|
|
|
})
|
|
|
|
|
}else{
|
|
|
|
|
this.setState({
|
|
|
|
|
searchtypes:true,
|
|
|
|
|
loadingstate:true
|
|
|
|
|
loadingstate:true,
|
|
|
|
|
page:1
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.fetchList()
|
|
|
|
|
this.fetchList(1)
|
|
|
|
|
}
|
|
|
|
|
onSearchValueInput = (e) => {
|
|
|
|
|
if (e.target.value === ""||e.target.value===undefined) {
|
|
|
|
@ -482,8 +483,9 @@ class CommonWorkList extends Component{
|
|
|
|
|
this.fetchList()
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
_getRequestParams() {
|
|
|
|
|
const {search, arg_work_status, arg_teacher_comment, arg_course_group, order, page, arg_member_work, b_order} = this.state
|
|
|
|
|
_getRequestParams(pages) {
|
|
|
|
|
let {search, arg_work_status, arg_teacher_comment, arg_course_group, order, page, arg_member_work, b_order} = this.state
|
|
|
|
|
page=pages?pages:page
|
|
|
|
|
return {
|
|
|
|
|
page,
|
|
|
|
|
search,
|
|
|
|
@ -500,7 +502,7 @@ class CommonWorkList extends Component{
|
|
|
|
|
fetchData = () => {
|
|
|
|
|
this.fetchList()
|
|
|
|
|
}
|
|
|
|
|
fetchList = () => {
|
|
|
|
|
fetchList = (page) => {
|
|
|
|
|
if(this.state.comwbool===true){
|
|
|
|
|
console.log('arg_course_group2');
|
|
|
|
|
console.log(this.state.arg_course_group);
|
|
|
|
@ -515,7 +517,7 @@ class CommonWorkList extends Component{
|
|
|
|
|
let courseId=this.props.match.params.coursesId;
|
|
|
|
|
|
|
|
|
|
const url = `/homework_commons/${workId}/works_list.json`
|
|
|
|
|
let params = this._getRequestParams()
|
|
|
|
|
let params = this._getRequestParams(page)
|
|
|
|
|
axios.post(url, params).then((response)=> {
|
|
|
|
|
if (response.data) {
|
|
|
|
|
this.setState({
|
|
|
|
|