chromesetting
杨树林 5 years ago
commit a455692b1b

@ -217,7 +217,8 @@ class MyshixunsController < ApplicationController
shixun_tomcat = edu_setting('tomcat_webssh')
uri = "#{shixun_tomcat}/bridge/webssh/getConnectInfo"
# 由于中间层采用混合云的方式因为local参数表示在有文件生成的实训是在本地生成还是在其他云端生成评测文件
params = {tpiID:@myshixun.id, podType:@myshixun.shixun.try(:webssh), local: @myshixun.shixun.show_type != -1,
local = @myshixun.shixun.challenges.where.not(show_type: -1).count == 0
params = {tpiID:@myshixun.id, podType:@myshixun.shixun.try(:webssh), local: local,
containers:(Base64.urlsafe_encode64(shixun_container_limit @myshixun.shixun))}
res = uri_post uri, params
if res && res['code'].to_i != 0

@ -19,7 +19,8 @@ class NewShixunModel extends Component{
order:'desc',
diff:0,
limit:15,
sort:"myshixuns_count"
sort:"myshixuns_count",
belongtoindex:0,
}
}
componentDidMount() {
@ -161,7 +162,17 @@ class NewShixunModel extends Component{
})
let{status,order,diff,limit,sort}=this.state;
if(this.props.type==='shixuns'){
this.getdatalist(1,value,status,undefined,order,diff,limit)
this.getdatalist(1,value,status,undefined,order,diff,limit);
if(value==="all"){
this.setState({
belongtoindex:0
})
}else{
this.setState({
belongtoindex:1
})
}
}else{
this.getdatalist(1,value,undefined,undefined,order,undefined,limit,undefined,sort)
}
@ -322,6 +333,7 @@ class NewShixunModel extends Component{
this.getdatalist(page,type,status,keyword,order,diff,limit)
}
updatepathlist=(sorts,orders)=>{
let{page,type,keyword,order,diff,limit,status,sort}=this.state;
let seartorders;
@ -352,7 +364,7 @@ class NewShixunModel extends Component{
}
render() {
let {diff,Grouplist,status,shixun_list,shixuns_count,page,type,order,sort}=this.state;
let {diff,Grouplist,status,shixun_list,shixuns_count,page,type,order,sort,belongtoindex}=this.state;
// let {visible,patheditarry}=this.props;
// console.log(Grouplist)
// console.log(allGrouplist)
@ -446,7 +458,7 @@ class NewShixunModel extends Component{
<Spin spinning={this.state.isspinning}>
<div className={"clearfix educontent pr mb60shixun"}>
<div className={"square-list clearfix"}>
<div className={"square-list clearfix verticallayout"}>
<div className="newshixunheadersear">
<div style={{height:"53px"}}></div>
@ -472,7 +484,36 @@ class NewShixunModel extends Component{
onSearch={ (value)=>this.setdatafuns(value)} />
</div>
<div className="clearfix font-12 mt30">
{this.props.type==='shixuns'?
<div className="clearfix sortinxdirection mt30 intermediatecenterysls">
<p className="nandu">筛选</p>
<p className={belongtoindex===0?"clickbutstwo ml13":"clickbutstwos ml13"} onClick={()=>this.belongto("all")}>全部实训</p>
<p className={belongtoindex===1?"clickbutstwo ml20":"clickbutstwos ml20"} onClick={()=>this.belongto("mine")}>普通实训</p>
</div>:""
}
{/*{this.props.type==='shixuns'? <Dropdown overlay={menus}>*/}
{/* <a className="ant-dropdown-link color-grey-6">*/}
{/* {diff===0?"难度":diff===1?"初级":diff===2?"中级":diff===3?"高级":diff===4?"顶级":""}<Icon type="down" className={"color-grey-6"}/>*/}
{/* </a>*/}
{/*</Dropdown>:""}*/}
{this.props.type==='shixuns'?
<div className="clearfix sortinxdirection mt20 intermediatecenterysls">
<p className="nandu">难度</p>
<p className={diff===0?"clickbuts ml13":"clickbutst ml13"} onClick={()=>this.DropdownClick(0)}>全部</p>
<p className={diff===1?"clickbuts ml30":"clickbutst ml30"} onClick={()=>this.DropdownClick(1)}>初级</p>
<p className={diff===2?"clickbuts ml30":"clickbutst ml30"} onClick={()=>this.DropdownClick(2)}>中级</p>
<p className={diff===3?"clickbuts ml30":"clickbutst ml30"} onClick={()=>this.DropdownClick(3)}>高级</p>
<p className={diff===4?"clickbuts ml30":"clickbutst ml30"} onClick={()=>this.DropdownClick(4)}>顶级</p>
</div>:""
}
<div className={this.props.type==='shixuns'?"clearfix font-12 mt20":"clearfix font-12 mt30"}>
<div className="font-12 ml5 fl">
@ -509,17 +550,18 @@ class NewShixunModel extends Component{
</a>
</Dropdown>:"":""}
{this.props.type==='shixuns'? <Dropdown overlay={menus}>
<a className="ant-dropdown-link color-grey-6">
{diff===0?"难度":diff===1?"初级":diff===2?"中级":diff===3?"高级":diff===4?"顶级":""}<Icon type="down" className={"color-grey-6"}/>
</a>
</Dropdown>:""}
</div>
<div className="font-12 alltopiscright ml25 fr">
{/*<span className={"fr pointer color-grey-3"} onClick={()=>this.props.hideNewShixunModelType()}>返回</span>*/}
<span className={type==="mine"?"fr topcsactive pointer color-grey-3 color-blue":"fr pointer color-grey-3"} onClick={()=>this.belongto("mine")}>我的{this.props.type==='shixuns'?'实训':"课程"}</span>
<span className={type==="all"?"fr mr30 topcsactive pointer color-grey-3 color-blue":"fr mr30 pointer color-grey-3"} onClick={()=>this.belongto("all")}>全部{this.props.type==='shixuns'?'实训':"课程"}</span>
<div className="font-12 alltopiscright ml25 fl">
{this.props.type==='shixuns'?"":
<span className={type==="mine"?"fr topcsactive pointer color-grey-3 color-blue":"fr pointer color-grey-3"} onClick={()=>this.belongto("mine")}>我的课程</span>
}
{this.props.type==='shixuns'?"":
<span className={type==="all"?"fr mr30 topcsactive pointer color-grey-3 color-blue":"fr mr30 pointer color-grey-3"} onClick={()=>this.belongto("all")}>全部课程</span>
}
</div>
</div>

@ -407,3 +407,110 @@
align-items: center;
justify-content: center;
}
/* 中间居中 */
.intermediatecenter{
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
/* 简单居中 */
.intermediatecenterysls{
display: flex;
align-items: center;
}
.spacearound{
display: flex;
justify-content: space-around;
}
.spacebetween{
display: flex;
justify-content: space-between;
}
/* 头顶部居中 */
.topcenter{
display: -webkit-flex;
flex-direction: column;
align-items: center;
}
/* x轴正方向排序 */
/* 一 二 三 四 五 六 七 八 */
.sortinxdirection{
display: flex;
flex-direction:row;
}
/* x轴反方向排序 */
/* 八 七 六 五 四 三 二 一 */
.xaxisreverseorder{
display: flex;
flex-direction:row-reverse;
}
/* 垂直布局 正方向*/
/*
*/
.verticallayout{
display: flex;
flex-direction:column;
}
/* 垂直布局 反方向*/
.reversedirection{
display: flex;
flex-direction:column-reverse;
}
.nandu{
width: 42px;
height: 19px;
font-size: 14px;
color: #000000;
line-height: 19px;
margin-left: 6px;
}
.clickbuts{
text-align: center;
width: 60px;
height: 32px;
background: #4CACFF;
border-radius: 16px;
line-height: 30px;
color: #FFFFFF;
cursor:pointer;
}
.clickbutst{
height:19px;
font-size:14px;
color:#505050;
line-height:19px;
cursor:pointer;
}
.clickbutstwo{
text-align: center;
width: 85px;
height: 32px;
background: #4CACFF;
border-radius: 16px;
line-height: 30px;
color: #FFFFFF;
cursor:pointer;
}
.clickbutstwos{
height:19px;
font-size:14px;
color:#505050;
line-height:19px;
cursor:pointer;
}

Loading…
Cancel
Save