From ed37f8e02b1e420fe81e1793d34ce2a77b080e92 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Wed, 18 Dec 2019 14:27:03 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=96=B0=E7=89=88=E5=AE=9E?=
=?UTF-8?q?=E8=AE=AD?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../react/src/modules/modals/Bottomsubmit.js | 2 +-
public/react/src/modules/tpm/TPMBanner.js | 34 ++++++++-----------
.../modules/tpm/TPMsettings/Configuration.js | 4 ++-
.../tpm/TPMsettings/Shixuninformation.js | 17 ++++++++--
.../modules/tpm/TPMsettings/TPMsettings.js | 29 ++++++++--------
5 files changed, 47 insertions(+), 39 deletions(-)
diff --git a/public/react/src/modules/modals/Bottomsubmit.js b/public/react/src/modules/modals/Bottomsubmit.js
index 7287f0858..d5637e0ff 100644
--- a/public/react/src/modules/modals/Bottomsubmit.js
+++ b/public/react/src/modules/modals/Bottomsubmit.js
@@ -35,7 +35,7 @@ class Bottomsubmit extends Component {
取 消
+ loading={this.props.loadings}>{this.props.bottomvalue===undefined?"保存":this.props.bottomvalue}
diff --git a/public/react/src/modules/tpm/TPMBanner.js b/public/react/src/modules/tpm/TPMBanner.js
index f438540b1..a31ca5952 100644
--- a/public/react/src/modules/tpm/TPMBanner.js
+++ b/public/react/src/modules/tpm/TPMBanner.js
@@ -788,7 +788,17 @@ class TPMBanner extends Component {
return (
shixunsDetails === undefined ? "" :
-
+
+
{AccountProfiletype === true ?
-
- {/**/}
+
+
- -
+ {shixunsDetails&&shixunsDetails.stu_num===0?"":
-
学习人数
{shixunsDetails.stu_num}
-
+ }
{/*- */}
{/*经验值*/}
{/*{shixunsDetails.experience}*/}
diff --git a/public/react/src/modules/tpm/TPMsettings/Configuration.js b/public/react/src/modules/tpm/TPMsettings/Configuration.js
index 848f853d6..e56e9f8f8 100644
--- a/public/react/src/modules/tpm/TPMsettings/Configuration.js
+++ b/public/react/src/modules/tpm/TPMsettings/Configuration.js
@@ -424,7 +424,9 @@ export default class Shixuninformation extends Component {
{this.props.identity < 5 ?
: ""}
+ onSubmits={this.onSubmits} loadings={this.state.loading}
+ // bottomvalue={ this.props.shixunsDetails&&this.props.shixunsDetails.is_jupyter === true?"确 定":"下一步"}
+ /> : ""}
);
}
diff --git a/public/react/src/modules/tpm/TPMsettings/Shixuninformation.js b/public/react/src/modules/tpm/TPMsettings/Shixuninformation.js
index b196bc4d8..200880019 100644
--- a/public/react/src/modules/tpm/TPMsettings/Shixuninformation.js
+++ b/public/react/src/modules/tpm/TPMsettings/Shixuninformation.js
@@ -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 {
{this.props.identity < 5 ?
: ""}
+ onSubmits={this.onSubmits} loadings={this.state.loading}/> : ""}
);
diff --git a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js
index 13b0e1882..860798722 100644
--- a/public/react/src/modules/tpm/TPMsettings/TPMsettings.js
+++ b/public/react/src/modules/tpm/TPMsettings/TPMsettings.js
@@ -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 (
-