From 370b1ee2343cbd8f5679cd7bffb3aa18b7717891 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 21 Jun 2019 10:35:34 +0800 Subject: [PATCH 1/8] css --- .../src/modules/courses/boards/TopicDetail.js | 37 +++++++++++++------ .../modules/courses/common/courseMessage.css | 2 +- 2 files changed, 27 insertions(+), 12 deletions(-) diff --git a/public/react/src/modules/courses/boards/TopicDetail.js b/public/react/src/modules/courses/boards/TopicDetail.js index 1ef880c9f..5d4a434a5 100644 --- a/public/react/src/modules/courses/boards/TopicDetail.js +++ b/public/react/src/modules/courses/boards/TopicDetail.js @@ -227,15 +227,30 @@ class TopicDetail extends Component { // filesize = bytesToSize(item.filesize) } attachments.push( -

- - - {fileName && 30 }> - {fileName} - } - {filesize? ` ${filesize.replace(' ', '')}` : ''} + //

+ // + // + // {fileName && 30 }> + // {fileName} + // } + // {filesize? ` ${filesize.replace(' ', '')}` : ''} + // + //

+ +
+ + -

+ {fileName && 30 }> + + {fileName} + + } + + {item.filesize} + +
) }) return attachments; @@ -542,7 +557,7 @@ class TopicDetail extends Component { } {/* || current_user.user_id === author_info.user_id */} { current_user && (isAdmin || isCurrentUserTheAuthor) && -
+
-
+
-
+
{/* ${memo.user_praise ? '' : ''} */} diff --git a/public/react/src/modules/courses/common/courseMessage.css b/public/react/src/modules/courses/common/courseMessage.css index db2381d37..e521b24f5 100644 --- a/public/react/src/modules/courses/common/courseMessage.css +++ b/public/react/src/modules/courses/common/courseMessage.css @@ -25,7 +25,7 @@ } */ #forum_list .return_btn.no_mr { - margin-right: 15px + /* margin-right: 15px */ } /* md编辑器拖拽调整 */ From e1339db81243bf967529695d61991a8c450ce68b Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 21 Jun 2019 11:01:00 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E8=BF=94=E5=9B=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/courses/exercise/ExerciseNew.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/exercise/ExerciseNew.js b/public/react/src/modules/courses/exercise/ExerciseNew.js index 88e1859f9..b17e8288c 100644 --- a/public/react/src/modules/courses/exercise/ExerciseNew.js +++ b/public/react/src/modules/courses/exercise/ExerciseNew.js @@ -408,7 +408,7 @@ class ExerciceNew extends Component{

{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()}> 返回

From 716c2b68cae222dab9745210f414939cb8ef643a Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 21 Jun 2019 11:03:50 +0800 Subject: [PATCH 3/8] clearfix mt30 mb30 --- public/react/src/modules/courses/boards/BoardsNew.js | 2 +- public/react/src/modules/courses/busyWork/NewWork.js | 2 +- public/react/src/modules/courses/exercise/ExerciseNew.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/boards/BoardsNew.js b/public/react/src/modules/courses/boards/BoardsNew.js index bd134c922..cf530aba5 100644 --- a/public/react/src/modules/courses/boards/BoardsNew.js +++ b/public/react/src/modules/courses/boards/BoardsNew.js @@ -280,7 +280,7 @@ class BoardsNew extends Component{ { name: this.isEdit ? '帖子编辑' : '帖子新建'} ]}> -

+

