dev_cs
杨树明 6 years ago
parent 737209285f
commit 0a1b2ee2a6

@ -10,6 +10,7 @@ class NewShixunModel extends Component{
diff:0, diff:0,
shixun_list:undefined, shixun_list:undefined,
shixuns_count:undefined, shixuns_count:undefined,
Grouplist:[],
} }
} }
componentDidMount() { componentDidMount() {
@ -68,13 +69,19 @@ class NewShixunModel extends Component{
})} })}
</Menu> </Menu>
} }
getGrouplist=(Grouplist)=>{
this.setState({
Grouplist: Grouplist,
})
}
render() { render() {
let {diff,datas,shixun_list,shixuns_count}=this.state; let {diff,Grouplist,shixun_list,shixuns_count}=this.state;
// let {visible,patheditarry}=this.props; // let {visible,patheditarry}=this.props;
const menus = ( const menus = (
<Menu> <Menu className="menus">
<Menu.Item> <Menu.Item>
<a onClick={()=>this.DropdownClick(0)}> <a onClick={()=>this.DropdownClick(0)}>
所有 所有
@ -184,6 +191,9 @@ class NewShixunModel extends Component{
{/*subjects: [{id: 138, name: "C语言程序设计"}, {id: 180, name: "C语言程序设计湖南师范大学"}, {id: 211, name: "移动云启 —— C语言练习题库"}]*/} {/*subjects: [{id: 138, name: "C语言程序设计"}, {id: 180, name: "C语言程序设计湖南师范大学"}, {id: 211, name: "移动云启 —— C语言练习题库"}]*/}
{/*title: "C语言程序设计编辑与调试环境"*/} {/*title: "C语言程序设计编辑与调试环境"*/}
{/*visits_count: 9419*/} {/*visits_count: 9419*/}
<Checkbox.Group onChange={()=>this.getGrouplist()} value={Grouplist}>
{shixun_list===undefined?"":shixun_list.length===0?"":shixun_list.map((item,key)=>{ {shixun_list===undefined?"":shixun_list.length===0?"":shixun_list.map((item,key)=>{
console.log(item.content) console.log(item.content)
return( return(
@ -191,13 +201,24 @@ class NewShixunModel extends Component{
<div className="clearfix"> <div className="clearfix">
<div className="item-body"> <div className="item-body">
<div className="clearfix ds pr contentSection"> <div className="clearfix ds pr contentSection">
<a title={item.title} className="ml30 fl font-16 color-dark maxwidth900"> <Checkbox
value={item.id}
key={item.id}
className="fl task-hide edu-txt-left"
name="shixun_homework[]"
></Checkbox>
<a title={item.title} className="ml15 fl font-16 color-dark maxwidth900">
{item.title} {item.title}
</a> </a>
<div className="cl"></div> <div className="cl"></div>
<p className="newshixunmodelmidfont"> <p className="newshixunmodelmidfont">
{/*{item.content}*/} {/*{item.content}*/}
{item.challenge_names.map((item,key)=>{
return(
<span>{item}</span>
)
})}
</p> </p>
<p className="newshixunmodelbotfont"> <p className="newshixunmodelbotfont">
@ -249,7 +270,7 @@ class NewShixunModel extends Component{
</div> </div>
)}) )})
} }
</Checkbox.Group>
{shixun_list===undefined?"":shixuns_count>15?<div className={" edu-txt-center pd303010"}> {shixun_list===undefined?"":shixuns_count>15?<div className={" edu-txt-center pd303010"}>
<Pagination <Pagination

@ -204,3 +204,13 @@
.inherits .ant-dropdown-menu-item{ .inherits .ant-dropdown-menu-item{
cursor: inherit !important; cursor: inherit !important;
} }
.menus{
width: 91px;
text-align: center;
}
.newshixunmodelbotfont span{
display: inline-block;
margin-right: 34px;
}
Loading…
Cancel
Save