dsy 2 týždňov pred
rodič
commit
55a26bf9d4

+ 1 - 1
.env

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

+ 1 - 1
package.json

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

+ 15 - 4
src/components/CommonPreview.vue

@@ -28,7 +28,7 @@
     <div class="audit-content">
       <div ref="previewMain" class="main-container">
         <main :class="['preview-main', { 'no-audit': !isShowAudit }]">
-          <span class="title">
+          <span class="title" :style="{ backgroundColor: unified_attrib?.topic_color }">
             <SvgIcon icon-class="menu-2" size="24" />
             <span>{{ courseware_info.name_path }}</span>
           </span>
@@ -174,6 +174,7 @@ import {
   MangerGetBookMindMap,
   PageQueryBookResourceList,
   GetLanguageTypeList,
+  GetBookUnifiedAttrib,
 } from '@/api/book';
 
 export default {
@@ -289,6 +290,7 @@ export default {
       chinese: 'zh-Hans',
       isJudgeCorrect: false,
       isShowAnswer: false,
+      unified_attrib: {},
     };
   },
   computed: {
@@ -319,6 +321,7 @@ export default {
       this.isBook ? this.getBookBaseInfo() : this.getProjectBaseInfo();
     }
     this.getBookChapterStructExpandList();
+    this.getBookUnifiedAttr();
   },
   mounted() {
     this.calcDrawerPosition();
@@ -391,6 +394,15 @@ export default {
         this.node_list = node_list;
       });
     },
