调整新版实训

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

@ -35,7 +35,7 @@ class Bottomsubmit extends Component {
<span> </span></button> <span> </span></button>
<Button type="button" className="ant-btn newshixunmode mr40 ant-btn-primary" type="primary" <Button type="button" className="ant-btn newshixunmode mr40 ant-btn-primary" type="primary"
htmlType="submit" onClick={() => this.props.onSubmits()} 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> </div>
</div> </div>

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

@ -424,7 +424,9 @@ export default class Shixuninformation extends Component {
</div> </div>
{this.props.identity < 5 ? {this.props.identity < 5 ?
<Bottomsubmit {...this.props} {...this.state} url={`/shixuns/${this.props.match.params.shixunId}/challenges`} <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> </div>
); );
} }

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

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

Loading…
Cancel
Save