瀏覽代碼

修改模板文档及编辑器字体问题

yangg 10 月之前
父節點
當前提交
baaec5394e

+ 21 - 0
dist/ckeditor/config.js

@@ -7,4 +7,25 @@ CKEDITOR.editorConfig = function( config ) {
 	// Define changes to default configuration here. For example:
 	// config.language = 'fr';
 	// config.uiColor = '#AADC6E';
+	config.font_names =
+	'宋体/SimSun;' +
+	'黑体/SimHei;' +
+	'仿宋/FangSong;' +
+	'楷体/KaiTi;' +
+	'隶书/LiSu;' +
+	'幼圆/YouYuan;' +
+	'微软雅黑/Microsoft YaHei;' +
+	config.font_names;
+
+// 确保字体插件被加载
+config.extraPlugins = 'font';
+
+// 可选:设置默认字体
+config.font_defaultLabel = '宋体';
+
+// 可选:允许所有字体大小
+config.fontSize_sizes = '8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px';
+
+// 可选:设置默认字体大小
+config.fontSize_defaultLabel = '12px';
 };

File diff suppressed because it is too large
+ 0 - 0
dist/index.html


+ 0 - 0
dist/static/css/chunk-354638c4.a5bdf00d.css → dist/static/css/chunk-165ce1a5.a5bdf00d.css


+ 0 - 0
dist/static/css/chunk-3b1696d4.ce959b8e.css → dist/static/css/chunk-b53a1e22.ce959b8e.css


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/app.69f17ab3.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-165ce1a5.c5758128.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-354638c4.e67f4c41.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-3b1696d4.1b47d009.js


File diff suppressed because it is too large
+ 0 - 0
dist/static/js/chunk-b53a1e22.6fe3240f.js


+ 21 - 0
public/ckeditor/config.js

@@ -7,4 +7,25 @@ CKEDITOR.editorConfig = function( config ) {
 	// Define changes to default configuration here. For example:
 	// config.language = 'fr';
 	// config.uiColor = '#AADC6E';
+	config.font_names =
+	'宋体/SimSun;' +
+	'黑体/SimHei;' +
+	'仿宋/FangSong;' +
+	'楷体/KaiTi;' +
+	'隶书/LiSu;' +
+	'幼圆/YouYuan;' +
+	'微软雅黑/Microsoft YaHei;' +
+	config.font_names;
+
+// 确保字体插件被加载
+config.extraPlugins = 'font';
+
+// 可选:设置默认字体
+config.font_defaultLabel = '宋体';
+
+// 可选:允许所有字体大小
+config.fontSize_sizes = '8/8px;9/9px;10/10px;11/11px;12/12px;14/14px;16/16px;18/18px;20/20px;22/22px;24/24px;26/26px;28/28px;36/36px;48/48px;72/72px';
+
+// 可选:设置默认字体大小
+config.fontSize_defaultLabel = '12px';
 };

+ 7 - 6
src/router/index.js

@@ -238,18 +238,19 @@ export const asyncRoutes = [
         name:"createNewDocument",
         meta: { title: '创建文档',  noCache: true,hidden:true }
       }, */
+       {
+        path: 'category/search',
+        component: () => import('@/views/document/category/search'),
+        name: 'documentCategory',
+        meta: { title: '文档分类',  noCache: true ,roles: ['admin']}
+      },
       {
         path: 'temList',
         component: () => import('@/views/document/temList/temList'),
         name: 'documentTemList',
         meta: { title: '模板列表',  noCache: true }
       },
