From 727ec30925c0cded215c87dc52e31b592fba7736 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=A8=E6=A0=91=E6=9E=97?= <904079904@qq.com> Date: Wed, 11 Sep 2019 10:07:55 +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/elearning/YslDetailCards.js | 211 ++++++++++-------- 1 file changed, 112 insertions(+), 99 deletions(-) diff --git a/public/react/src/modules/courses/elearning/YslDetailCards.js b/public/react/src/modules/courses/elearning/YslDetailCards.js index c29533b71..141c5abfb 100644 --- a/public/react/src/modules/courses/elearning/YslDetailCards.js +++ b/public/react/src/modules/courses/elearning/YslDetailCards.js @@ -388,76 +388,84 @@ class YslDetailCards extends Component{ } ` } - { - stages && stages.map((item,key)=>{ - - return( -
-

- - - - - {item.stage_name} - { - idsum===key&&pathCardsedittype===true?'': - - this.props.isAdmin()==true? - - - { editbuttomtype===true?'': - this.pathCardsedit(key, item.stage_id)}> - - - } - - { - stages.length=== key+1?"":this.chapterdown(item.stage_id)}> - - - - - } - - - {key===0?"": - this.chapterup(item.stage_id)}> - - - - } - - :"" - - - } - - { - idsum === key && pathCardsedittype === true ? - this.props.isAdmin()===true? - this.delectpathCardsedit(item.stage_id)}> - - - - :"" - : '' - } -

- - { - idsum===key&&pathCardsedittype===true?'': -
-

{item.stage_description}

- -
+ + + { + this.props.isStudent()===true&&(stages===undefined||stages===JSON.stringify("[]")||stages.length===0)? + + : + "" + } + { + stages && stages.map((item,key)=>{ + + return( +
+

+ + + + + {item.stage_name} + { + idsum===key&&pathCardsedittype===true?'': + + this.props.isAdmin()==true? + + + { editbuttomtype===true?'': + this.pathCardsedit(key, item.stage_id)}> + + + } + + { + stages.length=== key+1?"":this.chapterdown(item.stage_id)}> + + + + + } + + + {key===0?"": + this.chapterup(item.stage_id)}> + + + + } + + :"" + + + } { - item.shixuns_list && item.shixuns_list.map((line,index)=>{ - return( -

this.showparagraph(key,index)} onMouseLeave={this.hideparagraph}> + idsum === key && pathCardsedittype === true ? + this.props.isAdmin()===true? + this.delectpathCardsedit(item.stage_id)}> + + + + :"" + : '' + } +

+ + { + idsum===key&&pathCardsedittype===true?'': +
+

{item.stage_description}

+ +
-
  • + { + item.shixuns_list && item.shixuns_list.map((line,index)=>{ + return( +
    this.showparagraph(key,index)} onMouseLeave={this.hideparagraph}> + +
  • { @@ -465,45 +473,50 @@ class YslDetailCards extends Component{ : } - + {key+1}-{index+1}  {line.shixun_name} -
  • - { - this.props.current_user&&this.props.current_user.admin===false&&line.shixun_status==="暂未公开"? -
  • 暂未公开
  • - : -
  • +
  • { - showparagraphkey===key&&showparagraphindex===index?:"" + this.props.current_user&&this.props.current_user.admin===false&&line.shixun_status==="暂未公开"? +
  • 暂未公开
  • + : +
  • + { + showparagraphkey===key&&showparagraphindex===index?:"" + } + +
  • } +
    ) + }) + } +
    +
    + } + { + this.props.isAdmin()===true? + + :"" + } - - } -
    ) - }) - } -
    - } - -
    - ) - }) - } + ) + }) + } } { editbuttomtypeadd===true?'':this.props.isAdmin()===true?