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 1/7] =?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 2/7] =?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"?"发布":"学习":"项目"} 时间最新
暂无数据哦~
暂无数据哦~
- {polls_counts&&polls_counts.left_banner_name} - { - isAdmin && -
- 共{polls_counts && polls_counts.polls_total_counts}个问卷 - 已发布:{polls_counts && polls_counts.polls_published_counts}个 - { - isAdmin && 未发布:{polls_counts && polls_counts.polls_unpublish_counts}个 - } -
-+ {polls_counts&&polls_counts.left_banner_name} + { + isAdmin && +
+ 共{polls_counts && polls_counts.polls_total_counts}个问卷 + 已发布:{polls_counts && polls_counts.polls_published_counts}个 + { + isAdmin && 未发布:{polls_counts && polls_counts.polls_unpublish_counts}个 + } +
+