Merge branch 'dev_aliyun' of https://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

dev_aliyun_beta
SylorHuang 6 years ago
commit ec57e25fb7

@ -236,8 +236,7 @@ $(function(){
if(dragging) {
clickX = e.pageX || e.originalEvent.touches[0].pageX;;
if(clickX > leftOffset+0&&clickX<leftOffset+1600) {
console.log('resize')
//console.log(1);
// console.log('resize')
lab.css('left', clickX - 7 - leftOffset + 'px');
$("#game_left_contents").width( clickX-leftOffset + 'px');
nextW2 = clickX-leftOffset;
@ -314,10 +313,16 @@ $(function(){
window.top.__updateWebsshRows && window.top.__updateWebsshRows(rows)
}
window.refresh_editor_monaco = function(height) {
console.log('refresh_editor_monaco')
if (window.editor_monaco) {
height && $('#codetab_con_1').height(height)
window.editor_monaco.layout();
}
// if ($('#game_operate_action').width() < 720) {
// $('#game_operate_action .time_limit').hide()
// } else {
// $('#game_operate_action .time_limit').show()
// }
}
// end;
//解決IE瀏覽器大小改變時webssh佈局變亂。

@ -203,12 +203,12 @@ function generateNewIndexJsp() {
<script>
(function() {
var _host = '/react/build/'
/*
/**/
if (window.location.host == 'pre-newweb.educoder.net') {
_host = 'https://testali-cdn.educoder.net/react/build/'
} else if (window.location.host == 'www.educoder.net') {
_host = 'https://ali-newweb.educoder.net/react/build/'
}*/
}
document.write('<script type="text/javascript" src="' + _host + 'js/js_min_all.js"><\\/script>');
document.write('<script type="text/javascript" src="' + _host + 'static/js/main.${matchResult[1]}.js"><\\/script>');
})()

@ -35,6 +35,7 @@ const buildColumns = (that) => {
dataIndex: 'login',
key: 'login',
align:'center',
width:"10%",
className:"color-grey-6",
render: (login, record) => {
return <span className="color-dark overflowHidden1" style={{maxWidth: '160px'}}
@ -57,9 +58,10 @@ const buildColumns = (that) => {
dataIndex: 'student_id',
key: 'student_id',
align:'center',
width:"10%",
className:"color-grey-6",
render: (student_id, record) => {
return <span className="color-dark overflowHidden1 "title={student_id && student_id.length > 10 ? student_id : ''}
return <span className="color-dark overflowHidden1 " title={student_id && student_id.length > 10 ? student_id : ''}
style={{maxWidth: '160px'}} >{student_id}</span>
}
}];
@ -69,7 +71,7 @@ const buildColumns = (that) => {
dataIndex: 'course_group_name',
key: 'course_group_name',
align:'center',
width:"50%",
width:"40%",
className:"color-grey-6"
})
}

@ -52,9 +52,16 @@ class ActionView extends Component {
componentDidMount() {
// request
window._tpiWidthResize = () => {
if (window.$('#actionView').width() < 580) {
const _w = window.$('#actionView').width();
if (_w < 446) {
window.$('#time-consuming').hide()
// window.$('#time-consuming').hide()
} else if (_w < 746) {
// 文字放出来之前是 580
window.$('#time-consuming').show()
window.$('.time_limit').hide()
} else {
window.$('#time-consuming').show()
window.$('.time_limit').show()
}
}
@ -71,16 +78,27 @@ class ActionView extends Component {
<div className="-flex -layout-h" id="game_operate_action">
<style>{`
.time_limit {
margin-right: 16px;
margin-right: 0px;
}
.spliter {
border-right: 1px solid;
padding-right: 8px;
margin-right: 8px;
height: 14px;
display: inline-block;
position: relative;
top: 3px;
}
`}</style>
<span className="mt10 -flex c_grey ml15" id="time-consuming">
{!!time_limit &&
<span className="time_limit">{`本关最大执行时间:${real_time_limit}`}</span>}
<span className="time_limit">{`本关最大执行时间:${real_time_limit}`}
<span className="spliter"></span>
</span>}
{!gameBuilding && record ?
<Tooltip title={ "本次评测耗时(编译、运行总时间)" }>
<span>{ record } </span>
</Tooltip>
// <Tooltip title={ "本次评测耗时(编译、运行总时间)" }></Tooltip>
<span>本次评测耗时(编译运行总时间){ record } </span>
: ""}
</span>

@ -14,13 +14,16 @@
min-width: 280px;
}
#time-consuming .time_limit {
display: none;
}
.actionViewfirstButton {
display: none !important;
}
}
@media (max-width: 800px) {
#time-consuming .time_limit {
display: none;
}
}
@media (max-width: 628px) {
.-header-right { display: none }
.exitBtn span { display: none }

@ -297,43 +297,49 @@ class DetailCardsEditAndAdd extends Component{
contentViewScrolladd=(e)=>{
const {ChooseShixunList}=this.state;
//滑动到底判断
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
// console.log("到达底部");
this.setState({
hometypepvisible:true
})
let pathId=this.props.pathid;
let {search,page,type,ChooseShixunListshixun_list}=this.state;
let newpage=page+1;
let newChooseShixunListshixun_list=ChooseShixunListshixun_list;
let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+newpage
if(search!="" && search!=undefined){
url+="&search="+search;
}
if(type!=0){
url+="&type="+type;
}
axios.get(url).then((result)=>{
if(result.status===200){
let list =result.data.shixun_list;
for(var i=0; i<list.length; i++){
newChooseShixunListshixun_list.push(list[i])
}
this.setState({
ChooseShixunList:result.data,
hometypepvisible:false,
type:type,
search:search,
page:newpage,
ChooseShixunListshixun_list:newChooseShixunListshixun_list
})
}
}).catch((error)=>{
console.log(error);
})
if(ChooseShixunList.shixun_list.length===0){
return
}else{
// console.log("到达底部");
this.setState({
hometypepvisible:true
})
let pathId=this.props.pathid;
let {search,page,type,ChooseShixunListshixun_list}=this.state;
let newpage=page+1;
let newChooseShixunListshixun_list=ChooseShixunListshixun_list;
let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+newpage
if(search!="" && search!=undefined){
url+="&search="+search;
}
if(type!=0){
url+="&type="+type;
}
axios.get(url).then((result)=>{
if(result.status===200){
let list =result.data.shixun_list;
for(var i=0; i<list.length; i++){
newChooseShixunListshixun_list.push(list[i])
}
this.setState({
ChooseShixunList:result.data,
hometypepvisible:false,
type:type,
search:search,
page:newpage,
ChooseShixunListshixun_list:newChooseShixunListshixun_list
})
}
}).catch((error)=>{
console.log(error);
})
}
}

@ -338,50 +338,59 @@ class DetailCardsEditAndEdit extends Component{
contentViewScrolledit=(e)=>{
//滑动到底判断
const {ChooseShixunList}=this.state;
if(e.currentTarget.scrollHeight-e.currentTarget.scrollTop===e.currentTarget.clientHeight){
this.setState({
hometypepvisible:true
})
// console.log("到达底部");
let {page,type,search,ChooseShixunListshixun_list}=this.state;
if(ChooseShixunList.shixun_list.length===0){
return
}else{
this.setState({
hometypepvisible:true
})
// console.log("到达底部");
let newpage=page+1;
let {page,type,search,ChooseShixunListshixun_list}=this.state;
let pathId=this.props.pathid;
let newpage=page+1;
let newChooseShixunListshixun_list=ChooseShixunListshixun_list;
let pathId=this.props.pathid;
let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+newpage
let newChooseShixunListshixun_list=ChooseShixunListshixun_list;
if(search!="" && search!=undefined){
url+="&search="+search;
}
let url='/paths/'+pathId+'/choose_subject_shixun.json?page='+newpage
if(type!=0){
url+="&type="+type;
}
axios.get(url).then((result)=>{
if(result.status===200){
if(search!="" && search!=undefined){
url+="&search="+search;
}
if(type!=0){
url+="&type="+type;
}
axios.get(url).then((result)=>{
if(result.status===200){
let list =result.data.shixun_list;
for(var i=0; i<list.length; i++){
newChooseShixunListshixun_list.push(list[i])
}
this.setState({
ChooseShixunList:result.data,
hometypepvisible:false,
type:type,
page:newpage,
search:search,
ChooseShixunListshixun_list:newChooseShixunListshixun_list
})
}
}).catch((error)=>{
console.log(error);
})
}
let list =result.data.shixun_list;
for(var i=0; i<list.length; i++){
newChooseShixunListshixun_list.push(list[i])
}
this.setState({
ChooseShixunList:result.data,
hometypepvisible:false,
type:type,
page:newpage,
search:search,
ChooseShixunListshixun_list:newChooseShixunListshixun_list
})
}
}).catch((error)=>{
console.log(error);
})
}

@ -475,7 +475,10 @@ export default class TPMevaluation extends Component {
}
handpathoptionvalue=(value)=>{
this.setState({
pathoptionvalue:value
pathoptionvalue:value,
shixunfileexpectpicturepath:undefined,
shixunfilestandardpicturepath:undefined,
shixunfilepicturepath:undefined
})
}
showrepositoryurltip=(type)=>{
@ -640,19 +643,20 @@ export default class TPMevaluation extends Component {
let id = this.props.match.params.shixunId;
let{checkpointId}=this.state;
let url = "/shixuns/"+id+"/challenges/"+checkpointId+".json";
let newchallenge={
path:shixunfilepath,
exec_path:shixunfilepathplay,
show_type:pathoptionvalue===-1?undefined:pathoptionvalue,
original_picture_path:pathoptionvalue===-1?undefined:shixunfileexpectpicturepath===undefined?null:shixunfileexpectpicturepath,
expect_picture_path:pathoptionvalue===-1?undefined:shixunfilestandardpicturepath===undefined?null:shixunfilestandardpicturepath,
picture_path:pathoptionvalue===-1?undefined:shixunfilepicturepath===undefined?null:shixunfilepicturepath,
test_set_score:newscorevalue,
test_set_average:markvalue,
web_route:web_route===null?undefined:web_route
}
axios.put(url,{
tab:1,
challenge:{
path:shixunfilepath,
exec_path:shixunfilepathplay,
show_type:pathoptionvalue,
original_picture_path:shixunfileexpectpicturepath,
expect_picture_path:shixunfilestandardpicturepath,
picture_path:shixunfilepicturepath,
test_set_score:newscorevalue,
test_set_average:markvalue,
web_route:web_route===null?undefined:web_route
},
challenge:newchallenge,
test_set:evaluationlist
}
).then((response) => {

@ -1,6 +1,6 @@
/*global __webpack_public_path__ */
if (window._enableCDN && window.location.host == 'pre-newweb.educoder.net') {
__webpack_public_path__ = 'http://testali-cdn.educoder.net/react/build/'
} else if (window._enableCDN && window.location.host == 'www.educoder.net') {
if ( window.location.host == 'pre-newweb.educoder.net') {
__webpack_public_path__ = 'https://testali-cdn.educoder.net/react/build/'
} else if ( window.location.host == 'www.educoder.net') {
__webpack_public_path__ = 'https://ali-newweb.educoder.net/react/build/'
}
Loading…
Cancel
Save