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{ 课题详情 + {/* null: 未选题 0:待确认 1:已同意 2:已拒绝 */} + { + isStudent && tableData.user_selected == false && (tableData.user_selected_topic==null || tableData.user_selected_topic==2) && + 选题 + } { - isStudent && {tableData.user_selected_topic ? "取消选题":"选题"} + isStudent && tableData.user_selected == true && tableData.user_selected_topic==0 && + 取消选题 } { isAdmin && 编辑 diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailInfo.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailInfo.js index 708de6dcb..f0694964c 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailInfo.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailInfo.js @@ -57,12 +57,17 @@ class GraduateTopicDetailTable extends Component{ return(
+
{ topicInfo && topicInfo.description!="" && - + }
{ diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailTable.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailTable.js index 7dbbf21f7..963c7a4f9 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailTable.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailTable.js @@ -254,7 +254,7 @@ class GraduateTopicDetailTable extends Component{ tableData.users_list && tableData.users_list.length > 0 && tableData.users_list.map((item,key)=>{ return(
  • - {parseInt(key)*parseInt(page*15)+1} + {parseInt(key+1)+(parseInt(page-1)*15)} {item.student_name} {item.student_id} {item.class_group_name || "--"} diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js index 136280943..17a1b070e 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicItem.js @@ -96,26 +96,26 @@ class GraduateTopicItem extends Component{

    - + {discussMessage.author} - {discussMessage.selected_count} 已选 - {discussMessage.confirmation_count} 已确认 + {discussMessage.selected_count} 已选 + {discussMessage.confirmation_count} 已确认 { isAdmin && this.editTopic(`${discussMessage.id}`)} style="blue" className="font-16">编辑 } { - isStudent && data.user_selected == true && discussMessage.user_selected==true && - chooseTopic(`${discussMessage.id}`,index,discussMessage.user_selected)} style="blue" className="font-16"> + isStudent && data.user_selected == true && discussMessage.user_topic_status==0 && + chooseTopic(`${discussMessage.id}`,index,true)} style="blue" className="font-16"> 取消选题 } { - isStudent && data.user_selected == false && discussMessage.user_selected == false && - chooseTopic(`${discussMessage.id}`,index,discussMessage.user_selected)} style="blue" className="font-16"> + isStudent && data.user_selected==false && (discussMessage.user_topic_status == null || discussMessage.user_topic_status == 2) && + chooseTopic(`${discussMessage.id}`,index,false)} style="blue" className="font-16"> 选题 } diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js index 7c0811615..c3c0d18e2 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicNew.js @@ -87,7 +87,7 @@ class GraduateTopicNew extends Component{ let topicId=this.props.match.params.topicId let url=`/courses/${cid}/graduation_topics/${topicId}/edit.json`; axios.get((url)).then((result)=>{ - if(result.status==200){ + if(result){ this.setState({ left_banner_id:result.data.left_banner_id, course_name:result.data.course_name, @@ -315,6 +315,11 @@ class GraduateTopicNew extends Component{ console.log(this.props); return(

    +

    {course_name} @@ -384,6 +389,31 @@ class GraduateTopicNew extends Component{ .ant-upload-list-item{ margin-top:0px!important; } + + .ant-form-item-children{ + position:unset + } + .rememberTip{ + position:absolute; + right:0px; + bottom:-10px; + } + .chooseDes .ant-form-explain{ + position:absolute; + bottom:-10px; + left:0px; + } + .setUploadStyle .uploadBtn{ + height:20px; + line-height:20px; + } + .setUploadStyle .ant-form-item-control{ + margin-top:15px!important; + line-height:22px!important; + } + .setUploadStyle .ant-upload-list{ + margin-top:5px; + } `} @@ -392,7 +422,7 @@ class GraduateTopicNew extends Component{ {getFieldDecorator('description', { rules: [{ @@ -405,7 +435,9 @@ class GraduateTopicNew extends Component{ mdID={'courseMessageMD'} initValue={this.editTopic ? this.editTopic.content : ''} className="courseMessageMD"> )} - + { getFieldDecorator('file',{ rules:[{ @@ -508,6 +540,9 @@ class GraduateTopicNew extends Component{ .flexBlock .ant-row.ant-form-item { margin-bottom: 6px; } + .ant-cascader-menu{ + min-width:125px!important; + } `} @@ -546,7 +581,7 @@ class GraduateTopicNew extends Component{ {getFieldDecorator('city', { rules: [{ diff --git a/public/react/src/modules/courses/graduation/topics/index.js b/public/react/src/modules/courses/graduation/topics/index.js index d7d6852f2..f84f53952 100644 --- a/public/react/src/modules/courses/graduation/topics/index.js +++ b/public/react/src/modules/courses/graduation/topics/index.js @@ -223,7 +223,23 @@ onDelete=(index)=>{ }) }else{ // 加入题库 - + let courseid=this.props.match.params.coursesId + let url=`/courses/${courseid}/graduation_topics/add_to_bank.json`; + axios.post((url),{ + topic_ids:checkBoxValues + }).then((result)=>{ + if(result){ + this.props.showNotification(`题库更新成功`); + let {searchValue,page,status} =this.state + this.fetchAll(searchValue,page,status); + this.setState({ + checkBoxValues:[], + checkAllValue:false + }) + } + }).catch((error)=>{ + console.log(error) + }) } }else{ diff --git a/public/react/src/modules/courses/poll/PollDetailTabFirst.js b/public/react/src/modules/courses/poll/PollDetailTabFirst.js index 4166895e1..6a5be2e8d 100644 --- a/public/react/src/modules/courses/poll/PollDetailTabFirst.js +++ b/public/react/src/modules/courses/poll/PollDetailTabFirst.js @@ -187,7 +187,7 @@ class PollDetailTabFirst extends Component{ key: 'classes', dataIndex: 'classes', width:160, - className:course_groups && course_groups.length > 0?"edu-txt-center":"edu-txt-center none" + className:poll_types && poll_types.groups_count > 0 ? "edu-txt-center":"edu-txt-center none" }, { title: '提交状态', dataIndex: 'status', diff --git a/public/react/src/modules/courses/poll/PollListItem.js b/public/react/src/modules/courses/poll/PollListItem.js index 769b4db33..3ebb6eb73 100644 --- a/public/react/src/modules/courses/poll/PollListItem.js +++ b/public/react/src/modules/courses/poll/PollListItem.js @@ -49,23 +49,23 @@ class PollListItem 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 && - {formatDuring(t)} + {formatDuring(t)} } { @@ -81,21 +81,14 @@ class PollListItem extends Component{ } :"" } -

    - { - IsAdmin && -
    -
      -
    • - -
        -
      • 编辑
      • -
      • 设置
      • -
      -
    • + { + IsAdmin && +
        + 设置 + 编辑
      -
    - } + } +

    ) diff --git a/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js b/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js index 30fa1c803..4af26d698 100644 --- a/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js +++ b/public/react/src/modules/tpm/challengesnew/TPMMDEditor.js @@ -300,7 +300,7 @@ export default class TPMMDEditor extends Component {
  • -
    +
    {noStorage == true ? '' :

    } {noStorage == true ? '' :

    }
    diff --git a/public/react/src/modules/user/usersInfo/Infos.js b/public/react/src/modules/user/usersInfo/Infos.js index 0f608426c..8d77a1b29 100644 --- a/public/react/src/modules/user/usersInfo/Infos.js +++ b/public/react/src/modules/user/usersInfo/Infos.js @@ -268,7 +268,7 @@ class Infos extends Component{ 实训 实训课程 项目 - { isAdmin && 题库 } + { data && data.identity !="学生" && this.ToBank(`/`)}>题库 }
    diff --git a/public/react/src/modules/user/usersInfo/InfosCourse.js b/public/react/src/modules/user/usersInfo/InfosCourse.js index 1a6b78542..b864dff63 100644 --- a/public/react/src/modules/user/usersInfo/InfosCourse.js +++ b/public/react/src/modules/user/usersInfo/InfosCourse.js @@ -41,7 +41,7 @@ class InfosCourse extends Component{ category, status, page, - per_page:category && page ==1?17:16 + per_page: this.props.is_current && category && page ==1?17:16 }}).then((result)=>{ if(result){ this.setState({ @@ -111,18 +111,21 @@ class InfosCourse extends Component{
  • this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的
  • this.changeCategory("study")}>{is_current ? "我":"TA"}学习的
  • -
    -
  • this.changeStatus()}>全部
  • -
  • this.changeStatus("processing")}>正在进行
  • -
  • this.changeStatus("end")}>已结束
  • -
    + { + is_current && +
    +
  • this.changeStatus()}>全部
  • +
  • this.changeStatus("processing")}>正在进行
  • +
  • this.changeStatus("end")}>已结束
  • +
    + }

    共参与{totalCount}个{category?category=="manage"?"发布":"学习":"课堂"} 时间最新

    { - !isStudent && page == 1 && !category && + !isStudent && page == 1 && !category && is_current && } { diff --git a/public/react/src/modules/user/usersInfo/InfosPath.js b/public/react/src/modules/user/usersInfo/InfosPath.js index 156370f05..55422f208 100644 --- a/public/react/src/modules/user/usersInfo/InfosPath.js +++ b/public/react/src/modules/user/usersInfo/InfosPath.js @@ -44,7 +44,7 @@ class InfosPath extends Component{ status, sort_by, page, - per_page:category && page ==1?17:16 + per_page:this.props.is_current && category && page ==1?17:16 }}).then((result)=>{ if(result){ this.setState({ @@ -126,7 +126,7 @@ class InfosPath extends Component{
  • this.changeCategory("study")}>{is_current ? "我":"TA"}学习的
  • { - category && category == "manage" && + category && category == "manage" && is_current &&
  • this.changeStatus()}>全部
  • this.changeStatus("editing")}>编辑中
  • @@ -135,7 +135,7 @@ class InfosPath extends Component{
    } { - category && category == "study" && + category && category == "study" && is_current &&
  • this.changeStatus()}>全部
  • this.changeStatus("unfinished")}>未完成
  • @@ -148,7 +148,7 @@ class InfosPath extends Component{
    { - isStudent ==false && page == 1 && !category && + !isStudent && page == 1 && !category && is_current && } { diff --git a/public/react/src/modules/user/usersInfo/InfosProject.js b/public/react/src/modules/user/usersInfo/InfosProject.js index eb3ef9b65..fab96f59e 100644 --- a/public/react/src/modules/user/usersInfo/InfosProject.js +++ b/public/react/src/modules/user/usersInfo/InfosProject.js @@ -37,7 +37,7 @@ class InfosProject extends Component{ category, status, page, - per_page:category && page ==1?17:16 + per_page:this.props.is_current && category && page ==1?17:16 }}).then((result)=>{ if(result){ this.setState({ @@ -107,18 +107,21 @@ class InfosProject extends Component{
  • this.changeCategory("manage")}>{is_current ? "我":"TA"}管理的
  • this.changeCategory("study")}>{is_current ? "我":"TA"}学习的
  • -
    -
  • this.changeStatus()}>全部
  • -
  • this.changeStatus("publicly")}>公开
  • -
  • this.changeStatus("personal")}>私有
  • -
    + { + is_current && +
    +
  • this.changeStatus()}>全部
  • +
  • this.changeStatus("publicly")}>公开
  • +
  • this.changeStatus("personal")}>私有
  • +
    + }

    共参与{totalCount}个{category?category=="manage"?"发布":"学习":"项目"} 时间最新

    { - !isStudent && page == 1 && !category && + !isStudent && page == 1 && !category && is_current && } { diff --git a/public/react/src/modules/user/usersInfo/InfosShixun.js b/public/react/src/modules/user/usersInfo/InfosShixun.js index 1fcd86b98..90575f9f0 100644 --- a/public/react/src/modules/user/usersInfo/InfosShixun.js +++ b/public/react/src/modules/user/usersInfo/InfosShixun.js @@ -44,7 +44,7 @@ class InfosShixun extends Component{ status, sort_by, page, - per_page:category && page ==1?17:16 + per_page:this.props.is_current && category && page ==1?17:16 }}).then((result)=>{ if(result){ this.setState({ @@ -126,7 +126,7 @@ class InfosShixun extends Component{
  • this.changeCategory("study")}>{is_current ? "我":"TA"}学习的
  • { - category && category == "manage" && + category && category == "manage" && is_current &&
  • this.changeStatus()}>全部
  • this.changeStatus("editing")}>编辑中
  • @@ -136,7 +136,7 @@ class InfosShixun extends Component{
    } { - category && category == "study" && + category && category == "study" && is_current &&
  • this.changeStatus()}>全部
  • this.changeStatus("processing")}>未通关
  • @@ -157,7 +157,7 @@ class InfosShixun extends Component{
    { - isStudent ==false && page == 1 && !category && + !isStudent && page == 1 && !category && is_current && } { 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 03/12] 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) && -
    +
      @@ -619,10 +634,10 @@ class TopicDetail extends Component {
    -
    +
    -
    +
    {/* ${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 04/12] =?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 05/12] 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 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{ -

    - + { + all_count > 15 && +
    + +
    + }
    -
    -

    暂无数据哦~

    +
    + +

    暂无数据哦~

    diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js index 27c27c64a..2f6a364a5 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetail.js @@ -120,7 +120,7 @@ class GraduateTopicDetail extends Component{
    选题列表 - 课题详情 + 选题问答
    {/* null: 未选题 0:待确认 1:已同意 2:已拒绝 */} diff --git a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailInfo.js b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailInfo.js index f0694964c..b1cfe7c6e 100644 --- a/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailInfo.js +++ b/public/react/src/modules/courses/graduation/topics/GraduateTopicDetailInfo.js @@ -6,7 +6,7 @@ import '../style.css' import axios from "axios"; import GraduateTopicReply from './GraduateTopicReply' -import { ConditionToolTip,markdownToHTML } from 'educoder' +import { ConditionToolTip,MarkdownToHtml } from 'educoder' const $=window.$; const type={1: "设计",2: "论文", 3: "创作"} @@ -21,18 +21,6 @@ class GraduateTopicDetailTable extends Component{ topicInfo:undefined } } - updatamakedown=(id)=>{ - setTimeout(()=>{ - var shixunDescr = window.editormd.markdownToHTML(id, { - htmlDecode: "style,script,iframe", - taskList: true, - tex: true, - flowChart: true, - sequenceDiagram: true - }); - $("#"+id+" p:first").addClass("ReactMarkdown"); - }, 200) - } componentDidMount=()=>{ let course_id=this.props.match.params.course_id; let graduation_topic_id=this.props.match.params.graduation_topic_id; @@ -47,7 +35,6 @@ class GraduateTopicDetailTable extends Component{ }).catch((error)=>{ console.log(error); }) - this.updatamakedown("gratuationTopic_Detail"); } render(){ let{topicInfo}=this.state @@ -67,7 +54,7 @@ class GraduateTopicDetailTable extends Component{
    { topicInfo && topicInfo.description!="" && - + }
    { diff --git a/public/react/src/modules/user/usersInfo/Infos.js b/public/react/src/modules/user/usersInfo/Infos.js index 8d77a1b29..e5f1e99dd 100644 --- a/public/react/src/modules/user/usersInfo/Infos.js +++ b/public/react/src/modules/user/usersInfo/Infos.js @@ -15,6 +15,8 @@ import "../../courses/css/members.css" import "../../courses/css/Courses.css" import update from 'immutability-helper' +import Trialapplication from '../../login/Trialapplication' + const $ = window.$; class Infos extends Component{ @@ -26,7 +28,8 @@ class Infos extends Component{ is_edit:false, sign:undefined, type:0, - login:undefined + login:undefined, + isRenders:false } } componentDidMount =()=>{ @@ -44,6 +47,14 @@ class Infos extends Component{ } } } + + // 试用申请 + trialapplications =()=>{ + this.setState({ + isRenders: true, + }) + } + //获取个人主页信息 getInfo = (user_login) =>{ let url =`/users/${user_login}/homepage_info.json`; @@ -155,12 +166,16 @@ class Infos extends Component{ type, followed, id, - login + login, + isRenders }=this.state; let {username}= this.props.match.params; let {isAdmin}=this.props.isAdmin(); return(
    + { + isRenders && + }
    : From a8a33ebd7d24e54c70d5e5da01373f9f1a5f8d5e Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 21 Jun 2019 13:50:17 +0800 Subject: [PATCH 07/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 --- .../courses/graduation/tasks/GraduationTaskssettinglist.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js index 7ef1f99c5..9e0573a1c 100644 --- a/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js +++ b/public/react/src/modules/courses/graduation/tasks/GraduationTaskssettinglist.js @@ -1357,7 +1357,7 @@ class GraduationTaskssettinglist extends Component{ 不限 this.funteachercomment(e,taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.length)} style={{ paddingTop: '4px'}}> - {taskslistdata.search_assistants&&taskslistdata.search_assistants.teacher_comment.map((item,key)=>{ + {taskslistdata.search_assistants && taskslistdata.search_assistants.teacher_comment && taskslistdata.search_assistants.teacher_comment.map((item,key)=>{ return( {item.name} @@ -1499,7 +1499,7 @@ class GraduationTaskssettinglist extends Component{ pagination={false} loading={loadingstate} onChange={this.TablePagination} - + className="edu-txt-center" />}
    @@ -1740,6 +1740,7 @@ class GraduationTaskssettinglist extends Component{ pagination={false} loading={loadingstate} onChange={this.TablePagination} + className="edu-txt-center" />}
    From 0780f2027bff41bb9c5674e5f75d2a7b05befb50 Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 21 Jun 2019 13:58:46 +0800 Subject: [PATCH 08/12] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E4=B8=BB=E9=A1=B5-?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/user/usersInfo/Infos.js | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/public/react/src/modules/user/usersInfo/Infos.js b/public/react/src/modules/user/usersInfo/Infos.js index e5f1e99dd..0ce102eb5 100644 --- a/public/react/src/modules/user/usersInfo/Infos.js +++ b/public/react/src/modules/user/usersInfo/Infos.js @@ -48,12 +48,6 @@ class Infos extends Component{ } } - // 试用申请 - trialapplications =()=>{ - this.setState({ - isRenders: true, - }) - } //获取个人主页信息 getInfo = (user_login) =>{ @@ -157,6 +151,19 @@ class Infos extends Component{ } } + // 试用申请 + trialapplications =()=>{ + this.setState({ + isRenders: true, + showTrial:true + }) + } + cancelModulationModels=()=>{ + this.setState({ + isRenders: false + }) + } + render(){ let { data , @@ -174,7 +181,7 @@ class Infos extends Component{ return(
    { - isRenders && + isRenders && this.cancelModulationModels()}/> }
    From d276fee00b15bd3b9ae4ee2c4cdc85fd906cfd5c Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Fri, 21 Jun 2019 14:07:35 +0800 Subject: [PATCH 09/12] =?UTF-8?q?=E9=A2=98=E5=BA=93=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/react/src/modules/user/usersInfo/Infos.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/public/react/src/modules/user/usersInfo/Infos.js b/public/react/src/modules/user/usersInfo/Infos.js index 0ce102eb5..3300423a1 100644 --- a/public/react/src/modules/user/usersInfo/Infos.js +++ b/public/react/src/modules/user/usersInfo/Infos.js @@ -163,6 +163,9 @@ class Infos extends Component{ isRenders: false }) } + ToBank=(url)=>{ + window.location.href=url; + } render(){ let { @@ -290,7 +293,7 @@ class Infos extends Component{ 实训 实训课程 项目 - { data && data.identity !="学生" && this.ToBank(`/`)}>题库 } + { data && data.identity !="学生" && this.ToBank(`/users/${username}?type=a_project`)}>题库 }
    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 10/12] 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 11/12] =?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 12/12] 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} -
    ), }, {