diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js
index ec2f5e4c0..9bf782d48 100644
--- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js
+++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js
@@ -878,6 +878,7 @@ class ShixunHomework extends Component{
if(response.data&&response.data){
this.setState({
course_modules:response.data,
+ homework_categorys:response.data.homework_category
})
}
}
@@ -1128,19 +1129,31 @@ class ShixunHomework extends Component{
{this.setState({dirSearchValue: e.target.value})}}/>
}
- {/*{course_modules&&course_modules.main_category.map((item,key)=>{*/}
- {/*return(*/}
- {/* this.moveTos(item.main_category_id)}>{item.main_category_name}*/}
- {/*)*/}
- {/*})}*/}
+ {course_modules&&course_modules.main_category.map((item,key)=>{
+ return(
+ datas&&datas.category_id===null?datas.main_category_id===item.main_category_id?"": this.moveTos(item.main_category_id)}>{item.main_category_name}:""
+ )
+ })}
- { course_modules&&course_modules.homework_category.filter((item)=> {
+ { course_modules&&course_modules.homework_category.filter((item,key)=> {
return (!this.state.dirSearchValue || item.category_name.indexOf(this.state.dirSearchValue) != -1)
}).map( (item,key) => {
- return this.moveTos(item.category_id )}>{item.category_name}
- })}
-
+ return
+ datas&&datas.category_id!=null?datas.category_id===item.category_id?"": this.moveTos(item.category_id )}>{item.category_name}:""
+ })}
+
+
+
+ {course_modules&&course_modules.homework_category.length===0?
+ 暂无数据
:""}
{/*{course_modules&&course_modules.homework_category.map((item,key)=>{*/}
{/*return(*/}