人生啊人生 пре 1 месец
родитељ
комит
69d808cc85
1 измењених фајлова са 19 додато и 18 уклоњено
  1. 19 18
      src/view/student/trainChapter/trainChapter.vue

+ 19 - 18
src/view/student/trainChapter/trainChapter.vue

@@ -11,7 +11,7 @@
             <div class="chapter-content">
 
                 <!-- 原本的左侧菜单 -->
-                <div class="menu-box" :class="{ fold: state.menuFold }">
+                <!-- <div class="menu-box" :class="{ fold: state.menuFold }">
                     <div class="menu-title">{{ state.chapterTree[state.currentStep]?.name ?? '' }}</div>
                     <div class="menu-list">
                         <el-scrollbar :max-height="state.menuListHeight">
@@ -38,10 +38,10 @@
                         </el-scrollbar>
                         <div class="menu-switch" @click="menuSwitch"></div>
                     </div>
-                </div>
+                </div> -->
 
                 <!-- 新的左侧菜单 -->
-                <!-- <div :class="'menuLeft ' + (menuLeftLook == true ? 'menuLeftOpenEvent' : 'menuLeftExitEvent')" >
+                <div :class="'menuLeft ' + (menuLeftLook == true ? 'menuLeftOpenEvent' : 'menuLeftExitEvent')" >
                     <div class="menuTitle" >
                         <div class="logoLeft"></div>
                         <div class="txtRight">知识学习</div>
@@ -49,25 +49,26 @@
                     <div class="menuList commonsScrollbarNew" >
 
                         <div class="menuListMain" v-for="(item, index) of state.chapterTree" :key="index" >
-                            <div class="menuListpParent" @click="menuClickNew(item, index)" >
+                            <div :class="'menuListpParent ' + ( (index < state.currentStep || state.currentStep <= -1) ? 'menuListpParentYes' : '' ) "
+                            @click="menuClickNew(item, index)" >
                                 <div class="menuListpParentLeft">
-                                    <div class="logoMenu" ></div>
-                                    <div class="logoTime" ></div>
-                                    <div class="logoNo" ></div>
+                                    <div v-if="(index >= state.currentStep)" class="logoNo" ></div>
+                                    <!-- <div class="logoTime" ></div> -->
+                                    <div v-if="(index < state.currentStep || state.currentStep <= -1)" class="logoMenu" ></div>
                                 </div>
                                 <div class="menuListpParentCenter">{{ item.name }} {{ item.name }} {{ item.name }}</div>
                                 <div class="menuListpParentRight" v-if="item.children != null && item.children != undefined && item.children.length > 0" >
                                     +
                                 </div>
                             </div>
-                            <div class="menuListpChildren"
+                            <div :class="'menuListpChildren ' + ( (index < state.currentStep || state.currentStep <= -1) ? 'menuListpChildrenYes' : '' ) "
                             @click="menuClickNew(item_1, index, item_1.id)"
                             v-if="item.children?.length > 0" v-for="(item_1, index_1) of item.children" :key="index_1" >
                                 <div class="menuListpChildrenKong" ></div>
                                 <div class="menuListpChildrenLeft" >
-                                    <div class="logoMenu" ></div>
-                                    <div class="logoTime" ></div>
-                                    <div class="logoNo" ></div>
+                                    <div v-if="(index >= state.currentStep)" class="logoNo" ></div>
+                                    <!-- <div class="logoTime" ></div> -->
+                                    <div v-if="(index < state.currentStep || state.currentStep <= -1)" class="logoMenu" ></div>
                                 </div>
                                 <div class="menuListpChildrenRight">
                                     {{ item_1.name }} {{ item_1.name }}
@@ -78,7 +79,7 @@
                     </div>
                 </div>
                 <div :class="'menuLook ' + (menuLeftLook == true ? 'menuLookOpenEvent ' : 'menuLookExit menuLookExitEvent')"
-                @click="(menuLeftLook = menuLeftLook == true ? false : true)" ></div> -->
+                @click="(menuLeftLook = menuLeftLook == true ? false : true)" ></div>
                 
                 <div v-if="state.currentChapter.type != 30" class="chapter-detail">
                     <div class="detail-title">{{ state.currentChapter.name }}</div>
@@ -267,12 +268,12 @@ const menuClickNew = (item: any, step: number, nodeId?: string) => {
         state.currentNode = node;
         state.currentChapter = chapterQueue[step][node];
 
-        console.log(
-            'menuClickNew --- 1111111111 ',
-            state.currentStep,
-            state.currentNode,
-            state.currentChapter
-        );
+        // console.log(
+        //     'menuClickNew --- 1111111111 ',
+        //     state.currentStep,
+        //     state.currentNode,
+        //     state.currentChapter
+        // );
 
     } else {
         ElMessage({