From 74bb30ba01e8236272afc1de0e1191eaabeb9665 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, 28 Jun 2019 10:08:13 +0800 Subject: [PATCH] =?UTF-8?q?=20=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/modules/courses/busyWork/UseBank.js | 13 ++++++-- .../courses/coursesDetail/CoursesLeftNav.js | 2 ++ .../courses/coursesPublic/Addcourses.js | 30 +++++++++++++++---- .../courses/exercise/ExerciseListItem.js | 2 +- public/react/src/modules/tpm/NewHeader.js | 2 +- public/react/src/modules/tpm/TPMIndexHOC.js | 6 ++-- 6 files changed, 43 insertions(+), 12 deletions(-) diff --git a/public/react/src/modules/courses/busyWork/UseBank.js b/public/react/src/modules/courses/busyWork/UseBank.js index 7bddb9979..142c65c5c 100644 --- a/public/react/src/modules/courses/busyWork/UseBank.js +++ b/public/react/src/modules/courses/busyWork/UseBank.js @@ -187,7 +187,13 @@ class UseBank extends Component{ display: -webkit-flex; } .setImgW .edu-nodata-img{ - width:218px!important; + width:218px !important; + } + .bankwidth{ + width:29% !important; + overflow:hidden; + text-overflow:ellipsis; + white-space:nowrap } `} @@ -269,7 +275,10 @@ class UseBank extends Component{ - 14 && item.course_list_name} className={nav_my==='myself'?"fl with30 color-grey-6 task-hide pl5":"fl with30 color-grey-6 task-hide pl5"}>{item.course_list_name} + 14 && item.course_list_name} + className={nav_my==='myself'?"fl with30 color-grey-6 task-hide pl5 bankwidth":"fl with30 color-grey-6 task-hide pl5 bankwidth"} + + >{item.course_list_name} { nav_my==='public' && {item.username} diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js index 423632d89..aec7ca390 100644 --- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js +++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js @@ -272,9 +272,11 @@ class Coursesleftnav extends Component{ debugger let {url}=this.state; if(urls!=url){ + debugger this.props.history.replace(urls); this.props.updataleftNavfun(); }else{ + debugger if (key === this.props.indexs) { this.props.unlocationNavfun(undefined) } else { diff --git a/public/react/src/modules/courses/coursesPublic/Addcourses.js b/public/react/src/modules/courses/coursesPublic/Addcourses.js index f3212d9bd..097d55053 100644 --- a/public/react/src/modules/courses/coursesPublic/Addcourses.js +++ b/public/react/src/modules/courses/coursesPublic/Addcourses.js @@ -1,5 +1,5 @@ import React,{ Component } from "react"; -import { Modal,Checkbox,Input} from "antd"; +import { Modal,Checkbox,Input, Spin, Icon } from "antd"; import axios from 'axios'; import Modals from '../../modals/Modals'; const CheckboxGroup = Checkbox.Group; @@ -23,6 +23,7 @@ class Addcourses extends Component{ modalsType:false, modalsTopval:undefined, modalSave:undefined, + isSpin:false } } @@ -144,17 +145,22 @@ class Addcourses extends Component{ } submittojoinclass=()=>{ + this.setState({ + isSpin:true + }) let {invite_code,professor,assistant_professor,student}=this.state; if(invite_code===undefined||invite_code===""){ this.setState({ invite_codetype:true, - invite_codevalue:"邀请码不能为空" + invite_codevalue:"邀请码不能为空", + spinning:false }) return }else{ this.setState({ invite_codetype:false, - invite_codevalue:" " + invite_codevalue:" ", + spinning:false }) } @@ -178,7 +184,12 @@ class Addcourses extends Component{ // // modalSave:this.submitasyn, // course_id:response.data.course_id // }) - this.submitasyn(response.data.course_id) + if(response.data.course_id!=undefined){ + this.submitasyn(response.data.course_id) + } + this.props.hideAddcoursestype(); + + this.props.showNotification(response.data.message); }else{ this.setState({ Addcoursestype:false @@ -193,8 +204,15 @@ class Addcourses extends Component{ // course_id:undefined // }) } + + this.setState({ + spinning:false + }) }).catch((error) => { console.log(error) + this.setState({ + spinning:false + }) }) // if(value===0){ @@ -258,7 +276,7 @@ class Addcourses extends Component{ modalsTopval, modalSave }=this.state; - + const antIcon = ; return(
+
    @@ -331,6 +350,7 @@ class Addcourses extends Component{
+
) diff --git a/public/react/src/modules/courses/exercise/ExerciseListItem.js b/public/react/src/modules/courses/exercise/ExerciseListItem.js index eb0377022..70df3f577 100644 --- a/public/react/src/modules/courses/exercise/ExerciseListItem.js +++ b/public/react/src/modules/courses/exercise/ExerciseListItem.js @@ -167,7 +167,7 @@ class ExerciseListItem extends Component{ { IsAdmin &&
- 编辑 + 编辑 设置
} diff --git a/public/react/src/modules/tpm/NewHeader.js b/public/react/src/modules/tpm/NewHeader.js index 4af1aa6ef..a2ddb242a 100644 --- a/public/react/src/modules/tpm/NewHeader.js +++ b/public/react/src/modules/tpm/NewHeader.js @@ -811,7 +811,7 @@ submittojoinclass=(value)=>{ closable={false} footer={null} > -
+
  • diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index 1ae9e34fb..fff1ce231 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -123,13 +123,13 @@ export function TPMIndexHOC(WrappedComponent) { componentDidMount() { if(this.props.match.path==="/"){ - document.title="创新源于实践"; + document.title="创新源于实践"; }else if(this.props.match.path==="/403"){ - document.title="你没有权限访问"; + document.title="你没有权限访问"; }else if(this.props.match.path==="/nopage"){ document.title="没有找到该页面"; }else if(this.props.match.path==="/shixuns"){ - document.title="开发社区"; + document.title="开发社区"; }else if(this.props.match.path==="/paths"){ document.title="实训课程"; }else if(this.props.match.path==="/courses"){