From 071ca422b12396dae59647e6e1f7aea2a999804a Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 12 Dec 2019 19:43:56 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=91=BD=E4=BB=A4=E8=A1=8C=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/myshixuns_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index b5c8af1f3..d40fc8237 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -217,7 +217,7 @@ 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, + params = {tpiID:@myshixun.id, podType:@myshixun.shixun.try(:webssh)#, local: @myshixun.shixun.show_type != -1, containers:(Base64.urlsafe_encode64(shixun_container_limit @myshixun.shixun))} res = uri_post uri, params if res && res['code'].to_i != 0 From 8209f4d78d088d92d97afc23e15f403529475322 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 12 Dec 2019 19:44:33 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E5=91=BD=E4=BB=A4=E8=A1=8C=E6=8A=A5?= =?UTF-8?q?=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/myshixuns_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index d40fc8237..6d7386e2f 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -217,7 +217,7 @@ 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, + params = {tpiID:@myshixun.id, podType:@myshixun.shixun.try(:webssh), #local: @myshixun.shixun.show_type != -1, containers:(Base64.urlsafe_encode64(shixun_container_limit @myshixun.shixun))} res = uri_post uri, params if res && res['code'].to_i != 0 From d94c79cb061c58458fa5fca0b7e4dd9d6aee23e1 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 12 Dec 2019 20:40:21 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=91=BD=E4=BB=A4=E8=A1=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0local=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/myshixuns_controller.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index b5c8af1f3..d603b557e 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -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 From 0aa695d7f1c1ce89780e6eef3d08d3029df7a148 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Thu, 12 Dec 2019 23:46:25 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E5=BC=B9=E6=A1=86=20?= =?UTF-8?q?=E5=A1=9E=E9=80=89=E6=94=B9=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/coursesPublic/NewShixunModel.js | 72 +++++++++--- .../courses/coursesPublic/Newshixunmodel.css | 108 +++++++++++++++++- 2 files changed, 164 insertions(+), 16 deletions(-) diff --git a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js index a20f7733c..462df7608 100644 --- a/public/react/src/modules/courses/coursesPublic/NewShixunModel.js +++ b/public/react/src/modules/courses/coursesPublic/NewShixunModel.js @@ -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{
-
+
@@ -472,7 +484,36 @@ class NewShixunModel extends Component{ onSearch={ (value)=>this.setdatafuns(value)} />
-
+ + + + + + + {this.props.type==='shixuns'? +
+

筛选:

+

this.belongto("all")}>全部实训

+

this.belongto("mine")}>普通实训

+
:"" + } + {/*{this.props.type==='shixuns'? */} + {/* */} + {/* {diff===0?"难度":diff===1?"初级":diff===2?"中级":diff===3?"高级":diff===4?"顶级":""}*/} + {/* */} + {/*:""}*/} + {this.props.type==='shixuns'? +
+

难度:

+

this.DropdownClick(0)}>全部

+

this.DropdownClick(1)}>初级

+

this.DropdownClick(2)}>中级

+

this.DropdownClick(3)}>高级

+

this.DropdownClick(4)}>顶级

+
:"" + } + +
@@ -509,17 +550,18 @@ class NewShixunModel extends Component{ :"":""} - {this.props.type==='shixuns'? - - {diff===0?"难度":diff===1?"初级":diff===2?"中级":diff===3?"高级":diff===4?"顶级":""} - - :""} +
-
- {/*this.props.hideNewShixunModelType()}>返回*/} - this.belongto("mine")}>我的{this.props.type==='shixuns'?'实训':"课程"} - this.belongto("all")}>全部{this.props.type==='shixuns'?'实训':"课程"} +
+ + {this.props.type==='shixuns'?"": + this.belongto("mine")}>我的课程 + } + + {this.props.type==='shixuns'?"": + this.belongto("all")}>全部课程 + }
@@ -684,4 +726,4 @@ export default NewShixunModel; // {} // ) // })} -//
} \ No newline at end of file +//
} diff --git a/public/react/src/modules/courses/coursesPublic/Newshixunmodel.css b/public/react/src/modules/courses/coursesPublic/Newshixunmodel.css index 42595bf29..307035602 100644 --- a/public/react/src/modules/courses/coursesPublic/Newshixunmodel.css +++ b/public/react/src/modules/courses/coursesPublic/Newshixunmodel.css @@ -384,4 +384,110 @@ .newshixunmodels{ margin: 0 auto; -} \ No newline at end of file +} + +/* 中间居中 */ +.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; +}