|
|
@@ -69,13 +69,13 @@
|
|
|
</template>
|
|
|
<template v-if="category == 'EEP'">
|
|
|
<BookEep
|
|
|
- v-if="content.content && coursewareId"
|
|
|
+ v-if="context"
|
|
|
:id="coursewareId"
|
|
|
- :content="content.content"
|
|
|
- :content-group-row-list="content.content_group_row_list"
|
|
|
- :component-list="content.component_list"
|
|
|
- :book-background="content.background"
|
|
|
- ></BookEep>
|
|
|
+ :content="context.content"
|
|
|
+ :content-group-row-list="context.content_group_row_list"
|
|
|
+ :component-list="context.component_list"
|
|
|
+ :book-background="context.background"
|
|
|
+ />
|
|
|
</template>
|
|
|
|
|
|
<div v-if="category !== 'NPC' && category !== 'NNPE' && category !== 'RLC' && category !== 'NEW'" slot="footer">
|
|
|
@@ -127,53 +127,52 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- GetCoursewareContent_View({ id: this.coursewareId }).then(
|
|
|
- ({ content, category, book_theme_color, book_font_size }) => {
|
|
|
- if (!content) {
|
|
|
- this.context = null;
|
|
|
- return;
|
|
|
- }
|
|
|
- this.category = category;
|
|
|
- if (category === 'OC' || category.length === 0 || category === 'AILP') {
|
|
|
- return this.$message.warning('该课件类型已被废弃');
|
|
|
- }
|
|
|
- if (category === 'NPC') {
|
|
|
- this.themeColor = book_theme_color;
|
|
|
- this.dialogWidth = '900px';
|
|
|
- this.context = JSON.parse(content);
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.booknpc.handleAnswerTimeStart();
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
- if (category === 'NNPE') {
|
|
|
- this.dialogWidth = '900px';
|
|
|
- this.themeColor = book_theme_color;
|
|
|
- this.context = JSON.parse(content);
|
|
|
- return;
|
|
|
- }
|
|
|
+ GetCoursewareContent_View({ id: this.coursewareId }).then((res) => {
|
|
|
+ const { content, category, book_theme_color, book_font_size } = res;
|
|
|
+ if (!content) {
|
|
|
+ this.context = null;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.category = category;
|
|
|
+ if (category === 'OC' || category.length === 0 || category === 'AILP') {
|
|
|
+ return this.$message.warning('该课件类型已被废弃');
|
|
|
+ }
|
|
|
+ if (category === 'NPC') {
|
|
|
+ this.themeColor = book_theme_color;
|
|
|
+ this.dialogWidth = '900px';
|
|
|
+ this.context = JSON.parse(content);
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.booknpc.handleAnswerTimeStart();
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (category === 'NNPE') {
|
|
|
+ this.dialogWidth = '900px';
|
|
|
+ this.themeColor = book_theme_color;
|
|
|
+ this.context = JSON.parse(content);
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
- if (category === 'RLC') {
|
|
|
- this.dialogWidth = '900px';
|
|
|
- this.themeColor = book_theme_color;
|
|
|
- this.bookFontSize = book_font_size;
|
|
|
- this.context = JSON.parse(content);
|
|
|
- return;
|
|
|
- }
|
|
|
+ if (category === 'RLC') {
|
|
|
+ this.dialogWidth = '900px';
|
|
|
+ this.themeColor = book_theme_color;
|
|
|
+ this.bookFontSize = book_font_size;
|
|
|
+ this.context = JSON.parse(content);
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
- if (category === 'NEW') {
|
|
|
- this.dialogWidth = '1190px';
|
|
|
- this.context = JSON.parse(content);
|
|
|
- return;
|
|
|
- }
|
|
|
+ if (category === 'NEW') {
|
|
|
+ this.dialogWidth = '1190px';
|
|
|
+ this.context = JSON.parse(content);
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
- if (category === 'EEP') {
|
|
|
- this.dialogWidth = '1250px';
|
|
|
- this.content = JSON.parse(content);
|
|
|
- return;
|
|
|
- }
|
|
|
+ if (category === 'EEP') {
|
|
|
+ this.dialogWidth = '1250px';
|
|
|
+ this.context = res;
|
|
|
+ return;
|
|
|
}
|
|
|
- );
|
|
|
+ });
|
|
|
}
|
|
|
},
|
|
|
methods: {
|