Jelajahi Sumber

刷新父级

谢杰标 2 tahun lalu
induk
melakukan
0b6b5c86fb
2 mengubah file dengan 1125 tambahan dan 1049 penghapusan
  1. 1124 1048
      src/components/courseTree/CourseTree.vue
  2. 1 1
      src/pages/course-detail/index.vue

+ 1124 - 1048
src/components/courseTree/CourseTree.vue

@@ -1,1127 +1,1203 @@
 <template>
-    <div class="course_tree">
-        <div v-for="(courseItem, courseIndex) in treeList" :key="courseIndex">
-            <div v-if="courseItem.courseList" class="teacherList_name">
-                <div v-for="tea in courseItem.courseList" :key="tea.courseId" class="names"
-                    :class="{ nactive: tea.courseId == courseItem.courseId }"
-                    @click="activeFunc(tea.courseId, courseIndex)">
-                    {{ tea.aliasName }}
-                </div>
-            </div>
-            <div class="item__title" @click="getMenuList(courseItem)" v-if="treeList.length != 1">
-                <i :class="{
-                    'el-icon-caret-right': !courseItem.showList,
-                    'el-icon-caret-bottom': courseItem.showList,
-                }"></i>
-                {{ courseItem.courseName }}
+  <div class="course_tree">
+    <div v-for="(courseItem, courseIndex) in treeList" :key="courseIndex">
+      <div v-if="courseItem.courseList" class="teacherList_name">
+        <div
+          v-for="tea in courseItem.courseList"
+          :key="tea.courseId"
+          class="names"
+          :class="{ nactive: tea.courseId == courseItem.courseId }"
+          @click="activeFunc(tea.courseId, courseIndex)"
+        >
+          {{ tea.aliasName }}
+        </div>
+      </div>
+      <div
+        class="item__title"
+        @click="getMenuList(courseItem)"
+        v-if="treeList.length != 1"
+      >
+        <i
+          :class="{
+            'el-icon-caret-right': !courseItem.showList,
+            'el-icon-caret-bottom': courseItem.showList,
+          }"
+        ></i>
+        {{ courseItem.courseName }}
+      </div>
+      <div
+        v-if="courseItem.showList"
+        :style="{ paddingLeft: treeList.length != 1 ? '12px' : '0' }"
+      >
+        <div class="item" v-for="(menu, index) in courseItem.list" :key="index">
+          <template v-if="menu.type == 1">
+            <div class="item__title" @click="openModule(menu)">
+              <i
+                :class="{
+                  'el-icon-caret-right': !menu.showList,
+                  'el-icon-caret-bottom': menu.showList,
+                }"
+              ></i>
+              {{ menu.menuName }}
             </div>
-            <div v-if="courseItem.showList" :style="{ paddingLeft: (treeList.length != 1 ? '12px' : '0') }">
-                <div class="item" v-for="(menu, index) in courseItem.list" :key="index">
-                    <template v-if="menu.type == 1">
-                        <div class="item__title" @click="openModule(menu)">
-                            <i :class="{
-                                'el-icon-caret-right': !menu.showList,
-                                'el-icon-caret-bottom': menu.showList,
-                            }"></i>
-                            {{ menu.menuName }}
-                        </div>
-                        <div class="item__content">
-                            <div class="bank-chapter" v-if="menu.showList">
-                                <div class="bank-chapter__item" v-for="chapter in menu.list" :key="chapter.id">
-                                    <div v-if="chapter.type == 1" class="bank-chapter__item__text"
-                                        @click="openChapter(chapter)">
-                                        <i :class="{
-                                            'el-icon-caret-right':
-                                                !chapter.showList,
-                                            'el-icon-caret-bottom':
-                                                chapter.showList,
-                                        }"></i>{{ chapter.name }}
-                                    </div>
+            <div class="item__content">
+              <div class="bank-chapter" v-if="menu.showList">
+                <div
+                  class="bank-chapter__item"
+                  v-for="chapter in menu.list"
+                  :key="chapter.id"
+                >
+                  <div
+                    v-if="chapter.type == 1"
+                    class="bank-chapter__item__text"
+                    @click="openChapter(chapter)"
+                  >
+                    <i
+                      :class="{
+                        'el-icon-caret-right': !chapter.showList,
+                        'el-icon-caret-bottom': chapter.showList,
+                      }"
+                    ></i
+                    >{{ chapter.name }}
+                  </div>
 
-                                    <div class="bank-section" v-if="
-                                        chapter.showList &&
-                                        chapter.type == 1
-                                    ">
-                                        <div class="bank-section__item" :class="{
-                                            active: isActive(section),
-                                        }" v-for="(
-                                              section, sectionIndex
-                                            ) in chapter.list" :key="sectionIndex"
-                                            @click="getResource(section, 1, courseIndex)">
-                                            <template v-if="section.type != 2">
-                                                <template>
-                                                    <div class="note note--blue" v-if="
-                                                        section.sectionType == 1
-                                                    ">
-                                                        视频
-                                                    </div>
-                                                    <div class="note" v-if="
-                                                        section.sectionType == 2
-                                                    ">
-                                                        直播
-                                                    </div>
-                                                    <div class="note note--yellow" v-if="
-                                                        section.sectionType == 3
-                                                    ">
-                                                        回放
-                                                    </div>
-                                                    <div class="
-                                                    bank-section__item__text
-                                                  ">
-                                                        {{ section.name }}
-                                                        <div style="font-size: 12px" v-if="
-                                                            section.liveStartTime >
-                                                            nowTime
-                                                        ">
-                                                            <span>{{
-                                                                    $tools.timestampToTime(
-                                                                        section.liveStartTime,
-                                                                        (isDay = false)
-                                                                    )
-                                                            }}</span>-
-                                                            <span>{{
-                                                                    $tools.timestampToTime(
-                                                                        section.liveEndTime,
-                                                                        (isDay = false)
-                                                                    )
-                                                            }}</span>
-                                                        </div>
-                                                    </div>
-                                                </template>
+                  <div
+                    class="bank-section"
+                    v-if="chapter.showList && chapter.type == 1"
+                  >
+                    <div
+                      class="bank-section__item"
+                      :class="{
+                        active: isActive(section),
+                      }"
+                      v-for="(section, sectionIndex) in chapter.list"
+                      :key="sectionIndex"
+                      @click="getResource(section, 1, courseIndex)"
+                    >
+                      <template v-if="section.type != 2">
+                        <template>
+                          <div
+                            class="note note--blue"
+                            v-if="section.sectionType == 1"
+                          >
+                            视频
+                          </div>
+                          <div class="note" v-if="section.sectionType == 2">
+                            直播
+                          </div>
+                          <div
+                            class="note note--yellow"
+                            v-if="section.sectionType == 3"
+                          >
+                            回放
+                          </div>
+                          <div class="bank-section__item__text">
+                            {{ section.name }}
+                            <div
+                              style="font-size: 12px"
+                              v-if="section.liveStartTime > nowTime"
+                            >
+                              <span>{{
+                                $tools.timestampToTime(
+                                  section.liveStartTime,
+                                  (isDay = false)
+                                )
+                              }}</span
+                              >-
+                              <span>{{
+                                $tools.timestampToTime(
+                                  section.liveEndTime,
+                                  (isDay = false)
+                                )
+                              }}</span>
+                            </div>
+                          </div>
+                        </template>
 
