Эх сурвалжийг харах

修改导航栏图标及添加新的文档目录方式

yangg 8 сар өмнө
parent
commit
00485d868d
49 өөрчлөгдсөн 634 нэмэгдсэн , 169 устгасан
  1. 0 0
      dist/index.html
  2. 0 0
      dist/static/css/app.36596c8d.css
  3. 1 0
      dist/static/css/chunk-048e3da4.680f8f1c.css
  4. 0 0
      dist/static/css/chunk-10b289e2.9733ac4d.css
  5. 0 0
      dist/static/css/chunk-3a588088.7a93a04c.css
  6. 0 1
      dist/static/css/chunk-d9ef2ea8.ca62898c.css
  7. 0 0
      dist/static/js/app.350932ac.js
  8. 0 0
      dist/static/js/app.a4093da4.js
  9. 0 0
      dist/static/js/chunk-048e3da4.0a9afdb4.js
  10. 0 0
      dist/static/js/chunk-0ec56e2a.0f2d613f.js
  11. 0 0
      dist/static/js/chunk-0eed3357.19ecb195.js
  12. 0 0
      dist/static/js/chunk-10b289e2.f2c74c38.js
  13. 0 0
      dist/static/js/chunk-10bfc27e.160fd027.js
  14. 0 0
      dist/static/js/chunk-11ff1a32.d2899384.js
  15. 0 0
      dist/static/js/chunk-138f7583.afc8a722.js
  16. 0 0
      dist/static/js/chunk-2d0d3705.705fb721.js
  17. 0 0
      dist/static/js/chunk-35464144.0740381d.js
  18. 0 0
      dist/static/js/chunk-36afbef8.16916b9d.js
  19. 0 0
      dist/static/js/chunk-386d37cb.ed0cbb14.js
  20. 0 0
      dist/static/js/chunk-3a588088.53b8fb2e.js
  21. 0 0
      dist/static/js/chunk-3d8a6649.e1abeef2.js
  22. 0 0
      dist/static/js/chunk-44eee83d.2835accc.js
  23. 0 0
      dist/static/js/chunk-4ac7f82e.7cf386bf.js
  24. 0 0
      dist/static/js/chunk-52f685c2.0707d273.js
  25. 0 0
      dist/static/js/chunk-548f9440.7c018f8b.js
  26. 0 0
      dist/static/js/chunk-5a3bdf57.961d76c5.js
  27. 0 0
      dist/static/js/chunk-5bc2c8fb.8af52844.js
  28. 0 0
      dist/static/js/chunk-683feb49.8709c304.js
  29. 0 0
      dist/static/js/chunk-688ed2e7.dc6c4b0d.js
  30. 0 0
      dist/static/js/chunk-696e880a.08ecd45a.js
  31. 0 0
      dist/static/js/chunk-6a80e4ca.5db802a1.js
  32. 0 0
      dist/static/js/chunk-6ddf6871.ac73ac06.js
  33. 0 0
      dist/static/js/chunk-708604c0.01129860.js
  34. 0 0
      dist/static/js/chunk-7a88741c.ed9e1ae2.js
  35. 0 0
      dist/static/js/chunk-7dbc1954.cf59a3f4.js
  36. 0 0
      dist/static/js/chunk-9235c1ae.9539ac07.js
  37. 0 0
      dist/static/js/chunk-a577192a.7933353b.js
  38. 0 0
      dist/static/js/chunk-d09dbc1a.8b21f794.js
  39. 0 0
      dist/static/js/chunk-d4c547ca.0a2a1daa.js
  40. 0 0
      dist/static/js/chunk-d9ef2ea8.62dd27ef.js
  41. 0 0
      dist/static/js/chunk-libs.9282d9f8.js
  42. 1 0
      package.json
  43. 10 0
      src/api/knowledge.js
  44. 52 11
      src/layout/components/Sidebar/Item.vue
  45. 11 1
      src/main.js
  46. 7 7
      src/router/index.js
  47. 468 133
      src/views/appConfig/index.vue
  48. 16 6
      src/views/document/com/editor.vue
  49. 68 10
      src/views/document/create.vue

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/index.html


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/css/app.36596c8d.css


+ 1 - 0
dist/static/css/chunk-048e3da4.680f8f1c.css

