hjm 6 years ago
parent f61bcfb0b6
commit c4756cde67

@ -383,12 +383,12 @@ class Comments extends Component {
{/* <span className="ml5 mr5 color-grey-8">|</span>*/} {/* <span className="ml5 mr5 color-grey-8">|</span>*/}
<a href={`javascript:void(0)`} className="color-grey-8" {(this.props.showReply == undefined || this.props.showReply == true) && <a href={`javascript:void(0)`} className="color-grey-8"
onClick={() => this.initReply(item) } > onClick={() => this.initReply(item) } >
<Tooltip title={ "回复" }> <Tooltip title={ "回复" }>
<i className="iconfont icon-huifu1 mr5"></i> <i className="iconfont icon-huifu1 mr5"></i>
</Tooltip> </Tooltip>
</a> </a>}
{/* <span className="ml5 mr5 color-grey-8">|</span>*/} {/* <span className="ml5 mr5 color-grey-8">|</span>*/}

@ -527,6 +527,7 @@ class TopicDetail extends Component {
// TODO 图片上传地址 // TODO 图片上传地址
const courseId=this.props.match.params.coursesId; const courseId=this.props.match.params.coursesId;
const boardId = this.props.match.params.boardId const boardId = this.props.match.params.boardId
const isCourseEnd = this.props.isCourseEnd()
return ( return (
<div className="edu-back-white edu-class-container edu-position course-message topicDetail" id="yslforum_index_list"> {/* fl with100 */} <div className="edu-back-white edu-class-container edu-position course-message topicDetail" id="yslforum_index_list"> {/* fl with100 */}
<style>{` <style>{`
@ -678,8 +679,8 @@ class TopicDetail extends Component {
} }
</div> </div>
<MemoDetailMDEditor ref="editor" memo={memo} usingMockInput={true} placeholder="说点什么" {!isCourseEnd && <MemoDetailMDEditor ref="editor" memo={memo} usingMockInput={true} placeholder="说点什么"
height={160} showError={true} buttonText={'发表'} className={comments && comments.length && 'borderBottom'}></MemoDetailMDEditor> height={160} showError={true} buttonText={'发表'} className={comments && comments.length && 'borderBottom'}></MemoDetailMDEditor>}
{/* onClick={ this.createNewComment } {/* onClick={ this.createNewComment }
enableReplyTo={true} enableReplyTo={true}
@ -704,6 +705,7 @@ class TopicDetail extends Component {
loadMoreChildComments={this.loadMoreChildComments} loadMoreChildComments={this.loadMoreChildComments}
initReply={this.initReply} initReply={this.initReply}
showRewardButton={false} showRewardButton={false}
showReply={!isCourseEnd}
onlySuperAdminCouldHide={true} onlySuperAdminCouldHide={true}
></Comments> ></Comments>
@ -720,7 +722,7 @@ class TopicDetail extends Component {
{ total_count > REPLY_PAGE_COUNT && { total_count > REPLY_PAGE_COUNT &&
<Pagination showQuickJumper onChange={this.onPaginationChange} current={pageCount} total={total_count} pageSize={10}/> <Pagination showQuickJumper onChange={this.onPaginationChange} current={pageCount} total={total_count} pageSize={10}/>
} }
<div className="writeCommentBtn" onClick={this.showCommentInput}>写评论</div> {!isCourseEnd && <div className="writeCommentBtn" onClick={this.showCommentInput}>写评论</div>}
</div> </div>
</div> </div>

@ -327,6 +327,7 @@ class Boards extends Component{
} }
render(){ render(){
const isAdmin = this.props.isAdmin() const isAdmin = this.props.isAdmin()
const isCourseEnd = this.props.isCourseEnd()
const isAdminOrStudent = this.props.isAdminOrStudent() const isAdminOrStudent = this.props.isAdminOrStudent()
let { boardName, searchValue, boards, messages, checkBoxValues, let { boardName, searchValue, boards, messages, checkBoxValues,
checkAllValue, pagination, sort_type, parent_id } = this.state; checkAllValue, pagination, sort_type, parent_id } = this.state;
@ -350,9 +351,9 @@ class Boards extends Component{
searchPlaceholder={ '请输入帖子名称进行搜索' } searchPlaceholder={ '请输入帖子名称进行搜索' }
firstRowRight={ firstRowRight={
<React.Fragment> <React.Fragment>
{ isAdmin && !parent_id && <WordsBtn style="blue" className="mr30" onClick={()=>this.addDir()}>添加目录</WordsBtn> } { !isCourseEnd && isAdmin && !parent_id && <WordsBtn style="blue" className="mr30" onClick={()=>this.addDir()}>添加目录</WordsBtn> }
{ isAdmin && !!parent_id && <WordsBtn style="blue" className="mr30" onClick={()=>this.renameDir()}>目录重命名</WordsBtn> } { isAdmin && !!parent_id && <WordsBtn style="blue" className="mr30" onClick={()=>this.renameDir()}>目录重命名</WordsBtn> }
{ isAdminOrStudent && <WordsBtn style="blue" className="" onClick={()=>this.onToBoardsNew()}>我要发贴</WordsBtn> } { !isCourseEnd && isAdminOrStudent && <WordsBtn style="blue" className="" onClick={()=>this.onToBoardsNew()}>我要发贴</WordsBtn> }
</React.Fragment> </React.Fragment>
} }
secondRowLeft={ secondRowLeft={

@ -426,7 +426,7 @@ class CoursesBanner extends Component {
render() { render() {
let { Addcoursestypes, coursedata,excellent, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,is_guide,AccountProfiletype} = this.state; let { Addcoursestypes, coursedata,excellent, modalsType, modalsTopval, loadtype,modalsBottomval,antIcon,is_guide,AccountProfiletype} = this.state;
const isCourseEnd = this.props.isCourseEnd()
return ( return (
<div> <div>
{ {
@ -714,24 +714,24 @@ class CoursesBanner extends Component {
position: "relative" position: "relative"
}} }}
> >
<li className={"mt7 mr10im"}> {!isCourseEnd && <li className={"mt7 mr10im"}>
<a onClick={()=>this.addTeacher(true)}> <a onClick={()=>this.addTeacher(true)}>
<span className="color-white fl font-16 bannerurli width100f">添加老师</span> <span className="color-white fl font-16 bannerurli width100f">添加老师</span>
</a> </a>
</li> </li>}
<li className={"mt7 mr10im"}> {!isCourseEnd && <li className={"mt7 mr10im"}>
<a onClick={()=>this.addTeacher(false)}> <a onClick={()=>this.addTeacher(false)}>
<span className="color-white fl font-16 bannerurli width100f">添加助教</span> <span className="color-white fl font-16 bannerurli width100f">添加助教</span>
</a> </a>
</li> </li>}
<li className={"mt7 mr10im"}> {!isCourseEnd && <li className={"mt7 mr10im"}>
<a onClick={()=>this.addStudent()}> <a onClick={()=>this.addStudent()}>
<span className={"color-white fl font-16 bannerurli width100f"}>添加学生</span> <span className={"color-white fl font-16 bannerurli width100f"}>添加学生</span>
</a> </a>
</li> </li>}
{excellent===false? {excellent===false?
<li className={"mt7 mr10im ml10"} style={{overflow:"hidden"}}> <li className={"mt7 mr10im ml10"} style={{overflow:"hidden"}}>
<a> <a>

@ -497,6 +497,7 @@ class studentsList extends Component{
render(){ render(){
const isAdmin = this.props.isAdmin() const isAdmin = this.props.isAdmin()
const isSuperAdmin = this.props.isSuperAdmin() const isSuperAdmin = this.props.isSuperAdmin()
const isCourseEnd = this.props.isCourseEnd()
let { let {
page, page,
@ -591,7 +592,7 @@ class studentsList extends Component{
></CreateGroupByImportModal> ></CreateGroupByImportModal>
<WordsBtn style="blue" className="mr30" onClick={()=> this.refs['createGroupByImportModal'].setVisible(true)}>导入创建分班</WordsBtn> <WordsBtn style="blue" className="mr30" onClick={()=> this.refs['createGroupByImportModal'].setVisible(true)}>导入创建分班</WordsBtn>
</React.Fragment> } </React.Fragment> }
{ isAdmin && isParent && <WordsBtn style="blue" className="mr30" onClick={()=>this.addDir()}>添加分班</WordsBtn> } { !isCourseEnd && isAdmin && isParent && <WordsBtn style="blue" className="mr30" onClick={()=>this.addDir()}>添加分班</WordsBtn> }
{ isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.deleteDir()}>删除分班</WordsBtn> } { isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.deleteDir()}>删除分班</WordsBtn> }
{ isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.renameDir()}>分班重命名</WordsBtn> } { isAdmin && !isParent && course_group_id != 0 && <WordsBtn style="blue" className="mr30" onClick={()=>this.renameDir()}>分班重命名</WordsBtn> }
<style>{` <style>{`

@ -244,6 +244,10 @@ export function TPMIndexHOC(WrappedComponent) {
return this.state.coursedata&&this.state.coursedata.course_identity >= 6 return this.state.coursedata&&this.state.coursedata.course_identity >= 6
} }
isCourseEnd = () => {
return this.state.current_user ? this.state.current_user.course_is_end : false
}
// setTrialapplication = ()=>{ // setTrialapplication = ()=>{
// this.setState({ // this.setState({
// isRenders:true // isRenders:true
@ -411,6 +415,8 @@ export function TPMIndexHOC(WrappedComponent) {
isStudent: this.isStudent, isStudent: this.isStudent,
isAdminOrStudent: this.isAdminOrStudent, isAdminOrStudent: this.isAdminOrStudent,
isNotMember: this.isNotMember, isNotMember: this.isNotMember,
isCourseEnd: this.isCourseEnd,
isUserid:this.state.coursedata&&this.state.coursedata.userid, isUserid:this.state.coursedata&&this.state.coursedata.userid,
fetchUser: this.fetchUser, fetchUser: this.fetchUser,

Loading…
Cancel
Save