-      {
-        path: 'category/search',
-        component: () => import('@/views/document/category/search'),
-        name: 'documentCategory',
-        meta: { title: '文档分类',  noCache: true ,roles: ['admin']}
-      },
+     
       {
         path: '/template/category/search',
         component: () => import('@/views/template/category/search'),

+ 8 - 3
src/views/document/com/components/Attribute/comList/index.vue

@@ -4,10 +4,10 @@
     <div class="com-items">
       <draggable v-model="coms" @update="datadragEnd" :options="{animation:200}" style="width:100%;">
         <template v-for="(it,index) in coms">
-          <div class="com-item" draggable>
+          <div :key="index" class="com-item" draggable>
             <div class="icon"><svg-icon icon-class='dashBoard1' /></div>
             <div class="name" @click="onSetActive(index)">{{it.name}}</div>
-            <div class="remove" @click="onRemove(index)"><svg-icon style="cursor: pointer;" icon-class="delete" /></div>
+            <div class="remove" v-if="type!=='document'" @click="onRemove(index)"><svg-icon style="cursor: pointer;" icon-class="delete" /></div>
           </div>
         </template>
       </draggable>
@@ -31,7 +31,12 @@
       },
     },
     data() {
-      return {}
+      return {
+        type:''
+      }
+    },
+    mounted(){
+      this.type=this.$route.query.type
     },
     methods: {
 

+ 3 - 0
src/views/document/com/components/Attribute/docAttr/index.vue

@@ -7,6 +7,7 @@
           style="width: 100%"
           class="input-item"
           placeholder="请填写模版名称"
+          :disabled="articleId"
         />
       </el-form-item>
 
@@ -76,12 +77,14 @@ export default {
       articleCategoryList: [],
       productList: [],
       projectList: [],
+      articleId:0
     };
   },
   created() {
     this.initArticleCategoryList();
     this.initProjectList();
     this.initGoodsList();
+    this.articleId=this.$route.query.articleId
   },
   methods: {
     onChangeProduct(e) {

+ 2 - 2
src/views/document/com/components/Formula/dataInfo.vue

@@ -27,10 +27,10 @@
               格式一:[T][模块引用名][属性引用名] <span>*</span>其中
               [T]表示的是模块引用。
             </div>
-            <div>
+         <!--    <div>
               格式二:[R][表名][Sheet名称][row,col] <span>*</span>其中
               [R]表示引用的是原始数据。 其中row,col表示excel表中的行、列序号
-            </div>
+            </div> -->
             <div>目前仅支持+、-、*、/ 四种计算符合</div>
             <div>示例 [T][模块01][attr01]+[T][模块01][attr02]</div>
           </div>

+ 2 - 1
src/views/document/com/editor.vue

@@ -92,6 +92,7 @@
                     <el-form-item v-if="$store.state.user.id == 2">
                       <div class="btn-save">
                         <el-tooltip
+                        v-if="type!=='document'"
                           class="item"
                           effect="dark"
                           content="保存模块"
@@ -137,7 +138,7 @@
                         >
                         </el-button>
                         <el-tooltip
-                        v-if="!templateId"
+                        v-if="!templateId&&type!=='document'"
                           class="item"
                           effect="dark"
                           content="删除"

+ 12 - 1
src/views/document/com/menus.vue

@@ -3,7 +3,7 @@
     <div class="menus-out">
       <div
         class="group-item"
-        v-for="(it, index) in menus"
+        v-for="(it, index) in filteredMenus"
         :key="index"
         :class="'group-item' + index"
       >
@@ -231,6 +231,17 @@ export default {
       ],
     };
   },
+  computed: {
+    filteredMenus() {
+      if (this.type === 'document') {
+        return this.menus.map(group => ({
+          ...group,
+          subMenus: group.subMenus.filter(item => item.key === 'ai')
+        })).filter(group => group.subMenus.length > 0);
+      }
+      return this.menus;
+    }
+  },
   mounted() {
     this.type = this.$route.query.type;
   },

+ 22 - 6
src/views/document/create.vue

@@ -38,14 +38,30 @@
           "
           >更新文档</el-button
         >
-        <el-popover
+        <!-- <el-popover
           placement="bottom"
           trigger="click"
           v-if="type !== 'module' && type !== 'document'"
+        > -->
+        <el-button
+          v-if="
+            $store.state.user.name == 'admin' &&
+            type !== 'module' &&
+            type !== 'document'&&!articleId
+          "
+          @click="onSaveUpload"
+          >保存</el-button
         >
-          <el-button @click="onSaveUpload">保存</el-button>
-          <el-button @click="onUpload">更新</el-button>
-          <el-button
+        <el-button
+          v-if="
+            $store.state.user.name == 'admin' &&
+            type !== 'module' &&
+            type !== 'document'&&articleId
+          "
+          @click="onUpload"
+          >更新</el-button
+        >
+        <!-- <el-button
             slot="reference"
             type="primary"
             size="mini"
@@ -53,7 +69,7 @@
             v-if="$store.state.user.name == 'admin'"
             >保存并更新模版</el-button
           >
-        </el-popover>
+        </el-popover> -->
         <!-- <el-button
           type="primary"
           size="mini"
@@ -431,7 +447,7 @@
             <span class="name">模版属性</span>
           </div>
           <div
-          v-if="type!=='module'"
+            v-if="type !== 'module'"
             class="item"
             @click="onSetActiveIndex(9998)"
             :class="comIndex == 9998 ? 'active-item' : ''"

Some files were not shown because too many files changed in this diff