|
|
|
@ -98,6 +98,7 @@ class TPMBanner extends Component {
|
|
|
|
|
return -1;//不是ie浏览器
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
componentDidMount() {
|
|
|
|
|
let thiisie = this.IEVersion();
|
|
|
|
|
if (thiisie != -1) {
|
|
|
|
@ -110,6 +111,7 @@ class TPMBanner extends Component {
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* Fork
|
|
|
|
|
* */
|
|
|
|
@ -192,7 +194,8 @@ class TPMBanner extends Component {
|
|
|
|
|
params: {
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10
|
|
|
|
|
}}).then((response) => {
|
|
|
|
|
}
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
courses_count: response.data.courses_count,
|
|
|
|
|
course_list: response.data.course_list
|
|
|
|
@ -209,7 +212,8 @@ class TPMBanner extends Component {
|
|
|
|
|
params: {
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 10
|
|
|
|
|
}}).then((response) => {
|
|
|
|
|
}
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
courses_count: response.data.courses_count,
|
|
|
|
|
course_list: response.data.course_list,
|
|
|
|
@ -234,7 +238,8 @@ class TPMBanner extends Component {
|
|
|
|
|
params: {
|
|
|
|
|
page: pageNumber,
|
|
|
|
|
limit: 10
|
|
|
|
|
}}).then((response) => {
|
|
|
|
|
}
|
|
|
|
|
}).then((response) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
courses_count: response.data.courses_count,
|
|
|
|
|
course_list: response.data.course_list,
|
|
|
|
@ -379,7 +384,8 @@ class TPMBanner extends Component {
|
|
|
|
|
|
|
|
|
|
// message.success('重置成功,正在进入实训!');
|
|
|
|
|
// this.startshixunCombat();
|
|
|
|
|
}}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
).catch((error) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
startbtn: false,
|
|
|
|
@ -394,6 +400,79 @@ class TPMBanner extends Component {
|
|
|
|
|
//开始实战按钮
|
|
|
|
|
startshixunCombat = (id, reset) => {
|
|
|
|
|
|
|
|
|
|
if(this.props.shixunsDetails&&this.props.shixunsDetails.is_jupyter===true){
|
|
|
|
|
if (this.props.checkIfLogin() === false) {
|
|
|
|
|
this.props.showLoginDialog()
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (this.props.checkIfProfileCompleted() === false) {
|
|
|
|
|
this.setState({
|
|
|
|
|
AccountProfiletype: true
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if(this.props.checkIfProfessionalCertification()===false){
|
|
|
|
|
// this.setState({
|
|
|
|
|
// AccountProfiletype:true
|
|
|
|
|
// })
|
|
|
|
|
// return
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
let {shixunsDetails} = this.props
|
|
|
|
|
if (shixunsDetails.shixun_status > 1) {
|
|
|
|
|
this.setState({
|
|
|
|
|
startbtn: true,
|
|
|
|
|
hidestartshixunsreplacevalue: ""
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.setState({
|
|
|
|
|
hidestartshixunsreplacevalue: ""
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let url = "/shixuns/" + id + "/jupyter_exec.json";
|
|
|
|
|
if (reset) {
|
|
|
|
|
url += '?reset=' + reset
|
|
|
|
|
}
|
|
|
|
|
axios.get(url).then((response) => {
|
|
|
|
|
if (response.status === 200) {
|
|
|
|
|
if (response.data.status === -2) {
|
|
|
|
|
// this.resetshixunCombat(response.data.message);
|
|
|
|
|
this.setState({
|
|
|
|
|
startbtn: false,
|
|
|
|
|
shixunsreplace: true,
|
|
|
|
|
hidestartshixunsreplacevalue: response.data.message + ".json"
|
|
|
|
|
})
|
|
|
|
|
// this.shixunexec(response.data.message+".json")
|
|
|
|
|
} else if (response.data.status === -1) {
|
|
|
|
|
console.log(response)
|
|
|
|
|
} else if (response.data.status === -3) {
|
|
|
|
|
this.setState({
|
|
|
|
|
shixunsmessage: response.data.message,
|
|
|
|
|
startshixunCombattype: true,
|
|
|
|
|
startbtn: false
|
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
// let path="/tasks/"+response.data.game_identifier;
|
|
|
|
|
// this.props.history.push(path);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// this.context.router.history.push(path);
|
|
|
|
|
if (response.data.status != 401) {
|
|
|
|
|
window.location.href = "/tasks/" + response.data.identifier+`/jupyter`;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}).catch((error) => {
|
|
|
|
|
this.setState({
|
|
|
|
|
startbtn: false
|
|
|
|
|
})
|
|
|
|
|
});
|
|
|
|
|
}else{
|
|
|
|
|
if (this.props.checkIfLogin() === false) {
|
|
|
|
|
this.props.showLoginDialog()
|
|
|
|
|
return
|
|
|
|
@ -467,6 +546,9 @@ class TPMBanner extends Component {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
tocertification = () => {
|
|
|
|
|
let {certi_url} = this.state;
|
|
|
|
|
this.setState({
|
|
|
|
@ -532,7 +614,8 @@ class TPMBanner extends Component {
|
|
|
|
|
hidestartshixunsreplacevalue,
|
|
|
|
|
Forkvisibletype,
|
|
|
|
|
AccountProfiletype,
|
|
|
|
|
isIE} = this.state;
|
|
|
|
|
isIE
|
|
|
|
|
} = this.state;
|
|
|
|
|
let {shixunsDetails, shixunId, star_info, star_infos} = this.props;
|
|
|
|
|
let challengeBtnTipText = '';
|
|
|
|
|
let challengeBtnText = '模拟实战';
|
|
|
|
@ -594,6 +677,9 @@ class TPMBanner extends Component {
|
|
|
|
|
|
|
|
|
|
return <Rating {...rest} value={myValue}/>;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
console.log(this.props.shixunsDetails&&this.props.shixunsDetails.is_jupyter)
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
|
|
|
|
|
shixunsDetails === undefined ? "" :
|
|
|
|
@ -663,12 +749,14 @@ class TPMBanner extends Component {
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
|
|
|
|
|
<div className="pr fl" id="commentsStar" onMouseOver={()=>this.showonMouseOver()} onMouseOut={()=>this.hideonMouseOut()}>
|
|
|
|
|
<div className="pr fl" id="commentsStar" onMouseOver={() => this.showonMouseOver()}
|
|
|
|
|
onMouseOut={() => this.hideonMouseOut()}>
|
|
|
|
|
<div className={"color-grey-c ml15"} style={{color: "#Fff", textAlign: "center"}}>学员评分</div>
|
|
|
|
|
<div className="rateYo">
|
|
|
|
|
<MyRate allowHalf defaultValue={star_info[0]} disabled/>
|
|
|
|
|
</div>
|
|
|
|
|
<div id="ratePanel" className="showratePanel" style={{"width":"530px"}} onMouseOut={()=>this.hideonMouseOut()}>
|
|
|
|
|
<div id="ratePanel" className="showratePanel" style={{"width": "530px"}}
|
|
|
|
|
onMouseOut={() => this.hideonMouseOut()}>
|
|
|
|
|
<div className="pr">
|
|
|
|
|
<span className="rateTrangle"></span>
|
|
|
|
|
<div className="pr clearfix ratePanelContent" style={{height: '177px'}}>
|
|
|
|
@ -978,7 +1066,8 @@ class TPMBanner extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{this.props.identity < 8&&shixunsDetails.shixun_status != -1 ?<div className="fr user_default_btn user_blue_btn mr20"
|
|
|
|
|
{this.props.identity < 8 && shixunsDetails.shixun_status != -1 ?
|
|
|
|
|
<div className="fr user_default_btn user_blue_btn mr20"
|
|
|
|
|
style={{display: shixunsDetails.can_copy === false || shixunsDetails.can_copy === null ? "none" : "flex"}}>
|
|
|
|
|
<Tooltip placement="bottom" title={"基于这个实训修改形成新的实训"}>
|
|
|
|
|
<span className="flex1 edu-txt-center fl font-18"
|
|
|
|
@ -1046,7 +1135,8 @@ class TPMBanner extends Component {
|
|
|
|
|
</div>
|
|
|
|
|
<div className="alert alert-orange mb15 mt15 clearfix"
|
|
|
|
|
style={{display: shixunsDetails.shixun_status === 1 ? "block" : "none"}}
|
|
|
|
|
>正在等待管理员的审核。在审核通过前,可以随时撤销发布</div>
|
|
|
|
|
>正在等待管理员的审核。在审核通过前,可以随时撤销发布
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
);
|
|
|
|
|