From 5bfb41ad37c3ca0dcb7a652eb6496d9b8c69cfd8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=98=8E?= <775174143@qq.com>
Date: Thu, 25 Jul 2019 14:34:46 +0800
Subject: [PATCH] =?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/coursesDetail/CoursesLeftNav.js | 4 +-
.../courses/coursesPublic/AddcoursesNav.js | 148 +++++++++---------
.../courses/coursesPublic/ModalsRename.js | 124 +++++++--------
public/react/src/modules/paths/Index.js | 108 +++++++------
.../modules/paths/PathDetail/DetailCards.js | 20 ++-
.../paths/PathDetail/DetailCardsEditAndAdd.js | 2 +-
.../PathDetail/DetailCardsEditAndEdit.js | 2 +-
.../paths/PathDetail/PathDetailIndex.js | 6 +
8 files changed, 220 insertions(+), 194 deletions(-)
diff --git a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js
index 2a395200c..707c4ba9b 100644
--- a/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js
+++ b/public/react/src/modules/courses/coursesDetail/CoursesLeftNav.js
@@ -408,7 +408,7 @@ class Coursesleftnav extends Component{
this.setState({
Navmodalname:id===2?"新建分班":"添加目录",
Navtitles:id===2?"分班名称":"目录名称",
- Navplaceholder:id===2?"示例:分班(最佳4个字符)":"示例:第一阶段(最佳4个字符)",
+ Navplaceholder:"请输入名称,最大限制60个字符",
Navmodalnametype:true,
Navmodaltypename:id,
setnavid:setnavid,
@@ -419,7 +419,7 @@ class Coursesleftnav extends Component{
this.setState({
Navmodalname:id===5?"分班重命名":"目录重命名",
Navtitles:id===5?"分班名称":"目录名称",
- Navplaceholder:id===5?"示例:分班(最佳4个字符)":"示例:第一阶段(最佳4个字符)",
+ Navplaceholder:"请输入名称,最大限制60个字符",
Navmodalnametype:true,
Navmodaltypename:id,
setnavid:setnavid,
diff --git a/public/react/src/modules/courses/coursesPublic/AddcoursesNav.js b/public/react/src/modules/courses/coursesPublic/AddcoursesNav.js
index 74c03808a..756ae62a6 100644
--- a/public/react/src/modules/courses/coursesPublic/AddcoursesNav.js
+++ b/public/react/src/modules/courses/coursesPublic/AddcoursesNav.js
@@ -1,74 +1,74 @@
-import React,{ Component } from "react";
-import { Modal,Checkbox,Input,Select} from "antd";
-const Option = Select.Option;
-
-class AddcoursesNav extends Component{
- constructor(props){
- super(props);
- this.state={
- StudentList_value:""
- }
- }
-
-
-
- render(){
- // let {StudentList_value}=this.state;
- // let {child}=this.props;
- //
- return(
-
-
-
-
- {this.props.addnametab===2?
-
- : this.props.addnametab===4?
-
-
选择目录名称:
-
-
-
-
-
- :""}
-
-
-
- )
- }
-}
-export default AddcoursesNav;
-
-
+import React,{ Component } from "react";
+import { Modal,Checkbox,Input,Select} from "antd";
+const Option = Select.Option;
+
+class AddcoursesNav extends Component{
+ constructor(props){
+ super(props);
+ this.state={
+ StudentList_value:""
+ }
+ }
+
+
+
+ render(){
+ // let {StudentList_value}=this.state;
+ // let {child}=this.props;
+ //
+ return(
+
+
+
+
+ {this.props.addnametab===2?
+
+ : this.props.addnametab===4?
+
+
选择目录名称:
+
+
+
+
+
+ :""}
+
+
+
+ )
+ }
+}
+export default AddcoursesNav;
+
+
diff --git a/public/react/src/modules/courses/coursesPublic/ModalsRename.js b/public/react/src/modules/courses/coursesPublic/ModalsRename.js
index 61d0c1cd7..1398c50ff 100644
--- a/public/react/src/modules/courses/coursesPublic/ModalsRename.js
+++ b/public/react/src/modules/courses/coursesPublic/ModalsRename.js
@@ -1,63 +1,63 @@
-import React,{ Component } from "react";
-import { Modal,Checkbox,Upload,Button,Icon,message,Input} from "antd";
-import axios from 'axios';
-
-class ModalsRename extends Component{
- constructor(props){
- super(props);
- this.state={
- name:this.props.NavmodalValue
- }
- }
-
- saveNavmoda=()=>{
- let{url}=this.props;
- let{name}=this.state;
-
- axios.post(url, {name:name}).then((result) => {
- if(result.data.status===0){
- this.props.showNotification(result.data.message);
- this.props.cannerNavmoda();
- this.props.coursupdata();
- }}
- )
- }
-
- setNavmodalValue=(e)=>{
- console.log(e.target.value)
- this.setState({
- name:e.target.value
- })
- }
-
- render(){
- return(
-
-
- {this.props.Navname}名称:
-
-
-
-
- )
- }
-}
+import React,{ Component } from "react";
+import { Modal,Checkbox,Upload,Button,Icon,message,Input} from "antd";
+import axios from 'axios';
+
+class ModalsRename extends Component{
+ constructor(props){
+ super(props);
+ this.state={
+ name:this.props.NavmodalValue
+ }
+ }
+
+ saveNavmoda=()=>{
+ let{url}=this.props;
+ let{name}=this.state;
+
+ axios.post(url, {name:name}).then((result) => {
+ if(result.data.status===0){
+ this.props.showNotification(result.data.message);
+ this.props.cannerNavmoda();
+ this.props.coursupdata();
+ }}
+ )
+ }
+
+ setNavmodalValue=(e)=>{
+ console.log(e.target.value)
+ this.setState({
+ name:e.target.value
+ })
+ }
+
+ render(){
+ return(
+
+
+ {this.props.Navname}名称:
+
+
+
+
+ )
+ }
+}
export default ModalsRename;
\ No newline at end of file
diff --git a/public/react/src/modules/paths/Index.js b/public/react/src/modules/paths/Index.js
index a26228ed5..a7efc43bc 100644
--- a/public/react/src/modules/paths/Index.js
+++ b/public/react/src/modules/paths/Index.js
@@ -1,52 +1,58 @@
-import React, { Component } from 'react';
-
-import { SnackbarHOC } from 'educoder';
-
-
-import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
-import Loadable from 'react-loadable';
-import Loading from '../../Loading';
-import { TPMIndexHOC } from '../tpm/TPMIndexHOC';
-
-const PathsDetail = Loadable({
- loader: () => import('./PathDetail/PathDetailIndex'),
- loading:Loading,
-})
-const PathsNew = Loadable({
- loader: () => import('./PathNew'),
- loading:Loading,
-})
-const Statistics = Loadable({
- loader: () => import('./SchoolStatistics/Statistics'),
- loading:Loading
-})
-
-const ShixunPaths = Loadable({
- loader: () => import('./ShixunPaths'),
- loading:Loading,
-})
-
-
-class Index extends Component{
- constructor(props) {
- super(props)
- }
- render() {
- return (
-
-
-
- ()}
- >
- ()}
- >
-
-
-
-
- )
- }
-}
+import React, { Component } from 'react';
+
+import { SnackbarHOC } from 'educoder';
+
+
+import {BrowserRouter as Router,Route,Switch} from 'react-router-dom';
+import Loadable from 'react-loadable';
+import Loading from '../../Loading';
+import { TPMIndexHOC } from '../tpm/TPMIndexHOC';
+
+const PathsDetail = Loadable({
+ loader: () => import('./PathDetail/PathDetailIndex'),
+ loading:Loading,
+})
+const PathsNew = Loadable({
+ loader: () => import('./PathNew'),
+ loading:Loading,
+})
+const Statistics = Loadable({
+ loader: () => import('./SchoolStatistics/Statistics'),
+ loading:Loading
+})
+
+const ShixunPaths = Loadable({
+ loader: () => import('./ShixunPaths'),
+ loading:Loading,
+})
+
+
+class Index extends Component{
+ constructor(props) {
+ super(props)
+ }
+ render() {
+ return (
+
+
+
+
+ ()}
+ >
+ ()}
+ >
+
+ ()}
+ >
+
+ {/**/}
+
+
+
+ )
+ }
+}
export default SnackbarHOC() ( TPMIndexHOC(Index) );
\ No newline at end of file
diff --git a/public/react/src/modules/paths/PathDetail/DetailCards.js b/public/react/src/modules/paths/PathDetail/DetailCards.js
index 115f7066c..0e95f1a48 100644
--- a/public/react/src/modules/paths/PathDetail/DetailCards.js
+++ b/public/react/src/modules/paths/PathDetail/DetailCards.js
@@ -314,6 +314,7 @@ class DetailCards extends Component{
showparagraphindex
}=this.state;
const antIcon = ;
+
return(
+
{
pathCardsList && pathCardsList.map((item,key)=>{
@@ -374,7 +388,7 @@ class DetailCards extends Component{
-
{item.stage_name}
+
{item.stage_name}
{
idsum===key&&pathCardsedittype===true?'':
@@ -442,13 +456,13 @@ class DetailCards extends Component{
:
}
-
+
{key+1}-{index+1} {line.shixun_name}
{
- line.shixun_status==="暂未公开"?
+ this.props.current_user&&this.props.current_user.admin===false&&line.shixun_status==="暂未公开"?
暂未公开
:
diff --git a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js
index 340505655..912302cb8 100644
--- a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js
+++ b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndAdd.js
@@ -402,7 +402,7 @@ class DetailCardsEditAndAdd extends Component{
*
必填项
diff --git a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndEdit.js b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndEdit.js
index 1bf137016..f91cf0e96 100644
--- a/public/react/src/modules/paths/PathDetail/DetailCardsEditAndEdit.js
+++ b/public/react/src/modules/paths/PathDetail/DetailCardsEditAndEdit.js
@@ -435,7 +435,7 @@ class DetailCardsEditAndEdit extends Component{
*
必填项
diff --git a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js
index 1731064c0..61933b765 100644
--- a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js
+++ b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js
@@ -140,10 +140,13 @@ class PathDetailIndex extends Component{
let url="/paths/"+pathid+".json";
axios.get(url).then((result)=>{
if (result.data.status === 407 || result.data.status === 401) {
+ debugger
return;
}
if (result.data.status === 403) {
+ debugger
+ window.location.href = "/403";
return;
}
@@ -165,9 +168,12 @@ class PathDetailIndex extends Component{
axios.get(url).then((result)=>{
// TODO 403 让后台返回status 403 比较好
if (result.data.status == 407 || result.data.status == 401) {
+ debugger
return;
}
if (result.data.status === 403 ) {
+ debugger
+ window.location.href = "/403";
return;
}