diff --git a/public/react/src/modules/question/component/Contentpart.js b/public/react/src/modules/question/component/Contentpart.js index e1d0f0bef..e01922af8 100644 --- a/public/react/src/modules/question/component/Contentpart.js +++ b/public/react/src/modules/question/component/Contentpart.js @@ -17,14 +17,17 @@ import NoneDatas from '../component/NoneDatas'; import LoadingSpin from '../../../common/LoadingSpin'; import Contentquestionbank from "./Contentquestionbank"; import Listjihe from "./Listjihe"; +import Certifiedprofessional from "../../modals/Certifiedprofessional"; const { TabPane } = Tabs; const Search = Input.Search; class Contentpart extends Component { constructor(props) { super(props); this.state = { - page: 1, - chakanjiexibool: false, + page:1, + chakanjiexibool:false, + mydisplay:false, + occupation:2, } } //初始化 @@ -52,7 +55,26 @@ class Contentpart extends Component { this.props.callback(defaultActiveKeys); } } + HideAddcoursestypess=(i)=>{ + console.log("调用了"); + this.setState({ + mydisplay:true, + occupation:i, + }) + } + + mydisplayHidedel=()=>{ + this.setState({ + mydisplay:false, + }) + } + xinzenw=(e)=>{ + //只限制了教师 + if(this.props.current_user.professional_certification===false){ + this.HideAddcoursestypess(2); + return + } var urls=""; if(this.props.discipline_id){ // if(urls==="?"){ @@ -95,7 +117,7 @@ class Contentpart extends Component { } render() { - let {page}=this.state; + let {page,mydisplay}=this.state; let {defaultActiveKey,item_type,booljupyterurls}=this.props; const defaultActiveKeys=defaultActiveKey+''; const isysladmins=this.props&&this.props.current_user&&this.props.current_user.admin?this.props.current_user.admin:false; @@ -136,12 +158,33 @@ class Contentpart extends Component { ); - //console.log("Contentpart.js"); - //console.log(this.props.defaultActiveKey); + // console.log("Contentpart.js"); + // console.log(this.props.current_user.professional_certification); return (
智能组卷
人工组卷
this.props.showmodels(items.id)}> - - 公开 -
- : - ( items.public==true? - "" - : -this.props.showmodelsInaudit(e)}> - - 公开审核中 +
+ + 已公开
- ) + : + items.apply===false? +this.props.showmodels(items.id)}> + + 公开 +
+ : +this.props.showmodelsInaudit(e)}> + + 公开审核中 +
}