调整新版实训

chromesetting
杨树明 5 years ago
parent 4d5b0bd383
commit ed37f8e02b

@ -35,7 +35,7 @@ class Bottomsubmit extends Component {
<span> </span></button>
<Button type="button" className="ant-btn newshixunmode mr40 ant-btn-primary" type="primary"
htmlType="submit" onClick={() => this.props.onSubmits()}
loading={this.props.loadings}><span>{this.props.bottomvalue===undefined?"确 定":this.props.bottomvalue}</span></Button>
loading={this.props.loadings}><span>{this.props.bottomvalue===undefined?"保存":this.props.bottomvalue}</span></Button>
</div>
</div>
</div>

@ -788,7 +788,17 @@ class TPMBanner extends Component {
return (
shixunsDetails === undefined ? "" :
<div className="shixunDetail">
<div className="shixunDetail" id={"shixunDetail"}>
<style>
{
`
.shixunDetail_top{
height: 180px !important;
padding-top:35px !important;
}
`
}
</style>
<div className="shixunDetail_top">
{AccountProfiletype === true ? <AccountProfile
@ -824,27 +834,13 @@ class TPMBanner extends Component {
}
</p>
<div className="clearfix mt50">
{/*<style>*/}
{/*{*/}
{/*`*/}
{/*.anticon-star{*/}
{/*font-size:14px;*/}
{/*}*/}
{/*.pathInfo{*/}
{/*margin-right:-5px;*/}
{/*}*/}
{/*.ant-rate{*/}
{/*color: #FFA800;*/}
{/*}*/}
{/*`*/}
{/*}*/}
{/*</style>*/}
<div className="clearfix mt30">
<ul className="fl color-grey-c pathInfo">
<li>
{shixunsDetails&&shixunsDetails.stu_num===0?"":<li>
<span>学习人数</span>
<span className="mt3">{shixunsDetails.stu_num}</span>
</li>
</li>}
{/*<li>*/}
{/*<span>经验值</span>*/}
{/*<span className="mt10">{shixunsDetails.experience}</span>*/}

@ -424,7 +424,9 @@ export default class Shixuninformation extends Component {
</div>
{this.props.identity < 5 ?
<Bottomsubmit {...this.props} {...this.state} url={`/shixuns/${this.props.match.params.shixunId}/challenges`}
onSubmits={this.onSubmits} loadings={this.state.loading} bottomvalue={ this.props.shixunsDetails&&this.props.shixunsDetails.is_jupyter === true?"确 定":"下一步"} /> : ""}
onSubmits={this.onSubmits} loadings={this.state.loading}
// bottomvalue={ this.props.shixunsDetails&&this.props.shixunsDetails.is_jupyter === true?"确 定":"下一步"}
/> : ""}
</div>
);
}

@ -662,7 +662,17 @@ class Shixuninformation extends Component {
})
}
//跳转道描点的地方
scrollToAnchor = (anchorName) => {
if (anchorName) {
// 找到锚点
let anchorElement = document.getElementById(anchorName);
// 如果对应id的锚点存在就跳转到锚点
if (anchorElement) {
anchorElement.scrollIntoView();
}
}
}
onSubmits=()=>{
this.setState({
loading:true
@ -699,9 +709,10 @@ class Shixuninformation extends Component {
axios.put(url, data).then((result) => {
if (result) {
if (result.data) {
this.props.getdatas("2")
this.props.getdatas()
if(result.data.shixun_identifier){
this.props.showNotification("基本信息更新成功!")
this.scrollToAnchor("head-navpre1");
this.setState({
loading:false
})
@ -1287,7 +1298,7 @@ class Shixuninformation extends Component {
</div>
{this.props.identity < 5 ?
<Bottomsubmit {...this.props} {...this.state} url={`/shixuns/${this.props.match.params.shixunId}/challenges`}
onSubmits={this.onSubmits} loadings={this.state.loading} bottomvalue={"下一步"} /> : ""}
onSubmits={this.onSubmits} loadings={this.state.loading}/> : ""}
</div>
);

@ -48,26 +48,25 @@ export default class TPMsettings extends Component {
})
}
}
this.setState({
data: response.data
})
}
});
if(key==="3"&&this.props.shixunsDetails&&this.props.shixunsDetails.is_jupyter === true){
window.location.href =`/shixuns/${this.props.match.params.shixunId}/challenges`;
}else{
if(key){
this.setState({
activeKeys:key
})
}else{
window.location.href =`/shixuns/${this.props.match.params.shixunId}/challenges`;
}
}
//
// if(key==="3"&&this.props.shixunsDetails&&this.props.shixunsDetails.is_jupyter === true){
// window.location.href =`/shixuns/${this.props.match.params.shixunId}/challenges`;
// }else{
// if(key){
// this.setState({
// activeKeys:key
// })
// }else{
// window.location.href =`/shixuns/${this.props.match.params.shixunId}/challenges`;
// }
//
// }
}
@ -140,7 +139,7 @@ export default class TPMsettings extends Component {
// console.log( this.props.shixunsDetails === undefined ? "" : this.props.shixunsDetails.is_jupyter === false ? "学习页面设置" : "")
return (
<div>
<div id={"TPMsettings"}>
<style>
{
`

Loading…
Cancel
Save