-                                                <div class="lear-state" v-if="isActive(section)">
-                                                    <img src="../../assets/learing.gif" alt="" />
-                                                </div>
-                                                <template v-if="section.durationTime > 0">
-                                                    <div class="during">
-                                                        {{
-                                                                $tools.secondToDate(
-                                                                    section.durationTime
-                                                                )
-                                                        }}
-                                                    </div>
-                                                </template>
-                                                <template>
-                                                    <div class="btn" v-if="section.rebuild > 0">
-                                                        待重修
-                                                    </div>
-                                                    <template v-else>
-                                                        <div class="btn btn--green" v-if="section.learning == 1">
-                                                            已学完
-                                                        </div>
-                                                    </template>
-                                                </template>
-                                                <template v-if="
-                                                    section.liveStartTime &&
-                                                    section.sectionType == 2
-                                                ">
-                                                    <div class="
-                                                    live-btn live-btn--blue
-                                                  " v-if="
-                                                      section.liveStartTime >
-                                                      nowTime
-                                                  ">
-                                                        待开播
-                                                    </div>
-                                                    <div class="
-                                                    live-btn live-btn--yellow
-                                                  " v-if="
-                                                      section.liveStartTime <=
-                                                      nowTime &&
-                                                      section.liveEndTime >
-                                                      nowTime
-                                                  ">
-                                                        直播中
-                                                    </div>
-                                                    <div class="live-btn" v-if="
-                                                        section.liveEndTime <
-                                                        nowTime
-                                                    ">
-                                                        已结束
-                                                    </div>
-                                                </template>
+                        <div class="lear-state" v-if="isActive(section)">
+                          <img src="../../assets/learing.gif" alt="" />
+                        </div>
+                        <template v-if="section.durationTime > 0">
+                          <div class="during">
+                            {{ $tools.secondToDate(section.durationTime) }}
+                          </div>
+                        </template>
+                        <template>
+                          <div class="btn" v-if="section.rebuild > 0">
+                            待重修
+                          </div>
+                          <template v-else>
+                            <div
+                              class="btn btn--green"
+                              v-if="section.learning == 1"
+                            >
+                              已学完
+                            </div>
+                          </template>
+                        </template>
+                        <template
+                          v-if="
+                            section.liveStartTime && section.sectionType == 2
+                          "
+                        >
+                          <div
+                            class="live-btn live-btn--blue"
+                            v-if="section.liveStartTime > nowTime"
+                          >
+                            待开播
+                          </div>
+                          <div
+                            class="live-btn live-btn--yellow"
+                            v-if="
+                              section.liveStartTime <= nowTime &&
+                              section.liveEndTime > nowTime
+                            "
+                          >
+                            直播中
+                          </div>
+                          <div
+                            class="live-btn"
+                            v-if="section.liveEndTime < nowTime"
+                          >
+                            已结束
+                          </div>
+                        </template>
 
-                                                <template v-if="
-                                                    checkSection(
-                                                        section.sectionId,
-                                                        'sectionExam'
-                                                    )
-                                                ">
-                                                    <div class="exercises" @click.stop="
-                                                        handelPracticeOrRxam(
-                                                            section,
-                                                            2,
-                                                            courseItem.courseId
-                                                        )
-                                                    ">
-                                                        习题
-                                                        <i class="
-                                                      el-icon-arrow-right
-                                                      icons
-                                                    "></i>
-                                                    </div>
-                                                </template>
-                                            </template>
+                        <template
+                          v-if="checkSection(section.sectionId, 'sectionExam')"
+                        >
+                          <div
+                            class="exercises"
+                            @click.stop="
+                              handelPracticeOrRxam(
+                                section,
+                                2,
+                                courseItem.courseId
+                              )
+                            "
+                          >
+                            习题
+                            <i class="el-icon-arrow-right icons"></i>
+                          </div>
+                        </template>
+                      </template>
 
-                                            <template v-if="section.type == 2">
-                                                <template>
-                                                    <div class="test-btn" v-if="section.doType == 1">
-                                                        练习
-                                                    </div>
-                                                    <div class="test-btn" v-if="section.doType != 1">
-                                                        考试
-                                                    </div>
-                                                </template>
-                                                <div class="bank-section__item__text">
-                                                    {{ section.name }}
-                                                </div>
-                                                <template>
-                                                    <div class="btn" v-if="section.rebuild > 0">
-                                                        待重修
-                                                    </div>
-                                                    <template v-else>
-                                                        <div class="btn btn--green" v-if="section.learning == 1">
-                                                            合格
-                                                        </div>
-                                                        <div class="btn btn--red" v-if="section.learning == 0">
-                                                            不合格
-                                                        </div>
-                                                        <div class="btn btn--green" v-if="section.rebuild > 0">
-                                                            待重测
-                                                        </div>
-                                                    </template>
-                                                </template>
-                                            </template>
-                                        </div>
-                                    </div>
-                                    <div v-if="chapter.type == 2" class="bank-section__item"
-                                        @click="getResource(chapter, 3, courseIndex)">
-                                        <template>
-                                            <template>
-                                                <div class="test-btn" v-if="chapter.doType == 1">
-                                                    练习
-                                                </div>
-                                                <div class="test-btn" v-if="chapter.doType != 1">
-                                                    考试
-                                                </div>
-                                            </template>
-                                            <div class="bank-section__item__text">
-                                                {{ chapter.name }}
-                                            </div>
-                                            <template>
-                                                <div class="btn btn--green" v-if="chapter.learning == 1">
-                                                    合格
-                                                </div>
-                                                <div class="btn btn--red" v-if="chapter.learning == 0">
-                                                    不合格
-                                                </div>
-                                            </template>
-                                        </template>
-                                    </div>
-                                </div>
+                      <template v-if="section.type == 2">
+                        <template>
+                          <div class="test-btn" v-if="section.doType == 1">
+                            练习
+                          </div>
+                          <div class="test-btn" v-if="section.doType != 1">
+                            考试
+                          </div>
+                        </template>
+                        <div class="bank-section__item__text">
+                          {{ section.name }}
+                        </div>
+                        <template>
+                          <div class="btn" v-if="section.rebuild > 0">
+                            待重修
+                          </div>
+                          <template v-else>
+                            <div
+                              class="btn btn--green"
+                              v-if="section.learning == 1"
+                            >
+                              合格
+                            </div>
+                            <div
+                              class="btn btn--red"
+                              v-if="section.learning == 0"
+                            >
+                              不合格
+                            </div>
+                            <div
+                              class="btn btn--green"
+                              v-if="section.rebuild > 0"
+                            >
+                              待重测
                             </div>
+                          </template>
+                        </template>
+                      </template>
+                    </div>
+                  </div>
+                  <div
+                    v-if="chapter.type == 2"
+                    class="bank-section__item"
+                    @click="getResource(chapter, 3, courseIndex)"
+                  >
+                    <template>
+                      <template>
+                        <div class="test-btn" v-if="chapter.doType == 1">
+                          练习
                         </div>
+                        <div class="test-btn" v-if="chapter.doType != 1">
+                          考试
+                        </div>
+                      </template>
+                      <div class="bank-section__item__text">
+                        {{ chapter.name }}
+                      </div>
+                      <template>
+                        <div
+                          class="btn btn--green"
+                          v-if="chapter.learning == 1"
+                        >
+                          合格
+                        </div>
+                        <div class="btn btn--red" v-if="chapter.learning == 0">
+                          不合格
+                        </div>
+                      </template>
                     </template>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </template>
 
-                    <template v-if="menu.type == 2">
-                        <div class="item__content">
-                            <div class="bank-chapter">
-                                <div class="bank-chapter__item">
-                                    <div class="bank-chapter__item__text" @click="openChapter(menu)">
-                                        <i :class="{
-                                            'el-icon-caret-right':
-                                                !menu.showList,
-                                            'el-icon-caret-bottom':
-                                                menu.showList,
-                                        }"></i>{{ menu.menuName }}
-                                    </div>
+          <template v-if="menu.type == 2">
+            <div class="item__content">
+              <div class="bank-chapter">
+                <div class="bank-chapter__item">
+                  <div
+                    class="bank-chapter__item__text"
+                    @click="openChapter(menu)"
+                  >
+                    <i
+                      :class="{
+                        'el-icon-caret-right': !menu.showList,
+                        'el-icon-caret-bottom': menu.showList,
+                      }"
+                    ></i
+                    >{{ menu.menuName }}
+                  </div>
 