@@ -0,0 +1 @@
+.header[data-v-67e46fa8]{margin-left:20px}.header h2[data-v-67e46fa8]{margin-bottom:0}.center[data-v-67e46fa8]{margin:10px}.center[data-v-67e46fa8] .el-form--inline .el-form-item{display:block}.center[data-v-67e46fa8] .el-input-number--medium{width:150px}.footer[data-v-67e46fa8]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;margin:0 100px 20px}[data-v-67e46fa8] .avatar-uploader .el-upload{border:1px dashed #d9d9d9;border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload[data-v-67e46fa8]:hover{border-color:#409eff}.avatar-uploader-icon[data-v-67e46fa8]{font-size:28px;color:#8c939d;width:100px;height:100px;line-height:100px;text-align:center}.avatar[data-v-67e46fa8]{width:100px;height:100px;display:block}.hint[data-v-67e46fa8]{font-size:12px;color:#c0c4cc}

+ 0 - 0
dist/static/css/chunk-7dbc1954.9733ac4d.css → dist/static/css/chunk-10b289e2.9733ac4d.css


+ 0 - 0
dist/static/css/chunk-688ed2e7.7a93a04c.css → dist/static/css/chunk-3a588088.7a93a04c.css


+ 0 - 1
dist/static/css/chunk-d9ef2ea8.ca62898c.css

@@ -1 +0,0 @@
-.header[data-v-af168464]{margin-left:20px}.header h2[data-v-af168464]{margin-bottom:0}.center[data-v-af168464]{margin:10px}.center[data-v-af168464] .el-form--inline .el-form-item{display:block}.center[data-v-af168464] .el-input-number--medium{width:150px}.footer[data-v-af168464]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;margin:0 100px 20px}[data-v-af168464] .avatar-uploader .el-upload{border:1px dashed #d9d9d9;border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload[data-v-af168464]:hover{border-color:#409eff}.avatar-uploader-icon[data-v-af168464]{font-size:28px;color:#8c939d;width:100px;height:100px;line-height:100px;text-align:center}.avatar[data-v-af168464]{width:100px;height:100px;display:block}.hint[data-v-af168464]{font-size:12px;color:#c0c4cc}

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/app.350932ac.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/app.a4093da4.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/chunk-048e3da4.0a9afdb4.js


+ 0 - 0
dist/static/js/chunk-0ec56e2a.80596abe.js → dist/static/js/chunk-0ec56e2a.0f2d613f.js


+ 0 - 0
dist/static/js/chunk-0eed3357.f7d4b952.js → dist/static/js/chunk-0eed3357.19ecb195.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/chunk-10b289e2.f2c74c38.js


+ 0 - 0
dist/static/js/chunk-10bfc27e.e27436b4.js → dist/static/js/chunk-10bfc27e.160fd027.js


+ 0 - 0
dist/static/js/chunk-11ff1a32.b38540d3.js → dist/static/js/chunk-11ff1a32.d2899384.js


+ 0 - 0
dist/static/js/chunk-138f7583.8473a9db.js → dist/static/js/chunk-138f7583.afc8a722.js


+ 0 - 0
dist/static/js/chunk-2d0d3705.112ca886.js → dist/static/js/chunk-2d0d3705.705fb721.js


+ 0 - 0
dist/static/js/chunk-35464144.653596de.js → dist/static/js/chunk-35464144.0740381d.js


+ 0 - 0
dist/static/js/chunk-36afbef8.6e838300.js → dist/static/js/chunk-36afbef8.16916b9d.js


+ 0 - 0
dist/static/js/chunk-386d37cb.e6bd6bca.js → dist/static/js/chunk-386d37cb.ed0cbb14.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/chunk-3a588088.53b8fb2e.js


+ 0 - 0
dist/static/js/chunk-3d8a6649.444a5d66.js → dist/static/js/chunk-3d8a6649.e1abeef2.js


+ 0 - 0
dist/static/js/chunk-44eee83d.aab09f58.js → dist/static/js/chunk-44eee83d.2835accc.js


+ 0 - 0
dist/static/js/chunk-4ac7f82e.6da6b8c9.js → dist/static/js/chunk-4ac7f82e.7cf386bf.js


+ 0 - 0
dist/static/js/chunk-52f685c2.c3e07246.js → dist/static/js/chunk-52f685c2.0707d273.js


+ 0 - 0
dist/static/js/chunk-548f9440.e7964533.js → dist/static/js/chunk-548f9440.7c018f8b.js


+ 0 - 0
dist/static/js/chunk-5a3bdf57.33c8ab7c.js → dist/static/js/chunk-5a3bdf57.961d76c5.js


+ 0 - 0
dist/static/js/chunk-5bc2c8fb.d27c753e.js → dist/static/js/chunk-5bc2c8fb.8af52844.js


+ 0 - 0
dist/static/js/chunk-683feb49.37184f47.js → dist/static/js/chunk-683feb49.8709c304.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/chunk-688ed2e7.dc6c4b0d.js


+ 0 - 0
dist/static/js/chunk-696e880a.49a7924c.js → dist/static/js/chunk-696e880a.08ecd45a.js


+ 0 - 0
dist/static/js/chunk-6a80e4ca.546b3541.js → dist/static/js/chunk-6a80e4ca.5db802a1.js


+ 0 - 0
dist/static/js/chunk-6ddf6871.f8fed9b7.js → dist/static/js/chunk-6ddf6871.ac73ac06.js


+ 0 - 0
dist/static/js/chunk-708604c0.b2233849.js → dist/static/js/chunk-708604c0.01129860.js


+ 0 - 0
dist/static/js/chunk-7a88741c.1e772dc1.js → dist/static/js/chunk-7a88741c.ed9e1ae2.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/chunk-7dbc1954.cf59a3f4.js


+ 0 - 0
dist/static/js/chunk-9235c1ae.ce4a0d96.js → dist/static/js/chunk-9235c1ae.9539ac07.js


+ 0 - 0
dist/static/js/chunk-a577192a.9ed04cf8.js → dist/static/js/chunk-a577192a.7933353b.js


+ 0 - 0
dist/static/js/chunk-d09dbc1a.69370b23.js → dist/static/js/chunk-d09dbc1a.8b21f794.js


+ 0 - 0
dist/static/js/chunk-d4c547ca.26e0b245.js → dist/static/js/chunk-d4c547ca.0a2a1daa.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/chunk-d9ef2ea8.62dd27ef.js


Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 0 - 0
dist/static/js/chunk-libs.9282d9f8.js


+ 1 - 0
package.json

@@ -34,6 +34,7 @@
     "dropzone": "5.5.1",
     "echarts": "4.2.1",
     "element-ui": "^2.15.6",
+    "feather-icons": "^4.29.2",
     "file-saver": "^2.0.5",
     "fuse.js": "3.4.4",
     "handsontable": "^14.1.0",

+ 10 - 0
src/api/knowledge.js

@@ -654,4 +654,14 @@ export function update_items(data) {
     method: 'post',
     data
   })
+}
+
+/* 模糊查找文档 documents/search */
+
+export function vague_search(data) {
+  return request({
+    url: 'documents/search',
+    method: 'post',
+    data
+  })
 }

+ 52 - 11
src/layout/components/Sidebar/Item.vue

@@ -1,35 +1,43 @@
 <script>
 export default {
-  name: 'MenuItem',
+  name: "MenuItem",
   functional: true,
   props: {
     icon: {
       type: String,
-      default: ''
+      default: "",
     },
     title: {
       type: String,
-      default: ''
-    }
+      default: "",
+    },
   },
   render(h, context) {
-    const { icon, title } = context.props
-    const vnodes = []
-
+    const { icon, title } = context.props;
+    const vnodes = [];
+    /* 
     if (icon) {
       if (icon.includes('el-icon')) {
         vnodes.push(<i class={[icon, 'sub-el-icon']} />)
       } else {
         vnodes.push(<svg-icon icon-class={icon}/>)
       }
+    } */
+    if (icon) {
+      if (icon.includes("el-icon")) {
+        vnodes.push(<i class={[icon, "sub-el-icon"]} />);
+      } else {
+        // 添加自定义类名以控制图标大小
+        vnodes.push(<i data-feather={icon} class="feather-icon"></i>);
+      }
     }
 
     if (title) {
-      vnodes.push(<span slot='title'>{(title)}</span>)
+      vnodes.push(<span slot="title">{title}</span>);
     }
-    return vnodes
-  }
-}
+    return vnodes;
+  },
+};
 </script>
 
 <style scoped>
