diff --git a/public/react/src/modules/paths/PathDetail/DetailCardsTemp.js b/public/react/src/modules/paths/PathDetail/DetailCardsTemp.js
index 4acc28a48..5150d14da 100644
--- a/public/react/src/modules/paths/PathDetail/DetailCardsTemp.js
+++ b/public/react/src/modules/paths/PathDetail/DetailCardsTemp.js
@@ -1,5 +1,6 @@
import React, { Component } from 'react';
import {getImageUrl} from 'educoder';
+import { Tooltip } from 'antd';
import '../../paths/ShixunPaths.css';
import DetailCardsEditAndAdd from './DetailCardsEditAndAdd';
import axios from 'axios';
@@ -85,16 +86,26 @@ class DetailCards extends Component{
+
{item.stage_name}
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
+
+
+
+
+
+
+
{item.stage_description}
diff --git a/public/react/src/modules/paths/PathDetail/DetailTop.js b/public/react/src/modules/paths/PathDetail/DetailTop.js
index 50c5c2680..09425df92 100644
--- a/public/react/src/modules/paths/PathDetail/DetailTop.js
+++ b/public/react/src/modules/paths/PathDetail/DetailTop.js
@@ -1,238 +1,241 @@
-import React,{ Component } from "react";
-import { Modal,Radio,Input,Tooltip } from "antd";
-import { BrowserRouter as Router, Route, Link } from "react-router-dom";
-import SendPanel from "./sendPanel.js";
-import { getImageUrl } from 'educoder';
-import axios from 'axios';
-import Modals from '../../modals/Modals';
-import './DetailTop.css';
-
-const Search = Input.Search;
-const RadioGroup = Radio.Group;
-class DetailTop extends Component{
- constructor(props){
- super(props)
- this.state={
- cardsModalcancel:this.cardsModalcancel,
- cardsModalsave:this.cardsModalsave,
- Modalstype:false,
- Modalstopval:"",
- Modalsbottomval:'',
- loadtype:false,
- deletepathtype:false,
- cardsModalsavetype:false
- }
- }
-
- allow_deletepath=()=>{
- this.setState({
- Modalstype:true,
- Modalstopval:"是否删除路径?",
- deletepathtype:true
- })
- }
-
- applyissuePath=()=>{
- this.setState({
- Modalstype:true,
- Modalstopval:"发布申请已提交,请等待管理员的审核",
- Modalsbottomval:"• 我们将在1-2个工作日内完成审核",
- loadtype:true
- })
- }
-
- cancelissuePath=()=>{
- let pathId=this.props.match.params.pathId;
- let url ="/paths/"+pathId+"/cancel_publish.json";
- axios.get(url).then((result)=>{
- if(result.status===200){
- if(result.data.status===0){
-
- }else if(result.data.status===1){
- window.location.href = "/paths/" + result.data.subject_id
- }
- }
- }).catch((error)=>{
- console.log(error);
- })
- }
-
- reovkissuePath=()=>{
-
- this.setState({
- Modalstype:true,
- Modalstopval:"是否确认撤销发布",
- Modalsbottomval:"确认后,回退到编辑状态",
- cardsModalsavetype:true,
- })
-
- }
- reovkissuePaths=()=>{
- let pathId=this.props.match.params.pathId;
- let url ="/paths/"+pathId+"/cancel_has_publish.json";
- axios.get(url).then((result)=>{
- if(result.status===200){
- if(result.data.status===0){
-
- }else if(result.data.status===1){
- this.setState({
- cardsModalsavetype:false,
- loadtype:false,
- deletepathtype:false
- })
- window.location.href = "/paths/" + result.data.subject_id
- }
- }
- }).catch((error)=>{
- console.log(error);
- })
- }
-
- cardsModalcancel=()=>{
- this.setState({
- Modalstype:false,
- Modalsbottomval:'',
- loadtype:false,
- deletepathtype:false
- })
- }
-
- cardsModalsave=()=>{
- let {loadtype,deletepathtype}=this.state;
-
- //删除路径
- if(deletepathtype===true){
- let pathid=this.props.match.params.pathId;
- const deleteUrl = `/paths/`+pathid+`.json`;
- axios.delete(deleteUrl).then((response) => {
- const status = response.data.status
- if (status === 1) {
- window.location.href = "/paths";
- }
- }).catch((error) => {
- console.log(error)
- })
- }
-
- //申请发布
- if(loadtype===true){
-
- let pathid=this.props.match.params.pathId;
- let url ="/paths/"+pathid+"/publish.json";
- axios.get(url).then((result)=>{
- if(result.status===200){
- if(result.data.status===0){
- this.setState({
- Modalstype:true,
- Modalstopval: result.data.message,
- })
- }else if(result.data.status===1){
- window.location.reload();
- }
- }
- }).catch((error)=>{
- console.log(error);
- })
-
- }
- this.setState({
- Modalstype:false,
- Modalsbottomval:''
- })
- }
-
- render(){
- let{detailInfoList}=this.props;
- let{Modalstype,Modalstopval,cardsModalcancel,cardsModalsave,Modalsbottomval,cardsModalsavetype,loadtype}=this.state;
- const radioStyle = {
- display: 'block',
- height: '30px',
- lineHeight: '30px',
- };
-
- return(
-
-
-
- {
- detailInfoList &&
-
-
-
- {detailInfoList.name}
-
-
- {detailInfoList===undefined?"":detailInfoList.allow_statistics===true?
-
-
- :""
- }
-
- {detailInfoList===undefined?"":detailInfoList.allow_statistics===true?
-
- 学习统计
- :""
- }
-
- { detailInfoList.allow_send === true &&
-
- }
-
-
-
- {
- detailInfoList &&
-
- { detailInfoList.stages_count!=0 ? - 章节{detailInfoList.stages_count}
: ""}
- { detailInfoList.stage_shixuns_count!=0 ? - 实训{ detailInfoList.stage_shixuns_count}
: ""}
- { detailInfoList.challenge_choose_count!=0 ? - 选择题任务{detailInfoList.challenge_choose_count}
: ""}
- { detailInfoList.challenges_count!=0 ? - 实践任务{detailInfoList.challenges_count}
: ""}
- { detailInfoList.subject_score!=0 ? - 经验值{detailInfoList.subject_score}
: ""}
- { detailInfoList.member_count!=0 ? - 学习人数{detailInfoList.member_count}
: ""}
-
- }
-
- {detailInfoList===undefined?"":detailInfoList.allow_delete===true?
删除路径:""}
-
- {
- detailInfoList.publish_status===0&&detailInfoList.allow_statistics===true?
-
申请发布:""
- }
-
-
- {
- detailInfoList.publish_status===1 && detailInfoList.allow_statistics===true?
-
撤销申请:""
- }
-
- {
- detailInfoList.publish_status===2 && detailInfoList.allow_statistics===true?
-
撤销发布:""
- }
-
-
-
- }
-
-
- )
- }
-}
+import React,{ Component } from "react";
+import { Modal,Radio,Input,Tooltip } from "antd";
+import { BrowserRouter as Router, Route, Link } from "react-router-dom";
+import SendPanel from "./sendPanel.js";
+import { getImageUrl } from 'educoder';
+import axios from 'axios';
+import Modals from '../../modals/Modals';
+import './DetailTop.css';
+
+const Search = Input.Search;
+const RadioGroup = Radio.Group;
+class DetailTop extends Component{
+ constructor(props){
+ super(props)
+ this.state={
+ cardsModalcancel:this.cardsModalcancel,
+ cardsModalsave:this.cardsModalsave,
+ Modalstype:false,
+ Modalstopval:"",
+ Modalsbottomval:'',
+ loadtype:false,
+ deletepathtype:false,
+ cardsModalsavetype:false
+ }
+ }
+
+ allow_deletepath=()=>{
+ this.setState({
+ Modalstype:true,
+ Modalstopval:"是否删除路径?",
+ deletepathtype:true
+ })
+ }
+
+ applyissuePath=()=>{
+ this.setState({
+ Modalstype:true,
+ Modalstopval:"发布申请已提交,请等待管理员的审核",
+ Modalsbottomval:"• 我们将在1-2个工作日内完成审核",
+ loadtype:true
+ })
+ }
+
+ cancelissuePath=()=>{
+ let pathId=this.props.match.params.pathId;
+ let url ="/paths/"+pathId+"/cancel_publish.json";
+ axios.get(url).then((result)=>{
+ if(result.status===200){
+ if(result.data.status===0){
+
+ }else if(result.data.status===1){
+ window.location.href = "/paths/" + result.data.subject_id
+ }
+ }
+ }).catch((error)=>{
+ console.log(error);
+ })
+ }
+
+ reovkissuePath=()=>{
+
+ this.setState({
+ Modalstype:true,
+ Modalstopval:"是否确认撤销发布",
+ Modalsbottomval:"确认后,回退到编辑状态",
+ cardsModalsavetype:true,
+ })
+
+ }
+ reovkissuePaths=()=>{
+ let pathId=this.props.match.params.pathId;
+ let url ="/paths/"+pathId+"/cancel_has_publish.json";
+ axios.get(url).then((result)=>{
+ if(result.status===200){
+ if(result.data.status===0){
+
+ }else if(result.data.status===1){
+ this.setState({
+ cardsModalsavetype:false,
+ loadtype:false,
+ deletepathtype:false
+ })
+ window.location.href = "/paths/" + result.data.subject_id
+ }
+ }
+ }).catch((error)=>{
+ console.log(error);
+ })
+ }
+
+ cardsModalcancel=()=>{
+ this.setState({
+ Modalstype:false,
+ Modalsbottomval:'',
+ loadtype:false,
+ deletepathtype:false
+ })
+ }
+
+ cardsModalsave=()=>{
+ let {loadtype,deletepathtype}=this.state;
+
+ //删除路径
+ if(deletepathtype===true){
+ let pathid=this.props.match.params.pathId;
+ const deleteUrl = `/paths/`+pathid+`.json`;
+ axios.delete(deleteUrl).then((response) => {
+ const status = response.data.status
+ if (status === 1) {
+ window.location.href = "/paths";
+ }
+ }).catch((error) => {
+ console.log(error)
+ })
+ }
+
+ //申请发布
+ if(loadtype===true){
+
+ let pathid=this.props.match.params.pathId;
+ let url ="/paths/"+pathid+"/publish.json";
+ axios.get(url).then((result)=>{
+ if(result.status===200){
+ if(result.data.status===0){
+ this.setState({
+ Modalstype:true,
+ Modalstopval: result.data.message,
+ })
+ }else if(result.data.status===1){
+ window.location.reload();
+ }
+ }
+ }).catch((error)=>{
+ console.log(error);
+ })
+
+ }
+ this.setState({
+ Modalstype:false,
+ Modalsbottomval:''
+ })
+ }
+
+ render(){
+ let{detailInfoList}=this.props;
+ let{Modalstype,Modalstopval,cardsModalcancel,cardsModalsave,Modalsbottomval,cardsModalsavetype,loadtype}=this.state;
+ const radioStyle = {
+ display: 'block',
+ height: '30px',
+ lineHeight: '30px',
+ };
+
+ return(
+
+
+
+ {
+ detailInfoList &&
+
+
+
+ {detailInfoList.name}
+
+
+ {detailInfoList===undefined?"":detailInfoList.allow_statistics===true?
+
+
+
+
+
+ :""
+ }
+
+ {detailInfoList===undefined?"":detailInfoList.allow_statistics===true?
+
+ 学习统计
+ :""
+ }
+
+ { detailInfoList.allow_send === true &&
+
+ }
+
+
+
+ {
+ detailInfoList &&
+
+ { detailInfoList.stages_count!=0 ? - 章节{detailInfoList.stages_count}
: ""}
+ { detailInfoList.stage_shixuns_count!=0 ? - 实训{ detailInfoList.stage_shixuns_count}
: ""}
+ { detailInfoList.challenge_choose_count!=0 ? - 选择题任务{detailInfoList.challenge_choose_count}
: ""}
+ { detailInfoList.challenges_count!=0 ? - 实践任务{detailInfoList.challenges_count}
: ""}
+ { detailInfoList.subject_score!=0 ? - 经验值{detailInfoList.subject_score}
: ""}
+ { detailInfoList.member_count!=0 ? - 学习人数{detailInfoList.member_count}
: ""}
+
+ }
+
+ {detailInfoList===undefined?"":detailInfoList.allow_delete===true?
删除路径:""}
+
+ {
+ detailInfoList.publish_status===0&&detailInfoList.allow_statistics===true?
+
申请发布:""
+ }
+
+
+ {
+ detailInfoList.publish_status===1 && detailInfoList.allow_statistics===true?
+
撤销申请:""
+ }
+
+ {
+ detailInfoList.publish_status===2 && detailInfoList.allow_statistics===true?
+
撤销发布:""
+ }
+
+
+
+ }
+
+
+ )
+ }
+}
export default DetailTop;
\ No newline at end of file
diff --git a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js
index 61933b765..a72771c39 100644
--- a/public/react/src/modules/paths/PathDetail/PathDetailIndex.js
+++ b/public/react/src/modules/paths/PathDetail/PathDetailIndex.js
@@ -369,9 +369,11 @@ class PathDetailIndex extends Component{
课程须知
{detailInfoList===undefined?"":detailInfoList.allow_statistics===true?
+
-
+
+
:""
}
@@ -397,16 +399,18 @@ class PathDetailIndex extends Component{
+