-                                    <div class="bank-section" v-if="menu.showList">
-                                        <div class="bank-section__item" :class="{
-                                            active: isActive(section),
-                                        }" v-for="(
-                                              section, sectionIndex
-                                            ) in menu.list" :key="sectionIndex"
-                                            @click="getResource(section, 1, courseIndex)">
-                                            <template v-if="section.type != 2">
-                                                <template>
-                                                    <div class="note note--blue" v-if="
-                                                        section.sectionType == 1
-                                                    ">
-                                                        视频
-                                                    </div>
-                                                    <div class="note" v-if="
-                                                        section.sectionType == 2
-                                                    ">
-                                                        直播
-                                                    </div>
-                                                    <div class="note note--yellow" v-if="
-                                                        section.sectionType == 3
-                                                    ">
-                                                        回放
-                                                    </div>
-                                                </template>
-                                                <div class="bank-section__item__text">
-                                                    {{ section.name }}
-                                                    <div style="font-size: 12px" v-if="
-                                                        section.liveStartTime >
-                                                        nowTime
-                                                    ">
-                                                        <span>{{
-                                                                $tools.timestampToTime(
-                                                                    section.liveStartTime,
-                                                                    (isDay = false)
-                                                                )
-                                                        }}</span>-
-                                                        <span>{{
-                                                                $tools.timestampToTime(
-                                                                    section.liveEndTime,
-                                                                    (isDay = false)
-                                                                )
-                                                        }}</span>
-                                                    </div>
-                                                </div>
+                  <div class="bank-section" v-if="menu.showList">
+                    <div
+                      class="bank-section__item"
+                      :class="{
+                        active: isActive(section),
+                      }"
+                      v-for="(section, sectionIndex) in menu.list"
+                      :key="sectionIndex"
+                      @click="getResource(section, 1, courseIndex)"
+                    >
+                      <template v-if="section.type != 2">
+                        <template>
+                          <div
+                            class="note note--blue"
+                            v-if="section.sectionType == 1"
+                          >
+                            视频
+                          </div>
+                          <div class="note" v-if="section.sectionType == 2">
+                            直播
+                          </div>
+                          <div
+                            class="note note--yellow"
+                            v-if="section.sectionType == 3"
+                          >
+                            回放
+                          </div>
+                        </template>
+                        <div class="bank-section__item__text">
+                          {{ section.name }}
+                          <div
+                            style="font-size: 12px"
+                            v-if="section.liveStartTime > nowTime"
+                          >
+                            <span>{{
+                              $tools.timestampToTime(
+                                section.liveStartTime,
+                                (isDay = false)
+                              )
+                            }}</span
+                            >-
+                            <span>{{
+                              $tools.timestampToTime(
+                                section.liveEndTime,
+                                (isDay = false)
+                              )
+                            }}</span>
+                          </div>
+                        </div>
 
-                                                <template v-if="section.durationTime > 0">
-                                                    <div class="during">
-                                                        {{
-                                                                $tools.secondToDate(
-                                                                    section.durationTime
-                                                                )
-                                                        }}
-                                                    </div>
-                                                </template>
-                                                <template>
-                                                    <div class="btn" v-if="section.rebuild > 0">
-                                                        待重修
-                                                    </div>
-                                                    <template v-else>
-                                                        <div class="btn btn--green" v-if="section.learning == 1">
-                                                            已学完
-                                                        </div>
-                                                    </template>
-                                                </template>
-                                                <template v-if="
-                                                    section.liveStartTime &&
-                                                    section.sectionType == 2
-                                                ">
-                                                    <div class="
-                                                    live-btn live-btn--blue
-                                                  " v-if="
-                                                      section.liveStartTime >
-                                                      nowTime
-                                                  ">
-                                                        待开播
-                                                    </div>
-                                                    <div class="
-                                                    live-btn live-btn--yellow
-                                                  " v-if="
-                                                      section.liveStartTime <=
-                                                      nowTime &&
-                                                      section.liveEndTime >
-                                                      nowTime
-                                                  ">
-                                                        直播中
-                                                    </div>
-                                                    <div class="live-btn" v-if="
-                                                        section.liveEndTime <
-                                                        nowTime
-                                                    ">
-                                                        已结束
-                                                    </div>
-                                                </template>
+                        <template v-if="section.durationTime > 0">
+                          <div class="during">
+                            {{ $tools.secondToDate(section.durationTime) }}
+                          </div>
+                        </template>
+                        <template>
+                          <div class="btn" v-if="section.rebuild > 0">
+                            待重修
+                          </div>
+                          <template v-else>
+                            <div
+                              class="btn btn--green"
+                              v-if="section.learning == 1"
+                            >
+                              已学完
+                            </div>
+                          </template>
+                        </template>
+                        <template
+                          v-if="
+                            section.liveStartTime && section.sectionType == 2
+                          "
+                        >
+                          <div
+                            class="live-btn live-btn--blue"
+                            v-if="section.liveStartTime > nowTime"
+                          >
+                            待开播
+                          </div>
+                          <div
+                            class="live-btn live-btn--yellow"
+                            v-if="
+                              section.liveStartTime <= nowTime &&
+                              section.liveEndTime > nowTime
+                            "
+                          >
+                            直播中
+                          </div>
+                          <div
+                            class="live-btn"
+                            v-if="section.liveEndTime < nowTime"
+                          >
+                            已结束
+                          </div>
+                        </template>
 
-                                                <template v-if="
-                                                    checkSection(
-                                                        section.sectionId,
-                                                        'sectionExam'
-                                                    )
-                                                ">
-                                                    <div class="exercises" @click.stop="
-                                                        handelPracticeOrRxam(
-                                                            section,
-                                                            2,
-                                                            courseItem.courseId
-                                                        )
-                                                    ">
-                                                        习题
-                                                        <i class="
-                                                      el-icon-arrow-right
-                                                      icons
-                                                    "></i>
-                                                    </div>
-                                                </template>
-                                            </template>
+                        <template
+                          v-if="checkSection(section.sectionId, 'sectionExam')"
+                        >
+                          <div
+                            class="exercises"
+                            @click.stop="
+                              handelPracticeOrRxam(
+                                section,
+                                2,
+                                courseItem.courseId
+                              )
+                            "
+                          >
+                            习题
+                            <i class="el-icon-arrow-right icons"></i>
+                          </div>
+                        </template>
+                      </template>
 
-                                            <template v-if="section.type == 2">
-                                                <template>
-                                                    <div class="test-btn" v-if="section.doType == 1">
-                                                        练习
-                                                    </div>
-                                                    <div class="test-btn" v-if="section.doType != 1">
-                                                        考试
-                                                    </div>
-                                                </template>
-                                                <div class="bank-section__item__text">
-                                                    {{ section.name }}
-                                                </div>
-                                                <template>
-                                                    <div class="btn" v-if="section.rebuild > 0">
-                                                        待重修
-                                                    </div>
-                                                    <template v-else>
-                                                        <div class="btn btn--green" v-if="section.learning == 1">
-                                                            合格
-                                                        </div>
-                                                        <div class="btn btn--red" v-if="section.learning == 0">
-                                                            不合格
-                                                        </div>
-                                                        <div class="btn btn--green" v-if="section.rebuild > 0">
-                                                            待重测
-                                                        </div>
-                                                    </template>
-                                                </template>
-                                            </template>
-                                        </div>
-                                    </div>
-                                </div>
-                            </div>
+                      <template v-if="section.type == 2">
+                        <template>
+                          <div class="test-btn" v-if="section.doType == 1">
+                            练习
+                          </div>
+                          <div class="test-btn" v-if="section.doType != 1">
+                            考试
+                          </div>
+                        </template>
+                        <div class="bank-section__item__text">
+                          {{ section.name }}
                         </div>