@@ -38,4 +46,37 @@ export default {
   width: 1em;
   height: 1em;
 }
+/* 修改 feather 图标样式 */
+[data-feather] {
+  width: 1em;
+  height: 1em;
+  margin-right: 5px;
+  stroke: currentColor;
+}
+/* 自定义 feather 图标样式 */
+.feather-icon {
+  display: inline-block;
+  width: 16px !important; /* 使用 !important 确保覆盖 feather 默认样式 */
+  height: 16px !important;
+  margin-right: 8px;
+  stroke: currentColor;
+  stroke-width: 2;
+  stroke-linecap: round;
+  stroke-linejoin: round;
+  fill: none;
+}
+
+/* 如果需要在悬停时改变大小 */
+/* .feather-icon:hover {
+  width: 18px !important;
+  height: 18px !important;
+} */
+
+/* 如果需要响应式大小 */
+@media screen and (min-width: 768px) {
+  .feather-icon {
+    width: 20px !important;
+    height: 20px !important;
+  }
+}
 </style>

+ 11 - 1
src/main.js

@@ -92,7 +92,17 @@ import DataV from '@jiaminghi/data-view'
 
 Vue.use(DataV)
 
-
+import feather from 'feather-icons';
+
+// 在 mounted 钩子中初始化 Feather Icons
+Vue.mixin({
+  mounted() {
+    feather.replace();
+  },
+  updated() {
+    feather.replace();
+  }
+});
 
 new Vue({
   el: '#app',

+ 7 - 7
src/router/index.js

@@ -80,7 +80,7 @@ export const constantRoutes = [
         component: () => import('@/views/dashboard/index'),
         name: 'Dashboard',
 
-        meta: { title: '用户首页', icon: 'dashboards', affix: true }
+        meta: { title: '用户首页', icon: 'home', affix: true }
       }
     ]
   },
