Merge remote-tracking branch 'origin/master'

dev_forum
杨树明 6 years ago
commit b116ec06fa

@ -114,7 +114,6 @@ class Testpapersettinghomepage extends Component{
axios.get(url).then((response) => { axios.get(url).then((response) => {
console.log(response); console.log(response);
debugger
if(response.data.status&&response.data.status===-1){ if(response.data.status&&response.data.status===-1){
}else if(response.data.status&&response.data.status===-2){ }else if(response.data.status&&response.data.status===-2){
@ -170,12 +169,17 @@ class Testpapersettinghomepage extends Component{
Loadtype:false Loadtype:false
}) })
} }
DownloadType=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
Downloadcal=()=>{ Downloadcal=()=>{
this.setState({ this.setState({
DownloadType:false, DownloadType:false,
DownloadMessageval:undefined DownloadMessageval:undefined
}) })
} }
render(){ render(){
let {tab,visible,Commonheadofthetestpaper}=this.state; let {tab,visible,Commonheadofthetestpaper}=this.state;
@ -188,7 +192,7 @@ class Testpapersettinghomepage extends Component{
{...this.props} {...this.props}
value={this.state.DownloadMessageval} value={this.state.DownloadMessageval}
modalCancel={this.Downloadcal} modalCancel={this.Downloadcal}
modalsType={this.state.DownloadType} modalsType={this.DownloadType}
/> />
<div className={"educontent mb20"} style={{width:"1200px"}}> <div className={"educontent mb20"} style={{width:"1200px"}}>
{/* 公用的提示弹框 */} {/* 公用的提示弹框 */}

@ -1360,13 +1360,6 @@ class Listofworks extends Component {
// }); // });
} }
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
ChangeTab=(e)=>{ ChangeTab=(e)=>{
this.props.ChangeTab(e); this.props.ChangeTab(e);
} }

@ -350,6 +350,9 @@ class Listofworksstudentone extends Component {
if(result === undefined){ if(result === undefined){
return return
} }
try {
if (result.status === 200) { if (result.status === 200) {
if(this.props.isNotMember()===false) { if(this.props.isNotMember()===false) {
this.setState({ this.setState({
@ -374,10 +377,12 @@ class Listofworksstudentone extends Component {
} }
} }
} }
}catch (e) {
console.log(e);
}
}).catch((error) => { }).catch((error) => {
console.log(error) console.log(error);
}) })
} }

@ -371,14 +371,14 @@ class ShixunHomeworkPage extends Component {
<a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a> <a className="fr color-blue font-16" onClick={this.workshowmodel}>代码查重</a>
: "" : ""} : "" : ""}
{this.state.view_report === true ? <Link className="fr color-blue font-16" target={"_blank"} {this.state.view_report === true ? <Link className="fr color-blue font-16" target={"_blank"}
to={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${this.state.props.match.params.homeworkid}/shixun_work_report`}> to={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${this.props.match.params.homeworkid}/shixun_work_report`}>
查看实训报告 查看实训报告
</Link> : ""} </Link> : ""}
{ {
teacherdata === undefined ? "" teacherdata === undefined ? ""
: teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" : : teacherdata.commit_des === null || teacherdata.commit_des === undefined ? "" :
<a className="fr color-blue font-16" <a className="fr color-blue font-16"
href={`/courses/${this.state.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.state.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a> href={`/courses/${this.props.match.params.coursesId}/${this.state.shixuntypes}/${teacherdata === undefined ? "" : teacherdata.id}/commitsummary/${this.props.match.params.homeworkid}`}>{teacherdata.commit_des}</a>
} }
{teacherdata === undefined ? "" : <Startshixuntask {teacherdata === undefined ? "" : <Startshixuntask
{...this.props} {...this.props}

@ -501,13 +501,6 @@ class ShixunStudentWork extends Component {
// console.log(error) // console.log(error)
// }); // });
} }
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
ChangeTab=(e)=>{ ChangeTab=(e)=>{
this.props.ChangeTab(e); this.props.ChangeTab(e);
} }
@ -572,7 +565,7 @@ class ShixunStudentWork extends Component {
key: 'operating', key: 'operating',
render: (text, record) => ( render: (text, record) => (
<span> <span>
<a onClick={()=>this.Viewstudenttraininginformation("/courses/"+this.state.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+this.props.match.params.homeworkid+"/review_detail/"+record.operating)} >查看</a> <a onClick={()=>this.Viewstudenttraininginformation("/courses/"+this.props.match.params.coursesId+"/"+this.state.shixuntypes+"/"+this.props.match.params.homeworkid+"/review_detail/"+record.operating)} >查看</a>
</span> </span>
) )
}, },

@ -94,12 +94,6 @@ class ShixunWorkReport extends Component {
} }
} }
} }
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
render() { render() {
let{data} =this.state; let{data} =this.state;
let category_id=data===undefined?"":data.category.category_id; let category_id=data===undefined?"":data.category.category_id;

@ -1714,12 +1714,7 @@ class Trainingjobsetting extends Component {
// }); // });
} }
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
testscripttip =(e)=>{ testscripttip =(e)=>{
if(e === 0){ if(e === 0){
this.setState({ this.setState({

@ -344,12 +344,6 @@ class Workquestionandanswer extends Component {
// console.log(error) // console.log(error)
// }); // });
} }
Downloadcal=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
ChangeTab=(e)=>{ ChangeTab=(e)=>{
this.props.ChangeTab(e); this.props.ChangeTab(e);
} }

@ -59,7 +59,6 @@ class EducoderInteresse extends Component {
display: "flex", display: "flex",
justifyContent: "center", justifyContent: "center",
width: "100%", width: "100%",
height: "600px",
marginTop: "20px", marginTop: "20px",
}}> }}>
<InterestpageComponent {...this.props} {...this.state}> <InterestpageComponent {...this.props} {...this.state}>

@ -19,7 +19,13 @@ class DownloadMessage extends Component {
this.modalCancel(); this.modalCancel();
window.open(`/users/${this.props.user.login}/private_messages`) window.open(`/users/${this.props.user.login}/private_messages`)
} }
DownloadType=()=>{
this.setState({
DownloadType:false,
DownloadMessageval:undefined
})
}
Downloadcal=()=>{ Downloadcal=()=>{
this.setState({ this.setState({
DownloadType:false, DownloadType:false,

@ -671,11 +671,11 @@ class MainContentContainer extends Component {
// 之前的task_commit方法 // 之前的task_commit方法
gameBuild(fileUpdateResponse, first) { gameBuild(fileUpdateResponse, first) {
const { st, challenge, output_sets, onRunCodeTestFinish, resetTestSetsExpandedArray, showSnackbar, time_limit, game } = this.props const { st, challenge, output_sets, onRunCodeTestFinish, resetTestSetsExpandedArray, showSnackbar, time_limit, game } = this.props
const { resubmit, content_modified } = fileUpdateResponse.data; const { resubmit, content_modified, sec_key } = fileUpdateResponse.data;
const timeOut = time_limit; const timeOut = time_limit;
// http://localhost:3000/myshixuns/so5w6iap97/stages/zl6kx8f7vfpo/game_build?first=1&resubmit=GDBEX741_1993 // http://localhost:3000/myshixuns/so5w6iap97/stages/zl6kx8f7vfpo/game_build?first=1&resubmit=GDBEX741_1993
// const game_build_url = `${locationPath}/game_build?first=${first}&resubmit=${resubmit}&content_modified=${content_modified}` // const game_build_url = `${locationPath}/game_build?first=${first}&resubmit=${resubmit}&content_modified=${content_modified}`
const game_build_url = `/tasks/${game.identifier}/game_build.json?first=${first}&resubmit=${resubmit}&content_modified=${content_modified}` const game_build_url = `/tasks/${game.identifier}/game_build.json?first=${first}&resubmit=${resubmit}&content_modified=${content_modified}&sec_key=${sec_key}`
// var timeOut = parseInt(<%= @myshixun.main_mirror.try(:time_limit) %>); // 超时参数 // var timeOut = parseInt(<%= @myshixun.main_mirror.try(:time_limit) %>); // 超时参数
@ -702,7 +702,7 @@ class MainContentContainer extends Component {
var gameStatusIntervalId = setInterval(()=>{ var gameStatusIntervalId = setInterval(()=>{
// let game_status_url = `${locationPath}/game_status?port=${port}&resubmit=${resubmit||""}&time_out=${timeOutFlag}` // let game_status_url = `${locationPath}/game_status?port=${port}&resubmit=${resubmit||""}&time_out=${timeOutFlag}`
let game_status_url = `/tasks/${game.identifier}/game_status.json?port=${port}&resubmit=${resubmit||""}&time_out=${timeOutFlag}` let game_status_url = `/tasks/${game.identifier}/game_status.json?port=${port}&resubmit=${resubmit||""}&time_out=${timeOutFlag}&sec_key=${sec_key}`
axios.get(game_status_url, { axios.get(game_status_url, {
// withCredentials: true, // withCredentials: true,

@ -16,7 +16,7 @@ class AccountNav extends Component {
let { basicInfo } = this.props let { basicInfo } = this.props
console.log(this.props); console.log(this.props);
const path = window.location.pathname const path = window.location.pathname
const isBasic = path.indexOf('basic') != -1 || path == "/account" const isBasic = path.indexOf('profile') != -1 || path == "/account"
const isCertification = path.indexOf('certification') != -1 const isCertification = path.indexOf('certification') != -1
const isSecure = path.indexOf('secure') != -1 const isSecure = path.indexOf('secure') != -1
return ( return (

@ -73,7 +73,7 @@
display: flex; display: flex;
flex-direction:column; flex-direction:column;
margin-left: 73px; margin-left: 73px;
margin-top: 15px; margin-top: 8px;
} }
.ysldivhomediv2{ .ysldivhomediv2{
width: 110px; width: 110px;

Loading…
Cancel
Save