-                    </template>
-
-                    <template v-if="menu.type == 3">
-                        <div class="item__content">
-                            <div class="bank-section">
-                                <div class="bank-section__item" :class="{
-                                    active: isActive(menu),
-                                }" @click="getResource(menu, 1, courseIndex)">
-                                    <template>
-                                        <div class="note note--blue" v-if="menu.sectionType == 1">
-                                            视频
-                                        </div>
-                                        <div class="note" v-if="menu.sectionType == 2">
-                                            直播
-                                        </div>
-                                        <div class="note note--yellow" v-if="menu.sectionType == 3">
-                                            回放
-                                        </div>
-                                        <div class="bank-section__item__text">
-                                            {{ menu.name }}
-                                            <div style="font-size: 12px" v-if="
-                                                menu.liveStartTime > nowTime
-                                            ">
-                                                <span>{{
-                                                        $tools.timestampToTime(
-                                                            menu.liveStartTime,
-                                                            (isDay = false)
-                                                        )
-                                                }}</span>-
-                                                <span>{{
-                                                        $tools.timestampToTime(
-                                                            menu.liveEndTime,
-                                                            (isDay = false)
-                                                        )
-                                                }}</span>
-                                            </div>
-                                        </div>
-                                    </template>
+                        <template>
+                          <div class="btn" v-if="section.rebuild > 0">
+                            待重修
+                          </div>
+                          <template v-else>
+                            <div
+                              class="btn btn--green"
+                              v-if="section.learning == 1"
+                            >
+                              合格
+                            </div>
+                            <div
+                              class="btn btn--red"
+                              v-if="section.learning == 0"
+                            >
+                              不合格
+                            </div>
+                            <div
+                              class="btn btn--green"
+                              v-if="section.rebuild > 0"
+                            >
+                              待重测
+                            </div>
+                          </template>
+                        </template>
+                      </template>
+                    </div>
+                  </div>
+                </div>
+              </div>
+            </div>
+          </template>
 
-                                    <template v-if="menu.durationTime > 0">
-                                        <div class="during">
-                                            {{
-                                                    $tools.secondToDate(
-                                                        menu.durationTime
-                                                    )
-                                            }}
-                                        </div>
-                                    </template>
-                                    <template>
-                                        <div class="btn" v-if="menu.rebuild > 0">
-                                            待重修
-                                        </div>
-                                        <template v-else>
-                                            <div class="btn btn--green" v-if="menu.learning == 1">
-                                                已学完
-                                            </div>
-                                        </template>
-                                    </template>
-                                    <template v-if="
-                                        menu.liveStartTime &&
-                                        menu.sectionType == 2
-                                    ">
-                                        <div class="live-btn live-btn--blue" v-if="menu.liveStartTime > nowTime">
-                                            待开播
-                                        </div>
-                                        <div class="live-btn live-btn--yellow" v-if="
-                                            menu.liveStartTime <= nowTime &&
-                                            menu.liveEndTime > nowTime
-                                        ">
-                                            直播中
-                                        </div>
-                                        <div class="live-btn" v-if="menu.liveEndTime < nowTime">
-                                            已结束
-                                        </div>
-                                    </template>
+          <template v-if="menu.type == 3">
+            <div class="item__content">
+              <div class="bank-section">
+                <div
+                  class="bank-section__item"
+                  :class="{
+                    active: isActive(menu),
+                  }"
+                  @click="getResource(menu, 1, courseIndex)"
+                >
+                  <template>
+                    <div class="note note--blue" v-if="menu.sectionType == 1">
+                      视频
+                    </div>
+                    <div class="note" v-if="menu.sectionType == 2">直播</div>
+                    <div class="note note--yellow" v-if="menu.sectionType == 3">
+                      回放
+                    </div>
+                    <div class="bank-section__item__text">
+                      {{ menu.name }}
+                      <div
+                        style="font-size: 12px"
+                        v-if="menu.liveStartTime > nowTime"
+                      >
+                        <span>{{
+                          $tools.timestampToTime(
+                            menu.liveStartTime,
+                            (isDay = false)
+                          )
+                        }}</span
+                        >-
+                        <span>{{
+                          $tools.timestampToTime(
+                            menu.liveEndTime,
+                            (isDay = false)
+                          )
+                        }}</span>
+                      </div>
+                    </div>
+                  </template>
 
-                                    <template v-if="
-                                        checkSection(
-                                            menu.menuId,
-                                            'sectionExamList'
-                                        )
-                                    ">
-                                        <div class="exercises"
-                                            @click.stop="handelPracticeOrRxam(menu, 3, courseItem.courseId)">
-                                            习题
-                                            <i class="el-icon-arrow-right icons"></i>
-                                        </div>
-                                    </template>
-                                </div>
-                            </div>
-                        </div>
+                  <template v-if="menu.durationTime > 0">
+                    <div class="during">
+                      {{ $tools.secondToDate(menu.durationTime) }}
+                    </div>
+                  </template>
+                  <template>
+                    <div class="btn" v-if="menu.rebuild > 0">待重修</div>
+                    <template v-else>
+                      <div class="btn btn--green" v-if="menu.learning == 1">
+                        已学完
+                      </div>
                     </template>
+                  </template>
+                  <template v-if="menu.liveStartTime && menu.sectionType == 2">
+                    <div
+                      class="live-btn live-btn--blue"
+                      v-if="menu.liveStartTime > nowTime"
+                    >
+                      待开播
+                    </div>
+                    <div
+                      class="live-btn live-btn--yellow"
+                      v-if="
+                        menu.liveStartTime <= nowTime &&
+                        menu.liveEndTime > nowTime
+                      "
+                    >
+                      直播中
+                    </div>
+                    <div class="live-btn" v-if="menu.liveEndTime < nowTime">
+                      已结束
+                    </div>
+                  </template>
+
+                  <template v-if="checkSection(menu.menuId, 'sectionExamList')">
+                    <div
+                      class="exercises"
+                      @click.stop="
+                        handelPracticeOrRxam(menu, 3, courseItem.courseId)
+                      "
+                    >
+                      习题
+                      <i class="el-icon-arrow-right icons"></i>
+                    </div>
+                  </template>
                 </div>
+              </div>
             </div>
+          </template>
         </div>
+      </div>
     </div>
