|
|
@ -9,6 +9,7 @@ import Modals from '../../modals/Modals';
|
|
|
|
import SendTopics from '../../modals/SendTopics'
|
|
|
|
import SendTopics from '../../modals/SendTopics'
|
|
|
|
import NoneData from '../../courses/coursesPublic/NoneData';
|
|
|
|
import NoneData from '../../courses/coursesPublic/NoneData';
|
|
|
|
import "./usersInfo.css";
|
|
|
|
import "./usersInfo.css";
|
|
|
|
|
|
|
|
import Withoutpermission from './Withoutpermission.png';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -24,12 +25,23 @@ class InfosTopics extends Component{
|
|
|
|
page:1,
|
|
|
|
page:1,
|
|
|
|
data:undefined,
|
|
|
|
data:undefined,
|
|
|
|
checkBoxValues:[],
|
|
|
|
checkBoxValues:[],
|
|
|
|
per_page:15
|
|
|
|
per_page:15,
|
|
|
|
|
|
|
|
isshowprofes:false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
componentDidMount(){
|
|
|
|
componentDidMount(){
|
|
|
|
this.updataslist()
|
|
|
|
let types=this.props.match.params.topicstype;
|
|
|
|
|
|
|
|
let professional_certification=this.props.current_user&&this.props.current_user.professional_certification;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
console.log(professional_certification)
|
|
|
|
|
|
|
|
if(professional_certification===false&&types==="publicly"){
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
isshowprofes:true
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.updataslist()
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
updataslist=()=>{
|
|
|
|
updataslist=()=>{
|
|
|
|
let types=this.props.match.params.topicstype;
|
|
|
|
let types=this.props.match.params.topicstype;
|
|
|
@ -211,9 +223,15 @@ class InfosTopics extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sendTopics=()=>{
|
|
|
|
sendTopics=()=>{
|
|
|
|
this.setState({
|
|
|
|
let {checkBoxValues}=this.state;
|
|
|
|
visible:true
|
|
|
|
if(checkBoxValues.length===0){
|
|
|
|
})
|
|
|
|
this.props.showNotification("请选择题库")
|
|
|
|
|
|
|
|
}else{
|
|
|
|
|
|
|
|
this.setState({
|
|
|
|
|
|
|
|
visible:true
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
render(){
|
|
|
|
render(){
|
|
|
|
let{
|
|
|
|
let{
|
|
|
@ -226,7 +244,8 @@ class InfosTopics extends Component{
|
|
|
|
sort_by,
|
|
|
|
sort_by,
|
|
|
|
checkBoxValues,
|
|
|
|
checkBoxValues,
|
|
|
|
Modalstype,
|
|
|
|
Modalstype,
|
|
|
|
visible
|
|
|
|
visible,
|
|
|
|
|
|
|
|
isshowprofes
|
|
|
|
} = this.state;
|
|
|
|
} = this.state;
|
|
|
|
|
|
|
|
|
|
|
|
let categorylist=[
|
|
|
|
let categorylist=[
|
|
|
@ -240,7 +259,7 @@ class InfosTopics extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
let types=this.props.match.params.topicstype;
|
|
|
|
let types=this.props.match.params.topicstype;
|
|
|
|
|
|
|
|
|
|
|
|
console.log(Modalstype)
|
|
|
|
console.log(isshowprofes)
|
|
|
|
|
|
|
|
|
|
|
|
//types===publicly 公共
|
|
|
|
//types===publicly 公共
|
|
|
|
//types===personal 私有
|
|
|
|
//types===personal 私有
|
|
|
@ -276,7 +295,10 @@ class InfosTopics extends Component{
|
|
|
|
{
|
|
|
|
{
|
|
|
|
visible&&visible===true?
|
|
|
|
visible&&visible===true?
|
|
|
|
<SendTopics
|
|
|
|
<SendTopics
|
|
|
|
|
|
|
|
{...this.state}
|
|
|
|
|
|
|
|
{...this.props}
|
|
|
|
visible={visible}
|
|
|
|
visible={visible}
|
|
|
|
|
|
|
|
updataslist={()=>this.updataslist()}
|
|
|
|
topicscancelmodel={()=>this.topicscancelmodel()}
|
|
|
|
topicscancelmodel={()=>this.topicscancelmodel()}
|
|
|
|
/>:""
|
|
|
|
/>:""
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -320,40 +342,65 @@ class InfosTopics extends Component{
|
|
|
|
|
|
|
|
|
|
|
|
<Spin size="large" spinning={isSpin}>
|
|
|
|
<Spin size="large" spinning={isSpin}>
|
|
|
|
<div className="clearfix topicsbox">
|
|
|
|
<div className="clearfix topicsbox">
|
|
|
|
<div className={"topcschild"}>
|
|
|
|
{types==="publicly"?<div className={"topcschild"}>
|
|
|
|
|
|
|
|
<a className={types==="personal"?"topicstopfont fr topcsactive":"topicstopfont fr"}
|
|
|
|
|
|
|
|
href={`/users/innov/topics/personal`}>个人题库</a>
|
|
|
|
|
|
|
|
<a className={types==="publicly"?"topicstopfont fl topcsactive":"topicstopfont fl"}
|
|
|
|
|
|
|
|
href={`/users/innov/topics/publicly`}
|
|
|
|
|
|
|
|
>公共题库</a>
|
|
|
|
|
|
|
|
</div>:<div className={"topcschild"}>
|
|
|
|
<a className={types==="personal"?"topicstopfont fl topcsactive":"topicstopfont fl"}
|
|
|
|
<a className={types==="personal"?"topicstopfont fl topcsactive":"topicstopfont fl"}
|
|
|
|
href={`/users/innov/topics/personal`}>我的题库</a>
|
|
|
|
href={`/users/innov/topics/personal`}>我的题库</a>
|
|
|
|
<a className={types==="publicly"?"topicstopfont fr topcsactive":"topicstopfont fr"}
|
|
|
|
<a className={types==="publicly"?"topicstopfont fr topcsactive":"topicstopfont fr"}
|
|
|
|
href={`/users/innov/topics/publicly`}
|
|
|
|
href={`/users/innov/topics/publicly`}
|
|
|
|
>公共题库</a>
|
|
|
|
>公共题库</a>
|
|
|
|
</div>
|
|
|
|
</div>}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<div className={"topcsmid"}>
|
|
|
|
|
|
|
|
{categorylist.map((item,key)=>{
|
|
|
|
|
|
|
|
return(
|
|
|
|
|
|
|
|
<span key={key} className={category===item.type?"topicsmidfont fl mr38 topcsactive":"topicsmidfont fl mr38"} onClick={()=>this.searchCategory(item.type)}>{item.val}</span>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
})}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
{isshowprofes===false?
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
|
|
|
|
<div className={"shaiContent"}>
|
|
|
|
<div className={"topcsmid"}>
|
|
|
|
<div className="fl pr topicsItem pagetype mb20">
|
|
|
|
{categorylist.map((item,key)=>{
|
|
|
|
<li className={course_list_id===undefined?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} onClick={()=>this.searchCourselistid(undefined)}>全部</li>
|
|
|
|
|
|
|
|
{data===undefined?"":data.course_list===undefined||data.course_list.length===0?"":data.course_list.map((item,key)=>{
|
|
|
|
|
|
|
|
return(
|
|
|
|
return(
|
|
|
|
<li key={key} className={course_list_id===item.id?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} onClick={()=>this.searchCourselistid(item.id)}>{item.name}</li>
|
|
|
|
<span key={key} className={category===item.type?"topicsmidfont fl mr38 topcsactive":"topicsmidfont fl mr38"} onClick={()=>this.searchCategory(item.type)}>{item.val}</span>
|
|
|
|
)
|
|
|
|
)
|
|
|
|
})}
|
|
|
|
})}
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div className={"shaiContent"}>
|
|
|
|
|
|
|
|
<div className="fl pr topicsItem pagetype mb20">
|
|
|
|
|
|
|
|
<li className={course_list_id===undefined?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} onClick={()=>this.searchCourselistid(undefined)}>全部</li>
|
|
|
|
|
|
|
|
{data===undefined?"":data.course_list===undefined||data.course_list.length===0?"":data.course_list.map((item,key)=>{
|
|
|
|
|
|
|
|
return(
|
|
|
|
|
|
|
|
<li key={key} className={course_list_id===item.id?"shaiItem shixun_repertoire active":"shaiItem shixun_repertoire"} onClick={()=>this.searchCourselistid(item.id)}>{item.name}</li>
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
})}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>:<div className={"professional_certificationbox"}>
|
|
|
|
|
|
|
|
<p className="clearfix ">
|
|
|
|
|
|
|
|
<div className={"stud-class-set pd115200 coursenavbox edu-back-white"}>
|
|
|
|
|
|
|
|
<div className={"sumbtongs mb10"}><img className={"topicsItemimg"} src={Withoutpermission}/></div>
|
|
|
|
|
|
|
|
<div className={"terraces mb5 topicsItemfont"}>通过职业认证的教师才能访问公共题库</div>
|
|
|
|
|
|
|
|
<div className="clearfix mt30 mb30 padding251">
|
|
|
|
|
|
|
|
<a className="defalutSubmitbtn fl ml60 defalutSubmitbtns" target="_blank" href="/account/certification">立即认证</a>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
</div>}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div className="clearfix font-12 mt20">
|
|
|
|
{isshowprofes===false?<div className="clearfix font-12 mt20">
|
|
|
|
<p className="font-12 alltopisc ml25 fl">
|
|
|
|
<p className="font-12 alltopisc ml25 fl">
|
|
|
|
<span className="fl color-grey-9">共 <span className={"color-orange"}>{data&&data.count}</span> 个</span>
|
|
|
|
<span className="fl color-grey-9">共 <span className={"color-orange"}>{data&&data.count===undefined?0:data&&data.count}</span> 个</span>
|
|
|
|
<span className="fr color-grey-9">已选择 <span className={"color-orange"}>{checkBoxValues.length}</span> 个 (不支持跨页勾选)</span>
|
|
|
|
<span className="fr color-grey-9">已选择 <span className={"color-orange"}>{checkBoxValues.length}</span> 个 (不支持跨页勾选)</span>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
<p className="font-12 alltopiscright ml25 fr">
|
|
|
|
<p className="font-12 alltopiscright ml25 fr">
|
|
|
@ -371,10 +418,10 @@ class InfosTopics extends Component{
|
|
|
|
{user_type!="学生"?<span className="fr mr30 topcsactive pointer" onClick={()=>this.sendTopics()}>发送</span>:""}
|
|
|
|
{user_type!="学生"?<span className="fr mr30 topcsactive pointer" onClick={()=>this.sendTopics()}>发送</span>:""}
|
|
|
|
{types==="personal"?user_id===targetuserid&&user_type!="学生"?<span className="fr mr30 topcsactive pointer" onClick={()=>this.deletecheckBoxValues()}>删除</span>:"":""}
|
|
|
|
{types==="personal"?user_id===targetuserid&&user_type!="学生"?<span className="fr mr30 topcsactive pointer" onClick={()=>this.deletecheckBoxValues()}>删除</span>:"":""}
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>:""}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{data===undefined?<NoneData></NoneData>:data.question_banks===undefined||data.question_banks.length===0?<NoneData></NoneData>:
|
|
|
|
{isshowprofes===true?"":data===undefined?<NoneData></NoneData>:data.question_banks===undefined||data.question_banks.length===0?<NoneData></NoneData>:
|
|
|
|
<Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}>
|
|
|
|
<Checkbox.Group style={{ width: '100%' }} onChange={this.onCheckBoxChange} value={checkBoxValues}>
|
|
|
|
{data.question_banks.map((item,key)=>{
|
|
|
|
{data.question_banks.map((item,key)=>{
|
|
|
|
return(
|
|
|
|
return(
|
|
|
@ -417,7 +464,7 @@ class InfosTopics extends Component{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
{
|
|
|
|
{
|
|
|
|
data&&data.count >15 &&
|
|
|
|
isshowprofes===true?"":data&&data.count >15 &&
|
|
|
|
<div className="mt30 mb50 edu-txt-center">
|
|
|
|
<div className="mt30 mb50 edu-txt-center">
|
|
|
|
<Pagination showQuickJumper total={data&&data.count} onChange={this.changePage} pageSize={15} current={page}/>
|
|
|
|
<Pagination showQuickJumper total={data&&data.count} onChange={this.changePage} pageSize={15} current={page}/>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|