diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js index 418c201b5..c1ae69cc1 100644 --- a/public/react/src/modules/courses/Resource/Fileslistitem.js +++ b/public/react/src/modules/courses/Resource/Fileslistitem.js @@ -293,7 +293,7 @@ class Fileslistitem extends Component{ {discussMessage.author.name} 大小 {discussMessage.filesize} 下载 {discussMessage.downloads_count} - 引用 {discussMessage.quotes} + {/*引用 {discussMessage.quotes}*/} {/*{moment(discussMessage.publish_time).format('YYYY-MM-DD HH:mm:ss')}*/} {/*{moment(discussMessage.publish_time).fromNow()}*/} diff --git a/public/react/src/modules/courses/Resource/index.js b/public/react/src/modules/courses/Resource/index.js index 1fea29f84..a9aa79f53 100644 --- a/public/react/src/modules/courses/Resource/index.js +++ b/public/react/src/modules/courses/Resource/index.js @@ -51,8 +51,14 @@ class Fileslists extends Component{ }) if(this.props.match.params.main_id){ this.seactall(); + this.setState({ + child:false, + }) }else if(this.props.match.params.Id){ this.seactall(parseInt(this.props.match.params.Id),1) + this.setState({ + child:true, + }) } this.updadatalist(); on('updateNavSuccess', this.updateNavSuccess) @@ -74,9 +80,12 @@ class Fileslists extends Component{ this.setState({ isSpin:true, checkBoxValues:[], - checkAllValue:false + checkAllValue:false, }) if(this.props.match.params.main_id!=undefined){ + this.setState({ + child:false, + }) this.seactall(); } } @@ -84,31 +93,15 @@ class Fileslists extends Component{ this.setState({ isSpin:true, checkBoxValues:[], - checkAllValue:false + checkAllValue:false, }) if(this.props.match.params.Id!=undefined){ + this.setState({ + child:true, + }) this.seactall(parseInt(this.props.match.params.Id),1) } } - // if ( prevProps.match.params.Id != this.props.match.params.Id ||prevProps.isaloadtype!= this.props.isaloadtype) { - // let lists=this.props.course_modules; - // if(lists!=undefined){ - // debugger - // let url=this.props.location.pathname; - // lists.forEach((item,index)=>{ - // if(url===item.category_url){ - // this.seactall(); - // } - // if(item.second_category!=undefined&&item.second_category.length!=0){ - // item.second_category.forEach((iem,key)=>{ - // if(url===iem.second_category_url){ - // this.seactall(parseInt(this.props.match.params.Id),2); - // } - // }) - // } - // }) - // } - // } } updadatalist=(id)=>{ @@ -399,11 +392,16 @@ class Fileslists extends Component{ } addDir = () => { - let {filesId}=this.state; + let {filesId,course_modules}=this.state; this.setState({ checkBoxValues:[] }) - trigger('attachmentAddlog', parseInt(filesId)) + if(parseInt(this.props.match.params.main_id)!=parseInt(this.props.coursesids)){ + trigger('attachmentAddlog', parseInt( course_modules&&course_modules.course_modules[0].id)) + }else{ + trigger('attachmentAddlog', parseInt(filesId)) + } + } editDir = (name) => { @@ -677,11 +675,13 @@ class Fileslists extends Component{ course_modules, shixunmodal, course_is_public, - filesId + filesId, + child } = this.state; let category_id= this.props.match.params.category_id; + return( @@ -779,13 +779,14 @@ class Fileslists extends Component{ />:""} - {this.props.isAdmin()?parseInt(this.props.match.params.main_id)===parseInt(this.props.coursesids)?this.addDir()} className={"mr30 font-16"}>添加目录:"":""} + {/*{this.props.isAdmin()?parseInt(this.props.match.params.main_id)===parseInt(this.props.coursesids)?this.addDir()} className={"mr30 font-16"}>新建目录:"":""}*/} + {this.props.isAdmin()?this.addDir()} className={"mr30 font-16"}>新建目录:""} {this.props.isAdmin()?parseInt(this.props.match.params.main_id)!=parseInt(this.props.coursesids)?this.editDir(name)} className={"mr30 font-16"}>目录重命名:"":""} {this.props.isAdmin()||this.props.isStudent() ? this.addResource()}>选用资源:""} @@ -869,7 +870,7 @@ class Fileslists extends Component{ {/*})}*/} {this.props.isAdmin()?parseInt(this.props.match.params.main_id)===filesId&&filesId?

- this.addDir()}>添加目录 + this.addDir()}>新建目录