+  </div>
 </template>
 
 <script>
 export default {
-    props: {
-        courseList: {
-            type: Array,
-            default: () => {
-                return []
-            }
-        },
-        goodsLearningOrder: {
-            type: Number
-        },
-        sectionMaxNum: {
-            type: Number
-        },
-        sectionItem: {
-            type: Object,
-            default: () => {
-                return {}
-            }
+  props: {
+    courseList: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    goodsLearningOrder: {
+      type: Number,
+    },
+    sectionMaxNum: {
+      type: Number,
+    },
+    sectionItem: {
+      type: Object,
+      default: () => {
+        return {};
+      },
+    },
+  },
+  data() {
+    return {
+      teaIndex: 0,
+      nowTime: 0,
+      treeList: [],
+      query: this.$route.query,
+      sectionExam: [],
+      sectionExamList: [],
+    };
+  },
+  created() {
+    this.init();
+  },
+  mounted() {},
+  methods: {
+    async init() {
+      this.nowTime = Number(new Date().getTime() / 1000).toFixed(0);
+      this.treeList = await this.getDoubleTeacherList();
+      let index = this.treeList.findIndex(
+        (e) => e.courseId == this.activeCourseId
+      );
+      let list = await this.getMenuList(this.treeList[index]);
+      // 判断已选中的视频的父级
+      let { moduleId, chapterId, sectionId, sectionType } = this.query;
+      if (moduleId * 1) {
+        list = await this.openModule(
+          list.find((e) => e.menuId == moduleId),
+          true
+        );
+      }
+      if (chapterId * 1) {
+        list = await this.openChapter(
+          list.find(
+            (e) => e[moduleId * 1 ? "chapterId" : "menuId"] == chapterId
+          )
+        );
+      }
+      let sectionItem = list.find(
+        (e) =>
+          e[moduleId * 1 || chapterId * 1 ? "sectionId" : "id"] == sectionId
+      );
+      this.$emit("getResource", sectionItem);
+    },
+    activeFunc(courseId, index) {
+      let { courseId: nowCourseId, courseList } = this.treeList[index];
+      if (courseId == nowCourseId) {
+        return;
+      }
+      if (index) {
+        let { stuAllNum, secAllNum } = this.treeList[index - 1];
+        if (stuAllNum != secAllNum) {
+          return this.$message({
+            type: "warning",
+            message: "需按课程顺序学习",
+          });
         }
+      }
+      let course = this.courseList.find((e) => e.courseId == courseId);
+      if (course) {
+        course.courseList = courseList;
+        course.list = [];
+        course.showList = false;
+      }
+      this.treeList.splice(index, 1, JSON.parse(JSON.stringify(course)));
+      this.getMenuList(this.treeList[index]);
+    },
+    getMenuList(course) {
+      let { showList, courseId, list } = course;
+      course.showList = !showList;
+      if (list.length) return;
+      this.$request
+        .reSectionExamList({
+          chapterId: 0,
+          courseId,
+          gradeId: this.gradeId,
+        })
+        .then((res) => {
+          this.sectionExamList = res.data;
+        });
+      return this.$request
+        .reMenuList({ courseId, gradeId: this.gradeId })
+        .then((res) => {
+          for (let i = 0; i < res.rows.length; i++) {
+            let item = res.rows[i];
+            item.id = item.menuId;
+            item.name = item.menuName;
+            item.menuType = item.type;
+            item.showList = false;
+            item.list = [];
+            item.parent = this.menuList;
+          }
+          course.list = res.rows;
+          return Promise.resolve(res.rows);
+        });
+    },
+    openModule(module, status = false, isAuto = false) {
+      console.log(module);
+      let { list, isRebuild, id, courseId, showList } = module;
+      module.showList = !showList;
+      if (list.length) return;
+      return this.$request
+        .reChapterList({
+          moduleId: id,
+          gradeId: this.gradeId,
+          courseId: courseId,
+          rebuild: isRebuild ? 1 : undefined,
+        })
+        .then((res) => {
+          for (let i = 0; i < res.data.length; i++) {
+            let item = res.data[i];
+            item.id = item.chapterId;
+            item.showList = false;
+            item.list = [];
+            item.parent = module;
+            isRebuild ? (item.isRebuild = 1) : (item.menuType = 2);
+          }
+          module.list = res.data;
+          return Promise.resolve(res.data);
+        });
+    },
+    openChapter(chapter) {
+      let {
+        chapterId,
+        menuId,
+        list,
+        moduleId,
+        id,
+        isRebuild,
+        courseId,
+        showList,
+      } = chapter;
+      chapter.showList = !showList;
+      if (list.length) {
+        return;
+      }
+      this.$request
+        .reSectionExamList({
+          chapterId: chapterId || menuId,
+          courseId,
+          gradeId: this.gradeId,
+        })
+        .then((res) => {
+          this.sectionExam = [...this.sectionExam, ...res.data];
+        });
+      return this.$request
+        .reSectionList({
+          chapterId: id,
+          gradeId: this.gradeId,
+          courseId: courseId,
+          rebuild: isRebuild ? 1 : undefined,
+          moduleId: moduleId || 0,
+        })
+        .then((res) => {
+          chapter.canLearn = res.data
+            .filter((item) => item.type != 2)
+            .every((item) => item.learning == 1);
+          res.data.forEach((section) => {
+            section.parent = chapter;
+          });
+          chapter.list = res.data;
+          if (this.needOpen) {
+            this.needOpen = false;
+          }
+          return Promise.resolve(chapter.list);
+        });
+    },
+    isActive(section) {
+      return section == this.sectionItem;
     },
-    data() {
-        return {
-            teaIndex: 0,
-            nowTime: 0,
-            treeList: [],
-            query: this.$route.query,
-            sectionExam: [],
-            sectionExamList: []
+    async getResource(section, type, courseIndex) {
+      if (section.type != 2 && section == this.sectionItem) {
+        return;
+      }
+      if (!(await this.orderTopTobottom(section, type, courseIndex))) {
+        this.clickLock = false;
+        this.$message({
+          type: "warning",
+          message:
+            section.type == 2
+              ? "请学完视频课程再进行练习和测试"
+              : "请按顺序学习视频课程",
+        });
+        return false;
+      }
+      if (
+        section.sectionType === 2 &&
+        section.liveStartTime &&
+        section.liveEndTime
+      ) {
+        if (section.liveStartTime > this.nowTime) {
+          this.$message.warning("直播待开播");
+          return;
         }
+        if (section.liveEndTime < this.nowTime) {
+          this.$message.warning("直播已结束");
+          return;
+        }
+      }
+      section.type == 2
+        ? this.toCourseExam(section, type, courseIndex)
+        : this.toPlay(section);
     },
-    created() {
-        this.init()
+    async toCourseExam(section, type, courseIndex) {
+      //试卷
+      // 学习次数
+      if (!(await this.exceedLearnNum(section))) {
+        return false;
+      }
+      let num =
+        this.goodsLearningOrder != 2 || section.rebuild
+          ? await this.bankRecordDoNum(section.typeId)
+          : section.doNum;
+      if (
+        (section.answerNum - num > 0 && section.answerNum > 0) ||
+        section.answerNum == 0
+      ) {
+        this.$router.push({
+          path: "/course-exam/" + this.goodsId,
+          query: {
+            courseId: this.treeList[courseIndex].courseId,
+            gradeId: this.gradeId,
+            moduleId: section.moduleId || 0,
+            sectionId: section.sectionId || 0,
+            examId: section.typeId,
+            learning: section.learning,
+            type: type,
+            chapterId: section.chapterId || 0,
+            orderGoodsId: this.orderGoodsId,
+          },
+        });
+      } else {
+        this.$message({
+          type: "warning",
+          message: "该试卷只能答题" + section.answerNum + "次",
+        });
+        return;
+      }
     },
-    mounted() {
+    handelPracticeOrRxam(section, type, courseId) {
+      if (type == 3) {
+        //节卷
+        let data = this.sectionExamList.filter(
+          (x) => x.sectionId == section.menuId
+        );
+        if (data && data.length > 0) {
+          section = data[0];
+        }
+      } else if (type == 2) {
+        //节卷
+        let data = this.sectionExam.filter(
+          (x) => x.sectionId == section.sectionId
+        );
 
-    },
-    methods: {
-        async init() {
-            this.nowTime = Number(new Date().getTime() / 1000).toFixed(0);
-            this.treeList = await this.getDoubleTeacherList()
-            let index = this.treeList.findIndex(e => e.courseId == this.activeCourseId)
-            let list = await this.getMenuList(this.treeList[index])
-            // 判断已选中的视频的父级 
-            let { moduleId, chapterId, sectionId, sectionType } = this.query
-            if (moduleId * 1) {
-                list = await this.openModule(list.find(e => e.menuId == moduleId), true);
-            }
-            if (chapterId * 1) {
-                list = await this.openChapter(list.find(e => e[moduleId * 1 ? 'chapterId' : 'menuId'] == chapterId))
-            }
-            let sectionItem = list.find(e => e[(moduleId * 1 || chapterId * 1) ? 'sectionId' : 'id'] == sectionId)
-            this.$emit('getResource', sectionItem)
-        },
-        activeFunc(courseId, index) {
-            let { courseId: nowCourseId, courseList } = this.treeList[index]
-            if (courseId == nowCourseId) {
-                return
-            }
-            if (index) {
-                let { stuAllNum, secAllNum } = this.treeList[index - 1];
-                if (stuAllNum != secAllNum) {
-                    return this.$message({
-                        type: "warning",
-                        message: "需按课程顺序学习",
-                    });
-                }
-            }
-            let course = this.courseList.find(e => e.courseId == courseId)
-            if (course) {
-                course.courseList = courseList
-                course.list = []
-                course.showList = false
-            }
-            this.treeList.splice(index, 1, JSON.parse(JSON.stringify(course)))
-            this.getMenuList(this.treeList[index])
-        },
-        getMenuList(course) {
-            let { showList, courseId, list } = course
-            course.showList = !showList
-            if (list.length) return;
-            this.$request
-                .reSectionExamList({
-                    chapterId: 0,
-                    courseId,
-                    gradeId: this.gradeId,
-                })
-                .then((res) => {
-                    this.sectionExamList = res.data;
-                });
-            return this.$request
-                .reMenuList({ courseId, gradeId: this.gradeId })
-                .then((res) => {
-                    for (let i = 0; i < res.rows.length; i++) {
-                        let item = res.rows[i];
-                        item.id = item.menuId;
-                        item.name = item.menuName;
-                        item.menuType = item.type;
-                        item.showList = false;
-                        item.list = [];
-                        item.parent = this.menuList;
-                    }
-                    course.list = res.rows
-                    return Promise.resolve(res.rows)
-                })
-        },
-        openModule(module, status = false, isAuto = false) {
-            console.log(module)
-            let { list, isRebuild, id, courseId, showList } = module;
-            module.showList = !showList;
-            if (list.length) return;
-            return this.$request
-                .reChapterList({
-                    moduleId: id,
-                    gradeId: this.gradeId,
-                    courseId: courseId,
-                    rebuild: isRebuild ? 1 : undefined,
-                })
-                .then((res) => {
-                    for (let i = 0; i < res.data.length; i++) {
-                        let item = res.data[i];
-                        item.id = item.chapterId;
-                        item.showList = false;
-                        item.list = [];
-                        item.parent = module;
-                        isRebuild ? (item.isRebuild = 1) : (item.menuType = 2);
-                    }
-                    module.list = res.data;
-                    return Promise.resolve(res.data);
-                });
-        },
-        openChapter(chapter) {
-            let { chapterId, menuId, list, moduleId, id, isRebuild, courseId, showList } = chapter;
-            chapter.showList = !showList;
-            this.$request
-                .reSectionExamList({
-                    chapterId: chapterId || menuId,
-                    courseId,
-                    gradeId: this.gradeId,
-                })
-                .then((res) => {
-                    this.sectionExam = [...this.sectionExam, ...res.data];
-                });
-            if (list.length) {
-                return;
-            }
-            return this.$request
-                .reSectionList({
-                    chapterId: id,
-                    gradeId: this.gradeId,
-                    courseId: courseId,
-                    rebuild: isRebuild ? 1 : undefined,
-                    moduleId: moduleId || 0,
-                })
-                .then((res) => {
-                    chapter.canLearn = res.data.filter(item => item.type != 2).every(item => item.learning == 1)
-                    res.data.forEach((section) => {
-                        section.parent = chapter;
-                    });
-                    chapter.list = res.data;
-                    if (this.needOpen) {
-                        this.needOpen = false;
-                    }
-                    return Promise.resolve(chapter.list);
-                });
-        },
-        isActive(section) {
-            return section == this.sectionItem
+        if (data && data.length > 0) {
+          section = data[0];
+        }
+      }
+      this.$router.push({
+        path: "/course-exam/" + this.goodsId,
+        query: {
+          courseId,
+          gradeId: this.gradeId,
+          moduleId: section.moduleId || 0,
+          sectionId: section.sectionId || 0,
+          examId: section.typeId,
+          learning: section.learning,
+          type: type,
+          chapterId: section.chapterId || 0,
+          orderGoodsId: this.orderGoodsId,
         },
-        async getResource(section, type, courseIndex) {
-            if (!(await this.orderTopTobottom(section, type, courseIndex))) {
-                this.clickLock = false;
-                this.$message({
-                    type: "warning",
-                    message:
-                        section.type == 2
-                            ? "请学完视频课程再进行练习和测试"
-                            : "请按顺序学习视频课程",
-                });
-                return false;
-            }
-            if (
-                section.sectionType === 2 &&
-                section.liveStartTime &&
-                section.liveEndTime
-            ) {
-                if (section.liveStartTime > this.nowTime) {
-                    this.$message.warning("直播待开播");
-                    return;
-                }
-                if (section.liveEndTime < this.nowTime) {
-                    this.$message.warning("直播已结束");
-                    return;
+      });
+    },
+    async exceedLearnNum(section) {
+      let learnNum = await this.goodsTodayStudySectionNum();
+      let hasLearn = await this.gradeCheckGoodsStudy(section.typeId);
+      if (this.sectionMaxNum > 0) {
+        if (learnNum >= this.sectionMaxNum && !hasLearn) {
+          this.$message({
+            type: "warning",
+            message: `每天最多学习${this.sectionMaxNum}节`,
+          });
+          return false;
+        }
+      }
+      return true;
+    },
+    goodsTodayStudySectionNum(option) {
+      return new Promise((resolve) => {
+        this.$request
+          .goodsTodayStudySectionNum({
+            goodsId: this.goodsId,
+            gradeId: this.gradeId,
+          })
+          .then((res) => {
+            resolve(res.data);
+          });
+      });
+    },
+    gradeCheckGoodsStudy(option) {
+      return new Promise((resolve) => {
+        this.$request
+          .gradeCheckGoodsStudy({
+            goodsId: this.goodsId,
+            gradeId: this.gradeId,
+            moduleId: option.moduleId || 0,
+            chapterId: option.chapterId || 0,
+            sectionId: option.sectionId || option.menuId,
+          })
+          .then((res) => {
+            resolve(res.data);
+          });
+      });
+    },
+    bankRecordDoNum(section) {
+      return new Promise((resolve) => {
+        this.$request
+          .bankRecordDoNum({
+            goodsId: this.goodsId,
+            gradeId: this.gradeId,
+            chapterId: section.chapterId,
+            courseId: this.courseId,
+            moduleId: 0,
+            examId: section.typeId,
+          })
+          .then((res) => {
+            resolve(res.data);
+          });
+      });
+    },
+    toPlay(section) {
+      // if (
+      //     this.sectionItem.sectionType === 1 &&
+      //     this.playSectionId &&
+      //     (this.playSectionId == section.sectionId ||
+      //         this.playSectionId == section.menuId) &&
+      //     this.moduleId == (section.moduleId || 0) &&
+      //     this.chapterId == (section.chapterId || 0)
+      // ) {
+      //     //切换为同一频道不作为
+      //     this.clickLock = false;
+      //     return;
+      // }
+      this.$emit("getResource", section);
+    },
+    //获取商品双师资模板
+    getDoubleTeacherList() {
+      let rows = JSON.parse(JSON.stringify(this.courseList));
+      rows.forEach((e) => {
+        e.list = [];
+        e.showList = false;
+      });
+      return this.$request
+        .courseTeacherList({
+          goodsId: this.$route.params.goodsId,
+        })
+        .then(({ data }) => {
+          data.forEach((ele) => {
+            rows.forEach((e, i) => {
+              let actvieIndex = ele.courseIds.indexOf(this.activeCourseId);
+              let index = ele.courseIds.indexOf(e.courseId);
+              if (actvieIndex != -1 && index != -1) {
+                if (e.courseId == this.activeCourseId) {
+                  e.courseList = ele.courseList;
+                } else {
+                  delete rows[i];
                 }
-            }
-            section.type == 2 ? this.toCourseExam(section, type, courseIndex) : this.toPlay(section)
-        },
-        async toCourseExam(section, type, courseIndex) {
-            //试卷
-            // 学习次数
-            if (!(await this.exceedLearnNum(section))) {
-                return false;
-            }
-            let num =
-                this.goodsLearningOrder != 2 || section.rebuild
-                    ? await this.bankRecordDoNum(section.typeId)
-                    : section.doNum;
-            if (section.answerNum - num > 0 && section.answerNum > 0 || section.answerNum == 0) {
-                this.$router.push({
-                    path: "/course-exam/" + this.goodsId,
-                    query: {
-                        courseId: this.treeList[courseIndex].courseId,
-                        gradeId: this.gradeId,
-                        moduleId: section.moduleId || 0,
-                        sectionId: section.sectionId || 0,
-                        examId: section.typeId,
-                        learning: section.learning,
-                        type: type,
-                        chapterId: section.chapterId || 0,
-                        orderGoodsId: this.orderGoodsId,
-                    },
-                });
-            } else {
-                this.$message({
-                    type: "warning",
-                    message: "该试卷只能答题" + section.answerNum + "次",
-                });
-                return;
-            }
-        },
-        handelPracticeOrRxam(section, type, courseId) {
-            if (type == 3) {
-                //节卷
-                let data = this.sectionExamList.filter(
-                    (x) => x.sectionId == section.menuId
-                );
-                if (data && data.length > 0) {
-                    section = data[0];
+              } else {
+                if (index == 0) {
+                  e.courseList = ele.courseList;
                 }
-            } else if (type == 2) {
-                //节卷
-                let data = this.sectionExam.filter(
-                    (x) => x.sectionId == section.sectionId
-                );
-
-                if (data && data.length > 0) {
-                    section = data[0];
+                if (index > 0) {
+                  delete rows[i];
                 }
-            }
-            this.$router.push({
-                path: "/course-exam/" + this.goodsId,
-                query: {
-                    courseId,
-                    gradeId: this.gradeId,
-                    moduleId: section.moduleId || 0,
-                    sectionId: section.sectionId || 0,
-                    examId: section.typeId,
-                    learning: section.learning,
-                    type: type,
-                    chapterId: section.chapterId || 0,
-                    orderGoodsId: this.orderGoodsId,
-                },
+              }
             });
-        },
-        async exceedLearnNum(section) {
-            let learnNum = await this.goodsTodayStudySectionNum();
-            let hasLearn = await this.gradeCheckGoodsStudy(section.typeId);
-            if (this.sectionMaxNum > 0) {
-                if (learnNum >= this.sectionMaxNum && !hasLearn) {
-                    this.$message({
-                        type: "warning",
-                        message: `每天最多学习${this.sectionMaxNum}节`,
-                    });
-                    return false;
-                }
-            }
-            return true;
-        },
-        goodsTodayStudySectionNum(option) {
-            return new Promise((resolve) => {
-                this.$request
-                    .goodsTodayStudySectionNum({
-                        goodsId: this.goodsId,
-                        gradeId: this.gradeId,
-                    })
-                    .then((res) => {
-                        resolve(res.data);
-                    });
-            });
-        },
-        gradeCheckGoodsStudy(option) {
-            return new Promise((resolve) => {
-                this.$request
-                    .gradeCheckGoodsStudy({
-                        goodsId: this.goodsId,
-                        gradeId: this.gradeId,
-                        moduleId: option.moduleId || 0,
-                        chapterId: option.chapterId || 0,
-                        sectionId: option.sectionId || option.menuId,
-                    })
-                    .then((res) => {
-                        resolve(res.data);
-                    });
-            });
-        },
-        bankRecordDoNum(section) {
-            return new Promise((resolve) => {
-                this.$request
-                    .bankRecordDoNum({
-                        goodsId: this.goodsId,
-                        gradeId: this.gradeId,
-                        chapterId: section.chapterId,
-                        courseId: this.courseId,
-                        moduleId: 0,
-                        examId: section.typeId,
-                    })
-                    .then((res) => {
-                        resolve(res.data);
-                    });
-            });
-        },
-        toPlay(section) {
-            // if (
-            //     this.sectionItem.sectionType === 1 &&
-            //     this.playSectionId &&
-            //     (this.playSectionId == section.sectionId ||
-            //         this.playSectionId == section.menuId) &&
-            //     this.moduleId == (section.moduleId || 0) &&
-            //     this.chapterId == (section.chapterId || 0)
-            // ) {
-            //     //切换为同一频道不作为
-            //     this.clickLock = false;
-            //     return;
-            // }
-            if (section == this.sectionItem) {
-                return
-            }
-            this.$emit('getResource', section)
-        },
-        //获取商品双师资模板
-        getDoubleTeacherList() {
-            let rows = JSON.parse(JSON.stringify(this.courseList))
-            rows.forEach(e => {
-                e.list = []
-                e.showList = false
-            })
-            return this.$request
-                .courseTeacherList({
-                    goodsId: this.$route.params.goodsId,
-                })
-                .then(({ data }) => {
-                    data.forEach(ele => {
-                        rows.forEach((e, i) => {
-                            let actvieIndex = ele.courseIds.indexOf(this.activeCourseId)
-                            let index = ele.courseIds.indexOf(e.courseId)
-                            if (actvieIndex != -1 && index != -1) {
-                                if (e.courseId == this.activeCourseId) {
-                                    e.courseList = ele.courseList
-                                } else {
-                                    delete rows[i]
-                                }
-                            } else {
-                                if (index == 0) {
-                                    e.courseList = ele.courseList
-                                }
-                                if (index > 0) {
-                                    delete rows[i]
-                                }
-                            }
-
-                        })
-                    })
-                    return Promise.resolve(rows.filter(e => e))
-                });
-        },
-        async orderTopTobottom(section, type, courseIndex) {
-            let { rebuild, moduleId, chapterId } = section;
-            if (this.goodsLearningOrder != 2 || rebuild) {
-                return true;
-            }
-            if (this.treeList.length > 1 && courseIndex > 0) {
-                let isAllLear = this.treeList.filter((e, i) => i < courseIndex).every(ele => ele.stuAllNum == ele.secAllNum)
-                if (!isAllLear) return false
-            }
-            let list = await this.studyRecordMenuAllList(this.treeList[courseIndex].courseId);
-            type = type == 1 && section.type == 2 ? 2 : type;
-            if (type == 1) {
-                let index = list.findIndex(
-                    (e) =>
-                        e.moduleId == moduleId &&
-                        e.chapterId == chapterId &&
-                        e.id == section.sectionId
-                );
-                list = list.slice(0, index);
-            } else if (type != 3) {
-                list = list.filter(
-                    (e) => e.moduleId == moduleId && e.chapterId == chapterId
-                );
-            }
-            return list.every((item) => item.studyStatus == 1);
-        },
-        studyRecordMenuAllList(courseId) {
-            return new Promise((resolve) => {
-                this.$request
-                    .studyRecordMenuAllList({
-                        courseId,
-                        gradeId: this.gradeId,
-                        goodsId: this.goodsId,
-                    })
-                    .then((res) => {
-                        resolve(res.data);
-                    });
-            });
-        },
-        //校验节是否有试卷
-        checkSection(sectionId, key) {
-            let _data = this[key];
-            if (_data.length == 0) {
-                return false;
-            }
-            return _data.some((section) => section.sectionId == sectionId);
-        },
+          });
+          return Promise.resolve(rows.filter((e) => e));
+        });
     },
-    computed: {
-        gradeId() {
-            return this.query.gradeId
-        },
-        activeCourseId() {
-            return this.query.courseId
-        },
-        goodsId() {
-            return this.$route.params.goodsId;
-        }
+    async orderTopTobottom(section, type, courseIndex) {
+      let { rebuild, moduleId, chapterId } = section;
+      if (this.goodsLearningOrder != 2 || rebuild) {
+        return true;
+      }
+      if (this.treeList.length > 1 && courseIndex > 0) {
+        let isAllLear = this.treeList
+          .filter((e, i) => i < courseIndex)
+          .every((ele) => ele.stuAllNum == ele.secAllNum);
+        if (!isAllLear) return false;
+      }
+      let list = await this.studyRecordMenuAllList(
+        this.treeList[courseIndex].courseId
+      );
+      type = type == 1 && section.type == 2 ? 2 : type;
+      if (type == 1) {
+        let index = list.findIndex(
+          (e) =>
+            e.moduleId == moduleId &&
+            e.chapterId == chapterId &&
+            e.id == section.sectionId
+        );
+        list = list.slice(0, index);
+      } else if (type != 3) {
+        list = list.filter(
+          (e) => e.moduleId == moduleId && e.chapterId == chapterId
+        );
+      }
+      return list.every((item) => item.studyStatus == 1);
     },
-    watch: {
-        courseList: {
-            async handler(newVal, oldVal) {
-
-            },
-            deep: true,
-            immediate: true
-        },
+    studyRecordMenuAllList(courseId) {
+      return new Promise((resolve) => {
+        this.$request
+          .studyRecordMenuAllList({
+            courseId,
+            gradeId: this.gradeId,
+            goodsId: this.goodsId,
+          })
+          .then((res) => {
+            resolve(res.data);
+          });
+      });
+    },
+    //校验节是否有试卷
+    checkSection(sectionId, key) {
+      let _data = this[key];
+      if (_data.length == 0) {
+        return false;
+      }
+      return _data.some((section) => section.sectionId == sectionId);
+    },
+    // 刷新数据
+    refreshList(){
+        
     }
-}
+  },
+  computed: {
+    gradeId() {
+      return this.query.gradeId;
+    },
+    activeCourseId() {
+      return this.query.courseId;
+    },
+    goodsId() {
+      return this.$route.params.goodsId;
+    },
+  },
+  watch: {
+    courseList: {
+      async handler(newVal, oldVal) {},
+      deep: true,
+      immediate: true,
+    },
+  },
+};
 </script>
 
 <style scoped lang="scss">
 .course_tree {
-    height: 380px;
-    overflow-y: scroll;
+  height: 380px;
+  overflow-y: scroll;
+
+  &::-webkit-scrollbar {
+    display: none;
+  }
 
-    &::-webkit-scrollbar {
-        display: none;
+  .item {
+    &__title {
+      padding-left: 12px;
+      height: 40px;
+      line-height: 40px;
+      cursor: pointer;
+      font-size: 14px;
+      font-family: Microsoft YaHei;
+      font-weight: bold;
+      color: #fff;
+
+      .el-icon-caret-right,
+      .el-icon-caret-bottom {
+        color: #999;
+      }
     }
 
-    .item {
-        &__title {
-            padding-left: 12px;
-            height: 40px;
-            line-height: 40px;
+    &__content {
+      .bank-chapter {
+        &__item {
+          color: #fff;
+          font-size: 14px;
+
+          &__text {
+            padding: 8px 8px 8px 24px;
             cursor: pointer;
-            font-size: 14px;
-            font-family: Microsoft YaHei;
-            font-weight: bold;
-            color: #fff;
+            flex: 1;
 
             .el-icon-caret-right,
             .el-icon-caret-bottom {
-                color: #999;
+              color: #999;
             }
+          }
         }
+      }
 
-        &__content {
-            .bank-chapter {
-                &__item {
-                    color: #fff;
-                    font-size: 14px;
+      .bank-section {
+        &__item {
+          user-select: none;
+          color: #fff;
+          font-size: 14px;
+          display: flex;
+          align-items: center;
 
-                    &__text {
-                        padding: 8px 8px 8px 24px;
-                        cursor: pointer;
-                        flex: 1;
+          .lear-state {
+            height: 20px;
+            padding-right: 8px;
 
-                        .el-icon-caret-right,
-                        .el-icon-caret-bottom {
-                            color: #999;
-                        }
-                    }
-                }
+            img {
+              width: 20px;
+              height: 20px;
+              // margin-right: 4px;
             }
+          }
 
-            .bank-section {
-                &__item {
-                    user-select: none;
-                    color: #fff;
-                    font-size: 14px;
-                    display: flex;
-                    align-items: center;
-
-                    .lear-state {
-                        height: 20px;
-                        padding-right: 8px;
-
-                        img {
-                            width: 20px;
-                            height: 20px;
-                            // margin-right: 4px;
-                        }
-                    }
-
-                    &.active {
-                        background: #132b4d;
-                        font-size: 14px;
-                        font-family: Microsoft YaHei;
-                        font-weight: bold;
-                        color: #3f8dfd;
-                    }
-
-                    &__text {
-                        flex: 1;
-                        padding: 8px 8px 8px 12px;
-                        height: 40px;
-                        display: flex;
-                        flex-direction: column;
-                        justify-content: center;
-                        cursor: pointer;
+          &.active {
+            background: #132b4d;
+            font-size: 14px;
+            font-family: Microsoft YaHei;
+            font-weight: bold;
+            color: #3f8dfd;
+          }
 
-                        .el-icon-caret-right,
-                        .el-icon-caret-bottom {
-                            color: #999;
-                        }
-                    }
+          &__text {
+            flex: 1;
+            padding: 8px 8px 8px 12px;
+            height: 40px;
+            display: flex;
+            flex-direction: column;
+            justify-content: center;
+            cursor: pointer;
 
-                    .test-btn {
-                        margin-left: 10px;
-                        width: 32px;
-                        height: 20px;
-                        background: #007aff;
-                        border-radius: 4px;
-                        line-height: 18px;
-                        color: #fff;
-                        text-align: center;
-                    }
+            .el-icon-caret-right,
+            .el-icon-caret-bottom {
+              color: #999;
+            }
+          }
 
-                    .note {
-                        margin-left: 10px;
-                        width: 32px;
-                        height: 20px;
-                        border: 1px solid #ff3b30;
-                        border-radius: 4px;
-                        line-height: 18px;
-                        color: #ff3b30;
-                        text-align: center;
+          .test-btn {
+            margin-left: 10px;
+            width: 32px;
+            height: 20px;
+            background: #007aff;
+            border-radius: 4px;
+            line-height: 18px;
+            color: #fff;
+            text-align: center;
+          }
 
-                        &--yellow {
-                            border-color: #ff9500;
-                            color: #ff9500;
-                        }
+          .note {
+            margin-left: 10px;
+            width: 32px;
+            height: 20px;
+            border: 1px solid #ff3b30;
+            border-radius: 4px;
+            line-height: 18px;
+            color: #ff3b30;
+            text-align: center;
 
-                        &--blue {
-                            border-color: #3f8dfd;
-                            color: #3f8dfd;
-                        }
-                    }
+            &--yellow {
+              border-color: #ff9500;
+              color: #ff9500;
+            }
 
-                    .during {
-                        color: #999;
-                        margin-right: 10px;
-                    }
+            &--blue {
+              border-color: #3f8dfd;
+              color: #3f8dfd;
+            }
+          }
 
-                    .btn {
-                        margin-right: 12px;
-                        width: 48px;
-                        height: 20px;
-                        border: 1px solid #ff3b30;
-                        background: #ff3b30;
-                        border-radius: 4px;
-                        line-height: 18px;
-                        color: #fff;
-                        text-align: center;
+          .during {
+            color: #999;
+            margin-right: 10px;
+          }
 
-                        &--green {
-                            border: 1px solid #34c759;
-                            background: #34c759;
-                        }
-                    }
+          .btn {
+            margin-right: 12px;
+            width: 48px;
+            height: 20px;
+            border: 1px solid #ff3b30;
+            background: #ff3b30;
+            border-radius: 4px;
+            line-height: 18px;
+            color: #fff;
+            text-align: center;
 
-                    .live-btn {
-                        margin-left: 20px;
-                        width: 60px;
-                        height: 20px;
-                        border-radius: 4px;
-                        background: #eeeeee;
-                        line-height: 18px;
-                        color: #666666;
-                        text-align: center;
+            &--green {
+              border: 1px solid #34c759;
+              background: #34c759;
+            }
+          }
 
-                        &--yellow {
-                            background: #fff7eb;
-                            color: #ff9500;
-                        }
+          .live-btn {
+            margin-left: 20px;
+            width: 60px;
+            height: 20px;
+            border-radius: 4px;
+            background: #eeeeee;
+            line-height: 18px;
+            color: #666666;
+            text-align: center;
 
-                        &--blue {
-                            border-color: #ebf4ff;
-                            color: #007aff;
-                        }
-                    }
+            &--yellow {
+              background: #fff7eb;
+              color: #ff9500;
+            }
 
-                    .exercises {
-                        cursor: pointer;
-                        font-size: 14px;
-                        color: #498afe;
-                    }
-                }
+            &--blue {
+              border-color: #ebf4ff;
+              color: #007aff;
             }
+          }
+
+          .exercises {
+            cursor: pointer;
+            font-size: 14px;
+            color: #498afe;
+          }
         }
+      }
     }
+  }
 
-    .teacherList_name {
-        display: flex;
-        margin-left: 20px;
-        margin-top: 10px;
+  .teacherList_name {
+    display: flex;
+    margin-left: 20px;
+    margin-top: 10px;
 
-        .names {
-            font-size: 13px;
-            color: #383838;
-            margin-right: 8px;
-            cursor: pointer;
-            background: #818181;
-            border-radius: 4px;
-            padding: 3px 6px;
+    .names {
+      font-size: 13px;
+      color: #383838;
+      margin-right: 8px;
+      cursor: pointer;
+      background: #818181;
+      border-radius: 4px;
+      padding: 3px 6px;
 
-            &.nactive {
-                background: #cccccc;
-            }
-        }
+      &.nactive {
+        background: #cccccc;
+      }
     }
+  }
 }
 </style>

+ 1 - 1
src/pages/course-detail/index.vue

@@ -2680,6 +2680,7 @@ export default {
     this.getbaseprofiletplists().then(async (res) => {
       await this.courseCourseList();
     });
+    this.refreshParentList1()
     document.addEventListener("visibilitychange", this.pauseVideo);
   },
   beforeDestroy() {
@@ -5549,7 +5550,6 @@ export default {
           // });
         });
     },
-
     /**
      * 获取重修列表中是否有相同对象
      */