From b057098eb936ed3f9d24118821bae2b4f93edf0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Fri, 5 Jul 2019 11:25:34 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/package.json | 2 +- .../react/src/modules/courses/Resource/index.js | 4 ++-- .../courses/shixunHomework/shixunHomework.js | 15 ++++++++++----- 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/public/react/package.json b/public/react/package.json index ebfda1b41..54519f009 100644 --- a/public/react/package.json +++ b/public/react/package.json @@ -93,7 +93,7 @@ "wrap-md-editor": "^0.2.20" }, "scripts": { - "start": "node --max_old_space_size=8072 scripts/start.js", + "start": "node --max_old_space_size=15360 scripts/start.js", "build": "node --max_old_space_size=15360 scripts/build.js", "concat": "node scripts/concat.js", "gen_stats": "NODE_ENV=production webpack --profile --config=./config/webpack.config.prod.js --json > stats.json", diff --git a/public/react/src/modules/courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js index 06531d142..1ad136934 100644 --- a/public/react/src/modules/courses/Resource/index.js +++ b/public/react/src/modules/courses/Resource/index.js @@ -123,7 +123,7 @@ class Fileslists extends Component{ list.map((item,key)=>{ course_second_categoriess=item.course_second_categories }) - debugger + this.setState({ course_modules:response.data, has_course_groups:response.data.has_course_groups, @@ -850,7 +850,7 @@ class Fileslists extends Component{ {/*})*/} {/*)*/} {/*})}*/} - {this.props.isAdmin()?parseInt(this.props.match.params.main_id)===parseInt(this.props.coursesids)? + {this.props.isAdmin()?parseInt(this.props.match.params.main_id)===filesId&&filesId?

this.addDir()}>添加目录

diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js index 9bf782d48..9bf0d12a4 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js +++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js @@ -976,7 +976,8 @@ class ShixunHomework extends Component{ order, }=this.state; - + let main_id=this.props.match.params.main_id; + let category_id=this.props.match.params.category_id; return(
@@ -1131,7 +1132,7 @@ class ShixunHomework extends Component{ {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}
  • :"" + datas&&datas.category_id===null?"":
  • this.moveTos(item.main_category_id)}>{item.main_category_name}
  • :"" ) })} @@ -1139,8 +1140,12 @@ class ShixunHomework extends Component{ { 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 - datas&&datas.category_id!=null?datas.category_id===item.category_id?"":
  • this.moveTos(item.category_id )}>{item.category_name}
  • :"" + if(datas&&datas.category_id!=null&&datas&&datas.category_id===item.category_id===false){ + return
  • this.moveTos(item.category_id )}>{item.category_name}
  • + } + if(datas&&datas.category_id===null){ + return
  • this.moveTos(item.category_id )}>{item.category_name}
  • + } })} @@ -1152,7 +1157,7 @@ class ShixunHomework extends Component{ } `} - {course_modules&&course_modules.homework_category.length===0? + {course_modules&&course_modules.homework_category.length===0&&datas&&datas.category_id===null?
    暂无数据
    :""} {/*{course_modules&&course_modules.homework_category.map((item,key)=>{*/}