@@ -164,7 +164,7 @@ export const asyncRoutes = [
     type:1,
     meta: {
       title: '项目管理',
-      icon: 'paizhao-01-20',
+      icon: 'briefcase',
       roles: ['admin']
     },
     children: [
@@ -188,7 +188,7 @@ export const asyncRoutes = [
     type:4,
     meta: {
       title: '客户管理',
-      icon: 'kehus',
+      icon: 'users',
       roles: ['admin']
     },
     children: [
@@ -243,7 +243,7 @@ export const asyncRoutes = [
     type:10,
     meta: {
       title: '文档管理',
-      icon: 'wendangs'
+      icon: 'file-text'
     },
     children: [
       {
@@ -323,7 +323,7 @@ export const asyncRoutes = [
     type:32,
     meta: {
       title: '知识库',
-      icon: 'zhisk',
+      icon: 'book-open',
       roles: ['admin']
     },
     children: [
@@ -369,7 +369,7 @@ export const asyncRoutes = [
     type:37,
     meta: {
       title: '小程序管理',
-      icon: 'applets',
+      icon: 'smartphone',
       roles: ['admin']
     },
     children: [
@@ -393,7 +393,7 @@ export const asyncRoutes = [
     type:21,
     meta: {
       title: '系统设置',
-      icon: '系统设置',
+      icon: 'settings',
       roles: ['admin']
     },
     children: [

+ 468 - 133
src/views/appConfig/index.vue

@@ -87,6 +87,13 @@
         </el-row>
         <el-row :gutter="24">
           <el-col :span="12">
+            <el-form-item label="文档/目录:" prop="">
+              <el-radio v-model="radio" label="1">目录</el-radio>
+              <el-radio v-model="radio" label="2">文档</el-radio>
+            </el-form-item>
+            <!--  --></el-col
+          >
+          <el-col :span="12" v-if="radio == '1'">
             <el-form-item label="文档目录:" prop="document_directories">
               <el-select
                 v-model="AIform.document_directories"
@@ -103,9 +110,11 @@
                   :value="dir.id"
                   :key="index"
                 ></el-option>
-              </el-select> </el-form-item
-          ></el-col>
-          <el-col :span="12">
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <!-- Show document selection for both cases -->
+          <el-col :span="12" v-else>
             <el-form-item label="文  档:" prop="documents">
               <el-select
                 v-model="AIform.documents"
@@ -115,6 +124,9 @@
                 :disabled="isDocumentSelectDisabled"
                 clearable
                 filterable
+                remote
+                :remote-method="remoteSearch"
+                :loading="loading"
                 @change="handleDocumentChange"
               >
                 <el-option label="全部" value="all"></el-option>
@@ -527,17 +539,18 @@
         </el-row>
         <el-row :gutter="24">
           <el-col :span="12">
+            <el-form-item label="文档/目录:" prop="">
+              <el-radio v-model="editForm.radio" label="1">目录</el-radio>
+              <el-radio v-model="editForm.radio" label="2">文档</el-radio>
+            </el-form-item>
+          </el-col>
+          <el-col :span="12" v-if="editForm.radio == '1'">
             <el-form-item label="文档目录:" prop="document_directories">
               <el-select
                 v-model="editForm.document_directories"
                 placeholder="请选择文档目录"
                 style="width: 55%"
-                :disabled="
-                  !(
-                    editForm.knowledge_base_names &&
-                    editForm.knowledge_base_names.length
-                  )
-                "
+                :disabled="!editForm.knowledge_base_names.length"
                 @change="handleEditDirectoryChange"
                 clearable
                 filterable
@@ -551,16 +564,19 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="12">
+          <el-col :span="12" v-else>
             <el-form-item label="文  档:" prop="documents">
               <el-select
                 v-model="editForm.documents"
                 multiple
                 placeholder="请选择文档"
                 style="width: 55%"
-                :disabled="editForm.document_directories == ''"
+                :disabled="!editForm.knowledge_base_names.length"
                 clearable
                 filterable
+                remote
+                :remote-method="remoteEditSearch"
+                :loading="editLoading"
                 @change="handleEditDocumentChange"
               >
                 <el-option label="全部" value="all"></el-option>
@@ -976,6 +992,16 @@
         </el-row>
         <el-row :gutter="24">
           <el-col :span="12">
+            <el-form-item label="文档/目录:" prop="">
+              <el-radio v-model="viewForm.radio" label="1" disabled
+                >目录</el-radio
+              >
+              <el-radio v-model="viewForm.radio" label="2" disabled
+                >文档</el-radio
+              >
+            </el-form-item>
+          </el-col>
+          <el-col :span="12" v-if="viewForm.radio == '1'">
             <el-form-item label="文档目录:" prop="document_directories">
               <el-select
                 v-model="viewForm.document_directories"
@@ -995,7 +1021,7 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="12">
+          <el-col :span="12" v-else>
             <el-form-item label="文  档:" prop="documents">
               <el-select
                 v-model="viewForm.documents"
@@ -1373,6 +1399,7 @@ import {
   application_types,
   set_default,
   configurationInfo,
+  vague_search,
 } from "@/api/knowledge";
 export default {
   /*组件参数 接收来自父组件的数据*/
@@ -1508,6 +1535,9 @@ export default {
         application_type: "",
         is_default: false,
         generate_new_api_key: true,
+        radio: "1",
+        tempDocuments: [], // 用于临时存储文档数据
+        tempDirectories: [], // 用于临时存储目录数据
       },
       editDirectoryList: [],
       editDocumentList: [],
@@ -1542,11 +1572,15 @@ export default {
         is_default: false,
         generate_new_api_key: true,
         aiagent_icon: "",
+        radio: "1",
       },
       params: {
         token: "",
       },
       uploadUrl: "",
+      radio: "1",
+      loading: false, // 添加loading状态
+      editLoading: false,
     };
   },
 
@@ -1573,15 +1607,46 @@ export default {
       }
     },
     isDocumentSelectDisabled() {
-      return (
-        !this.AIform.knowledge_base_names.length ||
-        this.AIform.document_directories == ""
-      );
+      // Modify the disabled logic based on radio selection
+      if (this.radio === "1") {
+        return (
+          !this.AIform.knowledge_base_names.length ||
+          this.AIform.document_directories == ""
+        );
+      } else {
+        return !this.AIform.knowledge_base_names.length;
+      }
     },
   },
 
   /*侦听器*/
-  watch: {},
+  watch: {
+    "editForm.radio": {
+      handler(newVal, oldVal) {
+        if (newVal === "1") {
+          // 切换到目录模式
+          // 保存当前文档选择
+          this.editForm.tempDocuments = [...(this.editForm.documents || [])];
+          // 恢复之前的目录选择
+          if (this.editForm.tempDirectories.length > 0) {
+            this.editForm.document_directories = [
+              ...this.editForm.tempDirectories,
+            ];
+          }
+        } else {
+          // 切换到文档模式
+          // 保存当前目录选择
+          this.editForm.tempDirectories = [
+            ...(this.editForm.document_directories || []),
+          ];
+          // 恢复之前的文档选择
+          if (this.editForm.tempDocuments.length > 0) {
+            this.editForm.documents = [...this.editForm.tempDocuments];
+          }
+        }
+      },
+    },
+  },
 
   /*
    * el 被新创建的 vm.$ el 替换,并挂载到实例上去之后调用该钩子。
@@ -1608,20 +1673,157 @@ export default {
 
   /*组件方法*/
   methods: {
+    // 编辑模式的远程搜索方法
+    remoteEditSearch(query) {
+      if (query !== "") {
+        this.editLoading = true;
+        // 构建搜索参数
+        const searchParams = {
+          kb_id: this.editForm.knowledge_base_names, // 当前选中的知识库ID
+          keyword: query, // 搜索关键词
+          limit: 10, // 限制返回数量
+        };
+
+        // 如果是目录模式且选择了目录,添加目录ID
+        if (this.editForm.radio === "1" && this.editForm.document_directories) {
+          searchParams.doc_type_id = this.editForm.document_directories;
+        }
+
+        // 调用模糊搜索接口
+        vague_search(searchParams)
+          .then((response) => {
+            this.editDocumentList = response.data.items || [];
+          })
+          .catch((error) => {
+            console.error("搜索文档失败:", error);
+            this.$message.error("搜索文档失败");
+          })
+          .finally(() => {
+            this.editLoading = false;
+          });
+      } else {
+        // 当搜索词为空时,恢复原始文档列表
+        if (this.editForm.radio === "1") {
+          // 目录模式:加载选中目录的文档
+          if (this.editForm.document_directories) {
+            this.loadEditDocumentList(this.editForm.document_directories);
+          }
+        } else {
+          // 文档模式:加载所有文档
+          if (this.editForm.knowledge_base_names.length > 0) {
+            this.loadAllEditDocuments(this.editForm.knowledge_base_names[0]);
+          }
+        }
+      }
+    },
+    // 添加加载所有文档的方法
+    loadAllEditDocuments(kbId) {
+      this.editLoading = true;
+      let queryForm = {
+        page: 1,
+        pageSize: 9999,
+        bucket_id: kbId,
+        doc_type_id: "",
+      };
+
+      getBucketContents(queryForm)
+        .then((res) => {
+          this.editDocumentList = res.data.documents;
+        })
+        .finally(() => {
+          this.editLoading = false;
+        });
+    },
+    // 远程搜索方法
+    remoteSearch(query) {
+      if (query !== "") {
+        this.loading = true;
+        // 构建搜索参数
+        const searchParams = {
+          kb_id: this.AIform.knowledge_base_names, // 当前选中的知识库ID
+          keyword: query, // 搜索关键词
+          limit: 10, // 限制返回数量
+        };
+
+        // 如果是目录模式且选择了目录,添加目录ID
+        if (this.radio === "1" && this.AIform.document_directories) {
+          searchParams.doc_type_id = this.AIform.document_directories;
+        }
+
+        // 调用模糊搜索接口
+        vague_search(searchParams)
+          .then((response) => {
+            this.documentList = response.data.items || [];
+          })
+          .catch((error) => {
+            console.error("搜索文档失败:", error);
+            this.$message.error("搜索文档失败");
+          })
+          .finally(() => {
+            this.loading = false;
+          });
+      } else {
+        // 当搜索词为空时,恢复原始文档列表
+        if (this.radio === "1") {
+          // 目录模式:加载选中目录的文档
+          if (this.AIform.document_directories) {
+            this.loadDocumentList(this.AIform.document_directories);
+          }
+        } else {
+          // 文档模式:加载所有文档
+          if (this.AIform.knowledge_base_names.length > 0) {
+            this.loadAllDocuments(this.AIform.knowledge_base_names[0]);
+          }
+        }
+      }
+    },
+    // 修改加载所有文档的方法,添加loading状态
+    loadAllDocuments(kbId) {
+      this.loading = true;
+      let queryForm = {
+        page: 1,
+        pageSize: 9999,
+        bucket_id: kbId,
+        doc_type_id: "",
+      };
+
+      getBucketContents(queryForm)
+        .then((res) => {
+          this.documentList = res.data.documents;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+
     /* 编辑 */
     /* 上传图标 */
     onUploadEditSuccess(e) {
       this.editForm.aiagent_icon = e.data.fileUrl;
     },
+    // 修改文档选择处理方法
     handleEditDocumentChange(selectedValues) {
       if (selectedValues.includes("all")) {
         // 如果选择了"全部",则清空其他选项
         this.editForm.documents = ["all"];
       } else {
-        // 如果没有选择"全部",则限制最多选择10个文档
-        if (selectedValues.length > 10) {
-          this.editForm.documents = selectedValues.slice(0, 10);
+        // 获取当前选中的文档ID列表
+        const currentSelectedIds = new Set(selectedValues);
+
+        // 保留原有未删除的文档
+        const originalDocs = this.editForm.tempDocuments.filter(
+          (doc) => !doc.startsWith("temp_") && !currentSelectedIds.has(doc)
+        );
+
+        // 合并原有文档和新选择的文档
+        const allDocs = [...originalDocs, ...selectedValues];
+
+        // 如果总数超过10个,保留最新的文档
+        if (allDocs.length > 10) {
+          this.editForm.documents = allDocs.slice(-10);
           this.$message.warning("最多只能选择10个文档");
+        } else {
+          this.editForm.documents = allDocs;
         }
       }
     },
@@ -1630,8 +1832,10 @@ export default {
       this.$refs.editFormRef.validate(async (valid) => {
         if (valid) {
           try {
+            // 深拷贝表单数据
             const convertedForm = { ...this.editForm };
-            // 处理 role_permissions
+
+            // 处理 role_permissions 和 custom_variables
             const parsedPermissions = this.validateAndParseJSON(
               "role_permissions",
               "角色权限格式无效"
@@ -1639,38 +1843,87 @@ export default {
             if (!parsedPermissions) return;
             convertedForm.role_permissions = parsedPermissions;
 
-            // 处理 custom_variables
             const parsedVariables = this.validateAndParseJSON(
               "custom_variables",
               "自定义变量格式无效"
             );
             if (!parsedVariables) return;
             convertedForm.custom_variables = parsedVariables;
-            // 转换知识库、文档目录和文档的ID为名称
-            /*  convertedForm.knowledge_base_names = this.safeGetNamesByIds(this.editForm.knowledge_base_names, this.kneList); */
-            /*  convertedForm.documents = this.safeGetNamesByIds(this.editForm.documents, this.editDocumentList); */
-            // 处理文档选择
-            if (
-              convertedForm.documents.includes("all") ||
-              convertedForm.documents.length === 0
-            ) {
-              convertedForm.documents = []; // 全选或未选择时传空数组给后台
+
+            // 根据 radio 值处理文档和目录数据
+            if (convertedForm.radio === "1") {
+              // 目录模式:只提交目录数据,清空文档数据
+              convertedForm.documents = [];
+              // 如果选择了目录,则使用新选择的目录
+              if (this.editForm.document_directories) {
+                convertedForm.document_directories = this.safeGetNamesByIds(
+                  [this.editForm.document_directories],
+                  this.editDirectoryList
+                );
+              } else {
+                // 如果没有选择新目录,保留原有目录
+                convertedForm.document_directories =
+                  this.editForm.tempDirectories;
+              }
             } else {
-              convertedForm.documents = this.safeGetNamesByIds(
-                convertedForm.documents,
-                this.editDocumentList
-              );
-            }
-            convertedForm.document_directories = this.safeGetNamesByIds(
-              this.editForm.document_directories,
-              this.editDirectoryList
-            );
-            if (convertedForm.document_directories.length === 0) {
-              convertedForm.document_directories = ["全部"];
+              // 文档模式:只提交文档数据,清空目录数据
+              convertedForm.document_directories = [];
+
+              // 处理文档选择
+              if (convertedForm.documents.includes("all")) {
+                convertedForm.documents = ["全部"]; // 全选时传 "全部"
+              } else {
+                // 获取当前选中的文档ID列表
+                const currentSelectedIds = new Set(convertedForm.documents);
+
+                // 获取原有未删除的文档
+                const originalDocs = this.editForm.tempDocuments.filter(
+                  (doc) =>
+                    !doc.startsWith("temp_") && !currentSelectedIds.has(doc)
+                );
+
+                // 合并原有文档和新选择的文档
+                const allSelectedDocs = new Set([
+                  ...originalDocs,
+                  ...convertedForm.documents,
+                ]);
+
+                // 转换文档 ID 为名称
+                convertedForm.documents = Array.from(allSelectedDocs)
+                  .map((docId) => {
+                    // 如果是原有文档名称,直接使用
+                    if (typeof docId === "string" && !docId.match(/^[0-9]+$/)) {
+                      return docId;
+                    }
+                    // 否则查找文档名称
+                    const doc = this.editDocumentList.find(
+                      (d) => d.id === docId
+                    );
+                    return doc ? doc.name : null;
+                  })
+                  .filter((name) => name !== null); // 过滤掉未找到的文档
+
+                // 如果文档数量超过限制,保留前10个
+                if (convertedForm.documents.length > 10) {
+                  convertedForm.documents = convertedForm.documents.slice(
+                    0,
+                    10
+                  );
+                  this.$message.warning(
+                    "已超出最大文档数量限制,仅保留前10个文档"
+                  );
+                }
+              }
             }
 
+            // 删除不需要提交的临时数据和radio值
+            delete convertedForm.tempDocuments;
+            delete convertedForm.tempDirectories;
+            delete convertedForm.radio;
+
             console.log("Converted form for edit:", convertedForm);
 
+            // 发送请求
             const response = await axios.post(
               `${process.env.VUE_APP_BASE_API}/chatbot/configuration/update/`,
               convertedForm,
@@ -1685,9 +1938,7 @@ export default {
               this.$message.success("应用更新成功");
               this.$router.push({
                 path: "/knowledge/chatPage/index",
-              }); //跳转到聊天应用页面
-              /* this.editDialogVisible = false; */
-              /* this.fetchApplicationList(); */
+              });
             } else {
               this.$message.error(response.data.message || "应用更新失败");
             }
@@ -1702,19 +1953,26 @@ export default {
       });
     },
     handleEditKnowledgeBaseChange(val) {
-      // 重置目录和文档选择
-      this.editForm.document_directories = [];
-      this.editForm.documents = [];
-      this.editDocumentList = [];
-      // 加载新选择的知识库对应的目录列表
-      this.loadEditDirectoryList(val);
+      if (val && val.length > 0) {
+        // 只在有选择知识库时重置
+        if (this.editForm.radio === "1") {
+          this.editForm.document_directories = [];
+          this.editForm.documents = [];
+        } else {
+          this.editForm.documents = [];
+          // 加载初始文档列表
+          this.loadAllEditDocuments(val[0]);
+        }
+        this.editDocumentList = [];
+        this.loadEditDirectoryList(val);
+      }
     },
     handleEditDirectoryChange(val) {
-      // 重置文档选择
-      this.editForm.documents = [];
-
-      // 加载选中目录对应的文档列表
-      this.loadEditDocumentList(val);
+      if (this.editForm.radio === "1") {
+        // 只在目录模式下清空文档选择
+        this.editForm.documents = [];
+        this.loadEditDocumentList(val);
+      }
     },
     /* 知识库选择监听 */
     async loadEditDirectoryList(val) {
@@ -1930,9 +2188,9 @@ export default {
               this.AIform.document_directories,
               this.directoryList
             );
-            if (convertedForm.document_directories.length === 0) {
+            /* if (convertedForm.document_directories.length === 0) {
               convertedForm.document_directories = ["全部"];
-            }
+            } */
 
             console.log("Converted form:", convertedForm);
 
@@ -2059,17 +2317,23 @@ export default {
       // 这里需要调用后端 API 来获取文档列表
       this.loadDocumentList(val);
     },
+    // 修改原有的加载文档列表方法,添加loading状态
     loadDocumentList(val) {
-      const id = this.directoryList.find((el) => el.id == val);
+      this.loading = true;
       let queryForm = {
         page: 1,
         pageSize: 9999,
-        bucket_id: val == "001" ? this.bucket_id : id.kb_id, //this.bucket_id,
-        doc_type_id: val == "001" ? "" : val,
+        bucket_id: this.bucket_id,
+        doc_type_id: val === "001" ? "" : val,
       };
-      getBucketContents(queryForm).then((res) => {
-        this.documentList = res.data.documents;
-      });
+
+      getBucketContents(queryForm)
+        .then((res) => {
+          this.documentList = res.data.documents;
+        })
+        .finally(() => {
+          this.loading = false;
+        });
     },
     /* 获取列表 */
     init() {
@@ -2095,24 +2359,67 @@ export default {
         this.appTypeList = res.data.application_types;
       });
     },
-    /* 编辑查看 */
+    /* 编辑 */
+    // 修改 initEdit 方法
     async initEdit() {
-      // 深拷贝以避免直接修改原对象
-      this.editForm = JSON.parse(JSON.stringify(this.$route.query.card));
+      try {
+        // 深拷贝以避免直接修改原对象
+        this.editForm = JSON.parse(JSON.stringify(this.$route.query.card));
 
-      // 处理 role_permissions 和 custom_variables
-      this.handleJsonFields();
+        // 确保必要的属性都被初始化
+        this.editForm = {
+          ...this.editForm,
+          document_directories: this.editForm.document_directories || [],
+          documents: this.editForm.documents || [],
+          radio: "1", // 默认值
+        };
 
-      // 并行加载知识库目录列表
-      const directoryListPromise = this.loadEditDirectoryList(
-        this.editForm.knowledge_base_names
-      );
+        // 处理 role_permissions 和 custom_variables
+        this.handleJsonFields();
 
-      // 等待目录列表加载完成
-      await directoryListPromise;
+        // 设置 radio 的值
+        if (Array.isArray(this.editForm.document_directories)) {
+          if (this.editForm.document_directories.length === 0) {
+            this.editForm.radio = "2";
+          }
+        } else {
+          this.editForm.radio = "2";
+        }
 
-      // 处理目录和文档选择
-      this.handleDirectoryAndDocumentSelection();
+        if (Array.isArray(this.editForm.documents)) {
+          if (
+            this.editForm.documents.length === 0 &&
+            this.editForm.radio !== "2"
+          ) {
+            this.editForm.radio = "1";
+          }
+        }
+        // 初始化临时存储,保存原始数据
+        this.editForm.tempDocuments = Array.isArray(this.editForm.documents)
+          ? [...this.editForm.documents]
+          : [];
+        this.editForm.tempDirectories = Array.isArray(
+          this.editForm.document_directories
+        )
+          ? [...this.editForm.document_directories]
+          : [];
+        // 并行加载知识库目录列表
+        if (
+          this.editForm.knowledge_base_names &&
+          this.editForm.knowledge_base_names.length > 0
+        ) {
+          const directoryListPromise = this.loadEditDirectoryList(
+            this.editForm.knowledge_base_names
+          );
+          await directoryListPromise;
+        }
+
+        // 处理目录和文档选择
+        await this.handleDirectoryAndDocumentSelection();
+      } catch (error) {
+        console.error("Error in initEdit:", error);
+        this.$message.error("初始化编辑表单时出错");
+      }
     },
 
     async handleDirectoryAndDocumentSelection() {
@@ -2191,69 +2498,97 @@ export default {
         this.editForm.custom_variables = "";
       }
     },
-    /* 查看 */
+    // 同样修改 initView 方法
     initView() {
-      // 根据 card 的数据填充 viewForm
-      this.viewForm = JSON.parse(JSON.stringify(this.$route.query.card)); // 深拷贝以避免直接修改原对象
-
-      // 处理 knowledge_base_names
-      this.viewForm.knowledge_base_names =
-        this.viewForm.knowledge_base_names.map((name) => {
-          const kb = this.kneList.find((kb) => kb.name === name);
-          return kb ? kb.id : name; // 如果找不到对应的知识库,保留原名称
-        });
+      try {
+        // 根据 card 的数据填充 viewForm
+        this.viewForm = JSON.parse(JSON.stringify(this.$route.query.card));
 
-      // 处理 role_permissions
-      if (this.viewForm.role_permissions) {
-        if (typeof this.viewForm.role_permissions !== "string") {
-          try {
-            this.viewForm.role_permissions = JSON.stringify(
-              this.viewForm.role_permissions
-            );
-          } catch (error) {
-            console.error("Error stringifying role_permissions:", error);
-            this.viewForm.role_permissions = "";
+        // 确保必要的属性都被初始化
+        this.viewForm = {
+          ...this.viewForm,
+          document_directories: this.viewForm.document_directories || [],
+          documents: this.viewForm.documents || [],
+          radio: "1", // 默认值
+        };
+
+        // 设置 radio 的值
+        if (Array.isArray(this.viewForm.document_directories)) {
+          if (this.viewForm.document_directories.length === 0) {
+            this.viewForm.radio = "2";
           }
+        } else {
+          this.viewForm.radio = "2";
         }
-      } else {
-        this.viewForm.role_permissions = "";
-      }
 
-      // 处理 custom_variables
-      if (this.viewForm.custom_variables) {
-        this.viewForm.custom_variables = JSON.stringify(
-          this.viewForm.custom_variables
-        );
-      } else {
-        this.viewForm.custom_variables = "";
-      }
+        if (Array.isArray(this.viewForm.documents)) {
+          if (
+            this.viewForm.documents.length === 0 &&
+            this.viewForm.radio !== "2"
+          ) {
+            this.viewForm.radio = "1";
+          }
+        }
 
-      // 处理文档选择
-      if (
-        !this.viewForm.documents ||
-        this.viewForm.documents.length === 0 ||
-        this.viewForm.documents.includes("全部")
-      ) {
-        this.viewForm.documents = ["全部"];
-      } else {
-        // 将文档名称转换为ID(如果需要的话)
-        this.viewForm.documents = this.viewForm.documents.map((docName) => {
-          const doc = this.editDocumentList.find((d) => d.name === docName);
-          return doc ? doc.id : docName;
-        });
+        // 处理 knowledge_base_names
+        if (
+          this.viewForm.knowledge_base_names &&
+          Array.isArray(this.viewForm.knowledge_base_names)
+        ) {
+          this.viewForm.knowledge_base_names =
+            this.viewForm.knowledge_base_names.map((name) => {
+              const kb = this.kneList.find((kb) => kb.name === name);
+              return kb ? kb.id : name;
+            });
+        } else {
+          this.viewForm.knowledge_base_names = [];
+        }
+
+        // 处理 role_permissions 和 custom_variables
+        if (this.viewForm.role_permissions) {
+          if (typeof this.viewForm.role_permissions !== "string") {
+            try {
+              this.viewForm.role_permissions = JSON.stringify(
+                this.viewForm.role_permissions
+              );
+            } catch (error) {
+              console.error("Error stringifying role_permissions:", error);
+              this.viewForm.role_permissions = "";
+            }
+          }
+        } else {
+          this.viewForm.role_permissions = "";
+        }
+
+        if (this.viewForm.custom_variables) {
+          this.viewForm.custom_variables = JSON.stringify(
+            this.viewForm.custom_variables
+          );
+        } else {
+          this.viewForm.custom_variables = "";
+        }
+
+        // 处理文档选择
+        if (
+          !this.viewForm.documents ||
+          !Array.isArray(this.viewForm.documents) ||
+          this.viewForm.documents.length === 0 ||
+          this.viewForm.documents.includes("全部")
+        ) {
+          this.viewForm.documents = ["全部"];
+        }
+
+        // 加载知识库对应的目录列表
+        if (
+          this.viewForm.knowledge_base_names &&
+          this.viewForm.knowledge_base_names.length > 0
+        ) {
+          this.loadEditDirectoryList(this.viewForm.knowledge_base_names);
+        }
+      } catch (error) {
+        console.error("Error in initView:", error);
+        this.$message.error("初始化查看表单时出错");
       }
-      /* // 处理文档选择
-       if (this.editForm.documents.length === 0 || this.editForm.documents.includes('全部')) {
-        this.editForm.documents = ['all'];
-      } else {
-        // 将文档名称转换为ID
-        this.editForm.documents = this.editForm.documents.map(docName => {
-          const doc = this.editDocumentList.find(d => d.name === docName);
-          return doc ? doc.id : docName;
-        });
-      } */
-      // 加载知识库对应的目录列表
-      this.loadEditDirectoryList(this.viewForm.knowledge_base_names);
     },
   },
 };

+ 16 - 6
src/views/document/com/editor.vue

@@ -27,7 +27,7 @@
             <div style="padding: 10px 0">
               <el-form label-position="left" class="inline-form">
                 <el-row :gutter="24" style="margin-left: 0; margin-right: 0">
-                  <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <el-col :xs="24" :sm="24" :md="12" :lg="4" :xl="4">
                     <el-form-item label="模块分类:">
                       <!-- 此处需要处理为只有admin账号可编辑 -->
                       <!--  <el-cascader
@@ -61,7 +61,7 @@
                       }}</span>
                     </el-form-item>
                   </el-col>
-                  <el-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="12">
                     <el-form-item label="模块名称:">
                       <!--  <el-input
                         v-if="showCategoryName(it)"
@@ -69,9 +69,19 @@
                         v-model="it.name"
                         placeholder="请填写模块名称"
                       />v-else -->
-                      <span @click="enableName(it)" style="cursor: pointer">{{
-                        it.name
-                      }}</span>
+                      <div
+                        :title="it.name"
+                        @click="enableName(it)"
+                        style="
+                          cursor: pointer;
+                          max-width: 400px;
+                          white-space: nowrap;
+                          overflow: hidden;
+                          text-overflow: ellipsis;
+                        "
+                      >
+                        {{ it.name }}
+                      </div>
                     </el-form-item>
                   </el-col>
                   <!-- <el-col :span="6">
@@ -266,7 +276,7 @@ export default {
         if (JSON.stringify(this.comList) !== JSON.stringify(newComList)) {
           this.comList = newComList;
         } */
-         console.log("val", val);
+        console.log("val", val);
         this.comList = JSON.parse(JSON.stringify(val));
         console.log("comList", this.comList);
         /*   console.log("val", val);

+ 68 - 10
src/views/document/create.vue

@@ -114,7 +114,19 @@
                     data-type="article"
                     class="sub-menus"
                   >
-                    <div @click="onLoadArticle(it.id)" style="cursor:pointer">{{ it.title }}</div>
+                    <div
+                      @click="onLoadArticle(it.id)"
+                      :title="it.title"
+                      style="
+                        cursor: pointer;
+                        white-space: nowrap;
+                        overflow: hidden; /* 隐藏超出部分 */
+                        text-overflow: ellipsis; /* 显示省略号 */
+                        max-width: 100%;
+                      "
+                    >
+                      {{ it.title }}
+                    </div>
                   </div>
                 </el-collapse-item>
                 <el-collapse-item
@@ -130,7 +142,9 @@
                     data-type="article"
                     class="sub-menus"
                   >
-                    <div @click="onTemplateInfo(it.id)" style="cursor:pointer">{{ it.title }}</div>
+                    <div @click="onTemplateInfo(it.id)" style="cursor: pointer">
+                      {{ it.title }}
+                    </div>
                   </div>
                 </el-collapse-item>
               </el-collapse>
@@ -297,7 +311,18 @@
                                         ) in fiveChild.dataList"
                                         :key="fiveIndex"
                                       >
-                                        <div style="cursor:move;">{{ fiveIts.name }}</div>
+                                        <div
+                                          :title="fiveIts.name"
+                                          style="
+                                            cursor: move;
+                                            white-space: nowrap;
+                                            overflow: hidden; /* 隐藏超出部分 */
+                                            text-overflow: ellipsis; /* 显示省略号 */
+                                            width: 100%;
+                                          "
+                                        >
+                                          {{ fiveIts.name }}
+                                        </div>
                                       </div>
                                     </transition-group>
                                   </draggable>
@@ -319,7 +344,18 @@
                                     ) in greatGrandChild.dataList"
                                     :key="index"
                                   >
-                                    <div style="cursor:move;">{{ its.name }}</div>
+                                    <div
+                                      :title="its.name"
+                                      style="
+                                        cursor: move;
+                                        white-space: nowrap;
+                                        overflow: hidden; /* 隐藏超出部分 */
+                                        text-overflow: ellipsis; /* 显示省略号 */
+                                        width: 100%;
+                                      "
+                                    >
+                                      {{ its.name }}
+                                    </div>
                                   </div>
                                 </transition-group>
                               </draggable>
@@ -339,7 +375,18 @@
                                 v-for="(it, index) in grandChild.dataList"
                                 :key="index"
                               >
-                                <div style="cursor:move;">{{ it.name }}</div>
+                                <div
+                                  :title="it.name"
+                                  style="
+                                    cursor: move;
+                                    white-space: nowrap;
+                                    overflow: hidden; /* 隐藏超出部分 */
+                                    text-overflow: ellipsis; /* 显示省略号 */
+                                    width: 100%;
+                                  "
+                                >
+                                  {{ it.name }}
+                                </div>
                               </div>
                             </transition-group>
                           </draggable>
@@ -359,7 +406,18 @@
                             v-for="(it, index) in child.dataList"
                             :key="index"
                           >
-                            <div style="cursor:move;">{{ it.name }}</div>
+                            <div
+                              :title="it.name"
+                              style="
+                                cursor: move;
+                                white-space: nowrap;
+                                overflow: hidden; /* 隐藏超出部分 */
+                                text-overflow: ellipsis; /* 显示省略号 */
+                                width: 100%;
+                              "
+                            >
+                              {{ it.name }}
+                            </div>
                           </div>
                         </transition-group>
                       </draggable>
@@ -379,7 +437,7 @@
                         v-for="(it, index) in item.dataList"
                         :key="index"
                       >
-                        <div style="cursor:move;">{{ it.name }}</div>
+                        <div style="cursor: move">{{ it.name }}</div>
                       </div>
                     </transition-group>
                   </draggable>
@@ -625,7 +683,7 @@ import draggable from "vuedraggable";
 import htmlDocx from "html-docx-js/dist/html-docx";
 import { searchFormula } from "@/api/formula";
 import axios from "axios";
-import settings from '@/settings'
+import settings from "@/settings";
 // import htmlDocx from "htmlDocx";
 export default {
   name: "create",
@@ -741,7 +799,7 @@ export default {
     this.isAdmin = this.userInfo ? this.userInfo.roleInfo.is_admin : 2;
     this.initArticleCategoryList();
     if (this.type !== "module" && this.type !== "document") {
-      document.title = "新建模版-"+settings.title;
+      document.title = "新建模版-" + settings.title;
     }
     if (
       this.type !== "module" &&
@@ -1207,7 +1265,7 @@ export default {
         // 设置文档标题
         document.title = data.name
           ? `${data.name}-${settings.title}`
-          : "新建模块-"+settings.title;
+          : "新建模块-" + settings.title;
 
         // 解析属性
         data.attrs = JSON.parse(data.attrs);

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно