人生啊人生 1 month ago
parent
commit
f782e6aa1d
1 changed files with 11 additions and 11 deletions
  1. 11 11
      src/view/student/trainChapter/trainChapter.vue

+ 11 - 11
src/view/student/trainChapter/trainChapter.vue

@@ -50,11 +50,11 @@
 
                         <div class="menuListMain" v-for="(item, index) of state.chapterTree" :key="index" >
 
-                            <div :class="'menuListpParent ' + ( (index < state.currentStep) ? 'menuListpParentYes' : '' ) "
+                            <div :class="'menuListpParent ' + ( (index <= state.currentStep) ? 'menuListpParentYes' : '' ) "
                             @click="menuClickNew(item, index)" >
                                 <div class="menuListpParentLeft">
                                     <!-- <div class="logoTime" ></div> -->
-                                    <div :class="'' + ( (index < state.currentStep) ? 'logoMenu' : 'logoNo' )" ></div>
+                                    <div :class="'' + ( (index <= state.currentStep) ? 'logoMenu' : 'logoNo' )" ></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" >
@@ -62,19 +62,19 @@
                                 </div>
                             </div>
 
-                            <div :class="'menuListpChildren ' + ( (index < state.currentStep) ? 'menuListpChildrenYes' : '' ) "
+                            <div :class="'menuListpChildren ' + ( (index <= state.currentStep || ( index == state.currentStep && index_1 < state.currentNode ) ) ? '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="logoTime" ></div> -->
-                                    <div :class="'' + ( (index < state.currentStep) ? 'logoMenu' : 'logoNo' )" ></div>
+                                    <div :class="'' + ( (index < state.currentStep || ( index == state.currentStep && index_1 < state.currentNode ) ) ? 'logoMenu' : 'logoNo' )" ></div>
                                 </div>
                                 <div class="menuListpChildrenRight">
                                     {{ item_1.name }} {{ item_1.name }}
                                 </div>
                             </div>
-                            
+
                         </div>
 
                     </div>
@@ -269,12 +269,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({