:"":""} @@ -885,7 +886,7 @@ class Fileslists extends Component{ {/*className={sorttype === 'created_on'?"none":""} className={sorttype === 'quotes'?"none":""} className={sorttype === 'downloads'?"none":""} */}
  • this.onSortTypeChange('created_on')}>更新时间排序
  • this.onSortTypeChange('downloads')}>下载次数排序
  • -
  • this.onSortTypeChange('quotes')}>引用次数排序
  • + {/*
  • this.onSortTypeChange('quotes')}>引用次数排序
  • */} :""} diff --git a/public/react/src/modules/courses/boards/BoardsNew.js b/public/react/src/modules/courses/boards/BoardsNew.js index 0222907d3..22a5fece1 100644 --- a/public/react/src/modules/courses/boards/BoardsNew.js +++ b/public/react/src/modules/courses/boards/BoardsNew.js @@ -291,7 +291,7 @@ class BoardsNew extends Component{ return(
    this.refs['addDirModal'].open()}> - 添加目录 + 新建目录
    } diff --git a/public/react/src/modules/courses/boards/index.js b/public/react/src/modules/courses/boards/index.js index b1ada5bb5..28ba6d65b 100644 --- a/public/react/src/modules/courses/boards/index.js +++ b/public/react/src/modules/courses/boards/index.js @@ -349,7 +349,7 @@ class Boards extends Component{ searchPlaceholder={ '请输入帖子名称进行搜索' } firstRowRight={ - { !isCourseEnd && isAdmin && !parent_id && this.addDir()}>添加目录 } + { !isCourseEnd && isAdmin && !parent_id && this.addDir()}>新建目录 } { isAdmin && !!parent_id && this.renameDir()}>目录重命名 } { !isCourseEnd && isAdminOrStudent && this.onToBoardsNew()}>我要发贴 } @@ -393,7 +393,7 @@ class Boards extends Component{

    this.addDir()} - >添加目录... + >新建目录...

    } {/*

    添加分班...

    */} diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js index e47f83c1f..489f01447 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js @@ -401,7 +401,7 @@ class Coursesleftnav extends Component{ axios.get(url).then((result)=>{ navidtype=true this.props.updataleftNavfun(); - console.log(this.props) + // console.log(this.props) let list=this.props.course_modules; for(var i=0; i {/*公告栏*/} {/*作业*/} - {item.type==="shixun_homework"?
    this.Navmodalnames(e,1,"shixun_homework",item.id)}>添加目录
    :""} + {item.type==="shixun_homework"?
    this.Navmodalnames(e,1,"shixun_homework",item.id)}>新建目录
    :""} {/*资源*/} - {item.type==="attachment"?
    this.Navmodalnames(e,1,"attachment",item.id)}>添加目录
    :""} + {item.type==="attachment"?
    this.Navmodalnames(e,1,"attachment",item.id)}>新建目录
    :""} {/*毕业设计*/} {/*{item.type==="graduation"?
    this.Navmodalnames(1,"attachment",item.id)}>添加目录
    :""}*/} {/*讨论区*/} - {item.type==="board"?this.props.current_user&&this.props.current_user.course_is_end===true?"":
    this.Navmodalnames(e,6,"board",item.main_id)}>添加目录
    :""} + {item.type==="board"?this.props.current_user&&this.props.current_user.course_is_end===true?"":
    this.Navmodalnames(e,6,"board",item.main_id)}>新建目录
    :""} {/*分班*/} - {item.type==="course_group"?this.props.current_user&&this.props.current_user.course_is_end===true?"":
    this.Navmodalnames(e,2,"course_group",item.id)}>添加分班
    :""} + {item.type==="course_group"?this.props.current_user&&this.props.current_user.course_is_end===true?"":
    this.Navmodalnames(e,2,"course_group",item.id)}>新建分班
    :""} {/*分班*/} {/*{item.type==="course_group"? :""}*/}
    this.Navmodalnames(e,3,"editname",item.id,item.name)}>重命名
    diff --git a/public/react/src/modules/courses/poll/Poll.js b/public/react/src/modules/courses/poll/Poll.js index 2831611c5..45bbc184f 100644 --- a/public/react/src/modules/courses/poll/Poll.js +++ b/public/react/src/modules/courses/poll/Poll.js @@ -75,7 +75,7 @@ class Poll extends Component{ selectBlank=(type)=>{ if(type===2){ this.setState({ - addname:"添加目录", + addname:"新建目录", addnametype:true, addnametab:type, addcanner:this.homeworkhide, diff --git a/public/react/src/modules/courses/publicNav/listNav.js b/public/react/src/modules/courses/publicNav/listNav.js index dba39b37c..c980e693f 100644 --- a/public/react/src/modules/courses/publicNav/listNav.js +++ b/public/react/src/modules/courses/publicNav/listNav.js @@ -74,7 +74,7 @@ class ListNav extends Component{

    资源列表

  • - 添加目录 + 新建目录 导入资源 上传资源
  • diff --git a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js index 88d143011..4a985a2b6 100644 --- a/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js +++ b/public/react/src/modules/courses/shixunHomework/ShixunhomeWorkItem.js @@ -304,8 +304,8 @@ class ShixunhomeWorkItem extends Component{
    + {this.props.isAdmin?this.stopPro(event)} className={this.props.isAdminOrCreator()?"homepagePostSetting homepagePostSettingname":"homepagePostSetting homepagePostSettingbox"} style={{"right":"-2px","top":"6px","display":"block"}}> + 实训详情 + {this.props.isAdminOrCreator()?this.editname(discussMessage.name,discussMessage.homework_id,event)} className={"btn colorblue ml20 font-16"}>重命名:""} + {/* 设置*/} + 设置 + :""} + + + {this.props.isStudent===true?this.props.course_identity===5? + + {startbtn===false? + (discussMessage.task_operation[0] == '继续挑战' || discussMessage.task_operation[0] == '查看实战' ? + + {discussMessage.task_operation[0]} + + : + this.taskoperationId(discussMessage.task_operation[1])}> + {discussMessage.task_operation[0]} + ):开启中} + :"":"" + }
    -

    - +

    + {/* {discussMessage.author.name} */} { discussMessage.author && {discussMessage.author} } {discussMessage.commit_count===undefined?"":已开始做题 {discussMessage.commit_count}人} @@ -381,7 +414,7 @@ class ShixunhomeWorkItem extends Component{ { discussMessage && discussMessage.upper_category_name && 22 }> - { {discussMessage.upper_category_name}} + {

    所属目录:{discussMessage.upper_category_name}
    } } @@ -396,39 +429,6 @@ class ShixunhomeWorkItem extends Component{

    - - {this.props.isAdmin?
    this.stopPro(event)} className={this.props.isAdminOrCreator()?"homepagePostSetting homepagePostSettingname":"homepagePostSetting homepagePostSettingbox"} style={{"right":"-2px","top":"46px","display":"block"}}> - 实训详情 - {this.props.isAdminOrCreator()?this.editname(discussMessage.name,discussMessage.homework_id,event)} className={"btn colorblue ml20 font-16"}>重命名:""} - {/* 设置*/} - 设置 -
    :""} - - - {this.props.isStudent===true?this.props.course_identity===5? - - {startbtn===false? - (discussMessage.task_operation[0] == '继续挑战' || discussMessage.task_operation[0] == '查看实战' ? - - {discussMessage.task_operation[0]} - - : - this.taskoperationId(discussMessage.task_operation[1])}> - {discussMessage.task_operation[0]} - ):开启中} - :"":"" - }
    diff --git a/public/react/src/modules/courses/shixunHomework/shixunHomework.js b/public/react/src/modules/courses/shixunHomework/shixunHomework.js index cbfdaf72b..5124bdd58 100644 --- a/public/react/src/modules/courses/shixunHomework/shixunHomework.js +++ b/public/react/src/modules/courses/shixunHomework/shixunHomework.js @@ -1152,7 +1152,7 @@ class ShixunHomework extends Component{ {this.props.isAdmin()===true?datas&&datas.category_name===undefined||datas&&datas.category_name===null? - this.addDir()} className={"mr30 font-16"}>添加目录 + this.addDir()} className={"mr30 font-16"}>新建目录 {/*this.editname(datas&&datas.main_category_name)} className={"mr30"}>目录重命名*/} : this.editDir(datas&&datas.category_name)} className={"mr30 font-16"}>目录重命名:""} @@ -1252,7 +1252,7 @@ class ShixunHomework extends Component{ {this.props.isAdmin()?datas&&datas.category_name===undefined||datas&&datas.category_name===null?

    - this.addDir()}>添加目录... + this.addDir()}>新建目录...

    :"":""} diff --git a/public/react/src/modules/login/LoginDialog.js b/public/react/src/modules/login/LoginDialog.js index 3f5afd845..552e8765e 100644 --- a/public/react/src/modules/login/LoginDialog.js +++ b/public/react/src/modules/login/LoginDialog.js @@ -541,7 +541,7 @@ class LoginDialog extends Component { if (isRender === undefined) { isRender = false } - console.log(this.props) + // console.log(this.props) return (