{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 6995de1523182422013b2c58bca9cb223619458e Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 21 Jun 2019 15:08:09 +0800 Subject: [PATCH 4/8] cs --- .../modules/courses/boards/BoardsListItem.js | 42 ++++++++++--------- .../courses/busyWork/CommonWorkItem.js | 10 ++++- 2 files changed, 30 insertions(+), 22 deletions(-) diff --git a/public/react/src/modules/courses/boards/BoardsListItem.js b/public/react/src/modules/courses/boards/BoardsListItem.js index c25c541e8..2a6aaae2f 100644 --- a/public/react/src/modules/courses/boards/BoardsListItem.js +++ b/public/react/src/modules/courses/boards/BoardsListItem.js @@ -1,7 +1,7 @@ import React,{ Component } from "react"; import {Tooltip} from 'antd' import moment from 'moment' -import { getUrl } from 'educoder' +import { getUrl, WordsBtn } from 'educoder' class BoardsListItem extends Component{ constructor(props){ super(props); @@ -61,34 +61,37 @@ class BoardsListItem 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个月前 */}

+
+ {(isAdmin || discussMessage.author.login == current_user.login) && + { this.props.toEditPage(this.props.match.params.coursesId, this.props.match.params.boardId, discussMessage.id )} }>编辑 } + + { isAdmin && { debugger; onSticky(discussMessage); e.cancelBubble = true; e.stopPropagation();}}> + { discussMessage.sticky ? '取消置顶' : '置顶' } } +
+ + - {/* 473 */} - {/*

- 82 - 1 - 4 -

*/} - { (isAdmin || discussMessage.author.login == current_user.login) && + {/* { (isAdmin || discussMessage.author.login == current_user.login) &&
- } + } */} + +
) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkItem.js b/public/react/src/modules/courses/busyWork/CommonWorkItem.js index 258a06332..295f55fe1 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkItem.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkItem.js @@ -156,7 +156,7 @@ class CommonWorkItem extends Component{ - { + {/* { mainList && isAdmin &&
  • @@ -170,7 +170,7 @@ class CommonWorkItem extends Component{
  • - } + } */}

    {item.commit_count===undefined?"":{item.commit_count} 已交} @@ -184,6 +184,12 @@ class CommonWorkItem extends Component{ {item.status_time} } + + {this.props.isAdmin &&

    + { this.props.toEditPage(this.props.match.params, item.homework_id) }}>编辑 + { this.props.toWorkSettingPage(this.props.match.params, item.homework_id) }}>设置 +
    } + { // isStudent && From b7424701b22fab5af6f4d98fe117562ac5b8f718 Mon Sep 17 00:00:00 2001 From: hjm <63528605@qq.com> Date: Fri, 21 Jun 2019 15:11:07 +0800 Subject: [PATCH 5/8] =?UTF-8?q?route=E7=BC=BA=E5=A4=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/courses/busyWork/IndexGroup.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/public/react/src/modules/courses/busyWork/IndexGroup.js b/public/react/src/modules/courses/busyWork/IndexGroup.js index 5271d7deb..0a4415f2f 100644 --- a/public/react/src/modules/courses/busyWork/IndexGroup.js +++ b/public/react/src/modules/courses/busyWork/IndexGroup.js @@ -36,6 +36,10 @@ const CommonWorkAnswer = Loadable({ loader: () => import('./CommonWorkAnswer'), loading:Loading, }) +const CommonWorkAppraise = Loadable({ + loader: () => import('./CommonWorkAppraise'), + loading:Loading, +}) const CommonWork = Loadable({ @@ -87,6 +91,12 @@ class CoursesWorkIndex extends Component{ (props) => () } > + {/* 评阅 */} + () + } + > Date: Fri, 21 Jun 2019 15:18:11 +0800 Subject: [PATCH 6/8] title --- public/react/src/modules/courses/busyWork/CommonWorkList.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/CommonWorkList.js b/public/react/src/modules/courses/busyWork/CommonWorkList.js index 58a448a35..11d26ebf1 100644 --- a/public/react/src/modules/courses/busyWork/CommonWorkList.js +++ b/public/react/src/modules/courses/busyWork/CommonWorkList.js @@ -70,10 +70,10 @@ function buildColumns(that, student_works) { overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' - }}> - + }} title={text}> + {/* + */} {text} -
    ), }, { From 9769bec51717f4afc616c8d2e66022e4caed64b5 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, 21 Jun 2019 15:31:48 +0800 Subject: [PATCH 7/8] =?UTF-8?q?=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../courses/graduation/tasks/GraduationTasksedit.js | 9 +++++++-- public/react/src/modules/courses/new/CoursesNew.js | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js index 9874b26fa..cd84cd221 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js @@ -79,7 +79,12 @@ class GraduationTasksedit extends Component{ let listid=[] let graduation_id=this.state.data.graduation_id; for(var list of fileList){ - listid.push(list.response.id) + if(list.response!=undefined){ + listid.push(list.response.id) + }else{ + listid.push(list.id) + } + } // console.log(listid) @@ -125,7 +130,7 @@ class GraduationTasksedit extends Component{ GraduationTasksedittype=false; // window.location.href="/courses/"+course_id+"/graduation/"+graduationId+"/graduation_tasks/"+category_id+"/questions"; // this.goback() - window.location.href="/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+graduation_id+"/"+this.props.match.params.category_id +"/setting"; + this.props.history.push("/courses/"+this.props.match.params.coursesId+"/graduation_tasks/"+graduation_id+"/"+this.props.match.params.category_id +"/setting"); } }).catch((error) => { console.log(error) diff --git a/public/react/src/modules/courses/new/CoursesNew.js b/public/react/src/modules/courses/new/CoursesNew.js index d8fb83974..6c0158f21 100644 --- a/public/react/src/modules/courses/new/CoursesNew.js +++ b/public/react/src/modules/courses/new/CoursesNew.js @@ -314,7 +314,7 @@ class CoursesNew extends Component { } }).then((result)=>{ this.setState({ - searchlistscholl:result.data.shools_name, + searchlistscholl:result.data.school_names, scholl:value }) this.props.form.setFieldsValue({ From 5811df7dcecba4a2baa7a23d25e4798bff220691 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, 21 Jun 2019 15:34:44 +0800 Subject: [PATCH 8/8] =?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/graduation/tasks/GraduationTasksedit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js index cd84cd221..39116c5de 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTasksedit.js @@ -82,7 +82,7 @@ class GraduationTasksedit extends Component{ if(list.response!=undefined){ listid.push(list.response.id) }else{ - listid.push(list.id) + listid.push(list.uid) } }