dsy il y a 1 mois
Parent
commit
cda5497ea0

+ 1 - 1
.env

@@ -11,4 +11,4 @@ VUE_APP_BookWebSI = '/GCLSBookWebSI/ServiceInterface'
 VUE_APP_EepServer = '/EEPServer/SI'
 
 #version
-VUE_APP_VERSION = '2026.01.20'
+VUE_APP_VERSION = '2026.01.23'

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "eep_page",
-  "version": "2026.01.20",
+  "version": "2026.01.23",
   "private": true,
   "main": "main.js",
   "description": "智慧梧桐数字教材编辑器",

+ 37 - 32
src/components/CommonPreview.vue

@@ -409,6 +409,7 @@ export default {
       getChinese: () => this.chinese,
       getLangList: () => this.langList,
       convertText: this.convertText,
+      getTitleList: () => this.title_list,
     };
   },
   props: {
@@ -520,7 +521,7 @@ export default {
       opencc: OpenCC.Converter({ from: 'cn', to: 'tw' }),
       langList: [],
       lang: 'ZH',
-      chinese: 'zh-Hans',
+      chinese: 'zh-Hans', // 语言简体中文zh-Hans,繁体中文zh-Hant
       isJudgeCorrect: false,
       isShowAnswer: false,
       unified_attrib: {},
@@ -542,6 +543,7 @@ export default {
       activeBookChapterId: '',
       multimediaLoadingStates: true,
       isFullScreen: false, // 是否全屏状态
+      title_list: [],
     };
   },
   computed: {
@@ -657,40 +659,43 @@ export default {
      * @param {string} id - 课件ID
      */
     getCoursewareComponentContent_View(id) {
-      ContentGetCoursewareContent_View({ id }).then(({ content, component_list, content_group_row_list }) => {
-        if (content) {
-          const _content = JSON.parse(content);
-          this.data = _content;
-          this.background = {
-            background_image_url: _content.background_image_url,
-            background_position: _content.background_position,
-          };
-        } else {
-          this.data = { row_list: [] };
-        }
+      ContentGetCoursewareContent_View({ id }).then(
+        ({ content, component_list, content_group_row_list, title_list }) => {
+          if (content) {
+            const _content = JSON.parse(content);
+            this.data = _content;
+            this.background = {
+              background_image_url: _content.background_image_url,
+              background_position: _content.background_position,
+            };
+          } else {
+            this.data = { row_list: [] };
+          }
 
-        if (component_list) this.component_list = component_list;
-        this.component_list.forEach((x) => {
-          if (x.component_type === 'audio') {
-            let _c = JSON.parse(x.content);
-            let p = _c.property || {};
-            if (!p.file_name_display_mode) p.file_name_display_mode = 'true';
-            if (p.view_method === 'independent' && !p.style_mode) {
-              p.style_mode = 'middle';
-            }
-            if (!p.style_mode) p.style_mode = 'big';
-            if (p.view_method === 'icon') {
-              p.file_name_display_mode = 'false';
-              p.view_method = 'independent';
-              p.style_mode = 'small';
-            }
+          if (component_list) this.component_list = component_list;
+          this.component_list.forEach((x) => {
+            if (x.component_type === 'audio') {
+              let _c = JSON.parse(x.content);
+              let p = _c.property || {};
+              if (!p.file_name_display_mode) p.file_name_display_mode = 'true';
+              if (p.view_method === 'independent' && !p.style_mode) {
+                p.style_mode = 'middle';
+              }
+              if (!p.style_mode) p.style_mode = 'big';
+              if (p.view_method === 'icon') {
+                p.file_name_display_mode = 'false';
+                p.view_method = 'independent';
+                p.style_mode = 'small';
+              }
 
-            x.content = JSON.stringify(_c);
-          }
-        });
+              x.content = JSON.stringify(_c);
+            }
+          });
 
-        if (content_group_row_list) this.content_group_row_list = JSON.parse(content_group_row_list) || [];
-      });
+          if (content_group_row_list) this.content_group_row_list = JSON.parse(content_group_row_list) || [];
+          if (title_list) this.title_list = title_list || [];
+        },
+      );
     },
 
     getLangList() {

+ 5 - 1
src/views/book/courseware/create/components/CreateCanvas.vue

@@ -157,6 +157,7 @@ export default {
   provide() {
     return {
       getBookUnifiedAttr: () => this.book_unified_attrib,
+      getTitleList: () => this.title_list,
     };
   },
   props: {
@@ -202,6 +203,7 @@ export default {
       },
       visibleFullTextSettings: false,
       book_unified_attrib: unified_attrib,
+      title_list: [],
     };
   },
   computed: {
@@ -336,7 +338,7 @@ export default {
       spinner: 'el-icon-loading',
     });
     ContentGetCoursewareContent({ id: this.courseware_id })
-      .then(({ content, content_group_row_list }) => {
+      .then(({ content, content_group_row_list, title_list }) => {
         if (content) {
           let parsedContent = JSON.parse(content);
           if (
@@ -353,6 +355,8 @@ export default {
         }
         if (content_group_row_list) this.content_group_row_list = JSON.parse(content_group_row_list);
 
+        if (title_list) this.title_list = title_list || [];
+
         this.$watch(
           'data',
           () => {

+ 1 - 1
src/views/book/courseware/preview/components/common/PreviewMixin.js

@@ -19,7 +19,7 @@ const mixin = {
       loader: false,
     };
   },
-  inject: ['getLang', 'getChinese', 'convertText'],
+  inject: ['getLang', 'getChinese', 'convertText', 'getTitleList'],
   props: {
     id: {
       type: String,

+ 40 - 30
src/views/personal_workbench/edit_task/edit/UseTemplate.vue

@@ -77,6 +77,11 @@ export default {
     PaginationPage,
     CoursewarePreview,
   },
+  provide() {
+    return {
+      getTitleList: () => this.title_list,
+    };
+  },
   props: {
     visible: {
       type: Boolean,
@@ -119,6 +124,7 @@ export default {
         unified_attrib,
       },
       data_content_group_row_list: [],
+      title_list: [],
     };
   },
   methods: {
@@ -156,40 +162,44 @@ export default {
      * @param {string} id - 课件ID
      */
     getCoursewareComponentContent_View(id) {
-      ContentGetCoursewareContent_View({ id }).then(({ content, component_list, content_group_row_list }) => {
-        if (content) {
-          const _content = JSON.parse(content);
-          this.coursewareData = _content;
-          this.background = {
-            background_image_url: _content.background_image_url,
-            background_position: _content.background_position,
-          };
-        } else {
-          this.coursewareData = { row_list: [] };
-        }
+      ContentGetCoursewareContent_View({ id }).then(
+        ({ content, component_list, content_group_row_list, title_list }) => {
+          if (content) {
+            const _content = JSON.parse(content);
+            this.coursewareData = _content;
+            this.background = {
+              background_image_url: _content.background_image_url,
+              background_position: _content.background_position,
+            };
+          } else {
+            this.coursewareData = { row_list: [] };
+          }
 
-        if (component_list) this.component_list = component_list;
-        this.component_list.forEach((x) => {
-          if (x.component_type === 'audio') {
-            let _c = JSON.parse(x.content);
-            let p = _c.property || {};
-            if (!p.file_name_display_mode) p.file_name_display_mode = 'true';
-            if (p.view_method === 'independent' && !p.style_mode) {
-              p.style_mode = 'middle';
-            }
-            if (!p.style_mode) p.style_mode = 'big';
-            if (p.view_method === 'icon') {
-              p.file_name_display_mode = 'false';
-              p.view_method = 'independent';
-              p.style_mode = 'small';
+          if (component_list) this.component_list = component_list;
+          this.component_list.forEach((x) => {
+            if (x.component_type === 'audio') {
+              let _c = JSON.parse(x.content);
+              let p = _c.property || {};
+              if (!p.file_name_display_mode) p.file_name_display_mode = 'true';
+              if (p.view_method === 'independent' && !p.style_mode) {
+                p.style_mode = 'middle';
+              }
+              if (!p.style_mode) p.style_mode = 'big';
+              if (p.view_method === 'icon') {
+                p.file_name_display_mode = 'false';
+                p.view_method = 'independent';
+                p.style_mode = 'small';
+              }
+
+              x.content = JSON.stringify(_c);
             }
+          });
 
-            x.content = JSON.stringify(_c);
-          }
-        });
+          if (content_group_row_list) this.content_group_row_list = JSON.parse(content_group_row_list) || [];
 
-        if (content_group_row_list) this.content_group_row_list = JSON.parse(content_group_row_list) || [];
-      });
+          if (title_list) this.title_list = title_list || [];
+        },
+      );
     },
     /**
      * 得到课件内容(编辑内容)

+ 35 - 31
src/views/personal_workbench/template_list/preview/CommonPreview.vue

@@ -63,6 +63,7 @@ export default {
       getChinese: () => this.chinese,
       getLangList: () => this.langList,
       convertText: this.convertText,
+      getTitleList: () => this.title_list,
     };
   },
   props: {
@@ -144,39 +145,42 @@ export default {
      * @param {string} id - 课件ID
      */
     getCoursewareComponentContent_View(id) {
-      ContentGetCoursewareContent_View({ id }).then(({ content, component_list, content_group_row_list }) => {
-        if (content) {
-          const _content = JSON.parse(content);
-          this.data = _content;
-          this.background = {
-            background_image_url: _content.background_image_url,
-            background_position: _content.background_position,
-          };
-        } else {
-          this.data = { row_list: [] };
-        }
+      ContentGetCoursewareContent_View({ id }).then(
+        ({ content, component_list, content_group_row_list, title_list }) => {
+          if (content) {
+            const _content = JSON.parse(content);
+            this.data = _content;
+            this.background = {
+              background_image_url: _content.background_image_url,
+              background_position: _content.background_position,
+            };
+          } else {
+            this.data = { row_list: [] };
+          }
 
-        if (component_list) this.component_list = component_list;
-        this.component_list.forEach((x) => {
-          if (x.component_type === 'audio') {
-            let _c = JSON.parse(x.content);
-            let p = _c.property || {};
-            if (!p.file_name_display_mode) p.file_name_display_mode = 'true';
-            if (p.view_method === 'independent' && !p.style_mode) {
-              p.style_mode = 'middle';
-            }
-            if (!p.style_mode) p.style_mode = 'big';
-            if (p.view_method === 'icon') {
-              p.file_name_display_mode = 'false';
-              p.view_method = 'independent';
-              p.style_mode = 'small';
-            }
+          if (component_list) this.component_list = component_list;
+          this.component_list.forEach((x) => {
+            if (x.component_type === 'audio') {
+              let _c = JSON.parse(x.content);
+              let p = _c.property || {};
+              if (!p.file_name_display_mode) p.file_name_display_mode = 'true';
+              if (p.view_method === 'independent' && !p.style_mode) {
+                p.style_mode = 'middle';
+              }
+              if (!p.style_mode) p.style_mode = 'big';
+              if (p.view_method === 'icon') {
+                p.file_name_display_mode = 'false';
+                p.view_method = 'independent';
+                p.style_mode = 'small';
+              }
 
-            x.content = JSON.stringify(_c);
-          }
-        });
-        if (content_group_row_list) this.content_group_row_list = JSON.parse(content_group_row_list) || [];
-      });
+              x.content = JSON.stringify(_c);
+            }
+          });
+          if (content_group_row_list) this.content_group_row_list = JSON.parse(content_group_row_list) || [];
+          if (title_list) this.title_list = title_list || [];
+        },
+      );
     },
 
     backTop() {