From 9e043e2ec4ecd61df21a8892e34b898375045944 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Wed, 21 Aug 2019 10:23:15 +0800 Subject: [PATCH 001/130] issue --- .../src/modules/courses/busyWork/commonWork.js | 4 +++- .../modules/courses/coursesPublic/NoneData.js | 17 +++++++++++++++-- .../courses/exercise/ExerciseReviewAndAnswer.js | 12 ++++++++++++ .../courses/exercise/question/multiple.js | 14 +++++++------- .../modules/courses/exercise/question/single.js | 16 ++++++++-------- .../modules/courses/graduation/tasks/index.js | 4 +++- .../courses/shixunHomework/shixunHomework.js | 2 ++ .../src/modules/user/usersInfo/InfosBanner.js | 11 +++++++++-- .../src/modules/user/usersInfo/InfosCourse.js | 2 +- .../src/modules/user/usersInfo/InfosPath.js | 2 +- .../src/modules/user/usersInfo/InfosProject.js | 2 +- .../src/modules/user/usersInfo/InfosShixun.js | 4 ++-- 12 files changed, 64 insertions(+), 26 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/commonWork.js b/public/react/src/modules/courses/busyWork/commonWork.js index f9c34cfcf..d5ac0be68 100644 --- a/public/react/src/modules/courses/busyWork/commonWork.js +++ b/public/react/src/modules/courses/busyWork/commonWork.js @@ -143,7 +143,9 @@ class commonWork extends Component{ this.setState({ order:e.key==="all"?"":e.key, page:1, - isSpin:true + isSpin:true, + checkBoxValues:[], + checkAll:false }) let {search}=this.state; this.getList(1,search,e.key==="all"?"":e.key); diff --git a/public/react/src/modules/courses/coursesPublic/NoneData.js b/public/react/src/modules/courses/coursesPublic/NoneData.js index 73406ab5c..4066cea8b 100644 --- a/public/react/src/modules/courses/coursesPublic/NoneData.js +++ b/public/react/src/modules/courses/coursesPublic/NoneData.js @@ -1,5 +1,5 @@ import React, { Component } from 'react'; -import {getImageUrl} from 'educoder'; +import { getImageUrl , getUrl } from 'educoder'; class NoneData extends Component{ constructor(props) { @@ -9,7 +9,20 @@ class NoneData extends Component{ const { style } = this.props; return(
暂时还没有相关数据哦!
-
-
+
-
+
{
item.is_pdf && item.is_pdf == true ?
- {item.title}
+
- { + {/* { topicInfo.attachment_list.map((item,key)=>{ return( +
-
点击或拖拽文件到这里上传
-- 单个文件最大150MB -
-
+
点击或拖拽文件到这里上传
++ 单个文件最大150MB +
+实训已经更新了,正在为您重置!
-本实训的开启时间:{shixunsmessage}
开启时间之前不能挑战
-
*/} - {/*知道了*/} - {/*
*/} -实训已经更新了,正在为您重置!
+本实训的开启时间:{shixunsmessage}
开启时间之前不能挑战
+
*/} + {/*知道了*/} + {/*
*/} +还未上传附件
- : + : "" } {this.state.updatas===true?请上传附件:""}
- {this.props.coursedata.name}
+ {this.props.coursedata.name}
>
- 试卷
+ 试卷
>
-
+ {jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name}
>
{jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_name}
+ href={`/courses/${this.props.match.params.coursesId}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.mian === 1 ? "shixun_homeworks" :"shixun_homework"}/${jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_id === undefined ? "" : jobsettingsdatapage.data.category.category_id}`}>{jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.category.category_name}
>
- {jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name}
+ {jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name}
>
Date: Fri, 23 Aug 2019 18:17:05 +0800
Subject: [PATCH 037/130] =?UTF-8?q?=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../src/modules/courses/shixunHomework/ShixunHomeworkPage.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js
index c31e167f4..dddd39989 100644
--- a/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js
+++ b/public/react/src/modules/courses/shixunHomework/ShixunHomeworkPage.js
@@ -134,7 +134,7 @@ class ShixunHomeworkPage extends Component {
- {jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name}
+ {jobsettingsdatapage === undefined ? "" : jobsettingsdatapage.data.course_name}
>
Date: Fri, 23 Aug 2019 23:21:58 +0800
Subject: [PATCH 038/130] =?UTF-8?q?=E8=81=8C=E4=B8=9A=E8=AE=A4=E8=AF=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/shixuns_controller.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb
index bfd386e1c..5a52f6500 100644
--- a/app/controllers/shixuns_controller.rb
+++ b/app/controllers/shixuns_controller.rb
@@ -109,7 +109,7 @@ class ShixunsController < ApplicationController
can_fork = current_user.is_certification_teacher || current_user.admin?
unless can_fork
@can_fork = {can_fork: "已经职业认证的教师才能fork实训",
- certi_url: edu_setting('old_edu_host') + "/account/professional_certification"}
+ certi_url: "/account/professional_certification"}
end
@current_myshixun = @shixun.current_myshixun(current_user)
if @shixun.fork_from
From a5138f8394dfe0493f0b43cb806d8855375fa427 Mon Sep 17 00:00:00 2001
From: daiao <358551898@qq.com>
Date: Fri, 23 Aug 2019 23:26:49 +0800
Subject: [PATCH 039/130] =?UTF-8?q?=E8=81=8C=E4=B8=9A=E8=AE=A4=E8=AF=81?=
=?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/controllers/shixuns_controller.rb | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb
index 5a52f6500..d9ab31b8d 100644
--- a/app/controllers/shixuns_controller.rb
+++ b/app/controllers/shixuns_controller.rb
@@ -109,7 +109,7 @@ class ShixunsController < ApplicationController
can_fork = current_user.is_certification_teacher || current_user.admin?
unless can_fork
@can_fork = {can_fork: "已经职业认证的教师才能fork实训",
- certi_url: "/account/professional_certification"}
+ certi_url: "/account/certification"}
end
@current_myshixun = @shixun.current_myshixun(current_user)
if @shixun.fork_from
From 284c03e7394dd2fc5fdf7fbb25d733ff035a336c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com>
Date: Sat, 24 Aug 2019 09:34:08 +0800
Subject: [PATCH 040/130] =?UTF-8?q?=E8=B0=83=E6=95=B4=E6=82=AC=E5=81=9C?=
=?UTF-8?q?=E5=B0=8F=E6=89=8B?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/courses/shixunHomework/Listofworksstudentone.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
index a37e58a92..64e2e6a99 100644
--- a/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
+++ b/public/react/src/modules/courses/shixunHomework/Listofworksstudentone.js
@@ -369,9 +369,9 @@ class Listofworksstudentone extends Component {
{
record.submitstate === "未提交" ?--
:
- this.Viewstudenttraininginformation(record)}>{record.operating}
+ onClick={() => this.Viewstudenttraininginformation(record)}>{record.operating}
}
From 9e93f9c59e87b6cea973f123c0eec71459afdbca Mon Sep 17 00:00:00 2001
From: caicai8 <1149225589@qq.com>
Date: Sat, 24 Aug 2019 10:34:55 +0800
Subject: [PATCH 041/130] =?UTF-8?q?=E5=B7=B2=E5=8F=91=E5=B8=83=E8=AF=95?=
=?UTF-8?q?=E5=8D=B7=E7=BC=96=E8=BE=91=E4=BF=9D=E5=AD=98=E9=9C=80=E8=A6=81?=
=?UTF-8?q?=E5=BC=B9=E6=A1=86=E8=AF=A2=E9=97=AE=E6=98=AF=E5=90=A6=E6=9B=B4?=
=?UTF-8?q?=E6=96=B0=E5=88=86=E6=95=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/common/CNotificationHOC.js | 10 +++---
.../modules/courses/exercise/ExerciseNew.js | 22 +++++++++++--
.../courses/exercise/new/JudgeEditor.js | 14 ++++++--
.../courses/exercise/new/NullEditor.js | 14 ++++++--
.../courses/exercise/new/SingleEditor.js | 32 ++++++++++++-------
5 files changed, 69 insertions(+), 23 deletions(-)
diff --git a/public/react/src/modules/courses/common/CNotificationHOC.js b/public/react/src/modules/courses/common/CNotificationHOC.js
index 95e36957f..9a08268b1 100644
--- a/public/react/src/modules/courses/common/CNotificationHOC.js
+++ b/public/react/src/modules/courses/common/CNotificationHOC.js
@@ -106,11 +106,11 @@ export function CNotificationHOC(options = {}) {
confirm = (object) => {
- const { title, content, onOk, onCancel, okText } = object;
+ const { title, content,subContent, onOk, onCancel, okText } = object;
this.onCancel = onCancel
this.onOk = onOk
this.okText = okText || ''
- this.setState({ title, content, dialogOpen: true })
+ this.setState({ title, content , subContent , dialogOpen: true })
}
onDialogOkBtnClick = () => {
this.onOk && this.onOk();
@@ -141,17 +141,17 @@ export function CNotificationHOC(options = {}) {
this.onOk = null
}
render() {
- const { snackbarOpen, snackbarText, snackbarHorizontal, snackbarVertical, dialogOpen, content ,defineOpen } = this.state;
+ const { snackbarOpen, snackbarText, snackbarHorizontal, snackbarVertical, dialogOpen, content ,subContent ,defineOpen } = this.state;
return (
+ {errorTip} +
) } From d21085c92098a502bb8a3692badccf3dad6f34dc Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Sat, 24 Aug 2019 15:54:55 +0800 Subject: [PATCH 060/130] =?UTF-8?q?=E6=AF=95=E8=AE=BE=E6=88=AA=E6=AD=A2?= =?UTF-8?q?=E6=97=B6=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/graduation_tasks_controller.rb | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/app/controllers/graduation_tasks_controller.rb b/app/controllers/graduation_tasks_controller.rb index 4cae4e08b..727bdb77e 100644 --- a/app/controllers/graduation_tasks_controller.rb +++ b/app/controllers/graduation_tasks_controller.rb @@ -322,6 +322,8 @@ class GraduationTasksController < ApplicationController def publish_task tip_exception("缺少截止时间参数") if params[:end_time].blank? tip_exception("截止时间必须晚于当前时间") if params[:end_time] <= strf_time(Time.now) + tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if + @course.end_date.present? && params[:end_time] > @course.end_date.end_of_day ActiveRecord::Base.transaction do begin @@ -397,8 +399,8 @@ class GraduationTasksController < ApplicationController tip_exception("发布时间不能早于当前时间") if params[:publish_time] <= Time.now.strftime("%Y-%m-%d %H:%M:%S") tip_exception("截止时间不能早于当前时间") if params[:end_time] <= Time.now.strftime("%Y-%m-%d %H:%M:%S") tip_exception("截止时间不能早于发布时间") if params[:publish_time] > params[:end_time] - tip_exception("截止时间不能早于课堂结束时间") if @course.end_date.present? && - params[:end_time] > @course.end_date.end_of_day + tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if + @course.end_date.present? && params[:end_time] > @course.end_date.end_of_day @task.publish_time = params[:publish_time] @task.end_time = params[:end_time] @@ -410,7 +412,8 @@ class GraduationTasksController < ApplicationController elsif @task.status < 2 tip_exception("截止时间不能为空") if params[:end_time].blank? tip_exception("截止时间不能早于当前时间") if params[:end_time] <= Time.now.strftime("%Y-%m-%d %H:%M:%S") - tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if @course.end_date.present? && params[:end_time] > @course.end_date.end_of_day + tip_exception("截止时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if + @course.end_date.present? && params[:end_time] > @course.end_date.end_of_day @task.end_time = params[:end_time] end @@ -421,8 +424,8 @@ class GraduationTasksController < ApplicationController if params[:allow_late].to_i == 1 tip_exception("补交结束时间不能为空") if params[:late_time].blank? tip_exception("补交结束时间不能早于截止时间") if params[:late_time] <= @task.end_time - tip_exception("补交结束时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if @course.end_date.present? && params[:late_time] > - @course.end_date.end_of_day + tip_exception("补交结束时间不能晚于课堂结束时间(#{@course.end_date.end_of_day.strftime("%Y-%m-%d %H:%M")})") if + @course.end_date.present? && params[:late_time] > @course.end_date.end_of_day tip_exception("迟交扣分应为正整数") if params[:late_penalty] && params[:late_penalty].to_i < 0 @task.allow_late = true From 021b71985732cd60b09d610d1bfd015c1515c874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 24 Aug 2019 16:00:18 +0800 Subject: [PATCH 061/130] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=BD=93=E6=9C=9F=E5=BC=80=E8=AF=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/public/css/edu-all.css | 5 +++++ public/stylesheets/educoder/edu-all.css | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css index 52991cd2d..107f6694f 100644 --- a/public/react/public/css/edu-all.css +++ b/public/react/public/css/edu-all.css @@ -3448,4 +3448,9 @@ a.singlepublishtwo{ .square-main p{ margin-bottom: 0 !important; +} + +.ant-notification{ + width: auto !important; + max-width: 600px !important; } \ No newline at end of file diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css index 2b4449333..55cb03926 100644 --- a/public/stylesheets/educoder/edu-all.css +++ b/public/stylesheets/educoder/edu-all.css @@ -3756,4 +3756,8 @@ a.singlepublishtwo{ .has-error .ant-input:focus{ border-color: #ff4d4f !important; +} +.ant-notification{ + width: auto !important; + max-width: 600px !important; } \ No newline at end of file From 98f8443f9b1836373919e929ee047948b82584e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 24 Aug 2019 16:05:15 +0800 Subject: [PATCH 062/130] =?UTF-8?q?=E9=BB=98=E8=AE=A4=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E5=BC=B9=E7=AA=97=E5=AE=BD=E5=BA=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/public/css/edu-all.css | 8 ++++---- public/stylesheets/educoder/edu-all.css | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/public/react/public/css/edu-all.css b/public/react/public/css/edu-all.css index 107f6694f..6d180e342 100644 --- a/public/react/public/css/edu-all.css +++ b/public/react/public/css/edu-all.css @@ -3450,7 +3450,7 @@ a.singlepublishtwo{ margin-bottom: 0 !important; } -.ant-notification{ - width: auto !important; - max-width: 600px !important; -} \ No newline at end of file +/*.ant-notification{*/ + /*width: auto !important;*/ + /*max-width: 600px !important;*/ +/*}*/ \ No newline at end of file diff --git a/public/stylesheets/educoder/edu-all.css b/public/stylesheets/educoder/edu-all.css index 55cb03926..c4718c076 100644 --- a/public/stylesheets/educoder/edu-all.css +++ b/public/stylesheets/educoder/edu-all.css @@ -3757,7 +3757,7 @@ a.singlepublishtwo{ .has-error .ant-input:focus{ border-color: #ff4d4f !important; } -.ant-notification{ - width: auto !important; - max-width: 600px !important; -} \ No newline at end of file +/*.ant-notification{*/ + /*width: auto !important;*/ + /*max-width: 600px !important;*/ +/*}*/ \ No newline at end of file From 28e94d1dc9942395acfb0f34dc93f7c1e0f078a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com> Date: Sat, 24 Aug 2019 16:32:23 +0800 Subject: [PATCH 063/130] =?UTF-8?q?=E8=B0=83=E6=95=B4=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/tpm/TPMIndexHOC.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index a98e80739..21bd63b2b 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -35,14 +35,14 @@ if (!window['indexHOCLoaded']) { // $('head').append($('') // .attr('href', `${_url_origin}/stylesheets/educoder/antd.min.css?1525440977`)); $('head').append($('') - .attr('href', `${_url_origin}/stylesheets/css/edu-common.css?6`)); + .attr('href', `${_url_origin}/stylesheets/css/edu-common.css?8`)); $('head').append($('') - .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?6`)); + .attr('href', `${_url_origin}/stylesheets/educoder/edu-main.css?8`)); // index.html有加载 $('head').append($('') - .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?6`)); + .attr('href', `${_url_origin}/stylesheets/educoder/edu-all.css?8`)); // $('head').append($('') From da03ded9ea4faab861046cc7694efb595e581c9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Sat, 24 Aug 2019 17:09:48 +0800 Subject: [PATCH 064/130] =?UTF-8?q?=E8=B0=83=E6=95=B4=20=E5=85=AC=E5=91=8A?= =?UTF-8?q?=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/gradinforms/Bullsubdirectory.js | 302 ++++++++++++++++++ .../modules/courses/gradinforms/Eduinforms.js | 278 +++++++++++----- .../courses/gradinforms/myysleduinforms.css | 65 +++- 3 files changed, 565 insertions(+), 80 deletions(-) create mode 100644 public/react/src/modules/courses/gradinforms/Bullsubdirectory.js diff --git a/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js new file mode 100644 index 000000000..09fb43a23 --- /dev/null +++ b/public/react/src/modules/courses/gradinforms/Bullsubdirectory.js @@ -0,0 +1,302 @@ +import React,{ Component } from "react"; +import { Input,Checkbox,Table, Pagination, Modal,Menu, Tooltip,Spin,Button,Form } from "antd"; +import { WordsBtn,on, off, trigger,markdownToHTML,getImageUrl} from 'educoder'; +import './myysleduinforms.css' +import axios from 'axios'; +import TPMMDEditor from "../../tpm/challengesnew/TPMMDEditor"; +import moment from "../new/CoursesNew"; +import Fileslistitem from "../Resource/Fileslistitem"; +// 公告栏 +class Bullsubdirectory extends Component{ + constructor(props){ + super(props); + this.messageRef = React.createRef(); + + this.state={ + description:null, + isSpinysl:false, + whethertoeditysl:false, + addonAfter:0, + eduintits:"", + informs:[], + + + } + } + + componentDidMount() { + console.log("获取到数据"); + console.log(this.props); + let{id,myname,mydescription} =this.props + this.props.form.setFieldsValue({ + id:id, + eduintits:myname, + description:mydescription, + }); + this.setState({ + id:id, + eduintits:myname, + description:mydescription, + }) + + } + + + bianji = (bians)=>{ + this.setState({ + whethertoeditysl:bians, + }) + if(bians===true){ + this.props.getyslbooltrue(); + }else { + this.props.getyslboolfalse(); + } + }; + changeTopicName = (e) => { + console.log("调用了changeTopicName"); + let num = parseInt(e.target.value.length); + if(num>60){ + return; + } + this.setState({ + addonAfter: num < 0 ? 0 : num + }); + this.setState({ + eduintits: e.target.value + }) + + this.props.form.setFieldsValue({ + eduintits: e.target.value, + }); + } + handleSubmit=(e) => { + e.preventDefault(); + this.props.form.validateFields((err, values) => { + if (!err) { + console.log(values.description); + if(values.eduintits === undefined|| values.eduintits === "" || values.eduintits ===null){ + this.props.showNotification(`请输入标题`); + return + + } + if(values.description === undefined|| values.description === "" || values.description ===null){ + this.props.showNotification(`请输入内容`); + return + + } + var id=this.props.match.params.coursesId + + var url = `/courses/${id}/update_informs.json`; + axios.post(url,{ + inform_id:this.state.id, + name:values.eduintits, + description:values.description, + }).then((result) => { + if(result){ + if(result.data){ + if(result.data.status === 0){ + this.props.form.setFieldsValue({ + id:this.state.id, + eduintits:values.eduintits, + description:values.description, + }); + this.setState({ + whethertoeditysl:false, + id:this.state.id, + eduintits:values.eduintits, + description:values.description, + }); + this.props.getinputdata(); + this.props.showNotification(result.data.message); + }else { + this.props.showNotification(result.data.message); + + } + } + + } + }).catch((error) => { + console.log(error) + }) + }else{ + console.log(err); + } + + }); + } + + + render(){ + let{description,whethertoeditysl,addonAfter,eduintits,informs,isSpinysl} =this.state; + let{myname,mydescription}=this.props; + const {getFieldDecorator} = this.props.form; + + return( +暂时还没有相关数据哦!
暂时还没有相关数据哦!
+
公告栏 { this.props.isAdmin()===true? (this.state.yslbool===false? -