From ee6d0ee4aef0c5f690d748e4c1c7fee5e844b5dd Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Thu, 20 Jun 2019 17:06:27 +0800 Subject: [PATCH 01/12] =?UTF-8?q?=E9=80=89=E9=A2=98=E6=96=B0=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/graduation/topics/GraduateTopicNew.js | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js index 876f2e4d0..7c0811615 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js @@ -38,7 +38,7 @@ class GraduateTopicNew extends Component{ topic_source:[], topic_type:[], attachments:undefined, - addonAfter:20, + addonAfter:60, left_banner_id:undefined, course_name:undefined } @@ -257,7 +257,7 @@ class GraduateTopicNew extends Component{ // 附件相关 ------------ END changeTopicName=(e)=>{ - let num= 20 - parseInt(e.target.value.length); + let num= 60 - parseInt(e.target.value.length); this.setState({ addonAfter:num < 0 ? 0 : num }) @@ -357,10 +357,10 @@ class GraduateTopicNew extends Component{ rules: [{ required: true, message: '请输入选题名称', }, { - max: 20, message: '最大限制为20个字符', + max: 60, message: '最大限制为60个字符', }], })( - + )} @@ -381,6 +381,9 @@ class GraduateTopicNew extends Component{ width: 350px; margin-bottom:10px; } + .ant-upload-list-item{ + margin-top:0px!important; + } `} From 86a20e86803fce6131d1ce664a78f395a3257341 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 21 Jun 2019 10:09:35 +0800 Subject: [PATCH 02/12] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../graduation/topics/GraduateTopicDetail.js | 46 +++++++++++++------ .../topics/GraduateTopicDetailInfo.js | 7 ++- .../topics/GraduateTopicDetailTable.js | 2 +- .../graduation/topics/GraduateTopicItem.js | 14 +++--- .../graduation/topics/GraduateTopicNew.js | 43 +++++++++++++++-- .../courses/graduation/topics/index.js | 18 +++++++- .../courses/poll/PollDetailTabFirst.js | 2 +- .../src/modules/courses/poll/PollListItem.js | 29 +++++------- .../modules/tpm/challengesnew/TPMMDEditor.js | 2 +- .../react/src/modules/user/usersInfo/Infos.js | 2 +- .../src/modules/user/usersInfo/InfosCourse.js | 17 ++++--- .../src/modules/user/usersInfo/InfosPath.js | 8 ++-- .../modules/user/usersInfo/InfosProject.js | 17 ++++--- .../src/modules/user/usersInfo/InfosShixun.js | 8 ++-- 14 files changed, 143 insertions(+), 72 deletions(-) diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js index e0eb07d56..27c27c64a 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js @@ -67,25 +67,35 @@ class GraduateTopicDetail extends Component{ let course_id=this.props.match.params.course_id; let {tableData}=this.state; - let url="/courses/"+course_id+"/graduation_topics/"+graduation_topic_id+"/" - if(tableData.user_selected_topic){ - url+="student_cancel_topic.json" - }else{ - url+="student_select_topic.json" - } - axios.post((url)).then((result)=>{ - console.log(result); - if(result.data.status == 0){ - this.getDetailList(); - this.props.showNotification(`${result.data.message}`); + this.props.confirm({ + content: tableData.user_selected_topic==0?`是否确认取消选题?`:"是否确认选题?", + onOk: () => { + let url="/courses/"+course_id+"/graduation_topics/"+graduation_topic_id+"/" + if(tableData.user_selected_topic==0){ + url+="student_cancel_topic.json" + }else if(tableData.user_selected_topic==null || tableData.user_selected_topic==2){ + url+="student_select_topic.json" + } + axios.post((url)).then((result)=>{ + console.log(result); + if(result.data.status == 0){ + this.getDetailList(); + this.props.showNotification(`${result.data.message}`); + } + }).catch((error)=>{ + console.log(error); + }) } - }).catch((error)=>{ - console.log(error); }) } render(){ - let {tableData,tablePage,tablePageSize,tab}=this.state + let { + tableData, + tablePage, + tablePageSize, + tab, + }=this.state let {course_id,graduation_topic_id}=this.props.match.params; const isStudent =this.props.isStudent(); const isAdmin =this.props.isAdmin(); @@ -113,8 +123,14 @@ class GraduateTopicDetail extends Component{
-
+
{
item.polls_status !=1 &&
-
+
{item.poll_answer} 已答
{item.poll_unanswer} 未答
}
{
item.polls_status ==1 && item.publish_time ==null && item.created_at &&
- 创建于{moment(item.created_at).format(dataformat)}
+ 创建于{moment(item.created_at).format(dataformat)}
}
{
item.polls_status ==1 && item.publish_time !=null &&
- 将发布于{moment(item.publish_time).format(dataformat)}
+ 将发布于{moment(item.publish_time).format(dataformat)}
}
{
item.polls_status ==2 && item.publish_time !=null &&
-
-
-
+
-
共参与{totalCount}个{category?category=="manage"?"发布":"学习":"课堂"} 时间最新
共参与{totalCount}个{category?category=="manage"?"发布":"学习":"项目"} 时间最新
-
-
- {fileName &&
{this.isEdit ? "编辑" : "新建"}试卷
this.props.history.goBack()}>
+ onClick={() => this.props.history.length == 1 ? this.props.history.push(`/courses/${courseId}/exercises/${left_banner_id}`): this.props.history.goBack()}>
返回
+
{this.isEdit ? "编辑" : "新建"}帖子
this.props.history.goBack()}>
diff --git a/public/react/src/modules/courses/busyWork/NewWork.js b/public/react/src/modules/courses/busyWork/NewWork.js
index 607a2dc82..eefbc1f0b 100644
--- a/public/react/src/modules/courses/busyWork/NewWork.js
+++ b/public/react/src/modules/courses/busyWork/NewWork.js
@@ -373,7 +373,7 @@ class NewWork extends Component{
{ name: `${ this.isEdit ? '编辑' : '新建'}` }
]}>
-
+
{this.isEdit ?"编辑":"新建"}{ moduleName }
{/* history.goBack()
this.props.toListPage(this.props.match.params, category.category_id)}
diff --git a/public/react/src/modules/courses/exercise/ExerciseNew.js b/public/react/src/modules/courses/exercise/ExerciseNew.js
index b17e8288c..8bc7ed6ae 100644
--- a/public/react/src/modules/courses/exercise/ExerciseNew.js
+++ b/public/react/src/modules/courses/exercise/ExerciseNew.js
@@ -405,7 +405,7 @@ class ExerciceNew extends Component{
{ name: this.isEdit ? '编辑试卷' : '新建试卷'}
]}>
-
+
{this.isEdit ? "编辑" : "新建"}试卷
this.props.history.length == 1 ? this.props.history.push(`/courses/${courseId}/exercises/${left_banner_id}`): this.props.history.goBack()}>
From 19bf3d635a08b619d67898ee667fcb61f209dc5f Mon Sep 17 00:00:00 2001
From: caishi <1149225589@qq.com>
Date: Fri, 21 Jun 2019 11:19:04 +0800
Subject: [PATCH 06/12] =?UTF-8?q?=E6=AF=95=E8=AE=BE=E4=BB=BB=E5=8A=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../modules/courses/graduation/tasks/index.js | 38 +++++++++----------
.../graduation/topics/GraduateTopicDetail.js | 2 +-
.../topics/GraduateTopicDetailInfo.js | 17 +--------
.../react/src/modules/user/usersInfo/Infos.js | 21 ++++++++--
4 files changed, 38 insertions(+), 40 deletions(-)
diff --git a/public/react/src/modules/courses/graduation/tasks/index.js b/public/react/src/modules/courses/graduation/tasks/index.js
index fa86da93d..5553db968 100644
--- a/public/react/src/modules/courses/graduation/tasks/index.js
+++ b/public/react/src/modules/courses/graduation/tasks/index.js
@@ -744,24 +744,20 @@ class GraduationTasks extends Component{
- 暂无数据哦~ 暂无数据哦~
+
- {discussMessage.author.name}
+ {discussMessage.author.name}
- { discussMessage.total_replies_count != 0 && {discussMessage.total_replies_count} 回复 }
- { discussMessage.total_praises_count != 0 && {discussMessage.total_praises_count} 点赞 }
- { discussMessage.visits != 0 && {discussMessage.visits} 浏览 }
+ { discussMessage.total_replies_count != 0 && {discussMessage.total_replies_count} 回复 }
+ { discussMessage.total_praises_count != 0 && {discussMessage.total_praises_count} 点赞 }
+ { discussMessage.visits != 0 && {discussMessage.visits} 浏览 }
- {moment(discussMessage.created_on).fromNow()}
+ {moment(discussMessage.created_on).fromNow()}
- {/* 最后回复社区导师10个月前 */}
- 82
- 1
- 4
-
{item.commit_count===undefined?"":{item.commit_count} 已交}
@@ -184,6 +184,12 @@ class CommonWorkItem extends Component{
{item.status_time}
}
+
+ {this.props.isAdmin &&
- {/*