+
+    getBookUnifiedAttr() {
+      GetBookUnifiedAttrib({ book_id: this.projectId }).then(({ content }) => {
+        if (content) {
+          this.unified_attrib = JSON.parse(content);
+        }
+      });
+    },
+
     /**
      * 选择节点
      * @param {string} nodeId - 节点ID
@@ -693,22 +705,21 @@ export default {
   }
 
   .main-container {
-    display: flex;
     flex: 1;
-    justify-content: center;
     min-width: 1110px;
     overflow: auto;
   }
 
   main.preview-main {
     display: flex;
+    flex: 1;
     flex-direction: column;
     row-gap: 5px;
     width: 1100px;
     min-width: 1100px;
     min-height: 100%;
     padding: 5px;
-    margin: 0 5px;
+    margin: 0 auto;
     background-color: #fff;
     border-radius: 4px;
     box-shadow: 0 2px 4px rgba(0, 0, 0, 10%);

+ 1 - 2
src/main.js

@@ -16,8 +16,7 @@ import '@/styles/element-variables.scss';
 import '@/utils/mathjax'; // 必须在引入mathjax前引入mathjax的配置文件
 import 'mathjax/es5/tex-mml-chtml';
 
-import VueSignaturePad from "vue-signature-pad";
-
+import VueSignaturePad from 'vue-signature-pad';
 
 import { setupRouterGuard } from '@/router/guard';
 

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

@@ -132,12 +132,7 @@
 <script>
 import { getRandomNumber } from '@/utils/index';
 import { componentList } from '../../data/bookType';
-import {
-  ContentSaveCoursewareContent,
-  ContentGetCoursewareContent,
-  SaveBookUnifiedAttrib,
-  GetBookUnifiedAttrib,
-} from '@/api/book';
+import { ContentSaveCoursewareContent, ContentGetCoursewareContent, GetBookUnifiedAttrib } from '@/api/book';
 import _ from 'lodash';
 import { unified_attrib } from '@/common/data';
 
@@ -373,7 +368,6 @@ export default {
         item.setUnifiedAttr(data);
       });
       this.data.unified_attrib = data;
-      this.saveBookUnifiedAttr(data);
     },
     getBookUnifiedAttr() {
       GetBookUnifiedAttrib({ book_id: this.project_id }).then(({ content }) => {
@@ -382,14 +376,6 @@ export default {
         }
       });
     },
-    saveBookUnifiedAttr(data) {
-      SaveBookUnifiedAttrib({
-        book_id: this.project_id,
-        content: JSON.stringify(data),
-      }).catch(() => {
-        this.$message.error('保存失败');
-      });
-    },
     /**
      * 保存课件内容
      * @param {string} type 类型

+ 14 - 1
src/views/book/courseware/create/components/FullTextSettings.vue

@@ -9,7 +9,11 @@
   >
     <el-form ref="form" :model="unified_attrib" label-width="80px" size="small">
       <el-form-item label="主题色">
-        <el-color-picker v-model="unified_attrib.topic_color" />
+        <div class="color-group">
+          <el-color-picker v-model="unified_attrib.topic_color" />
+          <span>辅助色</span>
+          <el-color-picker v-model="unified_attrib.assist_color" />
+        </div>
       </el-form-item>
       <el-form-item label="字体">
         <el-select v-model="unified_attrib.font" placeholder="请选择字体">
@@ -136,6 +140,15 @@ export default {
   padding: 0;
 
   .el-form {
+    .color-group {
+      display: flex;
+      column-gap: 10px;
+      align-items: center;
+
+      span {
+        white-space: nowrap;
+      }
+    }
   }
 }
 </style>

+ 11 - 4
src/views/book/courseware/create/components/common/ModuleMixin.js

@@ -94,21 +94,28 @@ const mixin = {
         ({ content }) => {
           if (content) {
             this.data = JSON.parse(content);
-          } else if ('view_pinyin' in this.data.property) {
-            // 初始化时,如果有 view_pinyin 则根据全文设置配置设 view_pinyin 和 pinyin_position
+          } else {
             const bookUnifiedAttr = this.getBookUnifiedAttr();
 
-            this.data.property.view_pinyin = bookUnifiedAttr?.view_pinyin ?? 'false';
-            this.data.property.pinyin_position = bookUnifiedAttr?.pinyin_position ?? 'top';
+            this.$set(this.data, 'unified_attrib', bookUnifiedAttr);
+
+            // 初始化时,如果有 view_pinyin 则根据全文设置配置设 view_pinyin 和 pinyin_position
+            if ('view_pinyin' in this.data.property) {
+              this.data.property.view_pinyin = bookUnifiedAttr?.view_pinyin ?? 'false';
+              this.data.property.pinyin_position = bookUnifiedAttr?.pinyin_position ?? 'top';
+            }
+
             if ('frame_color' in this.data.property) {
               // 框颜色初始化为主题色
               this.data.property.frame_color = bookUnifiedAttr?.topic_color ?? '#F13232';
             }
+
             if ('sn_background_color' in this.data.property) {
               // 序号背景色
               this.data.property.sn_background_color = bookUnifiedAttr?.topic_color ?? '#EA3232';
             }
           }
+
           this.property.isGetContent = true;
 
           this.$watch(

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

@@ -40,7 +40,7 @@ const mixin = {
   },
   computed: {
     showLang() {
-      return this.getLang() !== 'zh';
+      return this.getLang() !== 'ZH';
     },
   },
   watch: {

+ 20 - 4
src/views/personal_workbench/project/components/BookUnifiedAttr.vue

@@ -53,7 +53,7 @@
         </el-form>
       </div>
 
-      <div class="tips">
+      <div class="tips" @click="applyBookUnifiedAttr">
         <p>重置当前教材所有内容</p>
         <p style="color: #f00">(不包含富文本的现有文字属性)</p>
       </div>
@@ -71,14 +71,14 @@
 
     <div slot="footer" class="dialog-footer">
       <el-button @click="dialogClose">取 消</el-button>
-      <el-button type="primary" @click="applyBookUnifiedAttr">确定</el-button>
+      <el-button type="primary" @click="saveBookUnifiedAttr">确定</el-button>
     </div>
   </el-dialog>
 </template>
 
 <script>
 import { pinyinPositionList, isEnable } from '@/views/book/courseware/data/common';
-import { GetBookUnifiedAttrib, ApplyBookUnifiedAttrib } from '@/api/book';
+import { GetBookUnifiedAttrib, ApplyBookUnifiedAttrib, SaveBookUnifiedAttrib } from '@/api/book';
 import { unified_attrib } from '@/common/data';
 
 export default {
@@ -133,11 +133,26 @@ export default {
       });
     },
     applyBookUnifiedAttr() {
+      let loading = this.$loading({ fullscreen: true, text: '正在应用,请稍后...' });
       ApplyBookUnifiedAttrib({
         book_id: this.bookId,
         content: JSON.stringify(this.unified_attrib),
+      })
+        .then(() => {
+          this.$message.success('应用成功');
+          this.dialogClose();
+        })
+        .finally(() => {
+          loading.close();
+        });
+    },
+    saveBookUnifiedAttr() {
+      SaveBookUnifiedAttrib({
+        book_id: this.bookId,
+        content: JSON.stringify(this.unified_attrib),
       }).then(() => {
-        this.$message.success('应用成功');
+        this.$message.success('保存成功');
+        this.dialogClose();
       });
     },
     dialogClose() {
@@ -180,6 +195,7 @@ export default {
       font-size: 12px;
       line-height: 1.5;
       text-align: center;
+      cursor: pointer;
       background-color: rgba(22, 93, 255, 8%);
       border-radius: 8px;
     }