From a467ef8475c8db0d9c3f7e45109dae3c801b3be2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Mon, 2 Sep 2019 10:30:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=AF=BE=E5=A0=82=E9=A6=96?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=8C=85=E5=B1=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/new/CoursesNew.js | 30 ++- .../src/modules/courses/new/Goldsubject.js | 199 +++++++++--------- 2 files changed, 121 insertions(+), 108 deletions(-) diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index bcf5a8c19..9e0a9645e 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -77,6 +77,7 @@ class CoursesNew extends Component { this.setState({ datatime: data.end_date, + dataname:data.name, is_public: data.is_public === 1 ? true : false, Realnamecertification: data.authentication, Professionalcertification:data.professional_certification, @@ -326,7 +327,7 @@ class CoursesNew extends Component { } - goback = () => { + goback = (id) => { // if(this.props.match.params.coursesId===undefined){ // this.props.history.push("/courses"); @@ -334,7 +335,12 @@ class CoursesNew extends Component { // this.props.history.push(this.props.current_user.first_category_url); // } // window.history.go(-1) - this.props.history.goBack() + if(id===undefined){ + this.props.history.goBack() + }else{ + this.props.history.push(this.props.current_user.first_category_url); + } + } onCheckAllChange = (e) => { @@ -494,7 +500,7 @@ class CoursesNew extends Component { this.applyForAddOrgForm.setVisible(true) } render() { - let {datatime,school,searchlistscholl,bordebool} = this.state; + let {datatime,school,searchlistscholl,bordebool,dataname} = this.state; const {getFieldDecorator} = this.props.form; const propsWithoutForm = Object.assign({}, this.props) delete propsWithoutForm.form @@ -504,7 +510,7 @@ class CoursesNew extends Component { // form合并了 // console.log("获取到的数据"); // console.log(this.state); - // console.log(this.props); + //console.log(this.props.current_user.first_category_url); // console.log(this.props.current_user); var addonAfterone=this.props.form&&this.props.form.getFieldValue('period'); var addonAfteronelen=0; @@ -537,7 +543,7 @@ class CoursesNew extends Component { .color-green-light { color: #45E660!important; } - + .line15{line-height: 15px;} ` } @@ -562,15 +568,19 @@ class CoursesNew extends Component { {/**/}

- 翻转课堂 + + {this.props.match.params.coursesId === undefined ?"翻转课堂":dataname} + > - {this.props.match.params.coursesId === undefined ?"新建课堂":"编辑课堂"} + {this.props.match.params.coursesId === undefined ?"新建课堂":"编辑课堂"}

-
-

{this.props.match.params.coursesId === undefined ? "新建课堂" : "编辑课堂"}

- 返回 +
+

{this.props.match.params.coursesId === undefined ? "新建课堂" : "编辑课堂"}

+ this.goback(this.props.match.params.coursesId)} className="color-grey-6 fr font-16 ml30 line15 mr20">返回
this.applyForAddOrgForm = form} schoolName={school} @@ -693,47 +693,50 @@ class Goldsubject extends Component { {/* {Whethertocreateanewclassroom===true?"新建课堂":"编辑课堂"}*/} {/**/}

- 翻转课堂 + {Whethertocreateanewclassroom===true?"翻转课堂":name} > - {Whethertocreateanewclassroom===true?"新建课堂":"编辑课堂"} + {Whethertocreateanewclassroom===true?"新建课堂":"编辑课堂"}

-
-

{Whethertocreateanewclassroom===true ? "新建课堂" : "编辑课堂"}

- +
+

{Whethertocreateanewclassroom===true ? "新建课堂" : "编辑课堂"}

+
{/*内容*/} {/*
*/} @@ -772,30 +775,30 @@ class Goldsubject extends Component {
- - + + )} - - + + )}