Browse Source

教材的全文设置加初始化值

dsy 2 weeks ago
parent
commit
78e20f99de

+ 1 - 1
.env

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

+ 1 - 1
package.json

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

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

@@ -122,6 +122,7 @@
     />
 
     <FullTextSettings
+      :book-id="project_id"
       :visible.sync="visibleFullTextSettings"
       :settings="data.unified_attrib"
       @fullTextSettings="fullTextSettings"

+ 16 - 0
src/views/book/courseware/create/components/FullTextSettings.vue

@@ -70,6 +70,8 @@
 <script>
 import { pinyinPositionList, isEnable } from '@/views/book/courseware/data/common';
 
+import { GetBookUnifiedAttrib } from '@/api/book';
+
 export default {
   name: 'FullTextSettings',
   props: {
@@ -81,6 +83,10 @@ export default {
       type: Object,
       required: true,
     },
+    bookId: {
+      type: String,
+      required: true,
+    },
   },
   data() {
     return {
@@ -123,7 +129,17 @@ export default {
       }
     },
   },
+  created() {
+    this.getBookUnifiedAttr();
+  },
   methods: {
+    getBookUnifiedAttr() {
+      GetBookUnifiedAttrib({ book_id: this.bookId }).then(({ content }) => {
+        if (content && (this.settings === null || Object.keys(this.settings).length > 0)) {
+          this.unified_attrib = JSON.parse(content);
+        }
+      });
+    },
     handleClose() {
       this.$emit('update:visible', false);
     },