From 4aa70fc370d8a26370a1861668e7c38de4a4fe56 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Fri, 20 Mar 2020 19:24:08 +0800
Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E3=80=81=E8=AF=BE=E5=A0=82?=
=?UTF-8?q?=E6=94=B6=E8=97=8F=E5=8A=9F=E8=83=BD=E3=80=81=E5=AE=9E=E8=AE=AD?=
=?UTF-8?q?=E5=A4=8D=E5=88=B6=E5=8F=AF=E9=80=89=E7=8F=AD=E7=BA=A7=E5=8A=9F?=
=?UTF-8?q?=E8=83=BD=E8=B0=83=E6=95=B4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../courses/signin/model/Createsignmodel.js | 30 +++++++---
.../src/modules/paths/PathDetail/DetailTop.js | 50 ++++++++++++++++
.../paths/PathDetail/PathDetailIndex.js | 6 +-
public/react/src/modules/tpm/TPMBanner.js | 60 ++++++++++++++++++-
public/react/src/modules/tpm/TPMIndex.js | 1 +
5 files changed, 132 insertions(+), 15 deletions(-)
diff --git a/public/react/src/modules/courses/signin/model/Createsignmodel.js b/public/react/src/modules/courses/signin/model/Createsignmodel.js
index 99f616204..6b504e4b7 100644
--- a/public/react/src/modules/courses/signin/model/Createsignmodel.js
+++ b/public/react/src/modules/courses/signin/model/Createsignmodel.js
@@ -54,7 +54,8 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
end_time: date
});
}
- componentDidMount() {
+ getgroup_idss=(course_groups)=>{
+ let newcourse_groups=course_groups;
if(this.props.type==="edit"){
let newlist=[]
if(this.props.attendancesdata.groups.length>0){
@@ -63,15 +64,25 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
})
}
- console.log(this.props.attendancesdata.start_time)
- // console.log()
+ newlist.map((item,key)=>{
+ newcourse_groups.map((i,k)=>{
+ if(i.id===item){
+ i.disabled=true
+ }
+ })
+ })
+ console.log(newlist)
+ // this.setState({
+ //
+ // })
this.setState({
attendance_date: this.props.attendancesdata.attendance_date,
start_time:new Date(this.props.attendancesdata.start_time),
end_time:new Date(this.props.attendancesdata.end_time),
newmode:this.props.attendancesdata.mode,
+ course_groups:newcourse_groups
})
@@ -85,6 +96,7 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
}else{
this.setState({
start_time: new Date("2000-01-01T09:00:00.000+08:00"),
+ course_groups:newcourse_groups
})
this.props.form.setFieldsValue({
@@ -92,15 +104,15 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
});
}
+ }
+ componentDidMount() {
const coursesId=this.props.match.params.coursesId;
let newurl=`/courses/${coursesId}/all_course_groups.json`;
axios.get(newurl).then((response) => {
+ this.getgroup_idss(response.data.course_groups)
+ })
- this.setState({
- course_groups:response.data.course_groups
- })
- })
}
@@ -269,12 +281,12 @@ const CollectionCreateForm = Form.create({ name: 'form_in_modal' })(
{getFieldDecorator('group_ids')(