From c3a130382a9f33f8c8d82b34debd5602f87a15be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Tue, 10 Mar 2020 15:52:13 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E5=A0=82url=E6=8A=8Acourses=E6=94=B9?= =?UTF-8?q?=E6=88=90classrooms=20=2078=E5=A4=84=E5=9C=B0=E6=96=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../react/src/modules/ecs/EcSetting/index.js | 6 +- public/react/src/modules/tpm/TPMIndexHOC.js | 26 +- .../react/src/modules/user/usersInfo/Infos.js | 20 +- .../src/modules/user/usersInfo/InfosBanner.js | 4 +- .../src/modules/user/usersInfo/banner_out.js | 380 +++++++++--------- 5 files changed, 217 insertions(+), 219 deletions(-) diff --git a/public/react/src/modules/ecs/EcSetting/index.js b/public/react/src/modules/ecs/EcSetting/index.js index 71814f3e3..bcfebcdae 100644 --- a/public/react/src/modules/ecs/EcSetting/index.js +++ b/public/react/src/modules/ecs/EcSetting/index.js @@ -9,8 +9,8 @@ import { Loadable } from 'educoder'; import Loading from "../../../Loading"; const { Step } = Steps; const steps = ["培养目标", "毕业要求", "培养目标VS毕业要求", "毕业要求VS通用标准", "学生", "课程体系", "课程体系VS毕业要求", "达成度评价结果"]; -const stepTypes = ["training_objectives", "graduation_requirement", "requirement_vs_objective", "requirement_vs_standard", "students", "courses", "requirement_vs_courses", "reach_calculation_info"]; -const EcStudentList = Loadable({ +const stepTypes = ["training_objectives", "graduation_requirement", "requirement_vs_objective", "requirement_vs_standard", "students", "classrooms", "requirement_vs_courses", "reach_calculation_info"]; +const EcStudentList=Loadable({ loader: () => import('../subroute/ecStudentList/EcStudentList'), loading: Loading, }); @@ -82,7 +82,7 @@ class EcSetting extends React.Component { let type = stepTypes[stepIndex]; this.setState({ stepIndex: stepIndex }); - // if(type==="courses"){ + // if(type==="classrooms"){ // this.props.history.push(`/ecs/major_schools/${majorId}/years/${yearId}/${type}/ec_course_support_setting/1`); // }else { this.props.history.push(`/ecs/major_schools/${majorId}/years/${yearId}/${type}`); diff --git a/public/react/src/modules/tpm/TPMIndexHOC.js b/public/react/src/modules/tpm/TPMIndexHOC.js index ae447b758..0ffc56455 100644 --- a/public/react/src/modules/tpm/TPMIndexHOC.js +++ b/public/react/src/modules/tpm/TPMIndexHOC.js @@ -460,20 +460,18 @@ export default function TPMIndexHOC(WrappedComponent) { } - fetchUser = () => { - let url = `/users/get_user_info.json` - let courseId; - let query = this.props.location.pathname; - const type = query.split('/'); - if (type[1] == 'courses' && type[2]) { - courseId = parseInt(type[2]) - // url += `?course_id=${courseId}` - } - var datay = {}; - if (JSON.stringify(this.state.dataquerys) === "{}") { - datay = { - course_id: isNaN(courseId) ? undefined : courseId, - school: 1 + }).catch((error) => { + console.log(error) + }) + }; + fetchUsers = (yslurlobject) => { + let url = `/users/get_user_info.json` + let courseId; + let query = this.props.location.pathname; + const type = query.split('/'); + if (type[1] == 'classrooms' && type[2]) { + courseId = parseInt(type[2]) + // url += `?course_id=${courseId}` } } else { datay = { diff --git a/public/react/src/modules/user/usersInfo/Infos.js b/public/react/src/modules/user/usersInfo/Infos.js index bab362732..dbc607f45 100644 --- a/public/react/src/modules/user/usersInfo/Infos.js +++ b/public/react/src/modules/user/usersInfo/Infos.js @@ -52,16 +52,16 @@ const $ = window.$; class Infos extends Component { constructor(props) { super(props); - this.state = { - data: undefined, - is_current: undefined, - is_edit: false, - sign: undefined, - type: 0, - login: undefined, - isRenders: false, - moduleName: "courses", - next_gold: undefined + this.state={ + data:undefined, + is_current:undefined, + is_edit:false, + sign:undefined, + type:0, + login:undefined, + isRenders:false, + moduleName:"classrooms", + next_gold:undefined } } componentDidMount = () => { diff --git a/public/react/src/modules/user/usersInfo/InfosBanner.js b/public/react/src/modules/user/usersInfo/InfosBanner.js index 3e09adf82..e7d695d71 100644 --- a/public/react/src/modules/user/usersInfo/InfosBanner.js +++ b/public/react/src/modules/user/usersInfo/InfosBanner.js @@ -117,9 +117,9 @@ class InfosBanner extends Component{
- { - is_edit && is_current ? - - : - is_current ? - {sign || "这家伙很懒,什么都没留下~"} - : - {sign || "这家伙很懒,什么都没留下~"} - } -
- { - is_current ? - - : -+ { + is_edit && is_current ? + + : + is_current ? + {sign || "这家伙很懒,什么都没留下~"} + : + {sign || "这家伙很懒,什么都没留下~"} + } +
+ { + is_current ? + + : +