|
@@ -37,7 +37,12 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { GetCoursewareContent, GetBookChapterStruct, GetCoursewareList_Chapter } from '@/api/book';
|
|
|
+import {
|
|
|
+ GetCoursewareContent,
|
|
|
+ GetBookChapterStruct,
|
|
|
+ GetCoursewareList_Chapter,
|
|
|
+ GetCoursewareComponentContent_View,
|
|
|
+} from '@/api/book';
|
|
|
|
|
|
import CatalogueTree from '@/views/book/components/catalogueTree.vue';
|
|
|
|
|
@@ -75,8 +80,18 @@ export default {
|
|
|
this.setCurPosition(this.chapter_id);
|
|
|
});
|
|
|
this.getCoursewareList_Chapter(this.chapter_id);
|
|
|
+ this.GetCoursewareComponentContent_View();
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 获取课件数据
|
|
|
+ getCoursewareComponentContent_View() {
|
|
|
+ GetCoursewareComponentContent_View({ courseware_id: this.coursewareId, component_id: this.componentId }).then(
|
|
|
+ ({ content }) => {
|
|
|
+ // if (content) this.file_list = JSON.parse(content).file_list;
|
|
|
+ },
|
|
|
+ );
|
|
|
+ },
|
|
|
+
|
|
|
goBack() {
|
|
|
this.$router.push(`/chapter?chapter_id=${this.chapter_id}&book_id=${this.book_id}`);
|
|
|
},
|
|
@@ -133,6 +148,16 @@ export default {
|
|
|
this.coursewareDataList = coursewareDataList;
|
|
|
});
|
|
|
},
|
|
|
+ getNodeName(index) {
|
|
|
+ let node = this.nodes;
|
|
|
+ for (let i = 0; i <= index; i++) {
|
|
|
+ node = i === 0 ? node[this.curPosition[i]] : node.nodes[this.curPosition[i]];
|
|
|
+ }
|
|
|
+ return node?.name;
|
|
|
+ },
|
|
|
+ getCatalogueName() {
|
|
|
+ return this.curPosition.map((item, index) => this.getNodeName(index)).join(' / ');
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -221,6 +246,21 @@ export default {
|
|
|
border-bottom-right-radius: 12px;
|
|
|
border-bottom-left-radius: 12px;
|
|
|
}
|
|
|
+
|
|
|
+ .navigation {
|
|
|
+ margin: -10px 0 0 -24px;
|
|
|
+
|
|
|
+ &-label {
|
|
|
+ padding: 18px 24px;
|
|
|
+ color: #fff;
|
|
|
+ background-color: #f44444;
|
|
|
+ border-radius: 16px 0;
|
|
|
+
|
|
|
+ .svg-icon {
|
|
|
+ margin: 0 22px 0 1px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|