个人题库完善

dev_aliyun_beta
杨树明 6 years ago
parent 72282980a1
commit 3c322a38c3

@ -117,7 +117,8 @@ class InfosTopics extends Component{
category, category,
course_list_id, course_list_id,
isSpin, isSpin,
data data,
page
} = this.state; } = this.state;
let categorylist=[ let categorylist=[
@ -128,9 +129,53 @@ class InfosTopics extends Component{
{val:"试卷",type:"exercise"}, {val:"试卷",type:"exercise"},
{val:"问卷",type:"poll"}, {val:"问卷",type:"poll"},
] ]
let types=this.props.match.params.topicstype;
console.log(types)
//types===publicly 公共
//types===personal 私有
return( return(
<div className="educontent mb50"> <div className="educontent mb50">
{/*提示*/} {/*提示*/}
<style>
{
`
.shaiContent li.shaiItem {
padding: 3px 15px;
float: left;
border-radius: 4px;
color: #4C4C4C;
cursor: pointer;
margin-right: 20px;
display: block;
margin-bottom: 5px;
}
.mr38{
margin-right:38px;
}
.maxwidth900{
max-width: 900px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap
}
.homepagePostSettingname{
width:192px !important;
}
.homepagePostSettingbox{
width:139px !important;
}
`
}
</style>
<Modals <Modals
modalsType={this.state.Modalstype} modalsType={this.state.Modalstype}
modalsTopval={this.state.Modalstopval} modalsTopval={this.state.Modalstopval}
@ -148,30 +193,14 @@ class InfosTopics extends Component{
<div className={"topcsmid"}> <div className={"topcsmid"}>
{categorylist.map((item,key)=>{ {categorylist.map((item,key)=>{
return( return(
<span key={key} className={category===item.type?"topicsmidfont fl mr20 topcsactive":"topicsmidfont fl mr20"} onClick={()=>this.searchCategory(item.type)}>{item.val}</span> <span key={key} className={category===item.type?"topicsmidfont fl mr38 topcsactive":"topicsmidfont fl mr38"} onClick={()=>this.searchCategory(item.type)}>{item.val}</span>
) )
})} })}
</div> </div>
<style>
{
`
.shaiContent li.shaiItem {
padding: 3px 15px;
float: left;
border-radius: 4px;
color: #4C4C4C;
cursor: pointer;
margin-right: 20px;
display: block;
margin-bottom: 5px;
}
`
}
</style>
<div className={"shaiContent"}> <div className={"shaiContent"}>
<div className="fl pr shaiAllItem pagetype mb20"> <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> <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)=>{ {data===undefined?"":data.course_list===undefined||data.course_list.length===0?"":data.course_list.map((item,key)=>{
return( return(
@ -191,35 +220,28 @@ class InfosTopics extends Component{
<p className="font-12 alltopiscright ml25 fr"> <p className="font-12 alltopiscright ml25 fr">
<span className="fr color-grey-9 mr10">最近更新</span> <span className="fr color-grey-9 mr10">最近更新</span>
<span className="fr mr30 topcsactive">发送</span> <span className="fr mr30 topcsactive">发送</span>
<span className="fr mr30 topcsactive">删除</span> {types==="personal"?<span className="fr mr30 topcsactive">删除</span>:""}
</p> </p>
</div> </div>
{data===undefined?<NoneData></NoneData>:data.question_banks===undefined||data.question_banks.length===0?<NoneData></NoneData>:data.question_banks.map((item,key)=>{ {data===undefined?<NoneData></NoneData>:data.question_banks===undefined||data.question_banks.length===0?<NoneData></NoneData>:data.question_banks.map((item,key)=>{
return( return(
<div className="mt20 edu-back-white pd1323" key={key} > <div className="mt20 edu-back-white pd1323 relativef" key={key} >
<div className="clearfix"> <div className="clearfix">
{/*id: 4269*/} {/*id: 4269*/}
<div className="item-body"> <div className="item-body">
<div className="clearfix ds pr pt5 contentSection" > <div className="clearfix ds pr pt5 contentSection" >
<style>{`
.maxwidth580{
max-width: 580px;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap
}
`}
</style>
<a title={item.name} className="fl mt3 font-16 color-dark maxwidth580"> <a title={item.name} className="fl mt3 font-16 color-dark maxwidth580">
{item.name} {item.name}
</a> </a>
{item.is_public===true?<span className="edu-filter-btn ml15 fl typestyle mt7 topiscfilterbtn">公开</span>:""} {item.is_public===false?<span className="edu-filter-btn ml15 fl typestyle mt7 topiscfilterbtn">公开</span>:""}
{types==="personal"&&item.is_public===false?<a className="btn colorblue mr25 fr font-16">设为公开</a>:""}
<div className="cl"></div> <div className="cl"></div>
@ -232,23 +254,9 @@ class InfosTopics extends Component{
<span className="topicsbtn">{item.course_list_name}</span> <span className="topicsbtn">{item.course_list_name}</span>
</p> </p>
<style> <div className="homepagePostSetting homepagePostSettingname topscisright">
{ {types==="personal"?<a className="btn colorblue mr25 font-16 fr">编辑</a>:""}
` </div>
.homepagePostSettingname{
width:192px !important;
}
.homepagePostSettingbox{
width:139px !important;
}
`
}
</style>
{/*<div className={"homepagePostSetting homepagePostSettingname"} style={{"right":"-2px","top":"44px","display":"block"}}>*/}
{/*<a className="btn colorblue font-16" target={"_blank"}>实训详情</a>*/}
{/*</div>*/}
</div> </div>
</div> </div>

@ -339,4 +339,12 @@
border-radius: 5px; border-radius: 5px;
border: 1px solid #4CACFF !important; border: 1px solid #4CACFF !important;
line-height: 23px !important; line-height: 23px !important;
} }
.topscisright{
right: -2px;
top: 50px;
display: block;
position: absolute;
}

Loading…
Cancel
Save