From b7452575af0de838564e35eb4fda3c8ecd6836e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Mon, 26 Aug 2019 16:47:56 +0800
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=A0=B7=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/modules/courses/new/CoursesNew.js | 46 ++++++-------------
.../src/modules/courses/new/Goldsubject.js | 45 +++++-------------
2 files changed, 25 insertions(+), 66 deletions(-)
diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js
index 25459fcc6..edee26a27 100644
--- a/public/react/src/modules/courses/new/CoursesNew.js
+++ b/public/react/src/modules/courses/new/CoursesNew.js
@@ -81,22 +81,19 @@ class CoursesNew extends Component {
is_public: data.is_public === 1 ? true : false,
Realnamecertification: data.authentication,
Professionalcertification:data.professional_certification,
- checkbofrups:data.course_modules,
+ // checkbofrups:data.course_modules,
});
- try {
- if(data.course_modules===undefined||data.course_modules.length===0){
- this.setState({
- checkbofrups:this.state.checkbofrup,
- });
- }
- }catch (e) {
- this.setState({
- checkbofrups:this.state.checkbofrup,
- });
- }
-
-
-
+ // try {
+ // if(data.course_modules===undefined||data.course_modules.length===0){
+ // this.setState({
+ // checkbofrups:this.state.checkbofrup,
+ // });
+ // }
+ // }catch (e) {
+ // this.setState({
+ // checkbofrups:this.state.checkbofrup,
+ // });
+ // }
this.handleSearchschool(data.school);
}).catch((error) => {
console.log(error);
@@ -464,7 +461,7 @@ class CoursesNew extends Component {
this.applyForAddOrgForm.setVisible(true)
}
render() {
- let {datatime,school,searchlistscholl,checkbofrups} = this.state;
+ let {datatime,school,searchlistscholl} = this.state;
const {getFieldDecorator} = this.props.form;
const propsWithoutForm = Object.assign({}, this.props)
delete propsWithoutForm.form
@@ -705,23 +702,6 @@ class CoursesNew extends Component {
"shixun_homework", "common_homework", "group_homework", "exercise", "attachment", "course_group",
],
})(
- this.props.match.params.coursesId != undefined?
-
- {
- checkbofrups===undefined?"":checkbofrups.length===0?"":checkbofrups.map((item,key)=>{
- return(
- item.module_type==="announcement"?
- ""
- :
- item.module_type==="online_learning"?
- ""
- :
- {item.module_name}
- )
- })
- }
-
- :
实训作业
普通作业
diff --git a/public/react/src/modules/courses/new/Goldsubject.js b/public/react/src/modules/courses/new/Goldsubject.js
index a51e535e9..80530c7ed 100644
--- a/public/react/src/modules/courses/new/Goldsubject.js
+++ b/public/react/src/modules/courses/new/Goldsubject.js
@@ -144,20 +144,18 @@ class Goldsubject extends Component {
course_module_types: data.course_module_types,
school:data.school,
Whethertocreateanewclassroom:false,
- checkbofrups:data.course_modules,
});
-
- try {
- if(data.course_modules===undefined||data.course_modules.length===0){
- this.setState({
- checkbofrups:this.state.checkbofrup,
- });
- }
- }catch (e) {
- this.setState({
- checkbofrups:this.state.checkbofrup,
- });
- }
+ // try {
+ // if(data.course_modules===undefined||data.course_modules.length===0){
+ // this.setState({
+ // checkbofrups:this.state.checkbofrup,
+ // });
+ // }
+ // }catch (e) {
+ // this.setState({
+ // checkbofrups:this.state.checkbofrup,
+ // });
+ // }
this.handleSearchschool(data.school);
}).catch((error) => {
console.log(error);
@@ -609,7 +607,7 @@ class Goldsubject extends Component {
this.applyForAddOrgForm.setVisible(true)
}
render() {
- let {datatime,datatimetwo,school,searchlistscholl,Whethertocreateanewclassroom,checkbofrups} = this.state;
+ let {datatime,datatimetwo,school,searchlistscholl,Whethertocreateanewclassroom} = this.state;
const {getFieldDecorator} = this.props.form;
const propsWithoutForm = Object.assign({}, this.props)
delete propsWithoutForm.form
@@ -884,25 +882,6 @@ class Goldsubject extends Component {
"announcement","online_learning","shixun_homework","common_homework",
],
})(
- this.props.match.params.coursesId != undefined?
-
- {
- checkbofrups===undefined?"":checkbofrups.length===0?"":checkbofrups.map((item,key)=>{
- return(
- item.module_type==="announcement"?
- 公告栏
- :
- item.module_type==="online_learning"?
- 在线学习
- :
- item.module_type==="graduation"?"":
- item.module_type==="group_homework"?"":
- {item.module_name}
- )
- })
- }
-
- :
公告栏
在线学习