Ver Fonte

feat: 移除用不到的文件

朱沛 há 1 ano atrás
pai
commit
565c3392cb
100 ficheiros alterados com 4 adições e 32993 exclusões
  1. 0 3
      docs/.vitepress/config.js
  2. 0 11
      docs/i18n.md
  3. 0 224
      docs/other-platform-dify.md
  4. 0 27
      docs/theme.md
  5. 0 70
      public/config.js
  6. 0 509
      public/i18n/lang-en.json
  7. 0 508
      public/i18n/lang-zh.json
  8. 0 20
      public/pdfjs-dist/pdf.min.mjs
  9. 0 20523
      public/pdfjs-dist/pdf.mjs
  10. 0 0
      public/pdfjs-dist/pdf.mjs.map
  11. 0 20
      public/pdfjs-dist/pdf.sandbox.min.mjs
  12. 0 52
      public/pdfjs-dist/pdf.sandbox.mjs
  13. 0 0
      public/pdfjs-dist/pdf.sandbox.mjs.map
  14. 0 3494
      public/pdfjs-dist/pdf.worker.js
  15. 0 20
      public/pdfjs-dist/pdf.worker.min.js
  16. 0 20
      public/pdfjs-dist/pdf.worker.min.mjs
  17. 0 3494
      public/pdfjs-dist/pdf.worker.mjs
  18. 1 24
      src/App.vue
  19. 0 7
      src/assets/ai-search/doc.svg
  20. 0 7
      src/assets/ai-search/docx.svg
  21. 0 10
      src/assets/ai-search/pdf.svg
  22. 0 5
      src/assets/ai-search/selected-files-collapse.svg
  23. 0 7
      src/assets/ai-search/xls.svg
  24. 0 7
      src/assets/ai-search/xlsx.svg
  25. BIN
      src/assets/aside-menu-bg.png
  26. BIN
      src/assets/chat-aside/aside-btn-expond.png
  27. BIN
      src/assets/chat-aside/aside-menu-bg-black-bottom.png
  28. BIN
      src/assets/chat-aside/aside-menu-bg-black-middle.png
  29. BIN
      src/assets/chat-aside/aside-menu-bg-black-top.png
  30. BIN
      src/assets/chat-aside/aside-menu-bg-blk-bottom.png
  31. BIN
      src/assets/chat-aside/aside-menu-bg-blk-top.png
  32. BIN
      src/assets/chat-aside/aside-menu-bg-white-bottom.png
  33. BIN
      src/assets/chat-aside/aside-menu-bg-white-middle.png
  34. BIN
      src/assets/chat-aside/aside-menu-bg-white-top.png
  35. BIN
      src/assets/chat-aside/aside-menu-bg-wt-bottom.png
  36. BIN
      src/assets/chat-aside/aside-menu-bg-wt-top.png
  37. BIN
      src/assets/chat-aside/chat-history-1.png
  38. BIN
      src/assets/chat-aside/chat-new-1.png
  39. BIN
      src/assets/chat-aside/chat-smart-1.png
  40. BIN
      src/assets/chat/board-bg.png
  41. BIN
      src/assets/chat/chat-agent-icon.png
  42. BIN
      src/assets/chat/history-bg.png
  43. BIN
      src/assets/file-upload.png
  44. BIN
      src/assets/header-quanping-1.png
  45. BIN
      src/assets/header-search-1.png
  46. BIN
      src/assets/header-setting-1.png
  47. BIN
      src/assets/language-1.png
  48. BIN
      src/assets/party-bg.jpeg
  49. BIN
      src/assets/question-define.png
  50. BIN
      src/assets/theme.png
  51. BIN
      src/assets/属性=上@2x.png
  52. BIN
      src/assets/属性=标签.png
  53. BIN
      src/assets/属性=用户.png
  54. 0 6
      src/base/storage.js
  55. 0 81
      src/base/store/use-all-agents.js
  56. 0 19
      src/base/store/use-locale.js
  57. 0 32
      src/base/store/use-platform-information.js
  58. 0 105
      src/base/store/use-recent-agents.js
  59. 0 58
      src/base/store/use-recent-history-search-type.js
  60. 0 19
      src/base/store/use-theme.js
  61. 2 2
      src/index.html
  62. 1 1
      src/index.js
  63. 0 148
      src/modules/ai-search/ChunkList.vue
  64. 0 27
      src/modules/ai-search/FileIcon.vue
  65. 0 61
      src/modules/ai-search/MarkdownContent.vue
  66. 0 542
      src/modules/ai-search/MindMapping.vue
  67. 0 34
      src/modules/ai-search/MindMappingData.json
  68. 0 38
      src/modules/ai-search/PopoverImage.vue
  69. 0 90
      src/modules/ai-search/RetrievalDocuments.vue
  70. 0 64
      src/modules/ai-search/Sidebar.vue
  71. 0 210
      src/modules/ai-search/hooks.js
  72. 0 327
      src/modules/ai-search/index.vue
  73. 0 39
      src/modules/answer-refference/AsideImage.vue
  74. 0 37
      src/modules/answer-refference/DownloadFileItem.vue
  75. 0 37
      src/modules/answer-refference/DownloadFileList.vue
  76. 0 346
      src/modules/answer-refference/RefferenceDocDetail.vue
  77. 0 173
      src/modules/answer-refference/RefferenceFileBlocks.vue
  78. 0 93
      src/modules/answer-refference/RefferenceFileNameContentLinks.vue
  79. 0 62
      src/modules/answer-refference/RefferenceFileNameItem.vue
  80. 0 82
      src/modules/answer-refference/RefferenceFileNameList.vue
  81. 0 161
      src/modules/answer-refference/RefferenceFlag.vue
  82. 0 38
      src/modules/answer-refference/apply-refference-popover-4-download-file.js
  83. 0 36
      src/modules/answer-refference/apply-refference-popover-4-filename.js
  84. 0 66
      src/modules/answer-refference/apply-refference-popover-4-ref-flag.js
  85. 0 38
      src/modules/answer-refference/document.js
  86. 0 17
      src/modules/answer-refference/effect-download-links.js
  87. 0 28
      src/modules/answer-refference/effect-refference-filename.js
  88. 0 31
      src/modules/answer-refference/effect-refference-flag.js
  89. 0 17
      src/modules/answer-refference/i18n-message/en.json
  90. 0 15
      src/modules/answer-refference/i18n-message/i18n.js
  91. 0 17
      src/modules/answer-refference/i18n-message/zh.json
  92. 0 15
      src/modules/answer-refference/icon.svg
  93. 0 41
      src/modules/answer-refference/init-dynamic-app.js
  94. 0 73
      src/modules/btn-iframe-chujuan/BtnConfigChujuan.vue
  95. 0 64
      src/modules/btn-iframe-chujuan/BtnIframeChujuan.vue
  96. 0 106
      src/modules/common/CardItem.vue
  97. 0 181
      src/modules/common/icon-map.js
  98. 0 110
      src/modules/conversation-board/BoardAgentItem.vue
  99. 0 40
      src/modules/conversation-board/BoardAgentList.vue
  100. 0 104
      src/modules/conversation-board/BoardTags.vue

+ 0 - 3
docs/.vitepress/config.js

@@ -41,10 +41,7 @@ export default {
       { text: '配置文件', link: '/config'},
       { text: '本地存储', link: '/storage'},
       { text: '事件总线', link: '/event-bus'},
-      { text: '主题', link: '/theme'},
-      { text: '多语言', link: '/i18n'},
       { text: '网络请求', link: '/api-request'},
-      { text: '其他平台:dify', link: '/other-platform-dify'}
     ]
   }
 };

+ 0 - 11
docs/i18n.md

@@ -1,11 +0,0 @@
-# 多语言
-
-项目支持多语言,在开发过程中,应时刻注意`多语言`的设置。
-
-<s>多语言的定义按照`就近原则`,在哪个文件中使用的,就在该文件`同目录`下,创建一个多语言配置文件。</s>
-
-<s>查看示例:`src/views/common/Header.vue`与`src/views/common/header-i18n.js`</s>
-
-<s>所有`-i18n.js`文件,都需要在`src/i18n.js`中进行注册。</s>
-
-多语言的设置需要在`public/i18n`目录下进行统一定义。

+ 0 - 224
docs/other-platform-dify.md

@@ -1,224 +0,0 @@
-# dify
-
-由于此项目有嵌入`dify`部分功能的需求,针对`dify`源码做了部分调整。可以使用`iframe`的方式嵌入`dify`,并支持对其`样式`与`脚本`的调整。
-
-```vue
-<template>
-<iframe :src="defaultUrl" id="dify"></iframe>
-</template>
-
-<script setup>
-import { ref, onMounted } from 'vue';
-
-const defaultUrl = ref('http://192.168.20.119:28003');
-
-onMounted(()=>{
-  const ele = document.getElementById('dify');
-  
-  ele.onload = function(){
-    if(ele && ele.contentwindow){
-      const msg1 = {
-        type:'insertStyle',
-        value:`body{background-color:red;font-size:58px;}`
-      };
-
-      ele.contentWindow.postMessage(JSON.stringify(msg1), defaultUrl.value);
-
-      const msg2 = {
-        type: 'insertScript',
-        value: `console.log('hello world');`
-      }
-
-      ele.contentWindow.postMessage(JSON.stringify(msg2), defaultUrl.value);
-    }
-  }
-})
-</script>
-
-<style scoped lang="css"></style>
-```
-
-## dify相关修改记录
-
-### 2024-12-12 dify 配置跨域
-
-为了解决无界`微前端跨域`的问题,修改了dify的配置文件。
-
-`nginx`配置文件目录: `/data/disk2/llm_platform/dify/docker/nginx/conf.d`
-
-`nginx`配置文件
-
-修改:`default.conf.template`文件,添加如下内容:
-
-添加内容如下:
-
-```
-    add_header 'Access-Control-Allow-Origin' '*';
-    add_header 'Access-Control-Allow-Methods' '*';
-```
-
-最终结果如下:
-
-```
-# Please do not directly edit this file. Instead, modify the .env variables related to NGINX configuration.
-
-server {
-    listen ${NGINX_PORT};
-    server_name ${NGINX_SERVER_NAME};
-
-    add_header 'Access-Control-Allow-Origin' '*';
-    add_header 'Access-Control-Allow-Methods' '*';
-
-    location /console/api {
-      proxy_pass http://api:5001;
-      include proxy.conf;
-    }
-
-    location /api {
-      proxy_pass http://api:5001;
-      include proxy.conf;
-    }
-
-    location /v1 {
-      proxy_pass http://api:5001;
-      include proxy.conf;
-    }
-
-    location /files {
-      proxy_pass http://api:5001;
-      include proxy.conf;
-    }
-
-    location / {
-      proxy_pass http://web:3000;
-      include proxy.conf;
-    }
-
-    # placeholder for acme challenge location
-    ${ACME_CHALLENGE_LOCATION}
-
-    # placeholder for https config defined in https.conf.template
-    ${HTTPS_CONFIG}
-}
-```
-
-然后执行:`docker restart docker-nginx-1`重启容器即可。
-
-### 2024-12-13 dify 添加事件监听,支持iframe样式和脚本插入
-
-在`大模型2.0`中`嵌入dify`项目时,初始使用`微前端`方式,但是使用微前端时,发现dify的前端使用的是`服务器端渲染`框架`nextjs`,在加载dify项目时,会有报错,经过查询资料得知,`无界`当前不支持`服务器端渲染(SSR)`,无界嵌入`next.js`或者`nuxt.js`都没有好的解决方案。
-
-![](./dify/dify-missing-bootstrap-script.png)
-
-为了解决此问题,考虑了两个方案:
-
-1. 调整为使用`iframe`进行嵌入,通过`postMessage`进行通信,调整样式和脚本。此方案需要调整`dify`的源码,与初衷有些许背离。
-2. 继续使用微前端方式,但是需要修改`无界`的源码,调整起来比较困难。
-
-由于修改无界的源码,需要的时间较多,暂时使用`iframe`方式嵌入。此方案需要调整`dify`的源码。下方记录对`dify`的修改。
-
-#### 修改位置
-
-**文件1**
-
-文件远程地址:`http://192.168.20.116/_next/static/chunks/app/layout-4c8b096bae21994c.js`
-
-文件服务器路径:`/data/disk2/llm_platform/dify/docker/web/.next/static/chunks/app/layout-4c8b096bae21994c.js`
-
-**文件2**
-
-文件远程地址:`http://192.168.20.116/_next/static/chunks/app/(commonLayout)/layout-f8be35226350c774.js`
-
-文件服务器路径:`/data/disk2/llm_platform/dify/docker/web/.next/static/chunks/app/(commonLayout)/layout-f8be35226350c774.js`
-
-**文件3**
-
-文件远程地址:`http://192.168.20.116/_next/static/chunks/app/signin/layout-a9277f33772c3201.js` 
-
-文件服务器目录位置:`/data/disk2/llm_platform/dify/docker/web/.next/static/chunks/app/signin`
-
-#### 修改内容
-
-在上述列出的js文件末尾添加下方脚本:
-
-> 此处的修改接收`message`,并进行相应的`css`和`js`的操作。
-
-```js
-function handleMessage(event) {
-    const data = event.data;
-    try{
-        const dataInfo = JSON.parse(event.data);
-        
-        const type = dataInfo.type;
-        const value = dataInfo.value;
-
-        if(type === 'insertStyle'){
-            // 插入样式表
-            const ele = document.createElement('style');
-            ele.innerHTML = value;
-            document.head.appendChild(ele);
-        }else if(type === 'insertScript'){
-            // 插入脚本
-            const ele = document.createElement('script');
-            ele.innerHTML = value;
-            document.head.appendChild(ele);
-        }else{
-            // 其他
-        }
-    }catch(err){
-        console.log('自定义事件出错');
-    }
-}
-
-window.addEventListener("message", handleMessage, false);
-```
-
-## 2024-12-13 dify 添加`token`参数处理
-
-为了解决嵌入登录问题,修改部分代码。
-
-需求描述:`大模型2.0`使用`iframe`嵌入`dify`,需要进行登录,此时在嵌入时,将`token`放入`url`后面,`dify`中需要处理此参数,将`token`通过`localstorage`进行保存,从而实现登录操作。
-
-### 嵌入时链接示例
-
-`http://192.168.20.116/explore/apps?token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyX2lkIjoiODA1NGU5ZmMtNzViYS00N2FlLWFlMmItNTEwOWZlMDFkYjA0IiwiZXhwIjoxNzM0MDgzODg4LCJpc3MiOiJTRUxGX0hPU1RFRCIsInN1YiI6IkNvbnNvbGUgQVBJIFBhc3Nwb3J0In0.urrZl876HSqbgbmbvklvTvcvkTb05N21UKUSVfnlHsM`
-
-### 修改文件
-
-* 文件远程地址:`http://192.168.20.116/_next/static/chunks/app/(commonLayout)/layout-f8be35226350c774.js`
-* 文件路径: `/data/disk2/llm_platform/dify/docker/web/.next/static/chunks/app/(commonLayout)/layout-f8be35226350c774.js`
-
-### 修改内容
-
-```js
-function getSearchParams(href){
-    const url = new URL(href);
-
-    const searchParams = new URLSearchParams(url.search);
-
-    // 将键值对列表转换为一个对象
-    const res = Object.fromEntries(searchParams.entries());
-
-    return res;
-}
-
-function setUrlToken(){
-    // 获取URL值
-    const href = location.href;
-
-    const params = getSearchParams(href);
-
-    if(params.token){
-        localStorage.setItem('console_token', params.token);
-        localStorage.setItem('refresh_token', '10846d07c926fe8db065246eea370067cfce547066865e6068792e78ebee3c41e841b0c0c41d0c59d3e149dbdfc746f6ea8638f4b99735fbe97b70d2aa0d78bb');
-    }else{
-        // 找不到token,提示错误
-    }
-}
-
-setUrlToken();
-```
-
-`dify`身份凭据是`console_token`,但是在`dify`代码中,会判断`refresh_token`是否存在,如果不存在,则会跳回登录页面。
-
-此部分代码手动创建一个`refresh_token`,再配合参数中的`token`,从而实现登录流程正常。

+ 0 - 27
docs/theme.md

@@ -1,27 +0,0 @@
-# 主题
-
-所有与主题有关的定义位于`src/theme`目录下。
-
-此目录下有两个`css`主题定义,`css`文件中,定义了一些关键的`颜色`、`字号`等变量,当在项目中使用到`颜色`、`字号`等`css属性`时,应使用`css变量`,否则将会引起`主题切换`功能的异常。
-
-内置的一些可以`直接使用`的变量: [设计变量](https://arco.design/vue/docs/token)
-
-如果没有找到可以直接使用的变量,则需要再`/src/theme`目录对应的`样式表`中进行定义
-
-例如:
-
-**theme-dark.css**
-
-```css
-html body[dmx-theme="dark"] {
-  --custom-color: black;
-}
-```
-
-**theme-light.css**
-
-```css
-html body[dmx-theme="dark"] {
-  --custom-color: white;
-}
-```

+ 0 - 70
public/config.js

@@ -5,73 +5,3 @@ window.DMX_VERSION = '1.0.1';
  * 配置项最后一个字符 无需是 / 即,无需以 / 结束
  */
 window.API_BASE_URL = 'http://smartai.com:8401';
-
-/**
- * 对话websocket连接地址
- */
-window.WEBSOCKET_BASE_URL = 'ws://smartai.com:8164';
-
-/**
- * 静态资源地址
- * 图片、文档等类型的地址
- */
-window.ASSETS_BASE_URL = 'http://smartai.com:8401';
-
-/**
- * rgflow 接口地址
- * */
-window.RGFLOW_BASE_URL = 'http://smartai.com:8294';
-
-/**
- * dify 接口地址
- * */
-window.DIFY_BASE_URL = 'http://smartai.com:8295';
-
-/**
- * 知识问答 引用效果 引用的静态资源地址(docx,pdf等文件)
- * PDF文档和图片链接需要使用此地址
- * 例如:
- * http://192.168.20.119:11080/v1/document/image/e2ade7feaae211ef88b50242ac130006-d66a28e5d91eea31e32d6e42474834cd
- * http://192.168.20.119:11080/v1/document/get/041cc868aaef11efa2170242ac130006
- */
-window.REFFERENCE_ASSETS_FILE_URL = 'http://192.168.20.116:11080';
-
-/**
- * 文档出卷 -> 出卷 -> iframe弹窗地址
- */
-window.IFRAME_URL_CHUJUAN = 'http://192.168.20.119:8501';
-
-/**
- * 小数系统访问地址
- * 导航栏 小数 通过 无界 微前端 方式嵌入到大模型2.0
- */
-window.XIAOSHU_URL = 'http://smartai.com:8401';
-
-/**
- * 如果用户直接点击 菜单 进行会话,则无法获知用户使用哪一个智能体进行对话,所以系统需要一个默认的Agent用来创建对话
- * 此处对默认的Agent进行配置
- * 配置说明:
- * DEFAULT_CHAT_AGENT_NAME 与 DEFAULT_CHAT_AGENT_ID 不必对应
- * 会先尝试使用 DEFAULT_CHAT_AGENT_NAME 对应的智能体,如果失败,会继续尝试 使用 DEFAULT_CHAT_AGENT_ID 对应的智能体
- */
-// window.DEFAULT_CHAT_AGENT_NAME = '知识问答';
-// window.DEFAULT_CHAT_AGENT_ID = 'e476db7cbdbb11ef82b50242ac130006';
-/**
- * 2024-12-25 薛娜提出,点击按钮 打开 智能问答 智能体,点击菜单会话,也打开 智能问答
- * 需求详情可查看下方链接中的第6条
- * @see https://note.youdao.com/ynoteshare/index.html?id=d781d48a6d64bab8451026fe65342a7f&type=note&_time=1735105294960
- * 根据需求,将默认agent配置为 智能问答
- */
-window.DEFAULT_CHAT_AGENT_NAME = '智能问答';
-window.DEFAULT_CHAT_AGENT_ID = '90d533729c0211efbf6b0242ac160006';
-
-/**
- * 临时配置项:语音项目地址
- * 为了做内网演示,新添加的一个特殊的链接地址
- *
- * 如果将语音项目嵌入大模型2.0时,需要将语音项目部署为https,否则麦克风权限无法使用
- * 如果部署为https麻烦,可以将 OPEN_MODE 的值设置为1,此时将会直接通过新标签打开项目
- */
-// window.WEB_LINK_AUDIO_LINK = 'http://192.168.20.116:3001';
-window.WEB_LINK_AUDIO_LINK = 'http://localhost:3000';
-window.WEB_LINK_OPEN_MODE = 2; // 1 直接跳转 2 内网嵌入

+ 0 - 509
public/i18n/lang-en.json

@@ -1,509 +0,0 @@
-{
-  "site": {
-    "name": "SmartAI LM Platform"
-  },
-  "theme": {
-    "light": "Light Mode",
-    "dark": "Dark Mode",
-    "party": "Party Mode"
-  },
-  "message": {
-    "hello": "hello world"
-  },
-  "header": {
-    "会话": "Conversation",
-    "知识库管理": "Knowledge Base Management",
-    "模型管理": "Model Management",
-    "AI搜索": "AI Search",
-    "Agent": "Agent",
-    "智能体": "Intelligent",
-    "权限管理": "Permission",
-    "小数": "Xiaoshu",
-    "用户组管理": "User Group Management",
-    "用户管理": "User Management",
-    "角色管理": "Role Management",
-    "机构管理": "Organization Management",
-    "资源管理": "Resource Management",
-    "search": "Search",
-    "language": "Language",
-    "theme": "Theme",
-    "setting": "Settings"
-  },
-  "login": {
-    "logoTitle": "SmartAI Large Model Platform",
-    "titleTips": "Covering Most Typical Business Scenarios",
-    "loginModel": "User Login",
-    "registerModel": "User Registration",
-    "usernameTips": "Please enter your username",
-    "passwordTips": "Please enter your password",
-    "emailTips": "Please enter your email",
-    "loginBtn": "Login",
-    "registerBtn": "Register",
-    "hasAccount": "Already have an account?",
-    "noAccount": "Don't have an account?",
-    "usernameLength": "Username must be between 3 and 20 characters long",
-    "passwordLength": "Password must be between 6 and 20 characters long",
-    "emailFormat": "Incorrect email format",
-    "system": "System Settings",
-    "logout": "Exit",
-    "okBtn": "OK",
-    "cancelBtn": "Cancel",
-    "tip": "Prompt",
-    "okText": "Are you sure you want to log out?"
-  },
-  "management": {
-    "knowledgeTitle": "Welcome back",
-    "knowledgeDesc": "Which knowledge base are we going to use today?",
-    "modelTitle": "Model Provider",
-    "modelDesc": "Set model parameters and API key here.",
-    "intelligentTitle": "Intelligent Agent Management",
-    "intelligentDesc": "The intelligent agent executes tasks through a visual workflow with clear steps. We provide scenario templates for your use and reference.",
-    "search": "Search",
-    "createKnowledgeBase": "Create Knowledge Base",
-    "setModel": "System Model Settings",
-    "createIntelligent": "Create Intelligent Agent",
-    "document": "Document",
-    "edit": "Edit",
-    "delete": "Delete",
-    "online": "Online",
-    "offline": "Offline",
-    "delete_success": "Deletion Successful",
-    "delete_fail": "Deletion Failed",
-    "create_success": "Creation Successful",
-    "create_fail": "Creation Failed",
-    "edit_success": "Edit Successful",
-    "edit_fail": "Edit Failed",
-    "no_permission": "No Permission",
-    "empty_tip": "Name cannot be empty",
-    "empty_tip_request": "Please fill in the required fields",
-    "rules": {
-      "name_rule": "Name cannot be empty",
-      "system_rule": "System cannot be empty",
-      "lim_rule": "Model cannot be empty",
-      "kb_rule": "Knowledge base cannot be empty"
-    },
-    "createUser": "Create User",
-    "addedModel": "Added Models",
-    "unaddModel": "Models to be Added",
-    "addModelBtn": "Add Model",
-    "showMoreModelBtn": "Show More Models",
-    "downBtn": "Expand",
-    "upBtn": "Collapse",
-    "useBtn": "Use",
-    "addLabelBtn": "Add Label",
-    "loadingDataTip": "Loading data, please wait...",
-    "noMoreData": "No more data available",
-    "searchAppTip": "All Application Types",
-    "searchLabelTip": "All Labels",
-    "create_kb_title": "Create Knowledge Base",
-    "create_intel_title": "Create Intelligent Agent",
-    "update_intelligent_title": "Edit Intelligent Agent",
-    "label_name": "Icon & Name",
-    "label_desc": "Description",
-    "input_placeholder": "Enter Name",
-    "change_icon_title": "Change Icon",
-    "all_icon": "All Icons",
-    "create_intelligent_title": "Create Intelligent Agent",
-    "create_btn": "Create",
-    "default_intelligent": {
-      "name_1": "Knowledge Q&A Assistant",
-      "name_2": "Chat Assistant",
-      "name_3": "Intelligent Agent",
-      "name_4": "Workflow Application",
-      "desc_1": "An intelligent Q&A assistant built based on a dedicated knowledge base, efficiently retrieving and answering domain-specific questions. Suitable for scenarios such as document Q&A, customer support, etc.",
-      "desc_2": "A conversational interaction assistant built on a large language model, suitable for multi-turn dialogue scenarios.",
-      "desc_3": "A conversational intelligent assistant that can decompose tasks, perform reasoning, and call tools. Suitable for handling complex tasks.",
-      "desc_4": "A flexible LLM workflow defined through process orchestration, enabling more stable and controllable outputs."
-    },
-    "rg_config": {
-      "title": "Agent Configuration",
-      "tab_1": "Assistant Settings",
-      "tab_2": "Prompt Engine",
-      "tab_3": "Model Settings",
-      "label_name": "Agent Name",
-      "input_placeholder": "Enter Name",
-      "label_icon": "Agent Icon",
-      "label_empty": "Empty Response",
-      "label_set_word": "Set Greeting",
-      "label_quo": "Show Quote",
-      "label_kb": "Knowledge Base",
-      "select_placeholder": "Please Select...",
-      "system": "System",
-      "similarity_threshold": "Similarity Threshold",
-      "similarity_weight": "Keyword Similarity Weight",
-      "rerank_model": "Rerank Model",
-      "label_var": "Variable",
-      "create_btn": "Create",
-      "table_column_1": "Keyword",
-      "table_column_2": "Optional",
-      "table_column_3": "Actions",
-      "label_llm": "Model",
-      "label_free": "Free",
-      "option_1": "Impromptu",
-      "option_2": "Precise",
-      "option_3": "Balanced",
-      "label_temp": "Temperature",
-      "label_attend": "Attendance Penalty",
-      "label_frequency": "Frequency Penalty",
-      "max_token_count": "Max Token Count"
-    }
-  },
-  "knowledgeLib": {
-    "tab_1": "Dataset",
-    "tab_2": "Test",
-    "tab_3": "Configuration",
-    "select_all": "Batch",
-    "select_enable": "Enable",
-    "select_disable": "Disable",
-    "select_start": "Start",
-    "select_cancel": "Cancel",
-    "select_delete": "Delete",
-    "tips_fresh": "Refresh",
-    "tips_density": "Density",
-    "font_size": {
-      "mini": "迷你",
-      "small": "偏小",
-      "medium": "中等",
-      "large": "偏大"
-    },
-    "search_placeholder": "Search",
-    "create_file": "Create file",
-    "upload_file": "Upload file",
-    "file": "File",
-    "folder": "Folder",
-    "table_name": "Name",
-    "table_chunk": "Chunk Count",
-    "table_create_time": "Upload Time",
-    "table_parser": "Parser Method",
-    "table_start": "Enable",
-    "table_run": "Parsing Status",
-    "table_action": "Action",
-    "table_status_finish": "Finish",
-    "table_status_fail": "Fail",
-    "table_status_running": "Parsing",
-    "table_status_cancel": "Cancelled",
-    "table_status_stop": "Not Started",
-    "popover_label_1": "The process starts at",
-    "popover_label_2": "Process duration",
-    "popover_label_3": "Progress message",
-    "action_tip_parser": "Parser Method",
-    "action_tip_delete": "Delete",
-    "action_tip_download": "Download",
-    "action_tip_rename": "Rename",
-    "rename_form_label": "name",
-    "rename_form_placeholder": "Please enter a name",
-    "submit": "Ok",
-    "cancel": "Cancel",
-    "delete_confirm": "Are you sure you want to delete?",
-    "tool_tab_1": "Parser Method",
-    "tool_tab_2": "Create Parsing Task",
-    "block_token_count": "Block Token Count",
-    "use_strategy": "Use Recall-Enhanced RAPTOR Strategy",
-    "prompt": "Prompt",
-    "prompt_placeholder": "Please enter a prompt",
-    "max_token_count": "Maximum Token Count",
-    "threshold": "Threshold",
-    "max_clusters": "Maximum Number of Clusters",
-    "random_seed": "Random Seed",
-    "radio_label_1": "Full Text",
-    "radio_label_2": "Ellipsis",
-    "check_all": "Select All",
-    "enable_checked": "Enable Selected",
-    "disable_checked": "Disable Selected",
-    "delete_checked": "Delete Selected",
-    "start_checked": "Start Selected",
-    "all": "All",
-    "enable": "Enable",
-    "disable": "Disable",
-    "edit_parser_block": "Edit Parsing Block",
-    "parse_block": "Parsing Block",
-    "keyword": "Keyword *",
-    "create_parser_block": "Create Parsing Block",
-    "test_title": "Retrieval Test",
-    "test_tips": "Last step! Once successful, leave the rest to Infiniflow AI.",
-    "similarity_threshold": "Similarity Threshold",
-    "similarity_weight": "Keyword Similarity Weight",
-    "rerank_model": "Rerank Model",
-    "select_placeholder": "Please select...",
-    "test_content": "Test Text",
-    "test_btn": "Test",
-    "test_result_head": "Selected Files",
-    "test_success": "Test successful",
-    "test_preview": "Preview",
-    "hybrid_similarity": "Hybrid Similarity",
-    "keyword_similarity": "Keyword Similarity",
-    "vector_similarity": "Vector Similarity",
-    "config_header": "Update your knowledge base details here, especially the parsing method.",
-    "label_name": "Knowledge Base Name",
-    "input_placeholder": "Please enter",
-    "label_desc": "Knowledge Base Description",
-    "label_permission": "Permission",
-    "permission_tooltip": "If the permission is set to 'Team', all team members can operate the knowledge base.",
-    "permission_item_1": "Only Me",
-    "permission_item_2": "Team",
-    "label_model": "Embedded Model",
-    "label_parser": "Parsing Method",
-    "label_layout": "Layout Recognition",
-    "label_prompt_placeholder": "Please fill in the prompt",
-    "save_btn": "Save",
-    "config_success": "Configuration successful",
-    "config_form_rule": {
-      "rule_1": "Knowledge base name cannot be empty",
-      "rule_2": "Please select",
-      "rule_3": "Prompt word cannot be empty"
-    },
-    "config_info": {
-      "h4_1": "Block Method Description",
-      "h4_2": "Example",
-      "h4_3": "Dialogue Example",
-      "p_1_1": "Supported file formats are",
-      "p_1_2": "This method applies a simple approach to block files:",
-      "p_1_3": "The system will use a visual detection model to split continuous text into multiple segments.",
-      "p_1_4": "Next, these continuous segments are combined into blocks with a token count not exceeding 'Token Count'.",
-      "p_2_1": "The following screenshots are provided to aid understanding."
-    }
-  },
-  "permission": {
-    "no_permission_sorry": "Sorry, you do not have permission to access this page",
-    "no_permission_route": "You do not have permission to access this page. Please contact the administrator",
-    "btn_back": "Back",
-    "query": "Query",
-    "reset": "Reset",
-    "delete": "Delete",
-    "edit": "Edit",
-    "add": "Add",
-    "refresh": "Refresh",
-    "density": "Density",
-    "success": "Success",
-    "delete_confirm": "Are you sure you want to delete this data?",
-    "bread_crumb": {
-      "用户": "User",
-      "用户组": "User Group",
-      "机构": "Organization",
-      "资源": "Resource",
-      "角色": "Role"
-    },
-    "table_size": {
-      "mini": "Mini",
-      "small": "Small",
-      "medium": "Medium",
-      "large": "Large"
-    },
-    "max_length_30": "Maximum length is 30",
-    "select_placeholder": "Please select...",
-    "input_placeholder": "Please enter",
-    "role": {
-      "name": "Role",
-      "add": "Add Role",
-      "permissionEdit": "Permission Configuration",
-      "deptEdit": "Department Configuration",
-      "confirmDelete": "Are you sure you want to delete this record?",
-      "roleName": "Role Name",
-      "remark": "Remark",
-      "roleNameRequired": "Role Name is required",
-      "permissionConfig": "Permission Configuration",
-      "deptConfig": "Department Configuration",
-      "menuFunctions": "Menu Functions",
-      "roleMenuPermissions": "Role Menu Permissions",
-      "organization": "Organization",
-      "roleDepartments": "Role Departments",
-      "serial_number": "Serial Number",
-      "status": "Status",
-      "action": "Action",
-      "search_placeholder": "Enter text"
-    },
-    "account": {
-      "new_user": "New User",
-      "edit_user": "Edit User",
-      "reset_password": "Reset Password",
-      "view_permission": "View Permission",
-      "dept_config": "Department Configuration",
-      "user_permission": "User Permission",
-      "menu_function": "Menu Function",
-      "knowledge_base": "Knowledge Base",
-      "agent": "Agent",
-      "organization": "Organization",
-      "user_department": "User Department",
-      "department_roles": "Department Roles",
-      "username": "Username",
-      "name": "Name",
-      "phone": "Phone",
-      "email": "Email",
-      "password": "Password",
-      "roles": "Roles",
-      "reset_password_success": "The user's password has been reset to basic123456",
-      "delete_success": "Deletion Successful",
-      "dept_config_success": "Department Configuration Successful"
-    },
-    "org": {
-      "tree_title": "Organization",
-      "details": "Details",
-      "add": "Add",
-      "parent_org": "Parent Organization",
-      "status": "Organization Status",
-      "org_name": "Organization Name",
-      "leader": "Leader",
-      "phone": "Phone",
-      "address": "Address",
-      "save": "Save",
-      "reset": "Reset",
-      "delete_success": "Deletion Successful",
-      "org_name_required": "Organization Name is required",
-      "leader_required": "Leader is required",
-      "phone_required": "Phone is required"
-    },
-    "resource": {
-      "tree_title": "Resource",
-      "details": "Details",
-      "add": "Add",
-      "parent_org": "Parent Resource",
-      "status": "Resource Status",
-      "resource_name": "Resource Name",
-      "leader": "Leader",
-      "phone": "Phone",
-      "address": "Resource Address",
-      "save": "Save",
-      "reset": "Reset",
-      "icon": "Resource Icon",
-      "menuType": "Resource Type",
-      "description": "Description",
-      "perms": "Resource Permission Character",
-      "component": "Component Address",
-      "resource_name_required": "Resource Name is required",
-      "address_required": "Resource Address is required",
-      "menu_type": "Resource Type",
-      "menu_type_required": "Resource Type is required",
-      "perms_required": "Resource Permission Character is required",
-      "component_required": "Component Address is required",
-      "page": "Page",
-      "menu": "Menu",
-      "button": "Button",
-      "order": "Display Order",
-      "order_tips": "Higher values appear first"
-    },
-    "group": {
-      "name": "User Group",
-      "create_user_group": "Create User Group",
-      "member_management": "Member Management",
-      "permission_management": "Permission Management",
-      "modal_title_edit": "Edit",
-      "modal_title_add": "Add New",
-      "serial_number": "Serial Number",
-      "groupName": "Group Name",
-      "description": "Description",
-      "status": "Status",
-      "action": "Action",
-      "member_title": "Permission Configuration",
-      "search_placeholder": "Please enter username to search",
-      "optional_members": "Available Members",
-      "selected_members": "Selected Members",
-      "permission_title": "Permission Configuration",
-      "knowledge_feature": "Knowledge Base Features:",
-      "agent_feature": "Agent Features:",
-      "all_permissions": "All Permissions",
-      "permission_config_success": "Permission Configuration Successful",
-      "delete_success": "Deletion Successful",
-      "member_management_success": "Member Management Successful",
-      "group_name": "Group Name",
-      "group_name_required": "Group Name is required"
-    }
-  },
-  "conversation": {
-    "chat_new": "New Session",
-    "chat_history": "History",
-    "chat_smart": "SmartAI+",
-    "search_history": "Search history",
-    "history_today": "Today",
-    "history_month": "This month",
-    "history_earlier": "Earlier",
-    "history_loadmore": "Load more",
-    "history_nomore": "No more",
-    "history_empty": "Empty",
-    "hello": "Welcome",
-    "nice_day": "Let's spend a wonderful day together!",
-    "attention": "The content is generated by an AI big model, please carefully identify it",
-    "file_upload_message": "Upload",
-    "input_message": "Enter your question",
-    "input_placholder_v0": "Enter text content",
-    "input_placholder_v1": "Enter “/” to use Smart intelligent dialogue to solve your problem",
-    "input_placholder": "",
-    "input_confirm": "Confirm",
-    "back": "Back",
-    "source": "Source",
-    "view_links": "View all associations",
-    "view_details": "View details",
-    "doc_details": "Document Details",
-    "related_docs": "Documents",
-    "doc_total": "There are a total of {total}",
-    "fragments": "Retrieve fragments",
-    "btn_ok": "Confirm",
-    "btn_cancel": "Cancel",
-    "btn_stop": "Stop",
-    "are_you_sure": "Are you sure to delete?",
-    "btn_yes": "Yes",
-    "btn_no": "No",
-    "del_success": "Success",
-    "online_search": "Online search",
-    "tag_all": "All",
-    "copy": "Copy",
-    "please_input_text": "Please enter text",
-    "please_upload_file": "Please upload the file"
-  },
-  "ai_search": {
-    "placeholder": "Please enter search content",
-    "intelligent_answer": "Intelligent Answer",
-    "related_questions": "Related Questions",
-    "mindmap_title": "Mind Map",
-    "enter_search_content": "Please enter the content you want to search",
-    "selected_files": "Selected Files",
-    "preview": "Preview"
-  },
-  "wendangchujuan": {
-    "agent_title": "Document paper",
-    "dynamic_title": "Parameter configuration",
-    "dificulty": "Difficulty",
-    "should_generate_paper": "Whether to generate a test paper",
-    "count_q_single_choice": "Number of Single choice question",
-    "count_q_muilty_choice": "Multiple Choice Question Quantity",
-    "count_q_fill_blank": "Number of fill in the blank questions",
-    "count_q_judge": "Number of True or False Questions",
-    "count_q_ask": "Number of short answer questions",
-    "count_q_case": "Number of Case Questions",
-    "keywords": "Topic direction or keywords",
-    "optional": "(Optional)",
-    "type_easy": "Easy",
-    "type_difficulty": "Difficult",
-    "type_yes": "Yes",
-    "type_no": "No"
-  },
-  "common": {
-    "confirm_delete": "Are you sure delete?",
-    "doc_error": "Document loading error",
-    "click_2_download": "Click to download the file"
-  },
-  "settings": {
-    "menuTitle": "System Settings",
-    "global": "General configuration",
-    "password": "Change Password",
-    "current_password": "Current Password",
-    "placeholder_cur_password": "Please enter the original password",
-    "new_password": "New Password",
-    "placeholder_new1_password": "Please enter a new password",
-    "confirm_password": "Confirm password",
-    "placeholder_new2_password": "Please confirm the new password",
-    "btn_cancel": "Cancel",
-    "btn_submit": "Confirm",
-    "warning_not_match": "The new password entered twice does not match. Please confirm",
-    "platform_name_empty": "Please enter the platform name",
-    "platform_name_length": "Platform name cannot exceed 20 characters",
-    "platform_logo_empty": "Please upload a logo",
-    "platform_introduce_empty": "Please enter the platform introduction",
-    "platform_introduce_length": "Platform introduction cannot exceed 20 characters",
-    "platform_name": "Platform Name",
-    "platform_logo": "Logo",
-    "platform_introduce": "Platform Introduction",
-    "platform_name_placeholder": "Please enter the platform name",
-    "platform_logo_placeholder": "Please upload a logo",
-    "platform_introduce_placeholder": "Please enter the platform introduction"
-  }
-}

+ 0 - 508
public/i18n/lang-zh.json

@@ -1,508 +0,0 @@
-{
-  "site": {
-    "name": "SmartAI大模型平台"
-  },
-  "theme": {
-    "light": "亮色模式",
-    "dark": "暗色模式",
-    "party": "党建模式"
-  },
-  "message": {
-    "hello": "欢迎光临"
-  },
-  "header": {
-    "会话": "会话",
-    "知识库管理": "知识库管理",
-    "模型管理": "模型管理",
-    "AI搜索": "AI搜索",
-    "Agent": "Agent",
-    "智能体": "智能体",
-    "权限管理": "权限管理",
-    "小数": "小数",
-    "用户组管理": "用户组管理",
-    "用户管理": "用户管理",
-    "角色管理": "角色管理",
-    "机构管理": "机构管理",
-    "资源管理": "资源管理",
-    "search": "搜索",
-    "language": "语言",
-    "theme": "主题",
-    "setting": "设置"
-  },
-  "login": {
-    "logoTitle": "SmartAI大模型平台",
-    "titleTips": "覆盖大多数典型业务场景",
-    "loginModel": "用户登录",
-    "registerModel": "用户注册",
-    "usernameTips": "请输入用户名",
-    "passwordTips": "请输入密码",
-    "emailTips": "请输入邮箱",
-    "loginBtn": "登录",
-    "registerBtn": "注册",
-    "noAccount": "没有账号?",
-    "hasAccount": "已有账号?",
-    "usernameLength": "用户名长度必须在3-20个字符之间",
-    "passwordLength": "密码长度必须在6-20个字符之间",
-    "emailFormat": "邮箱格式不正确",
-    "system": "系统设置",
-    "logout": "退出登录",
-    "okBtn": "确定",
-    "cancelBtn": "取消",
-    "tip": "提示",
-    "okText": "确定退出登录?"
-  },
-  "management": {
-    "knowledgeTitle": "欢迎回来",
-    "knowledgeDesc": "今天我们要使用哪个知识库?",
-    "modelTitle": "模型提供商",
-    "modelDesc": "在此设置模型参数和 APIKey。",
-    "intelligentTitle": "智能体管理",
-    "intelligentDesc": "智能体通过可视化的流程编排,明确任务执行步骤我们提供场景模板供您使用和参考。",
-    "search": "搜索",
-    "createKnowledgeBase": "创建知识库",
-    "setModel": "系统模型设置",
-    "createIntelligent": "新建智能体",
-    "document": "文档",
-    "edit": "编辑",
-    "delete": "删除",
-    "online": "上线",
-    "offline": "下线",
-    "delete_success": "删除成功",
-    "delete_fail": "删除失败",
-    "create_success": "创建成功",
-    "create_fail": "创建失败",
-    "edit_success": "修改成功",
-    "edit_fail": "修改失败",
-    "no_permission": "没有权限",
-    "empty_tip": "名称不能为空",
-    "empty_tip_request": "请填写必填项",
-    "rules": {
-      "name_rule": "名称不允许为空",
-      "system_rule": "系统不能为空",
-      "lim_rule": "模型不能为空",
-      "kb_rule": "知识库不能为空"
-    },
-    "createUser": "创建用户",
-    "addedModel": "添加了的模型",
-    "unaddModel": "待添加的模型",
-    "addModelBtn": "添加模型",
-    "showMoreModelBtn": "展示更多模型",
-    "downBtn": "展开",
-    "upBtn": "收起",
-    "useBtn": "使用",
-    "addLabelBtn": "添加标签",
-    "loadingDataTip": "正在加载数据,请稍后……",
-    "noMoreData": "没有更多数据了",
-    "searchAppTip": "全部应用类型",
-    "searchLabelTip": "全部标签",
-    "create_kb_title": "创建知识库",
-    "create_intel_title": "创建智能体",
-    "label_name": "图标&名称",
-    "label_desc": "描述",
-    "input_placeholder": "请输入名称",
-    "change_icon_title": "替换图标",
-    "all_icon": "全部图标",
-    "create_intelligent_title": "新建智能体",
-    "update_intelligent_title": "编辑智能体",
-    "create_btn": "新建",
-    "default_intelligent": {
-      "name_1": "知识问答助理",
-      "name_2": "聊天助理",
-      "name_3": "智能Agent",
-      "name_4": "工作流应用",
-      "desc_1": "基于专属知识库构建的智能问答助手,高效检索并解答特定领域问题,适用于文档问答、客户支持等场景",
-      "desc_2": "基于大型语言模型构建的对话式交互助手,适用于多轮对话场景",
-      "desc_3": "能够分解任务、进行推理思考并调用工具的对话式智能助手,适合处理复杂任务",
-      "desc_4": "通过流程编排的方式定义更灵活的 LLM 工作流,实现更稳定可控的输出"
-    },
-    "rg_config": {
-      "title": "智能体配置",
-      "tab_1": "助理设置",
-      "tab_2": "提示引擎",
-      "tab_3": "模型设置",
-      "label_name": "智能体名称",
-      "input_placeholder": "请输入名称",
-      "label_icon": "智能体图标",
-      "label_empty": "空回复",
-      "label_set_word": "设置开场白",
-      "label_quo": "显示引用",
-      "label_kb": "知识库",
-      "select_placeholder": "请选择...",
-      "system": "系统",
-      "similarity_threshold": "相似度阈值",
-      "similarity_weight": "关键字相似度权重",
-      "rerank_model": "Rerank模型",
-      "label_var": "变量",
-      "create_btn": "新建",
-      "table_column_1": "关键字",
-      "table_column_2": "可选",
-      "table_column_3": "操作",
-      "label_llm": "模型",
-      "label_free": "自由",
-      "option_1": "即兴创作",
-      "option_2": "精确",
-      "option_3": "平衡",
-      "label_temp": "温度",
-      "label_attend": "出席处罚",
-      "label_frequency": "频率处罚",
-      "max_token_count": "最大token数"
-    }
-  },
-  "knowledgeLib": {
-    "tab_1": "数据集",
-    "tab_2": "测试",
-    "tab_3": "配置",
-    "select_all": "批量",
-    "select_enable": "启用",
-    "select_disable": "禁用",
-    "select_start": "启动",
-    "select_cancel": "取消",
-    "select_delete": "删除",
-    "tips_fresh": "刷新",
-    "tips_density": "密度",
-    "search_placeholder": "搜索",
-    "create_file": "新增文件",
-    "upload_file": "上传文件",
-    "file": "文件",
-    "folder": "文件夹",
-    "table_name": "名称",
-    "table_chunk": "分快数",
-    "table_create_time": "上传时间",
-    "table_parser": "解析方法",
-    "table_start": "启用",
-    "table_run": "解析状态",
-    "table_action": "操作",
-    "table_status_finish": "完成",
-    "table_status_fail": "失败",
-    "table_status_running": "解析中",
-    "table_status_cancel": "取消",
-    "table_status_stop": "未启动",
-    "popover_label_1": "流程起始于",
-    "popover_label_2": "过程持续时间",
-    "popover_label_3": "进度消息",
-    "action_tip_parser": "解析方法",
-    "action_tip_delete": "删除",
-    "action_tip_download": "下载",
-    "action_tip_rename": "重命名",
-    "rename_form_label": "名称",
-    "rename_form_placeholder": "请输入名称",
-    "submit": "确定",
-    "cancel": "取消",
-    "delete_confirm": "确定删除吗?",
-    "tool_tab_1": "解析方法",
-    "tool_tab_2": "创建解析块",
-    "block_token_count": "块token数",
-    "use_strategy": "使用召回增强RAPTOR策略",
-    "prompt": "提示词",
-    "prompt_placeholder": "请填写提示词",
-    "max_token_count": "最大token数",
-    "threshold": "阈值",
-    "max_clusters": "最大聚类数",
-    "random_seed": "随机种子",
-    "radio_label_1": "全文",
-    "radio_label_2": "省略",
-    "check_all": "选择所有",
-    "enable_checked": "启用选定的",
-    "disable_checked": "禁用选定的",
-    "delete_checked": "删除选定的",
-    "start_checked": "启动选定的",
-    "all": "所有",
-    "enable": "启用",
-    "disable": "禁用",
-    "edit_parser_block": "编辑解析块",
-    "parse_block": "解析块",
-    "keyword": "关键词 *",
-    "create_parser_block": "创建解析块",
-    "test_title": "检索测试",
-    "test_tips": "最后一步! 成功后,剩下的就交给Infiniflow AI吧。",
-    "similarity_threshold": "相似度阈值",
-    "similarity_weight": "关键字相似度权重",
-    "rerank_model": "Rerank模型",
-    "select_placeholder": "请选择...",
-    "test_content": "测试文本",
-    "test_btn": "测试",
-    "test_success": "测试成功",
-    "test_result_head": "选定的文件",
-    "test_preview": "预览",
-    "hybrid_similarity": "混合相似度",
-    "keyword_similarity": "关键词相似度",
-    "vector_similarity": "向量相似度",
-    "config_header": "在这里更新您的知识库详细信息,尤其是解析方法。",
-    "label_name": "知识库名称",
-    "input_placeholder": "请输入",
-    "label_desc": "知识库描述",
-    "label_permission": "权限",
-    "permission_tooltip": "如果权限是“团队”,则所有团队成员都可以操作知识库。",
-    "permission_item_1": "只有我",
-    "permission_item_2": "团队",
-    "label_model": "嵌入模型",
-    "label_parser": "解析方法",
-    "label_layout": "布局识别",
-    "label_prompt_placeholder": "请填写提示词",
-    "save_btn": "保存",
-    "config_success": "配置成功",
-    "config_form_rule": {
-      "rule_1": "知识库名称不允许为空",
-      "rule_2": "请选择",
-      "rule_3": "提示词不允许为空"
-    },
-    "config_info": {
-      "h4_1": "分块方法说明",
-      "h4_2": "示例",
-      "h4_3": "对话示例",
-      "p_1_1": "支持的文件格式为",
-      "p_1_2": "此方法将简单的方法应用于块文件:",
-      "p_1_3": "系统将使用视觉检测模型将连续文本分割成多个片段。",
-      "p_1_4": "接下来,这些连续的片段被合并成Token数不超过“Token数”的块。",
-      "p_2_1": "提出以下屏幕截图以促进理解。"
-    }
-  },
-  "permission": {
-    "no_permission_sorry": "抱歉,您无权限访问此页面",
-    "no_permission_route": "您没有权限访问此页面,请联系管理员",
-    "btn_back": "返回",
-    "query": "查询",
-    "reset": "重置",
-    "delete": "删除",
-    "edit": "编辑",
-    "add": "新增",
-    "refresh": "刷新",
-    "density": "密度",
-    "success": "成功",
-    "close": "关闭",
-    "status_switch_success": "状态切换成功",
-    "delete_confirm": "确定删除该条数据吗?",
-    "bread_crumb": {
-      "用户": "用户",
-      "用户组": "用户组",
-      "机构": "机构",
-      "资源": "资源",
-      "角色": "角色"
-    },
-    "table_size": {
-      "mini": "迷你",
-      "small": "偏小",
-      "medium": "中等",
-      "large": "偏大"
-    },
-    "max_length_30": "最大长度30",
-    "select_placeholder": "请选择...",
-    "input_placeholder": "请输入",
-    "role": {
-      "name": "角色",
-      "add": "新建角色",
-      "permissionEdit": "权限配置",
-      "deptEdit": "部门配置",
-      "confirmDelete": "确定删除该条数据吗?",
-      "roleName": "角色名称",
-      "remark": "备注",
-      "roleNameRequired": "角色名称必填",
-      "permissionConfig": "权限配置",
-      "deptConfig": "部门配置",
-      "menuFunctions": "菜单功能",
-      "roleMenuPermissions": "角色菜单权限",
-      "organization": "机构",
-      "roleDepartments": "角色所属部门",
-      "serial_number": "序号",
-      "status": "状态",
-      "action": "操作",
-      "search_placeholder": "请输入关键字查询"
-    },
-    "account": {
-      "new_user": "新建用户",
-      "edit_user": "编辑用户",
-      "reset_password": "重置密码",
-      "reset_password_success": "该用户密码重置为basic123456",
-      "view_permission": "查看权限",
-      "dept_config": "部门配置",
-      "dept_config_success": "部门配置成功",
-      "delete_success": "删除成功",
-      "user_permission": "用户权限",
-      "menu_function": "菜单功能",
-      "knowledge_base": "知识库",
-      "agent": "智能体",
-      "organization": "机构",
-      "user_department": "用户所属部门",
-      "department_roles": "部门角色",
-      "username": "用户名",
-      "name": "姓名",
-      "phone": "手机号",
-      "email": "邮箱",
-      "password": "密码",
-      "roles": "角色",
-      "all": "全部",
-      "org": "机构",
-      "user": "个人"
-    },
-    "org": {
-      "tree_title": "机构",
-      "details": "详情",
-      "delete": "删除",
-      "delete_success": "删除成功",
-      "parent_org": "上级机构",
-      "status": "机构状态",
-      "org_name": "机构名称",
-      "leader": "联系人",
-      "phone": "联系电话",
-      "address": "机构地址",
-      "save": "保存",
-      "reset": "重置",
-      "org_name_required": "机构名称必填",
-      "leader_required": "联系人必填",
-      "phone_required": "联系电话必填"
-    },
-    "resource": {
-      "tree_title": "资源",
-      "details": "详情",
-      "parent_org": "上级资源",
-      "status": "资源状态",
-      "resource_name": "资源名称",
-      "leader": "联系人",
-      "phone": "联系电话",
-      "address": "资源地址",
-      "save": "保存",
-      "reset": "重置",
-      "icon": "资源图标",
-      "menuType": "资源类型",
-      "description": "提示词",
-      "perms": "资源控制权限字符",
-      "component": "组件地址",
-      "resource_name_required": "资源名称必填",
-      "address_required": "资源地址必填",
-      "menu_type": "资源类型",
-      "menu_type_required": "资源类型必填",
-      "perms_required": "资源控制权限字符必填",
-      "component_required": "组件地址必填",
-      "page": "页面",
-      "menu": "菜单",
-      "button": "按钮",
-      "order": "显示排序",
-      "order_tips": "值越大排列越靠前"
-    },
-    "group": {
-      "name": "用户组",
-      "create_user_group": "新建用户组",
-      "member_management": "成员管理",
-      "permission_management": "权限管理",
-      "permission_config_success": "权限配置成功",
-      "delete_success": "删除成功",
-      "member_management_success": "成员管理成功",
-      "group_name": "组名称",
-      "group_name_required": "组名称必填",
-      "description": "描述",
-      "modal_title_edit": "编辑",
-      "modal_title_add": "新增",
-      "serial_number": "序号",
-      "status": "状态",
-      "action": "操作",
-      "member_title": "权限配置",
-      "search_placeholder": "请输入用户名搜索",
-      "optional_members": "可选成员",
-      "selected_members": "已选成员",
-      "permission_title": "权限配置",
-      "knowledge_feature": "知识库功能:",
-      "agent_feature": "智能体功能:",
-      "all_permissions": "角色所有权限",
-      "knowledge": "知识库",
-      "agents": "智能体"
-    }
-  },
-  "conversation": {
-    "chat_new": "开启新会话",
-    "chat_history": "历史会话",
-    "chat_smart": "SmartAI+",
-    "search_history": "搜索历史会话",
-    "history_today": "今天",
-    "history_month": "本月",
-    "history_earlier": "一个月以前",
-    "history_loadmore": "加载更多",
-    "history_nomore": "没有更多了",
-    "history_empty": "暂无数据",
-    "hello": "你好",
-    "nice_day": "让我们一起度过美好的一天!",
-    "attention": "内容由 AI 大模型生成,请仔细甄别",
-    "file_upload_message": "文件上传",
-    "input_message": "输入您的问题",
-    "input_placholder_v0": "输入文本内容",
-    "input_placholder_v1": "输入“/”使用Smart智能对话,解决你的问题",
-    "input_placholder": "",
-    "input_confirm": "发送",
-    "back": "返回",
-    "source": "来源",
-    "view_links": "查看全部关联",
-    "view_details": "查看详情",
-    "doc_details": "文档详情",
-    "related_docs": "以下是根据您的提问搜索到的相关文档",
-    "doc_total": "共{total}条",
-    "fragments": "检索片段",
-    "btn_ok": "确定",
-    "btn_cancel": "取消",
-    "btn_stop": "停止生成",
-    "are_you_sure": "确定删除么?",
-    "btn_yes": "是",
-    "btn_no": "否",
-    "del_success": "删除成功",
-    "online_search": "联网搜索",
-    "tag_all": "全部",
-    "copy": "复制",
-    "please_input_text": "请输入文字",
-    "please_upload_file": "请上传文件"
-  },
-  "ai_search": {
-    "placeholder": "请输入搜索内容",
-    "intelligent_answer": "智能回答",
-    "related_questions": "相关问题",
-    "mindmap_title": "思维导图",
-    "enter_search_content": "请输入想要搜索的内容",
-    "selected_files": "选定文件",
-    "preview": "预览"
-  },
-  "wendangchujuan": {
-    "agent_title": "文档出卷",
-    "dynamic_title": "参数配置",
-    "dificulty": "难度",
-    "should_generate_paper": "是否生成试卷",
-    "count_q_single_choice": "单选题数量",
-    "count_q_muilty_choice": "多选题数量",
-    "count_q_fill_blank": "填空题数量",
-    "count_q_judge": "判断题数量",
-    "count_q_ask": "简答题数量",
-    "count_q_case": "案例题数量",
-    "keywords": "出题方向或关键字",
-    "optional": "(可选)",
-    "type_easy": "简单",
-    "type_difficulty": "困难",
-    "type_yes": "是",
-    "type_no": "否"
-  },
-  "common": {
-    "confirm_delete": "确定删除吗?",
-    "doc_error": "文档加载出错",
-    "click_2_download": "点击下载文件"
-  },
-  "settings": {
-    "menuTitle": "系统设置",
-    "global": "通用配置",
-    "password": "修改密码",
-    "current_password": "当前密码",
-    "placeholder_cur_password": "请输入原密码",
-    "new_password": "新密码",
-    "placeholder_new1_password": "请输入新密码",
-    "confirm_password": "确认密码",
-    "placeholder_new2_password": "请确认新密码",
-    "btn_cancel": "取消",
-    "btn_submit": "保存",
-    "warning_not_match": "新密码两次输入不一致,请确认",
-    "platform_name_empty": "请输入平台名称",
-    "platform_name_length": "平台名称长度不能超过20个字符",
-    "platform_logo_empty": "请上传logo",
-    "platform_introduce_empty": "请输入平台介绍",
-    "platform_introduce_length": "平台介绍长度不能超过20个字符",
-    "platform_name": "平台名称",
-    "platform_logo": "logo",
-    "platform_introduce": "平台介绍",
-    "platform_name_placeholder": "请输入平台名称",
-    "platform_logo_placeholder": "请上传logo",
-    "platform_introduce_placeholder": "请输入平台介绍"
-  }
-}

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 20
public/pdfjs-dist/pdf.min.mjs


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 20523
public/pdfjs-dist/pdf.mjs


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
public/pdfjs-dist/pdf.mjs.map


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 20
public/pdfjs-dist/pdf.sandbox.min.mjs


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 52
public/pdfjs-dist/pdf.sandbox.mjs


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
public/pdfjs-dist/pdf.sandbox.mjs.map


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 3494
public/pdfjs-dist/pdf.worker.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 20
public/pdfjs-dist/pdf.worker.min.js


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 20
public/pdfjs-dist/pdf.worker.min.mjs


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 3494
public/pdfjs-dist/pdf.worker.mjs


+ 1 - 24
src/App.vue

@@ -1,30 +1,7 @@
 <template>
-  <a-config-provider :locale="locale">
-    <router-view />
-  </a-config-provider>
+  <router-view />
 </template>
 
 <script setup>
 import { ref, computed } from 'vue';
-import { useLocaleStore } from './base/store/use-locale';
-
-/**
- * @see https://arco.design/vue/component/config-provider
- */
-import zhCN from '@arco-design/web-vue/es/locale/lang/zh-cn';
-import enUS from '@arco-design/web-vue/es/locale/lang/en-us';
-
-const locales = {
-  zh: zhCN,
-  en: enUS
-};
-
-const localStore = useLocaleStore();
-
-/**
- * 多语言
- */
-const locale = computed(() => {
-  return locales[localStore.value] || zhCN;
-});
 </script>

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 7
src/assets/ai-search/doc.svg


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 7
src/assets/ai-search/docx.svg


+ 0 - 10
src/assets/ai-search/pdf.svg

@@ -1,10 +0,0 @@
-<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">
-    <path
-        d="M7.75 4C7.75 2.20508 9.20508 0.75 11 0.75H27C27.1212 0.75 27.2375 0.798159 27.3232 0.883885L38.1161 11.6768C38.2018 11.7625 38.25 11.8788 38.25 12V36C38.25 37.7949 36.7949 39.25 35 39.25H11C9.20507 39.25 7.75 37.7949 7.75 36V4Z"
-        stroke="#D0D5DD" stroke-width="1.5" />
-    <path d="M27 0.5V8C27 10.2091 28.7909 12 31 12H38.5" stroke="#D0D5DD" stroke-width="1.5" />
-    <rect x="1" y="18" width="26" height="16" rx="2" fill="#D92D20" />
-    <path
-        d="M4.8323 30V22.7273H7.70162C8.25323 22.7273 8.72316 22.8326 9.11142 23.0433C9.49967 23.2517 9.7956 23.5417 9.9992 23.9134C10.2052 24.2827 10.3082 24.7088 10.3082 25.1918C10.3082 25.6747 10.204 26.1009 9.99565 26.4702C9.78732 26.8395 9.48547 27.1271 9.09011 27.3331C8.69712 27.5391 8.22127 27.642 7.66255 27.642H5.83372V26.4098H7.41397C7.7099 26.4098 7.95375 26.3589 8.14551 26.2571C8.33964 26.1529 8.48405 26.0097 8.57875 25.8274C8.67581 25.6428 8.72434 25.4309 8.72434 25.1918C8.72434 24.9503 8.67581 24.7396 8.57875 24.5597C8.48405 24.3774 8.33964 24.2365 8.14551 24.1371C7.95138 24.0353 7.70517 23.9844 7.40687 23.9844H6.36994V30H4.8323ZM13.885 30H11.3069V22.7273H13.9063C14.6379 22.7273 15.2676 22.8729 15.7955 23.1641C16.3235 23.4529 16.7295 23.8684 17.0136 24.4105C17.3 24.9527 17.4433 25.6013 17.4433 26.3565C17.4433 27.1141 17.3 27.7652 17.0136 28.3097C16.7295 28.8542 16.3211 29.272 15.7884 29.5632C15.2581 29.8544 14.6237 30 13.885 30ZM12.8445 28.6825H13.8211C14.2757 28.6825 14.658 28.602 14.9681 28.4411C15.2806 28.2777 15.515 28.0256 15.6713 27.6847C15.8299 27.3414 15.9092 26.8987 15.9092 26.3565C15.9092 25.8191 15.8299 25.38 15.6713 25.0391C15.515 24.6982 15.2818 24.4472 14.9717 24.2862C14.6615 24.1252 14.2792 24.0447 13.8247 24.0447H12.8445V28.6825ZM18.5823 30V22.7273H23.3976V23.995H20.1199V25.728H23.078V26.9957H20.1199V30H18.5823Z"
-        fill="white" />
-</svg>

+ 0 - 5
src/assets/ai-search/selected-files-collapse.svg

@@ -1,5 +0,0 @@
-<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
-    <path
-        d="M6.66667 10H13.3333M6.5 17.5H13.5C14.9001 17.5 15.6002 17.5 16.135 17.2275C16.6054 16.9878 16.9878 16.6054 17.2275 16.135C17.5 15.6002 17.5 14.9001 17.5 13.5V6.5C17.5 5.09987 17.5 4.3998 17.2275 3.86502C16.9878 3.39462 16.6054 3.01217 16.135 2.77248C15.6002 2.5 14.9001 2.5 13.5 2.5H6.5C5.09987 2.5 4.3998 2.5 3.86502 2.77248C3.39462 3.01217 3.01217 3.39462 2.77248 3.86502C2.5 4.3998 2.5 5.09987 2.5 6.5V13.5C2.5 14.9001 2.5 15.6002 2.77248 16.135C3.01217 16.6054 3.39462 16.9878 3.86502 17.2275C4.3998 17.5 5.09987 17.5 6.5 17.5Z"
-        stroke="#7F56D9" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
-</svg>

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 7
src/assets/ai-search/xls.svg


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 7
src/assets/ai-search/xlsx.svg


BIN
src/assets/aside-menu-bg.png


BIN
src/assets/chat-aside/aside-btn-expond.png


BIN
src/assets/chat-aside/aside-menu-bg-black-bottom.png


BIN
src/assets/chat-aside/aside-menu-bg-black-middle.png


BIN
src/assets/chat-aside/aside-menu-bg-black-top.png


BIN
src/assets/chat-aside/aside-menu-bg-blk-bottom.png


BIN
src/assets/chat-aside/aside-menu-bg-blk-top.png


BIN
src/assets/chat-aside/aside-menu-bg-white-bottom.png


BIN
src/assets/chat-aside/aside-menu-bg-white-middle.png


BIN
src/assets/chat-aside/aside-menu-bg-white-top.png


BIN
src/assets/chat-aside/aside-menu-bg-wt-bottom.png


BIN
src/assets/chat-aside/aside-menu-bg-wt-top.png


BIN
src/assets/chat-aside/chat-history-1.png


BIN
src/assets/chat-aside/chat-new-1.png


BIN
src/assets/chat-aside/chat-smart-1.png


BIN
src/assets/chat/board-bg.png


BIN
src/assets/chat/chat-agent-icon.png


BIN
src/assets/chat/history-bg.png


BIN
src/assets/file-upload.png


BIN
src/assets/header-quanping-1.png


BIN
src/assets/header-search-1.png


BIN
src/assets/header-setting-1.png


BIN
src/assets/language-1.png


BIN
src/assets/party-bg.jpeg


BIN
src/assets/question-define.png


BIN
src/assets/theme.png


BIN
src/assets/属性=上@2x.png


BIN
src/assets/属性=标签.png


BIN
src/assets/属性=用户.png


+ 0 - 6
src/base/storage.js

@@ -8,13 +8,7 @@ import { MyCookie } from './storage/cookie';
  * 应确保每个 storage 定义使用的 key 不重复,并做好注释
  * 任意localStorage的定义,必须添加 localST_ 前缀
  */
-export const localST_Theme = new MyLocalStorage('theme'); // 主题
-export const localST_Locale = new MyLocalStorage('locale'); // 多语言
-export const localST_RecentAgent = new MyLocalStorage('recent_agent'); // 近期使用的agent
-export const localST_AllAgent = new MyLocalStorage('full_agent'); // 所有可用的agent
 export const localST_UserInfo = new MyLocalStorage('user_info'); // 用户信息
-export const localST_RoutesList = new MyLocalStorage('routes_list'); // 用户身份token
-export const localST_RecentSearchType = new MyLocalStorage('recent_search_type'); // 最近的
 
 /**
  * session storage定义

+ 0 - 81
src/base/store/use-all-agents.js

@@ -1,81 +0,0 @@
-import { defineStore } from 'pinia';
-import { jsonStringify, jsonParse } from '../../utils/utils';
-import { localST_AllAgent } from '../storage';
-
-function allLocalSet(arr) {
-  // 在本地保存记录
-  const result_str = jsonStringify(arr);
-
-  localST_AllAgent.setItem(result_str);
-}
-
-function allLocalGet() {
-  const result_str = localST_AllAgent.getItem();
-
-  const result_list = jsonParse(result_str);
-
-  if (result_list === null) {
-    // json解析发生了错误
-    return [];
-  } else {
-    return result_list;
-  }
-}
-
-/**
- * 系统所有可用的agents列表
- */
-export const useAllAgentStore = defineStore('all_agents', {
-  state: () => {
-    return {
-      agents: []
-    };
-  },
-  actions: {
-    /**
-     * 获取所有的记录
-     * @returns
-     */
-    getList() {
-      const cur_list = this.agents;
-
-      if (cur_list.length === 0) {
-        const recent_list = allLocalGet();
-
-        this.agents = recent_list;
-
-        return this.agents;
-      }
-
-      return this.agents;
-    },
-    /**
-     * 根据agent id获取到相关的记录
-     * @param {string} agent_id
-     */
-    getInfo(agent_id) {
-      if (!agent_id) {
-        return null;
-      }
-
-      const list = this.getList();
-
-      const total = list.length;
-      for (let i = 0; i < total; i++) {
-        const item = list[i];
-
-        if (item.id === agent_id) {
-          return item;
-        }
-      }
-
-      return null;
-    },
-    setList(arr) {
-      const list = jsonParse(jsonStringify(arr));
-
-      this.agents = list;
-      allLocalSet(list);
-    }
-  }
-});

+ 0 - 19
src/base/store/use-locale.js

@@ -1,19 +0,0 @@
-import { defineStore } from 'pinia';
-
-import { LANGUAGE_ENGLISH, LANGUAGE_CHINESE } from '../variables';
-
-/**
- * 多语言
- */
-export const useLocaleStore = defineStore('locale', {
-  state: () => {
-    return {
-      value: LANGUAGE_CHINESE
-    };
-  },
-  actions: {
-    updateLanguage(lang) {
-      this.value = lang;
-    }
-  }
-});

+ 0 - 32
src/base/store/use-platform-information.js

@@ -1,32 +0,0 @@
-import { defineStore } from 'pinia';
-
-/**
- * 平台信息
- */
-export const usePlatformInformation = defineStore('platformInformation', {
-  persist: {
-    enabled: true,
-    // 可选:自定义存储的 key 和要持久化的路径
-    strategies: [
-      {
-        key: 'platform',
-        storage: localStorage,
-        paths: ['platform_name', 'platform_introduce', 'logo_key'] // 只持久化 username 属性
-      }
-    ]
-  },
-  state: () => {
-    return {
-      platform_name: 'SmartAI大模型平台',
-      platform_introduce: '覆盖大多数典型业务场景',
-      logo_key: 'xxxx'
-    };
-  },
-  actions: {
-    updatePlatformInformation(platform_name, platform_introduce, key) {
-      this.platform_name = platform_name;
-      this.platform_introduce = platform_introduce;
-      this.logo_key = key;
-    }
-  }
-});

+ 0 - 105
src/base/store/use-recent-agents.js

@@ -1,105 +0,0 @@
-import { defineStore } from 'pinia';
-import { localST_RecentAgent } from '../storage';
-import { jsonStringify, jsonParse } from '../../utils/utils';
-
-function recentLocalSet(arr) {
-  // 在本地保存记录
-  const result_str = jsonStringify(arr);
-
-  localST_RecentAgent.setItem(result_str);
-}
-
-function recentLocalGet() {
-  const result_str = localST_RecentAgent.getItem();
-
-  const result_list = jsonParse(result_str);
-
-  if (result_list === null) {
-    // json解析发生了错误
-    return [];
-  } else {
-    return result_list;
-  }
-}
-
-/**
- * 最近使用的Agent列表
- * ID
- * 名称
- * 图标
- * 简介
- * 时间
- */
-export const useRecentAgentStore = defineStore('recent_agents', {
-  state: () => {
-    return {
-      agents: recentLocalGet()
-    };
-  },
-  actions: {
-    /**
-     * 获取所有的记录
-     * @returns
-     */
-    getList() {
-      const cur_list = this.agents;
-
-      if (cur_list.length === 0) {
-        const recent_list = recentLocalGet();
-
-        this.agents = recent_list;
-
-        return this.agents;
-      }
-
-      return this.agents;
-    },
-    /**
-     * 新增一条记录
-     * @param {string} id
-     * @param {string} name
-     * @param {string} icon
-     * @param {string} mode
-     */
-    addItem(id, name, icon, mode) {
-      /**
-       * 检查是否已经存在,如果已经存在,则将其提到前位
-       * 如果不存在,则在首位添加记录
-       */
-      const item = {
-        id: id,
-        name: name,
-        icon: icon,
-        mode: mode,
-        active_time: Date.now()
-      };
-
-      const arr = [];
-      this.agents.forEach((item) => {
-        if (item.id !== id) {
-          arr.push(item);
-        }
-      });
-      arr.unshift(item);
-
-      this.agents = arr;
-      recentLocalSet(arr);
-    },
-    /**
-     * 移除一条记录
-     * @param {string} id
-     */
-    removeItem(id) {
-      const arr = [];
-
-      this.agents.forEach((item) => {
-        if (item.id !== id) {
-          arr.push(item);
-        }
-      });
-
-      this.agents = arr;
-      recentLocalSet(arr);
-    }
-  }
-});

+ 0 - 58
src/base/store/use-recent-history-search-type.js

@@ -1,58 +0,0 @@
-import { defineStore } from 'pinia';
-import { localST_RecentSearchType } from '../storage';
-import { jsonStringify, jsonParse } from '../../utils/utils';
-
-function recentLocalSet(item) {
-  // 在本地保存记录
-  const result_str = jsonStringify(item);
-
-  localST_RecentSearchType.setItem(result_str);
-}
-
-function recentLocalGet() {
-  const result_str = localST_RecentSearchType.getItem();
-
-  const result_list = jsonParse(result_str);
-
-  if (result_list === null) {
-    // json解析发生了错误
-    return null;
-  } else {
-    return result_list;
-  }
-}
-
-/**
- * 最近使用的搜索类型
- */
-export const useRecentSearchTypeStore = defineStore('recent_history_search_type', {
-  state: () => {
-    return {
-      search_type: recentLocalGet()
-    };
-  },
-  actions: {
-    /**
-     * 获取记录
-     * @returns
-     */
-    getType() {
-      const cur_type = this.search_type;
-
-      if (cur_type.length === 0) {
-        this.search_type = recentLocalGet();
-
-        return this.search_type;
-      }
-
-      return this.search_type;
-    },
-    /**
-     * 保存记录
-     */
-    setType(item) {
-      this.search_type = item;
-      recentLocalSet(item);
-    }
-  }
-});

+ 0 - 19
src/base/store/use-theme.js

@@ -1,19 +0,0 @@
-import { defineStore } from 'pinia';
-
-import { THEME_LIGHT, THEME_DARK } from '../variables';
-
-/**
- * 主题
- */
-export const useThemeStore = defineStore('theme', {
-  state: () => {
-    return {
-      value: THEME_LIGHT
-    };
-  },
-  actions: {
-    updateTheme(theme) {
-      this.value = theme;
-    }
-  }
-});

+ 2 - 2
src/index.html

@@ -4,11 +4,11 @@
     <meta charset="UTF-8" />
     <link rel="icon" type="image/png" href="/logo.png" />
     <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-    <title>大模型2.0</title>
+    <title>信通小数应用市场</title>
     <script type="module" src="/config.js"></script>
   </head>
   <body>
-    <div id="app"></div>
+    <div id="xintongxiaoshuyingyongshichang"></div>
     <script type="module" src="index.js"></script>
   </body>
 </html>

+ 1 - 1
src/index.js

@@ -21,4 +21,4 @@ app.use(router);
 app.use(store);
 
 installArcoVue(app);
-app.mount('#app');
+app.mount('#xintongxiaoshuyingyongshichang');

+ 0 - 148
src/modules/ai-search/ChunkList.vue

@@ -1,148 +0,0 @@
-<template>
-  <div class="chunk-list">
-    <a-spin v-if="loading" dot :loading="loading" />
-    <div v-else>
-      <div v-for="(item, index) in chunks" :key="index">
-        <div class="card">
-          <AsideImage v-if="item.image_url" :src="item.image_url" />
-          <div class="document-reference">
-            <a-popover trigger="hover">
-              <template #content>
-                <div class="popup-markdown">
-                  <div v-html="highlightText(item.content_with_weight)" />
-                </div>
-              </template>
-              <div v-html="highlightText(item.highlight)" class="highlight-content" />
-            </a-popover>
-            <div class="file-btn" @click="fileClick(item)">
-              <a-space>
-                <FileIcon :name="item.docnm_kwd" />
-                <div>{{ item.docnm_kwd }}</div>
-              </a-space>
-            </div>
-          </div>
-        </div>
-        <a-divider :margin="12" v-if="index < chunks.length - 1" />
-      </div>
-      <div v-if="chunks.length > 1">
-        <a-divider />
-        <a-pagination
-          :current="current_page"
-          :total="total"
-          :page-size="page_size"
-          show-total
-          show-page-size
-          @change="handlePageChange"
-          @page-size-change="handlePageSizeChange"
-        />
-      </div>
-    </div>
-  </div>
-</template>
-
-<script setup>
-import { ref } from 'vue';
-import FileIcon from './FileIcon.vue';
-import AsideImage from './PopoverImage.vue';
-const props = defineProps({
-  chunks: Array,
-  total: {
-    type: Number,
-    required: true
-  },
-  highlight_word: String,
-  page_size: {
-    type: Number,
-    default: 10
-  },
-  loading: Boolean
-});
-
-const emit = defineEmits(['clickDocumentButton', 'pageChange', 'pageSizeChange']);
-
-const fileClick = (item) => {
-  emit('clickDocumentButton', item);
-};
-
-const highlightText = (text) => {
-  if (!props.highlight_word) return text;
-  const regex = new RegExp(`(${props.highlight_word})`, 'gi');
-  return text.replace(regex, `<span class="highlighted">$1</span>`);
-};
-
-const current_page = ref(1);
-const page_size = ref(10);
-
-const handlePageChange = (page) => {
-  current_page.value = page;
-  emit('pageChange', page);
-};
-
-const handlePageSizeChange = (page_size) => {
-  page_size.value = page_size;
-  emit('pageSizeChange', page_size);
-};
-</script>
-
-<style scoped>
-.chunk-list {
-  text-align: center;
-}
-.card {
-  display: flex;
-  align-items: center;
-  box-sizing: border-box;
-  text-align: left;
-  padding: 14px;
-  padding-bottom: 8px;
-  color: var(--color-text-1);
-  font-size: 14px;
-  list-style: none;
-  position: relative;
-  background: var(--color-bg-1);
-  border: 1px solid var(--color-neutral-3);
-  border-radius: 8px;
-}
-.popup-markdown {
-  color: var(--color-text-1);
-  width: 60vw;
-  max-height: 40vh;
-  overflow: auto;
-}
-.highlight-content {
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-line-clamp: 2;
-  overflow: hidden;
-  text-overflow: ellipsis;
-}
-
-.file-btn {
-  font-weight: 600;
-  cursor: pointer;
-}
-.document-reference {
-  margin-left: 8px;
-  display: flex;
-  flex-direction: column;
-  gap: 16px;
-}
-
-/* 新增高亮样式 */
-:deep(.highlighted) {
-  color: red; /* 设置高亮文本为链接颜色 */
-}
-
-:deep(.arco-pagination) {
-  justify-content: end;
-}
-:deep(.arco-pagination-item-active) {
-  border-radius: 8px;
-  font-weight: 600;
-  background-color: var(--color-bg-1);
-}
-:deep(.arco-select-view-single) {
-  border-radius: 8px;
-  background-color: var(--color-bg-1);
-}
-</style>

+ 0 - 27
src/modules/ai-search/FileIcon.vue

@@ -1,27 +0,0 @@
-<template>
-  <img :src="icon_src" :alt="file_type" class="file-icon" />
-</template>
-
-<script setup>
-import { computed } from 'vue';
-
-const props = defineProps({
-  name: String
-});
-
-const getExtension = (name) => {
-  return name?.slice(name.lastIndexOf('.') + 1).toLowerCase() ?? '';
-};
-
-const icon_src = computed(() => {
-  return new URL(`../../assets/ai-search/${getExtension(props.name)}.svg`, import.meta.url).href;
-});
-</script>
-
-<style scoped>
-.file-icon {
-  width: 24px;
-  height: 24px;
-  background-color: var(--color-bg-1);
-}
-</style>

+ 0 - 61
src/modules/ai-search/MarkdownContent.vue

@@ -1,61 +0,0 @@
-<template>
-  <div class="markdown-content">
-    <div class="header">
-      <img src="../../assets/logo.png" alt="Logo" class="logo" />
-      <h3>{{ $t('ai_search.intelligent_answer') }}</h3>
-    </div>
-    <div v-if="content" v-html="html_content" class="content"></div>
-
-    <a-skeleton v-else class="content" :animation="true">
-      <a-space direction="vertical" :style="{ width: '100%' }" size="large">
-        <a-skeleton-line :rows="3" />
-      </a-space>
-    </a-skeleton>
-  </div>
-</template>
-
-<script setup>
-import { computed } from 'vue';
-import { marked } from 'marked';
-
-const props = defineProps({
-  content: String
-});
-
-const html_content = computed(() => {
-  return marked(props.content || '');
-});
-</script>
-
-<style scoped>
-.markdown-content {
-  padding: 0 16px;
-  border-radius: 8px;
-  background-color: var(--color-bg-1);
-  font-size: 14px;
-  color: var(--color-text-1);
-  box-shadow: 0 2px 8px #00000014;
-}
-
-.header {
-  display: flex;
-  align-items: center;
-  background-color: #e6f4ff23;
-  color: var(--color-text-1);
-  font-weight: 600;
-  font-size: 16px;
-  background: transparent;
-  border-bottom: 1px solid var(--color-neutral-3);
-  border-radius: 8px 8px 0 0;
-}
-
-.logo {
-  width: 32px;
-  height: 32px;
-  margin-right: 12px;
-}
-
-.content {
-  padding: 16px 0;
-}
-</style>

+ 0 - 542
src/modules/ai-search/MindMapping.vue

@@ -1,542 +0,0 @@
-<template>
-  <div v-show="!data && loading" class="progress">
-    <a-progress type="circle" width="250" stroke-width="10" :percent="progress / 100" :show-text="false" />
-    <h1>{{ `${progress}%` }}</h1>
-  </div>
-
-  <div ref="container" class="mindmap-container" />
-</template>
-
-<script setup>
-import MindMappingData from './MindMappingData.json';
-import { onMounted, watch, onUnmounted, ref } from 'vue';
-import { Rect, Text } from '@antv/g';
-import {
-  Badge,
-  BaseBehavior,
-  BaseNode,
-  BaseTransform,
-  CommonEvent,
-  CubicHorizontal,
-  ExtensionCategory,
-  Graph,
-  GraphEvent,
-  idOf,
-  NodeEvent,
-  positionOf,
-  register,
-  treeToGraphData
-} from '@antv/g6';
-
-const props = defineProps({
-  data: Object,
-  loading: Boolean
-});
-
-const container = ref(null);
-const progress = ref(0);
-const interval_ref = ref(null);
-
-const startProgress = () => {
-  interval_ref.value = setInterval(() => {
-    progress.value += Math.random() > 0.5 ? 3 : 2;
-    if (progress.value > 98) {
-      progress.value = 98; // 确保 progress 不会超过 98
-      clearInterval(interval_ref.value);
-    }
-  }, 1000);
-};
-
-onMounted(() => {
-  if (props.loading && !props.data) {
-    startProgress();
-  }
-});
-
-onUnmounted(() => {
-  clearInterval(interval_ref.value);
-});
-
-watch(
-  () => props.loading,
-  (new_loading) => {
-    if (new_loading && !props.data) {
-      startProgress();
-    } else {
-      clearInterval(interval_ref.value);
-    }
-  }
-);
-
-watch(
-  () => props.data,
-  (new_data) => {
-    if (new_data) {
-      initGraph(new_data);
-    }
-  }
-);
-// 定义样式
-const RootNodeStyle = {
-  fill: '#EFF0F0',
-  labelFill: '#262626',
-  labelFontSize: 24,
-  labelFontWeight: 600,
-  labelOffsetY: 8,
-  labelPlacement: 'center',
-  ports: [{ placement: 'right' }, { placement: 'left' }],
-  radius: 8
-};
-
-const NodeStyle = {
-  fill: 'transparent',
-  labelPlacement: 'center',
-  labelFontSize: 16,
-  ports: [{ placement: 'right-bottom' }, { placement: 'left-bottom' }]
-};
-
-const TreeEvent = {
-  COLLAPSE_EXPAND: 'collapse-expand',
-  ADD_CHILD: 'add-child'
-};
-
-let text_shape;
-
-const measureText = (text) => {
-  if (!text_shape) text_shape = new Text({ style: text });
-  text_shape.attr(text);
-  return text_shape.getBBox().width;
-};
-
-const getNodeWidth = (node_id, is_root) => {
-  const padding = is_root ? 40 : 30;
-  const node_style = is_root ? RootNodeStyle : NodeStyle;
-  return measureText({ text: node_id, fontSize: node_style.labelFontSize, fontFamily: 'Gill Sans' }) + padding;
-};
-
-const getNodeSize = (node_id, is_root) => {
-  const width = getNodeWidth(node_id, is_root);
-  const height = is_root ? 48 : 32;
-  return [width, height];
-};
-
-// 自定义节点类
-class MindmapNode extends BaseNode {
-  static defaultStyleProps = {
-    showIcon: true
-  };
-
-  constructor(options) {
-    Object.assign(options.style, MindmapNode.defaultStyleProps);
-    super(options);
-  }
-
-  get childrenData() {
-    return this.context.model.getChildrenData(this.id);
-  }
-
-  get rootId() {
-    return idOf(this.context.model.getRootsData()[0]);
-  }
-
-  isShowCollapse(attributes) {
-    const { collapsed, showIcon } = attributes;
-    return !collapsed && showIcon && this.childrenData.length > 0;
-  }
-
-  getCollapseStyle(attributes) {
-    const { color, direction } = attributes;
-    if (!this.isShowCollapse(attributes)) return false;
-    const [width, height] = this.getSize(attributes);
-
-    // TODO 有边框的小白点,stroke失效
-    return {
-      backgroundFill: color, // 设置为白色
-      backgroundHeight: 12, // 调整为小圆点的大小
-      backgroundWidth: 12, // 调整为小圆点的大小
-      cursor: 'pointer',
-      stroke: color, // 使用传入的颜色作为边框颜色
-      lineWidth: 4, // 设置边框宽度
-      fontSize: 0, // 不需要字体大小
-      text: '', // 移除文本
-      textAlign: 'center',
-      transform: [], // 移除旋转效果
-      visibility: 'visible',
-      x: direction === 'left' ? -6 : width + 6,
-      y: height
-    };
-  }
-
-  drawCollapseShape(attributes, container) {
-    const iconStyle = this.getCollapseStyle(attributes);
-    const btn = this.upsert('collapse-expand', Badge, iconStyle, container);
-    this.forwardEvent(btn, CommonEvent.CLICK, (event) => {
-      event.stopPropagation();
-      this.context.graph.emit(TreeEvent.COLLAPSE_EXPAND, {
-        id: this.id,
-        collapsed: !attributes.collapsed
-      });
-    });
-  }
-
-  getCountStyle(attributes) {
-    const { collapsed, color, direction } = attributes;
-    const count = this.context.model.getDescendantsData(this.id).length;
-    if (!collapsed || count === 0) return false;
-    const [width, height] = this.getSize(attributes);
-    return {
-      backgroundFill: color,
-      backgroundHeight: 12,
-      backgroundWidth: 12,
-      cursor: 'pointer',
-      fill: '#fff',
-      fontSize: 8,
-      text: count.toString(),
-      textAlign: 'center',
-      x: direction === 'left' ? -4 : width + 4,
-      y: height
-    };
-  }
-
-  drawCountShape(attributes, container) {
-    const countStyle = this.getCountStyle(attributes);
-    const btn = this.upsert('count', Badge, countStyle, container);
-
-    this.forwardEvent(btn, CommonEvent.CLICK, (event) => {
-      event.stopPropagation();
-      this.context.graph.emit(TreeEvent.COLLAPSE_EXPAND, {
-        id: this.id,
-        collapsed: false
-      });
-    });
-  }
-
-  getAddStyle(attributes) {
-    const { collapsed, showIcon, direction } = attributes;
-    const isLeaf = this.childrenData.length === 0; // 检查节点是否为叶子节点
-    if (collapsed || !showIcon || !isLeaf) return false; // 仅为叶子节点显示加号按钮
-    const [width, height] = this.getSize(attributes);
-
-    const offsetX = this.isShowCollapse(attributes) ? 24 : 12;
-    const isRoot = this.id === this.rootId;
-
-    return {
-      backgroundFill: '#1783FF',
-      backgroundHeight: 14,
-      backgroundLineWidth: 1,
-      backgroundStroke: '#1783FF',
-      backgroundWidth: 14,
-      cursor: 'pointer',
-      fill: '#fff',
-      fontSize: 14, // 调整字体大小以适应加号
-      text: '+', // 使用普通加号
-      textAlign: 'center',
-      x: isRoot ? width + 12 : direction === 'left' ? -offsetX : width + offsetX,
-      y: isRoot ? height / 2 : height
-    };
-  }
-
-  drawAddShape(attributes, container) {
-    const addStyle = this.getAddStyle(attributes);
-    const btn = this.upsert('add', Badge, addStyle, container);
-
-    this.forwardEvent(btn, CommonEvent.CLICK, (event) => {
-      event.stopPropagation();
-      this.context.graph.emit(TreeEvent.ADD_CHILD, { id: this.id, direction: attributes.direction });
-    });
-  }
-
-  forwardEvent(target, type, listener) {
-    if (target && !Reflect.has(target, '__bind__')) {
-      Reflect.set(target, '__bind__', true);
-      target.addEventListener(type, listener);
-    }
-  }
-
-  getKeyStyle(attributes) {
-    const [width, height] = this.getSize(attributes);
-    const keyShape = super.getKeyStyle(attributes);
-    return { width, height, ...keyShape };
-  }
-
-  drawKeyShape(attributes, container) {
-    const keyStyle = this.getKeyStyle(attributes);
-    return this.upsert('key', Rect, keyStyle, container);
-  }
-
-  render(attributes = this.parsedAttributes, container = this) {
-    super.render(attributes, container);
-
-    this.drawCollapseShape(attributes, container);
-    this.drawAddShape(attributes, container);
-
-    this.drawCountShape(attributes, container);
-  }
-}
-
-// 自定义边类
-class MindmapEdge extends CubicHorizontal {
-  get rootId() {
-    return idOf(this.context.model.getRootsData()[0]);
-  }
-
-  getKeyPath(attributes) {
-    const path = super.getKeyPath(attributes);
-    const isRoot = this.targetNode.id === this.rootId;
-    const labelWidth = getNodeWidth(this.targetNode.id, isRoot);
-
-    const [, tp] = this.getEndpoints(attributes);
-    const sign = this.sourceNode.getCenter()[0] < this.targetNode.getCenter()[0] ? 1 : -1;
-    return [...path, ['L', tp[0] + labelWidth * sign, tp[1]]];
-  }
-}
-
-// 自定义行为类
-class CollapseExpandTree extends BaseBehavior {
-  constructor(context, options) {
-    super(context, options);
-    this.bindEvents();
-  }
-
-  update(options) {
-    this.unbindEvents();
-    super.update(options);
-    this.bindEvents();
-  }
-
-  bindEvents() {
-    const { graph } = this.context;
-
-    // graph.on(NodeEvent.POINTER_ENTER, this.showIcon);
-    // graph.on(NodeEvent.POINTER_LEAVE, this.hideIcon);
-    graph.on(TreeEvent.COLLAPSE_EXPAND, this.onCollapseExpand);
-    graph.on(TreeEvent.ADD_CHILD, this.addChild);
-  }
-
-  unbindEvents() {
-    const { graph } = this.context;
-
-    // graph.off(NodeEvent.POINTER_ENTER, this.showIcon);
-    // graph.off(NodeEvent.POINTER_LEAVE, this.hideIcon);
-    graph.off(TreeEvent.COLLAPSE_EXPAND, this.onCollapseExpand);
-    graph.off(TreeEvent.ADD_CHILD, this.addChild);
-  }
-
-  status = 'idle';
-
-  showIcon = (event) => {
-    this.setIcon(event, true);
-  };
-
-  hideIcon = (event) => {
-    this.setIcon(event, false);
-  };
-
-  setIcon = (event, show) => {
-    if (this.status !== 'idle') return;
-    const { target } = event;
-    const id = target.id;
-    const { graph, element } = this.context;
-    graph.updateNodeData([{ id, style: { showIcon: show } }]);
-    element.draw({ animation: false, silence: true });
-  };
-
-  onCollapseExpand = async (event) => {
-    this.status = 'busy';
-    const { id, collapsed } = event;
-    const { graph } = this.context;
-    await graph.frontElement(id);
-    if (collapsed) await graph.collapseElement(id);
-    else await graph.expandElement(id);
-    this.status = 'idle';
-  };
-
-  addChild = async (event) => {
-    this.status = 'busy';
-    const {
-      onCreateChild = () => {
-        const currentTime = new Date(Date.now()).toLocaleString();
-        return { id: `新节点 in ${currentTime}` };
-      }
-    } = this.options;
-    const { graph } = this.context;
-    const datum = onCreateChild(event.id);
-    const parent = graph.getNodeData(event.id);
-
-    graph.addNodeData([datum]);
-    graph.addEdgeData([{ source: event.id, target: datum.id }]);
-    graph.updateNodeData([
-      {
-        id: event.id,
-        children: [...(parent.children || []), datum.id],
-        style: { collapsed: false, showIcon: false }
-      }
-    ]);
-    await graph.render();
-    await graph.focusElement(datum.id);
-    this.status = 'idle';
-  };
-}
-
-// 自定义变换类
-class AssignColorByBranch extends BaseTransform {
-  static defaultOptions = {
-    colors: [
-      '#80B4FF', // 淡蓝色
-      '#FFC8A2', // 淡橙色
-      '#E6C8FF', // 淡紫色
-      '#A2E6E6', // 淡青色
-      '#C8B4FF', // 淡紫色
-      '#FFD878', // 淡黄色
-      '#A2E680', // 淡绿色
-      '#FFA2D8', // 淡粉色
-      '#80C8D8', // 淡蓝色
-      '#80E6A2', // 淡绿色
-      '#FFD878', // 淡橙色
-      '#D880D8', // 淡紫色
-      '#80C880', // 淡绿色
-      '#FFA280', // 淡红色
-      '#80E6E6', // 淡青色
-      '#FFA2D8', // 淡粉色
-      '#C8C8D8', // 淡蓝色
-      '#FFC8C8', // 淡红色
-      '#FFD878', // 淡黄色
-      '#C8FF80' // 淡绿色
-    ] // 增加更多颜色以避免重复
-  };
-
-  constructor(context, options) {
-    super(context, Object.assign({}, AssignColorByBranch.defaultOptions, options));
-  }
-
-  beforeDraw(input) {
-    const nodes = this.context.model.getNodeData();
-    const edges = this.context.model.getEdgeData();
-
-    if (nodes.length === 0) return input;
-
-    let colorIndex = 0;
-
-    // 为每个节点分配一个独立的颜色
-    nodes.forEach((node) => {
-      node.style ||= {};
-      node.style.color = this.options.colors[colorIndex++ % this.options.colors.length];
-    });
-
-    // 为每条边分配颜色,颜色与目标节点的颜色一致
-    edges.forEach((edge) => {
-      const targetNode = nodes.find((node) => node.id === edge.target);
-      if (targetNode) {
-        edge.style ||= {};
-        edge.style.stroke = targetNode.style.color;
-      }
-    });
-
-    return input;
-  }
-}
-
-// 注册扩展
-register(ExtensionCategory.NODE, 'mindmap', MindmapNode);
-register(ExtensionCategory.EDGE, 'mindmap', MindmapEdge);
-register(ExtensionCategory.BEHAVIOR, 'collapse-expand-tree', CollapseExpandTree);
-register(ExtensionCategory.TRANSFORM, 'assign-color-by-branch', AssignColorByBranch);
-
-// 获取节点方向
-const getNodeSide = (node_data, parent_data) => {
-  if (!parent_data) return 'center';
-
-  const node_position_x = positionOf(node_data)[0];
-  const parent_position_x = positionOf(parent_data)[0];
-  return parent_position_x > node_position_x ? 'left' : 'right';
-};
-
-let mindmap = null;
-// 初始化图表
-const initGraph = (data) => {
-  if (mindmap) {
-    mindmap.destroy(); // 如果存在现有图表,则销毁
-  }
-
-  const root_id = data.id;
-  mindmap = new Graph({
-    container: container.value,
-    width: container.value?.clientWidth || 1000, // 画布宽度,默认值800
-    height: container.value?.clientHeight || 800, // 画布高度,默认值600
-    fitView: true, // 自动缩放以适应视图
-    fitCenter: true, // 自动居中
-    data: treeToGraphData(data),
-    node: {
-      type: 'mindmap',
-      style: function (d) {
-        const direction = getNodeSide(d, this.getParentData(idOf(d), 'tree'));
-        const is_root = idOf(d) === root_id;
-
-        return {
-          direction,
-          labelText: idOf(d),
-          size: getNodeSize(idOf(d), is_root),
-          labelFontFamily: 'Gill Sans',
-          labelBackground: true,
-          labelBackgroundFill: 'transparent',
-          labelPadding: direction === 'left' ? [2, 0, 10, 40] : [2, 40, 10, 0],
-          color: d.style.color,
-          ...(is_root ? RootNodeStyle : NodeStyle)
-        };
-      }
-    },
-    edge: {
-      type: 'mindmap',
-      style: {
-        lineWidth: 3,
-        stroke: function (data) {
-          return this.getNodeData(data.target).style.color || '#99ADD1';
-        }
-      }
-    },
-    layout: {
-      type: 'mindmap',
-      direction: 'H',
-      getHeight: () => 80,
-      getWidth: (node) => getNodeWidth(node.id, node.id === root_id),
-      getVGap: () => 6,
-      getHGap: () => 60,
-      animation: false,
-      // 新增配置项,使图表从左往右发散
-      getSide: () => 'right'
-    },
-    behaviors: ['drag-canvas', 'zoom-canvas', 'collapse-expand-tree'],
-    transforms: ['assign-color-by-branch'],
-    animation: {
-      duration: 200 // 动画时长,单位为毫秒
-    }
-  });
-
-  mindmap.once(GraphEvent.AFTER_RENDER, () => {
-    mindmap.fitView();
-  });
-
-  mindmap.render();
-};
-</script>
-
-<style scoped>
-.mindmap-container {
-  width: 100%;
-  height: 100%;
-}
-
-.progress {
-  margin-top: 5%;
-  position: relative;
-  text-align: center;
-}
-
-.progress h1 {
-  position: absolute;
-  top: 50%;
-  left: 50%;
-  transform: translate(-50%, -50%);
-  margin: 0;
-}
-</style>

+ 0 - 34
src/modules/ai-search/MindMappingData.json

@@ -1,34 +0,0 @@
-{
-  "id": "电力维修",
-  "children": [
-    {
-      "id": "电力维修的资质要求",
-      "children": [
-        {
-          "id": "资质等级",
-          "children": [
-            {
-              "id": "分为一级、二级、三级、四级和五级,五级是初级,一级资质最高"
-            }
-          ]
-        },
-        {
-          "id": "资质申请材料",
-          "children": [
-            {
-              "id": "包括许可证申请表、法人证明材料和净资产证明材料、主要设备及机具清单、经营场所证明材料、主要负责人的简历、专业技术任职资格证书等有关证明材料、工程技术人员、经济管理人员明细表及其专业技术任职资格证明文件、电工作业人员登记表"
-            }
-          ]
-        }
-      ]
-    },
-    {
-      "id": "申请材料提交",
-      "children": [
-        {
-          "id": "申请人确定申请事项并根据填报要求网上提交或提供书面申请材料"
-        }
-      ]
-    }
-  ]
-}

+ 0 - 38
src/modules/ai-search/PopoverImage.vue

@@ -1,38 +0,0 @@
-<template>
-  <a-popover>
-    <div class="image-aside-btn-container">
-      <img :src="src" class="image-aside-btn" />
-    </div>
-
-    <template #content>
-      <img :src="src" class="image-large-view" />
-    </template>
-  </a-popover>
-</template>
-<script setup>
-const props = defineProps({
-  src: String
-});
-</script>
-
-<style scoped>
-.image-aside-btn-container {
-  width: 90px;
-  max-height: 90px;
-  flex-shrink: 0;
-  overflow: hidden;
-
-  margin-right: 5px;
-}
-
-.image-aside-btn {
-  width: 100%;
-  height: 100%;
-  object-fit: cover;
-}
-
-.image-large-view {
-  max-width: 540px;
-  max-height: 540px;
-}
-</style>

+ 0 - 90
src/modules/ai-search/RetrievalDocuments.vue

@@ -1,90 +0,0 @@
-<template>
-  <a-collapse class="select-files-collapse">
-    <a-collapse-item :key="1">
-      <template #expand-icon="{ active }">
-        <img :src="expand_icon" :style="{ transform: active ? 'rotate(180deg)' : 'rotate(0deg)' }" />
-      </template>
-      <template #header>
-        <a-space>
-          {{ selected_document_ids.length }}/{{ documents?.length || 0 }} {{ $t('ai_search.selected_files') }}
-        </a-space>
-      </template>
-      <a-table
-        :data="documents"
-        @selection-change="onFileSelected"
-        :rowKey="'doc_id'"
-        :show-header="false"
-        :bordered="false"
-        :row-selection="row_selection"
-        v-model:selectedKeys="selected_keys"
-        :pagination="pagination"
-      >
-        <template #columns>
-          <a-table-column data-index="doc_name"></a-table-column>
-          <a-table-column data-index="count" width="80"></a-table-column>
-          <a-table-column width="80">
-            <template #cell="{ record }">
-              <a-tooltip :content="$t('ai_search.preview')">
-                <a-button type="text">
-                  <icon-eye />
-                </a-button>
-              </a-tooltip>
-            </template>
-          </a-table-column>
-        </template>
-      </a-table>
-
-      <!-- 组件位置 -->
-    </a-collapse-item>
-  </a-collapse>
-</template>
-
-<script setup>
-import { ref, reactive } from 'vue';
-import { useI18n } from 'vue-i18n';
-import expand_icon from '../../assets/ai-search/selected-files-collapse.svg';
-
-const { t } = useI18n();
-const emit = defineEmits('onFilesSelected');
-
-const props = defineProps({
-  documents: String
-});
-
-const selected_document_ids = ref([]);
-const selected_keys = ref([]);
-const row_selection = reactive({
-  type: 'checkbox',
-  showCheckedAll: true,
-  onlyCurrent: false
-});
-const pagination = { pageSize: 10 };
-
-const setSelectedDocumentIds = (document_ids) => {
-  selected_document_ids.value = document_ids;
-};
-
-const onFileSelected = (selected_row_keys) => {
-  emit('onFilesSelected', selected_row_keys);
-  setSelectedDocumentIds(selected_row_keys);
-};
-</script>
-
-<style scoped>
-.select-files-collapse {
-  border-radius: 8px;
-  overflow-y: auto;
-}
-
-:deep(.arco-collapse-item-header) {
-  padding-top: 12px;
-  padding-bottom: 12px;
-}
-:deep(.arco-collapse-item-content) {
-  background: var(--color-bg-1);
-  padding: 0 12px;
-}
-:deep(.arco-collapse-item-header-title) {
-  margin-left: 10px;
-}
-</style>

+ 0 - 64
src/modules/ai-search/Sidebar.vue

@@ -1,64 +0,0 @@
-<template>
-  <a-layout-sider width="18%">
-    <a-spin :loading="loading">
-      <template v-if="model_list.length">
-        <a-tree
-          class="tree"
-          :data="model_list"
-          checkable
-          :checked-keys="checked_list"
-          :selected-keys="selected_keys"
-          :field-names="{ title: 'name', key: 'id' }"
-          @check="onCheck"
-        />
-      </template>
-      <template v-else>
-        <div class="no-data">暂无数据</div>
-      </template>
-    </a-spin>
-  </a-layout-sider>
-</template>
-
-<script setup>
-import { ref, watch } from 'vue';
-
-const loading = ref(false);
-const checked_list = ref([]);
-const selected_keys = ref([]);
-const emit = defineEmits(['updateCheckedList']);
-const props = defineProps({
-  model_list: {
-    type: Array,
-    default: () => []
-  }
-});
-
-watch(
-  () => props.model_list,
-  (new_model_list) => {
-    checked_list.value = new_model_list.map((item) => item.id);
-  },
-  { immediate: true }
-);
-
-const onCheck = (checked_keys) => {
-  checked_list.value = checked_keys;
-  emit('updateCheckedList', checked_keys);
-};
-</script>
-
-<style scoped>
-.tree {
-  padding: 8px;
-  background-color: var(--color-bg-1);
-}
-:deep(.arco-spin) {
-  height: 100%;
-  width: 100%;
-}
-.no-data {
-  padding: 8px;
-  text-align: center;
-  color: var(--color-text-secondary);
-}
-</style>

+ 0 - 210
src/modules/ai-search/hooks.js

@@ -1,210 +0,0 @@
-import { ref, computed, onUnmounted } from 'vue';
-import { EventSourceParserStream } from 'eventsource-parser/stream';
-import { kuky_Authorization } from '../../base/storage';
-import { relatedQuestions, retrievalTest, queryMindmap } from '../../apis/ai-search';
-import { Message } from '../../3rd-libs/arco-vue-libs';
-import { useRoute } from 'vue-router';
-import { getConfigField } from '../../config/index';
-
-export function useTestChunkRetrieval() {
-  const data = ref({ chunks: [], documents: [], total: 0 });
-  const loading = ref(false);
-
-  const route = useRoute();
-  const knowledge_base_id = route?.query?.id || '';
-
-  const { getFileUrl } = useGetFileUrl();
-
-  const testChunk = async (values) => {
-    loading.value = true;
-    try {
-      const { data: response_data, code } = await retrievalTest({
-        ...values,
-        kb_id: values.kb_id ?? knowledge_base_id
-      });
-      if (code === 0) {
-        data.value = {
-          chunks: response_data.chunks.map((chunk) => ({
-            ...chunk,
-            image_url: getFileUrl(chunk.image_id, 'image')
-          })),
-          documents: response_data.doc_aggs,
-          total: response_data.total
-        };
-      } else {
-        data.value = { chunks: [], documents: [], total: 0 };
-      }
-    } catch (error) {
-      data.value = { chunks: [], documents: [], total: 0 };
-      Message.error('检索失败');
-    } finally {
-      loading.value = false;
-    }
-  };
-
-  return {
-    chunks_data: computed(() => data.value),
-    loading: computed(() => loading.value),
-    testChunk
-  };
-}
-
-export function useFetchRelatedQuestions() {
-  const data = ref([]);
-  const loading = ref(false);
-
-  const fetchRelatedQuestions = async (question) => {
-    loading.value = true;
-    try {
-      const { data: response_data } = await relatedQuestions({ question });
-      data.value = response_data?.slice(0, 5) ?? [];
-    } catch (error) {
-      Message.error(error.message);
-    } finally {
-      loading.value = false;
-    }
-  };
-
-  return {
-    data,
-    loading,
-    fetchRelatedQuestions
-  };
-}
-
-export function useSendMessageWithSse() {
-  const answer = ref({});
-  const done = ref(true);
-  const timer = ref(null);
-
-  const resetAnswer = () => {
-    if (timer.value) {
-      clearTimeout(timer.value);
-    }
-    timer.value = setTimeout(() => {
-      answer.value = {};
-      clearTimeout(timer.value);
-    }, 1000);
-  };
-
-  const send = async (body, controller) => {
-    try {
-      done.value = false;
-      const token = kuky_Authorization.get();
-
-      // 动态获取基础 URL,根据环境变量决定使用哪个 URL
-      const base_url = import.meta.env.MODE === 'production' ? getConfigField('RGFLOW_BASE_URL') : '/rgflow';
-      const request_url = `${base_url}/v1/conversation/ask`;
-
-      const response = await fetch(request_url, {
-        method: 'POST',
-        headers: {
-          Authorization: `Bearer ${token}`,
-          'Content-Type': 'application/json'
-        },
-        body: JSON.stringify(body),
-        signal: controller?.signal
-      });
-
-      const res = response.clone().json();
-
-      const reader = response?.body
-        ?.pipeThrough(new TextDecoderStream())
-        .pipeThrough(new EventSourceParserStream())
-        .getReader();
-
-      while (true) {
-        const x = await reader?.read();
-        if (x) {
-          const { done: reader_done, value } = x;
-          if (reader_done) {
-            console.info('done');
-            resetAnswer();
-            break;
-          }
-          try {
-            const val = JSON.parse(value?.data || '');
-            const d = val?.data;
-            if (typeof d !== 'boolean') {
-              answer.value = {
-                ...d,
-                conversation_id: body?.conversation_id
-              };
-            }
-          } catch (e) {
-            console.warn(e);
-          }
-        }
-      }
-      console.info('done?');
-      done.value = true;
-      resetAnswer();
-      return { data: await res, response };
-    } catch (e) {
-      done.value = true;
-      resetAnswer();
-      console.warn(e);
-    }
-  };
-
-  onUnmounted(() => {
-    if (timer.value) {
-      clearTimeout(timer.value);
-    }
-  });
-
-  return { send, answer, done, resetAnswer };
-}
-
-export function useQueryMindmap() {
-  const data = ref(null);
-  const loading = ref(false);
-
-  const fetchMindmap = async (params) => {
-    loading.value = true;
-    try {
-      const { data: response_data } = await queryMindmap(params);
-      data.value = response_data;
-    } catch (error) {
-      Message.error('获取思维导图失败');
-    } finally {
-      loading.value = false;
-    }
-  };
-
-  return {
-    data,
-    loading,
-    fetchMindmap
-  };
-}
-
-export function useGetFileUrl() {
-  const getFileUrl = (file_id, file_type) => {
-    if (!file_id || !file_type) {
-      return '';
-    }
-
-    const server_url = getConfigField('RGFLOW_BASE_URL');
-    let url = '';
-
-    switch (file_type) {
-      case 'doc':
-      case 'docx':
-        url = `${server_url}/document/${file_id}?ext=docx&prefix=document`;
-        break;
-      case 'pdf':
-        url = `${server_url}/v1/document/get/${file_id}`;
-        break;
-      case 'image':
-        url = `${server_url}/v1/document/image/${file_id}`;
-        break;
-      default:
-        url = '';
-    }
-
-    return url;
-  };
-
-  return { getFileUrl };
-}

+ 0 - 327
src/modules/ai-search/index.vue

@@ -1,327 +0,0 @@
-<template>
-  <div class="ai-search-container">
-    <Sidebar :model_list="model_list" @updateCheckedList="handleUpdateCheckedList" />
-    <div class="content-box" :class="{ 'search-active': search_active }">
-      <a-input-search
-        class="input-search"
-        v-model="search_query"
-        :placeholder="$t('ai_search.placeholder')"
-        search-button
-        :loading="sending_loading"
-        @press-enter="onPressEnter"
-        @search="onSearch"
-      />
-      <transition name="fade">
-        <div v-if="search_active" class="search-results">
-          <MarkdownContent :content="answer?.answer" />
-          <a-divider />
-          <RetrievalDocuments
-            :documents="chunks_data.documents"
-            :selected_document_ids="selected_document_ids"
-            @onFilesSelected="handleTestChunk"
-          />
-          <a-divider />
-          <ChunkList
-            :chunks="chunks_data.chunks"
-            :total="chunks_data.total"
-            :highlight_word="search_query"
-            :loading="chunk_list_loading"
-            @clickDocumentButton="handleDocumentClick"
-            @pageChange="handlePageChange"
-            @pageSizeChange="handlePageSizeChange"
-          />
-          <a-divider />
-          <a-card v-if="related_questions_data?.length > 0" :title="$t('ai_search.related_questions')">
-            <a-space wrap>
-              <a-tag
-                v-for="(question, index) in related_questions_data"
-                :key="index"
-                @click="handleClickRelatedQuestion(question)"
-                class="related-question-tag"
-              >
-                {{ question }}
-              </a-tag>
-            </a-space>
-          </a-card>
-          <a-divider />
-          <a-button class="floating-btn" shape="circle" @click="handleFloatingBtnClick">
-            <icon-attachment size="32" />
-          </a-button>
-        </div>
-      </transition>
-    </div>
-  </div>
-
-  <a-drawer v-model:visible="drawer_visible" :title="drawer_title" :width="drawer_width" :footer="false">
-    <MindMapping v-if="drawer_type === 'mindmap'" :loading="mindmap_loading" :data="mindmap_data" />
-    <ViewerPDFFromUrl v-if="drawer_type === 'pdf'" :url="file_info.drawer_url" :doc_width="drawer_width - 20"
-    :positions="file_info.positions"" />
-    <ViewerDocxFromUrl v-if="drawer_type === 'doc'" :url="file_info.drawer_url" :doc_width="drawer_width - 20" />
-  </a-drawer>
-</template>
-<script setup>
-import { ref, watch, onMounted, reactive } from 'vue';
-import Sidebar from './Sidebar.vue';
-import RetrievalDocuments from './RetrievalDocuments.vue';
-import MarkdownContent from './MarkdownContent.vue';
-import MindMapping from './MindMapping.vue';
-import ChunkList from './ChunkList.vue';
-import { IconAttachment } from '@arco-design/web-vue/es/icon';
-import { QueryAllKnowledgeList } from '../../apis/permission/common';
-import ViewerPDFFromUrl from '../../modules/viewer-pdf/ViewerPDFFromUrl.vue';
-import ViewerDocxFromUrl from '../../modules/viewer-docx/ViewerDocxFromUrl.vue';
-import {
-  useSendMessageWithSse,
-  useTestChunkRetrieval,
-  useFetchRelatedQuestions,
-  useGetFileUrl,
-  useQueryMindmap
-} from './hooks';
-import { isEmpty, trim } from 'lodash-es';
-import { Message } from '../../3rd-libs/arco-vue-libs';
-import { useI18n } from 'vue-i18n';
-
-const { t } = useI18n();
-const search_query = ref('');
-const search_active = ref(false);
-const drawer_visible = ref(false);
-const drawer_width = ref(1000);
-const drawer_title = ref(t('ai_search.mindmap_title'));
-const sending_loading = ref(false);
-const is_first_render = ref(true);
-const selected_document_ids = ref([]);
-const pagination = reactive({
-  page: 1,
-  page_size: 10
-});
-const chunk_list_loading = ref(false);
-const model_list = ref([]);
-const selected_knowledge_base_ids = ref([]);
-
-const drawer_type = ref(''); // file, mindmap, pdf, doc
-
-const file_info = reactive({
-  doc_id: '',
-  doc_name: '',
-  drawer_url: '',
-  image_url: '',
-  positions: []
-});
-
-const fetchInitialData = async () => {
-  try {
-    const {
-      data: { rows }
-    } = await QueryAllKnowledgeList();
-    model_list.value = rows;
-    selected_knowledge_base_ids.value = rows.map((row) => row.id);
-  } catch (error) {
-    console.error(error);
-  }
-};
-
-onMounted(fetchInitialData);
-
-const { send, answer, done } = useSendMessageWithSse();
-const { chunks_data, testChunk } = useTestChunkRetrieval();
-const { fetchRelatedQuestions, data: related_questions_data } = useFetchRelatedQuestions();
-const { data: mindmap_data, loading: mindmap_loading, fetchMindmap } = useQueryMindmap();
-const { getFileUrl } = useGetFileUrl();
-
-const sendQuestion = async (question) => {
-  const q = trim(question);
-  if (isEmpty(q)) return;
-
-  chunks_data.value = { documents: [], chunks: [] };
-  selected_document_ids.value = [];
-  related_questions_data.value = [];
-
-  is_first_render.value = false;
-  sending_loading.value = true;
-  send({ kb_ids: selected_knowledge_base_ids.value, question: q });
-  testChunk({
-    kb_id: selected_knowledge_base_ids.value,
-    highlight: true,
-    question: q,
-    page: 1,
-    size: pagination.page_size
-  });
-
-  await fetchRelatedQuestions(q);
-};
-
-const handleClickRelatedQuestion = (question) => {
-  if (sending_loading.value) return;
-  search_query.value = question;
-  sendQuestion(question);
-};
-
-const handleTestChunk = async (document_ids, page = 1, size = 10) => {
-  const q = trim(search_query.value);
-  if (sending_loading.value || isEmpty(q)) return;
-
-  chunk_list_loading.value = true;
-  await testChunk({
-    kb_id: selected_knowledge_base_ids.value,
-    highlight: true,
-    question: q,
-    doc_ids: document_ids ?? selected_document_ids.value,
-    page,
-    size
-  });
-  chunk_list_loading.value = false;
-};
-
-watch(done, (newDone) => {
-  if (newDone) sending_loading.value = false;
-});
-
-const handleDocumentClick = (item) => {
-  const { doc_id, docnm_kwd: doc_name, image_id, positions } = item;
-
-  drawer_title.value = doc_name;
-  drawer_visible.value = true;
-
-  const doc_type = doc_name.split('.').pop().toLowerCase();
-
-  file_info.doc_id = doc_id;
-  file_info.doc_name = doc_name;
-  file_info.drawer_url = getFileUrl(doc_id, doc_type);
-  file_info.image_url = getFileUrl(image_id, 'image');
-  file_info.positions = positions;
-
-  switch (doc_type) {
-    case 'pdf':
-      drawer_type.value = 'pdf';
-      break;
-    case 'doc':
-    case 'docx':
-      drawer_type.value = 'doc';
-      break;
-  }
-};
-
-const handleFloatingBtnClick = () => {
-  drawer_title.value = t('ai_search.mindmap_title');
-  drawer_type.value = 'mindmap';
-  drawer_visible.value = true;
-  fetchMindmap({ question: search_query.value, kb_ids: selected_knowledge_base_ids.value });
-};
-
-const handleUpdateCheckedList = (newCheckedList) => {
-  selected_knowledge_base_ids.value = newCheckedList;
-};
-
-const onSearch = (value) => {
-  const trimmedValue = trim(value);
-  if (isEmpty(trimmedValue)) {
-    Message.warning(t('ai_search.enter_search_content'));
-    return;
-  }
-
-  sendQuestion(trimmedValue);
-  search_active.value = true;
-};
-// 回车事件
-const onPressEnter = (event) => {
-  onSearch(event.target.value);
-};
-
-const handlePageChange = (page) => {
-  pagination.page = page;
-  handleTestChunk(selected_document_ids.value, page, pagination.page_size);
-};
-
-const handlePageSizeChange = (page_size) => {
-  pagination.page_size = page_size;
-  handleTestChunk(selected_document_ids.value, pagination.page, page_size);
-};
-</script>
-
-<style scoped>
-.ai-search-container {
-  display: flex;
-  height: 100%;
-}
-
-.content-box {
-  width: 100%;
-  padding: 16px;
-  overflow-y: auto;
-  padding: 20px 15% 10px;
-  transition: padding-top 0.3s ease;
-  line-height: 1.6;
-  letter-spacing: 0.5px;
-}
-
-.content-box.search-active {
-  padding-top: 10px;
-}
-
-.input-search {
-  margin-top: 20%;
-  text-align: center;
-  transition: margin-top 0.3s ease;
-}
-
-.content-box.search-active .input-search {
-  margin-top: 0;
-}
-
-.search-results {
-  margin-top: 20px;
-}
-
-:deep(.arco-input-wrapper) {
-  height: 50px;
-  border-top-left-radius: 18px;
-  border-bottom-left-radius: 18px;
-  background-color: var(--color-bg-5);
-}
-
-:deep(.arco-input-search-btn) {
-  width: 50px;
-  height: 50px;
-  border-top-right-radius: 18px;
-  border-bottom-right-radius: 18px;
-}
-
-.fade-enter-active,
-.fade-leave-active {
-  transition: opacity 0.3s ease;
-}
-
-.fade-enter,
-.fade-leave-to {
-  opacity: 0;
-}
-
-.floating-btn {
-  position: fixed;
-  top: 240px;
-  right: 20px;
-  width: 60px;
-  height: 60px;
-  background-color: var(--color-bg-5);
-  border-radius: 50%;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
-  cursor: pointer;
-  transition: transform 0.3s ease;
-}
-
-.floating-btn:hover {
-  transform: scale(1.1);
-}
-
-.related-question-tag {
-  cursor: pointer;
-  transition: background-color 0.3s ease;
-}
-
-.related-question-tag:hover {
-  background-color: var(--color-neutral-4);
-}
-</style>

+ 0 - 39
src/modules/answer-refference/AsideImage.vue

@@ -1,39 +0,0 @@
-<template>
-  <a-popover>
-    <div class="image-aisde-btn-container">
-      <img :src="src" class="image-aside-btn" />
-    </div>
-
-    <template #content>
-      <img :src="src" class="image-large-view" />
-    </template>
-  </a-popover>
-</template>
-<script setup>
-import { ref, computed } from 'vue';
-
-const props = defineProps({
-  src: String
-});
-</script>
-
-<style scoped>
-.image-aisde-btn-container {
-  width: 120px;
-  max-height: 120px;
-  flex-shrink: 0;
-  overflow: hidden;
-
-  margin-right: 5px;
-}
-
-.image-aside-btn {
-  width: 120px;
-  max-height: 120px;
-}
-
-.image-large-view {
-  max-width: 540px;
-  max-height: 540px;
-}
-</style>

+ 0 - 37
src/modules/answer-refference/DownloadFileItem.vue

@@ -1,37 +0,0 @@
-<template>
-  <FileItemDocDownload :file="file" />
-</template>
-<script setup>
-import { defineComponent, inject, ref, useTemplateRef, onMounted, computed } from 'vue';
-
-import FileItemDocDownload from '../file-preview/FileItemDocDownload.vue';
-
-const props = defineProps({
-  file: Object
-});
-
-onMounted(() => {});
-</script>
-
-<style scoped>
-.refference-content {
-  display: flex;
-  justify-content: space-between;
-  align-items: flex-start;
-}
-.refference-description {
-  flex-grow: 1;
-}
-
-.ref-text-content {
-  max-width: 460px;
-  max-height: 340px;
-  overflow-y: auto;
-}
-</style>
-<style>
-.arco-drawer-container[data-flag='doc-ref-effect-contaienr'] .arco-drawer-body {
-  overflow: hidden;
-  padding: 0;
-}
-</style>

+ 0 - 37
src/modules/answer-refference/DownloadFileList.vue

@@ -1,37 +0,0 @@
-<template>
-  <DownloadFileItem v-for="(item, index) of files" :key="index" :file="item" />
-</template>
-<script setup>
-import { defineComponent, inject, ref, useTemplateRef, onMounted, computed } from 'vue';
-
-import DownloadFileItem from './DownloadFileItem.vue';
-
-const props = defineProps({
-  files: Array
-});
-
-onMounted(() => {});
-</script>
-
-<style scoped>
-.refference-content {
-  display: flex;
-  justify-content: space-between;
-  align-items: flex-start;
-}
-.refference-description {
-  flex-grow: 1;
-}
-
-.ref-text-content {
-  max-width: 460px;
-  max-height: 340px;
-  overflow-y: auto;
-}
-</style>
-<style>
-.arco-drawer-container[data-flag='doc-ref-effect-contaienr'] .arco-drawer-body {
-  overflow: hidden;
-  padding: 0;
-}
-</style>

+ 0 - 346
src/modules/answer-refference/RefferenceDocDetail.vue

@@ -1,346 +0,0 @@
-<template>
-  <main>
-    <div class="left">
-      <header>
-        <div @click="goBack"><icon-left style="margin-right: 5px" />{{ $t('conversation.back') }}</div>
-      </header>
-      <!-- <div>
-        <div style="background-color: rgb(255, 110, 110)">{{ userName?.slice(0, 1) }}</div>
-        <p>{{ targetDocument.question }}</p>
-      </div> -->
-
-      <p>
-        <span>{{ $t('conversation.related_docs') }}</span>
-        <span>{{ $t('conversation.doc_total', { total: list.length }) }}</span>
-      </p>
-      <section>
-        <div
-          :class="[item.doc_id === target_doc_id ? 'activeBox' : '']"
-          v-for="(item, key) in list"
-          :key="key"
-          @click="handelChangePdf(item)"
-        >
-          <div>
-            <img src="./icon.svg" />
-          </div>
-          <div>
-            <p>{{ item.doc_name }}</p>
-            <p>{{ item.desc }}</p>
-            <span>
-              <b>{{ $t('conversation.fragments') }}</b>
-              <em></em>
-            </span>
-            <div
-              :class="[frag.chunk_id === target_chunk_id ? 'activeLink' : '']"
-              v-for="(frag, index) in item.fragments"
-              :key="index"
-              @click.stop="handlerClickFragment(frag)"
-            >
-              <span>{{ index + 1 }}.</span>
-              {{ frag.content }}
-            </div>
-          </div>
-        </div>
-      </section>
-    </div>
-
-    <div class="right" ref="pdfFather">
-      <template v-if="showPdfViewer">
-        <ViewerPDFFromUrl
-          v-if="target_doc_type === 'pdf'"
-          ref="pdfViewer"
-          class="pdf-viewer"
-          :url="target_doc_url"
-          :doc_width="DOC_WIDTH"
-          :positions="positions"
-        >
-        </ViewerPDFFromUrl>
-
-        <ViewerDocxFromUrl
-          v-if="target_doc_type === 'doc'"
-          ref="pdfViewer"
-          class="pdf-viewer"
-          :url="target_doc_url"
-          :doc_width="DOC_WIDTH"
-          :positions="positions"
-        >
-        </ViewerDocxFromUrl>
-      </template>
-    </div>
-  </main>
-</template>
-<script setup>
-import { onMounted, ref } from 'vue';
-
-import ViewerPDFFromUrl from '../viewer-pdf/ViewerPDFFromUrl.vue';
-import ViewerDocxFromUrl from '../viewer-docx/ViewerDocxFromUrl.vue';
-
-import { getDocumentUrl } from './document';
-
-const props = defineProps({
-  targetDocument: Object
-});
-
-/**
- * 文档类别:doc/pdf
- */
-const getDocType = (doc_name) => {
-  if (!doc_name) {
-    return '';
-  }
-
-  const arr = doc_name.split('.');
-  const len = arr.length;
-  const end_fix = arr[len - 1];
-
-  if (end_fix === 'pdf') {
-    return 'pdf';
-  }
-
-  if (end_fix === 'docx' || end_fix === 'doc') {
-    return 'doc';
-  }
-
-  return '';
-};
-
-const emit = defineEmits(['back']);
-
-const list = ref([]);
-const showPdfViewer = ref(false);
-const positions = ref([]);
-const pdfFather = ref(null);
-const DOC_WIDTH = ref(1100);
-
-const target_doc_url = ref('');
-const target_doc_type = ref('');
-
-let target_doc_id = ref(props.targetDocument.id);
-let target_chunk_id = ref('');
-
-target_doc_url.value = getDocumentUrl(props.targetDocument.id);
-target_doc_type.value = getDocType(props.targetDocument.doc_name);
-
-const pdfViewer = ref(null);
-const docData = props.targetDocument;
-
-list.value = docData.doc_aggs.map((item) => {
-  return {
-    ...item,
-    fragments: docData.chunks.filter((chunk) => chunk.document_name === item.doc_name),
-    desc: docData.chunks.filter((chunk) => chunk.document_name === item.doc_name)[0]?.content
-  };
-});
-
-const goBack = () => {
-  emit('back');
-};
-
-const handelChangePdf = (item) => {
-  if (item.doc_id !== target_doc_id.value) {
-    target_doc_url.value = getDocumentUrl(item.doc_id);
-    target_doc_type.value = getDocType(item.doc_name);
-
-    target_doc_id.value = item.doc_id;
-    target_chunk_id.value = '';
-    readLoadPdf();
-  }
-};
-
-const handlerClickFragment = (frag) => {
-  target_chunk_id.value = frag.id;
-  if (frag.document_id !== target_doc_id.value) {
-    target_doc_url.value = getDocumentUrl(frag.document_id);
-    target_doc_type.value = getDocType(frag.document_name);
-
-    target_doc_id.value = frag.document_id;
-    readLoadPdf();
-  }
-
-  positions.value = [...frag.positions] || [];
-
-  if (target_doc_type.value === 'pdf') {
-    if (frag.positions && frag.positions.length) {
-      pdfViewer.value.toPageIndex(positions.value[0][0], positions.value);
-    }
-  }
-};
-
-// 切换问答需要重新加载pdf
-const readLoadPdf = () => {
-  positions.value = [];
-  showPdfViewer.value = false;
-  setTimeout(() => {
-    showPdfViewer.value = true;
-  });
-};
-
-onMounted(() => {
-  DOC_WIDTH.value = pdfFather.value.getBoundingClientRect().width;
-
-  const target_doc = props.targetDocument;
-  const doc_id = target_doc.doc_id;
-  const doc_name = target_doc.doc_name;
-
-  // const doc_id = props.targetDocument.doc_id;
-  target_doc_url.value = getDocumentUrl(doc_id);
-  target_doc_type.value = getDocType(doc_name);
-
-  showPdfViewer.value = true;
-});
-</script>
-
-<style scoped>
-main {
-  display: flex;
-  height: 100%;
-}
-main > div {
-  height: 100%;
-}
-main > div.right {
-  flex: 1;
-  width: calc(100% - 460px);
-  position: relative;
-}
-main > div.right .pdf-viewer {
-  width: 100%;
-}
-main > div.left {
-  width: 460px;
-  padding: 20px 0 20px 20px;
-  /* background: #e2e4eb; */
-  background-color: var(--color-fill-2);
-  color: var(--color-text-1);
-  display: flex;
-  flex-direction: column;
-  /* height: calc(100vh - 48px - 65px); */
-  height: calc(100vh - 48px - 117px);
-}
-main > div.left > header {
-  padding-right: 20px;
-  margin-bottom: 10px;
-}
-main > div.left > header > div {
-  cursor: pointer;
-  font-weight: bold;
-}
-main > div.left > header > div:hover {
-  color: #00aea3;
-}
-main > div.left > div {
-  display: flex;
-  gap: 20px;
-  padding: 20px 20px 20px 0;
-}
-main > div.left > div > div {
-  width: 40px;
-  height: 40px;
-  border-radius: 20px;
-  display: flex;
-  align-items: center;
-  justify-content: center;
-  color: #fff;
-}
-main > div.left > div > p {
-  /* background: #f6f8ff; */
-  /* background-color: var(--color-bg-1); */
-  border-radius: 0 12px 12px 12px;
-  padding: 16px 16px;
-  font-size: 16px;
-  line-height: 1.6;
-}
-main > div.left > p {
-  display: flex;
-  justify-content: space-between;
-  color: #727376;
-  margin-bottom: 20px;
-  padding-right: 20px;
-}
-main > div.left > section {
-  flex: 1;
-  overflow-y: auto;
-  padding-right: 20px;
-}
-main > div.left > section > div {
-  /* background: #fff; */
-  background-color: var(--color-bg-1);
-  border-radius: 8px;
-  padding: 12px;
-  margin-bottom: 16px;
-  cursor: pointer;
-  gap: 5px;
-  display: flex;
-  border: 2px solid transparent;
-}
-main > div.left > section > div:hover,
-main > div.left > section > div.active {
-  border: 2px solid #00aea3;
-}
-main > div.left > section > div > div > img {
-  margin-top: 5px;
-}
-main > div.left > section > div > div > p:nth-child(1) {
-  font-size: 16px;
-  line-height: 28px;
-  font-weight: bold;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-line-clamp: 2;
-  margin-bottom: 8px;
-}
-main > div.left > section > div > div > p:nth-child(2) {
-  font-size: 16px;
-  line-height: 28px;
-  overflow: hidden;
-  text-overflow: ellipsis;
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-line-clamp: 3;
-}
-main > div.left > section > div > div > span {
-  display: flex;
-  align-items: center;
-  gap: 12px;
-  margin: 12px 0;
-}
-main > div.left > section > div > div > span > b {
-  font-style: normal;
-  color: #aaa;
-  font-size: 13px;
-}
-main > div.left > section > div > div > span > em {
-  flex: 1;
-  height: 1px;
-  background: #e3e3e3;
-}
-main > div.left > section > div > div > div {
-  overflow: hidden;
-  white-space: nowrap;
-  text-overflow: ellipsis;
-  margin-bottom: 10px;
-  font-size: 13px;
-  line-height: 18px;
-  width: 300px;
-  cursor: pointer;
-}
-main > div.left > section > div > div > div:hover,
-main > div.left > section > div > div > div.active {
-  color: #00aea3;
-}
-main > div.left > section > div > div > div span {
-  margin-right: 5px;
-}
-main .activeBox {
-  border: 3px solid #00aea3 !important;
-}
-main .activeLink {
-  color: #00aea3 !important;
-}
-
-.right {
-  height: calc(100vh - 48px - 65px);
-}
-</style>

+ 0 - 173
src/modules/answer-refference/RefferenceFileBlocks.vue

@@ -1,173 +0,0 @@
-<template>
-  <div>
-    <header class="client-formated-markdown-element-item client-formated-markdown-refference-header">
-      <div>{{ $t('conversation.source') }}</div>
-
-      <div class="btn-show-related-all" @click="showAllRelated">
-        {{ $t('conversation.view_links') }} <icon-double-right />
-      </div>
-    </header>
-
-    <RefferenceFileNameList :document_list="document_list" @showDocDetail="handleShowDocDetail" />
-
-    <a-drawer
-      :width="'90%'"
-      :height="340"
-      :visible="visible"
-      :placement="position"
-      data-flag="reffernce-file-block-drawer"
-      :ok-text="$t('conversation.btn_ok')"
-      :cancel-text="$t('conversation.btn_cancel')"
-      @ok="handleOk"
-      @cancel="handleCancel"
-      unmountOnClose
-    >
-      <template #title> {{ $t('conversation.doc_details') }} </template>
-
-      <div>
-        <RefferenceDocDetail :targetDocument="targetDocument" @back="handleBackQA" />
-      </div>
-    </a-drawer>
-  </div>
-</template>
-
-<script setup>
-import { ref, computed } from 'vue';
-
-import RefferenceFileNameList from './RefferenceFileNameList.vue';
-
-import RefferenceDocDetail from './RefferenceDocDetail.vue';
-
-const props = defineProps({
-  doc_aggs: Array,
-  chunks: Array
-});
-
-const visible = ref(false);
-const position = ref('right');
-
-const document_list = computed(() => {
-  const doc_list = props.doc_aggs;
-  const chunks = props.chunks;
-
-  const res_list = [];
-
-  if (Array.isArray(doc_list)) {
-    const len = doc_list.length;
-    for (let i = 0; i < len; i++) {
-      if (i >= 3) {
-        break;
-      }
-
-      const doc = doc_list[i];
-
-      const res_doc = {
-        doc_id: doc.doc_id,
-        doc_name: doc.doc_name,
-        count: doc.count,
-        page: i
-      };
-
-      const cur_doc_id = doc.doc_id;
-
-      const cur_doc_peaces = [];
-      if (chunks && Array.isArray(chunks)) {
-        chunks.forEach((item, index) => {
-          const chunk_doc_id = item.document_id;
-
-          if (cur_doc_id === chunk_doc_id) {
-            cur_doc_peaces.push(item.content);
-          }
-        });
-      }
-
-      res_doc.content_ltks = cur_doc_peaces;
-
-      res_list.push(res_doc);
-    }
-  }
-
-  return res_list;
-});
-
-/**
- * 目标数据
- */
-const targetDocument = ref({
-  doc_aggs: props.doc_aggs,
-  chunks: props.chunks
-});
-
-const handleClick = () => {
-  visible.value = true;
-};
-const handleOk = () => {
-  visible.value = false;
-};
-const handleCancel = () => {
-  visible.value = false;
-};
-
-const handleShowDocDetail = (item) => {
-  // TODO:组装参数数据
-  const cur_tar = targetDocument.value;
-
-  const obj = {
-    doc_aggs: cur_tar.doc_aggs,
-    chunks: cur_tar.chunks,
-    doc_id: item.doc_id,
-    doc_name: item.doc_name,
-    count: item.count,
-    content_ltks: item.content_ltks
-  };
-
-  targetDocument.value = obj;
-
-  // 展示文档详情
-  handleClick();
-};
-
-/**
- * 显示第一个
- */
-const showAllRelated = () => {
-  const item = document_list.value[0];
-
-  const cur_tar = targetDocument.value;
-
-  const obj = {
-    doc_aggs: cur_tar.doc_aggs,
-    chunks: cur_tar.chunks,
-    doc_id: item.doc_id,
-    doc_name: item.doc_name,
-    count: item.count,
-    content_ltks: item.content_ltks
-  };
-
-  targetDocument.value = obj;
-
-  handleClick();
-};
-
-// 返回
-const handleBackQA = () => {
-  handleCancel();
-};
-</script>
-
-<style scoped>
-.btn-show-related-all {
-  cursor: pointer;
-}
-
-.btn-show-related-all:hover {
-  color: #00aea3;
-}
-</style>
-
-<style>
-div.arco-drawer-container[data-flag='reffernce-file-block-drawer'] .arco-drawer-body {
-  height: calc(100vh - 48px - 65px);
-  overflow: hidden;
-}
-</style>

+ 0 - 93
src/modules/answer-refference/RefferenceFileNameContentLinks.vue

@@ -1,93 +0,0 @@
-<template>
-  <div class="knowledge-detail">
-    <div class="knowledge-content">
-      <div v-for="(content, index) in content_ltks" :key="content">
-        <div v-if="active_index === index">{{ content }}</div>
-      </div>
-    </div>
-
-    <div class="knowledge-footer">
-      <p>{{ $t('conversation.fragments') }}</p>
-
-      <p>
-        <span
-          v-for="(content, contentIndex) in content_ltks"
-          class="knowledge-page-item"
-          :key="contentIndex"
-          :class="{ active: active_index === contentIndex }"
-          @click="handleActive(contentIndex)"
-        >
-          {{ contentIndex + 1 }}
-        </span>
-      </p>
-
-      <div class="show-detail-btn" @click="goKnowledge(knowledge)">{{ $t('conversation.view_details') }}></div>
-    </div>
-  </div>
-</template>
-
-<script setup>
-import { defineComponent, ref, onBeforeUnmount, onMounted, reactive, nextTick, inject } from 'vue';
-
-const props = defineProps({
-  // page: Number,
-  content_ltks: Array
-});
-
-const active_index = ref(0);
-const handleActive = (index) => {
-  active_index.value = index;
-};
-
-const emit = defineEmits(['showDocument']);
-
-const goKnowledge = (knowledge) => {
-  emit('showDocument', knowledge);
-};
-</script>
-
-<style scoped>
-.knowledge-detail {
-}
-
-.knowledge-content {
-  height: 300px;
-  overflow-y: auto;
-  line-height: 30px;
-}
-
-.knowledge-footer {
-  border-top: 1px solid rgba(229, 229, 229, 1);
-
-  display: flex;
-  justify-content: space-between;
-  align-items: center;
-}
-
-.knowledge-page-item {
-  display: inline-block;
-  width: 18px;
-  height: 18px;
-  margin-left: 2px;
-  margin-right: 2px;
-  cursor: pointer;
-  /* background-color: #ccc; */
-  background-color: #00aea333;
-  color: #00aea3;
-  border-radius: 3px;
-  text-align: center;
-  line-height: 18px;
-  font-size: 12px;
-}
-.knowledge-page-item.active {
-  background-color: rgb(var(--primary-6));
-  color: #fff;
-}
-
-.show-detail-btn {
-  cursor: pointer;
-}
-.show-detail-btn:hover {
-  color: #00aea3;
-}
-</style>

+ 0 - 62
src/modules/answer-refference/RefferenceFileNameItem.vue

@@ -1,62 +0,0 @@
-<template>
-  <div>
-    <a-popover :title="knowledge.doc_name" position="left" :content-style="{ width: '400px', maxWidth: '400px' }">
-      <div class="doc-ref-container" @click="goKnowledge(knowledge.doc_name)">
-        <span class="doc-ref-index">{{ knowledgeIndex + 1 }}</span>
-        <span class="doc-ref-label">{{ knowledge.doc_name }}</span>
-      </div>
-
-      <template #content>
-        <RefferenceFileNameContentLinks
-          :content_ltks="knowledge.content_ltks"
-          :page="knowledge.page"
-          @showDocument="goKnowledge(knowledge.doc_name)"
-        />
-      </template>
-    </a-popover>
-  </div>
-</template>
-
-<script setup>
-import RefferenceFileNameContentLinks from './RefferenceFileNameContentLinks.vue';
-
-const props = defineProps({
-  knowledge: Object,
-
-  knowledgeIndex: Number
-});
-
-const emit = defineEmits(['showDocument']);
-
-const goKnowledge = (knowledge) => {
-  emit('showDocument', knowledge);
-};
-</script>
-
-<style scoped>
-.doc-ref-container {
-  height: 32px;
-  display: inline-flex;
-  align-items: center;
-}
-
-.doc-ref-index {
-  display: inline-block;
-  background-color: #00aea333;
-  color: #00aea3;
-  padding: 1px 5px;
-  border-radius: 2px;
-  margin-right: 5px;
-  font-size: 12px;
-
-  cursor: pointer;
-}
-
-.doc-ref-label {
-  cursor: pointer;
-}
-
-.doc-ref-label:hover {
-  color: #00aea3;
-}
-</style>

+ 0 - 82
src/modules/answer-refference/RefferenceFileNameList.vue

@@ -1,82 +0,0 @@
-<template>
-  <RefferenceFileNameItem
-    v-for="(item, index) of document_list"
-    :knowledge="item"
-    :key="index"
-    :knowledgeIndex="index"
-    @showDocument="handleShowDocument(item)"
-  />
-</template>
-
-<script setup>
-import { onMounted, computed } from 'vue';
-import RefferenceFileNameItem from './RefferenceFileNameItem.vue';
-
-const props = defineProps({
-  document_list: Array
-  // chunks: Array
-});
-
-const emit = defineEmits(['showDocDetail']);
-
-// const document_list = computed(() => {
-//   const doc_list = props.doc_aggs;
-//   const chunks = props.chunks;
-
-//   const res_list = [];
-
-//   const len = doc_list.length;
-//   for (let i = 0; i < len; i++) {
-//     const doc = doc_list[i];
-
-//     const res_doc = {
-//       doc_id: doc.doc_id,
-//       doc_name: doc.doc_name,
-//       count: doc.count,
-//       page: i
-//     };
-
-//     const cur_doc_id = doc.doc_id;
-
-//     const cur_doc_peaces = [];
-//     if (chunks && Array.isArray(chunks)) {
-//       chunks.forEach((item, index) => {
-//         const chunk_doc_id = item.doc_id;
-
-//         if (cur_doc_id === chunk_doc_id) {
-//           cur_doc_peaces.push(item.content_ltks);
-//         }
-//       });
-//     }
-
-//     res_doc.content_ltks = cur_doc_peaces;
-
-//     res_list.push(res_doc);
-//   }
-
-//   return res_list;
-// });
-
-/**
- * 展示文档详情
- * @param item
- */
-const handleShowDocument = (item) => {
-  emit('showDocDetail', item);
-};
-
-onMounted(() => {
-  // console.log(props.doc_aggs, '文档信息');
-  // console.log(props.chunks, '文档碎片');
-  // const cur_doc_id = props.doc_aggs.doc_id;
-  // const cur_doc_peaces = [];
-  // if (props.chunks && Array.isArray(props.chunks)) {
-  //   props.chunks.forEach((item, index) => {
-  //     const chunk_doc_id = item.doc_id;
-  //     if (cur_doc_id === chunk_doc_id) {
-  //       cur_doc_peaces.push(item);
-  //     }
-  //   });
-  // }
-});
-</script>

+ 0 - 161
src/modules/answer-refference/RefferenceFlag.vue

@@ -1,161 +0,0 @@
-<template>
-  <span class="refference-container">
-    <a-popover :content-style="{ width: '500px', maxWidth: '500px' }">
-      <!-- <span class="refference-flag-circle"></span> -->
-      <!-- <icon-info-circle :size="16" /> -->
-      <svg
-        data-v-6fd6a4a5=""
-        viewBox="0 0 48 48"
-        fill="none"
-        xmlns="http://www.w3.org/2000/svg"
-        stroke="currentColor"
-        class="arco-icon arco-icon-info-circle"
-        stroke-width="2.5"
-        stroke-linecap="butt"
-        stroke-linejoin="miter"
-        style="font-size: 16px"
-      >
-        <path d="M24 20v14m0-16v-4m18 10c0 9.941-8.059 18-18 18S6 33.941 6 24 14.059 6 24 6s18 8.059 18 18Z"></path>
-      </svg>
-
-      <template #title></template>
-      <template #content>
-        <div class="refference-content">
-          <AsideImage v-if="img_url" :src="img_url" />
-
-          <div class="refference-description">
-            <div class="ref-text-content">
-              {{ text }}
-            </div>
-
-            <FileNameDisplay @click="handleClick" :file_name="doc_name" :file_id="doc_id" />
-          </div>
-        </div>
-      </template>
-    </a-popover>
-
-    <a-drawer
-      ref="drawer"
-      :width="DOC_WIDTH + 20"
-      :visible="visible"
-      @ok="handleOk"
-      @cancel="handleCancel"
-      unmountOnClose
-      :data-flag="'doc-ref-effect-contaienr'"
-      :footer="false"
-    >
-      <template #title>
-        {{ doc_name }}
-      </template>
-
-      <ViewerPDFFromUrl v-if="doc_type === 'pdf'" :url="pdf_url" :doc_width="DOC_WIDTH" :positions="positions" />
-      <ViewerDocxFromUrl v-if="doc_type === 'doc'" :url="pdf_url" :doc_width="DOC_WIDTH" :positions="positions" />
-    </a-drawer>
-  </span>
-</template>
-<script setup>
-import { defineComponent, inject, ref, useTemplateRef, onMounted, computed } from 'vue';
-
-import ViewerPDFFromUrl from '../viewer-pdf/ViewerPDFFromUrl.vue';
-import ViewerDocxFromUrl from '../viewer-docx/ViewerDocxFromUrl.vue';
-
-import AsideImage from './AsideImage.vue';
-import FileNameDisplay from '../file-name/FileNameDisplay.vue';
-
-import { getDocumentUrl, getImageUrl } from './document';
-
-/**
- * 此页面可能用到的文档
- * @see https://arco.design/vue/component/popover
- */
-
-const props = defineProps({
-  img: String, // 图片链接
-  image_id: String,
-  text: String, // 文本地址
-  doc_id: String,
-  doc_name: String,
-  positions: Array
-});
-
-const DOC_WIDTH = window.innerWidth / 2;
-
-const pdf_url = getDocumentUrl(props.doc_id);
-const img_url = getImageUrl(props.image_id);
-
-const visible = ref(false);
-
-/**
- * 文档类别:doc/pdf
- */
-const doc_type = computed(() => {
-  const doc_name = props.doc_name;
-
-  if (!doc_name) {
-    return '';
-  }
-
-  const arr = doc_name.split('.');
-  const len = arr.length;
-  const end_fix = arr[len - 1];
-
-  if (end_fix === 'pdf') {
-    return 'pdf';
-  }
-
-  if (end_fix === 'docx' || end_fix === 'doc') {
-    return 'doc';
-  }
-
-  return '';
-});
-
-const handleClick = () => {
-  // console.log('点击事件触发');
-  const doc_nm = props.doc_name;
-  // console.log('点击事件触发', doc_nm);
-
-  if (doc_type.value === 'doc' || doc_type.value === 'pdf') {
-    visible.value = true;
-  } else {
-  }
-
-  // if (doc_nm && doc_nm.indexOf('.pdf') === doc_nm.length - 4) {
-  //   visible.value = true;
-  // } else {
-  // }
-};
-const handleOk = () => {
-  visible.value = false;
-};
-const handleCancel = () => {
-  visible.value = false;
-};
-
-onMounted(() => {
-  // console.log(props.img, props.image_id, props.text, props.doc_id, props.doc_name, '--->>>>>');
-});
-</script>
-
-<style scoped>
-.refference-content {
-  display: flex;
-  justify-content: space-between;
-  align-items: flex-start;
-}
-.refference-description {
-  flex-grow: 1;
-}
-
-.ref-text-content {
-  max-width: 460px;
-  max-height: 340px;
-  overflow-y: auto;
-}
-</style>
-<style>
-.arco-drawer-container[data-flag='doc-ref-effect-contaienr'] .arco-drawer-body {
-  overflow: hidden;
-  padding: 0;
-}
-</style>

+ 0 - 38
src/modules/answer-refference/apply-refference-popover-4-download-file.js

@@ -1,38 +0,0 @@
-import dynamicEffectDownloadLinks from './effect-download-links';
-
-/**
- * 文件下载
- * @param {string} container_klass
- * @param {object[]} files - 文件数据
- * @param {object} files.file_name - 文件名
- * @param {object} files.file_url - 下载链接
- * @returns
- */
-export default function applyRefferencePopover4DownloadFile(container_klass, files) {
-  let unmount = () => {};
-
-  // 处理引用数据
-  setTimeout(() => {
-    const selector = `.${container_klass} .agent-answer-download-container`;
-
-    // 无序号,渲染所有的内容
-    const ele = document.querySelectorAll(selector);
-
-    renderFlag(ele);
-  }, 0);
-
-  function renderFlag(ele) {
-    // 遍历找到的所有标记元素
-    ele.forEach((item, idx) => {
-      if (files && Array.isArray(files) && files.length !== 0) {
-        unmount = dynamicEffectDownloadLinks(item, files);
-      }
-    });
-  }
-
-  return () => {
-    if (typeof unmount === 'function') {
-      unmount();
-    }
-  };
-}

+ 0 - 36
src/modules/answer-refference/apply-refference-popover-4-filename.js

@@ -1,36 +0,0 @@
-import dynamicRegRefFileName from './effect-refference-filename';
-
-/**
- * 点击文档名称的效果
- * @param {string} container_klass
- * @param {object} refference - 引用数据
- * @returns
- */
-export default function applyRefferencePopover4FileName(container_klass, refference) {
-  let unmount = () => {};
-
-  // 处理引用数据
-  setTimeout(() => {
-    // 无序号,渲染所有的内容
-    const ele = document.querySelector(`.${container_klass} .client-formated-markdown-doc-refference-container`);
-
-    renderFlag(ele);
-  }, 0);
-
-  function renderFlag(ele) {
-    // 遍历找到的所有标记元素
-    if (ele && Array.isArray(ele)) {
-      ele.forEach((item, idx) => {
-        unmount = dynamicRegRefFileName(item, refference);
-      });
-    } else {
-      unmount = dynamicRegRefFileName(ele, refference);
-    }
-  }
-
-  return () => {
-    if (typeof unmount === 'function') {
-      unmount();
-    }
-  };
-}

+ 0 - 66
src/modules/answer-refference/apply-refference-popover-4-ref-flag.js

@@ -1,66 +0,0 @@
-import dynamicRegRefFlag from './effect-refference-flag';
-
-/**
- * 应用PDF文档引用
- * @param {string} container_klass
- * @param {object} refference - 引用数据
- * @returns
- */
-export default function applyRefferencePopover4RefFlag(container_klass, refference) {
-  let unmount = () => {};
-
-  // 处理引用数据
-  setTimeout(() => {
-    const selector = `.${container_klass} .client-formated-markdown-doc-refference-flag`;
-    // console.log(selector, '选择器');
-    // 无序号,渲染所有的内容
-    const ele = document.querySelectorAll(selector);
-
-    // const container = document.querySelectorAll(`.${container_klass}`);
-    // const ele = container.querySelectorAll('.client-formated-markdown-doc-refference-flag');
-
-    renderFlag(ele);
-  }, 0);
-
-  function renderFlag(ele) {
-    // 遍历找到的所有标记元素
-    ele.forEach((item, idx) => {
-      const data_flag_index = item.getAttribute('data-ref-index');
-      // const data_list_index = item.getAttribute('data-list-index');
-
-      if (refference) {
-        const chunks = refference.chunks;
-
-        if (chunks) {
-          const target_chunk = chunks[data_flag_index];
-
-          // 引用数据
-          const current_refference_obj = {
-            refference: {
-              chunk_id: target_chunk.id,
-              content_ltks: target_chunk.content_ltks,
-              content_with_weight: target_chunk.content,
-              doc_id: target_chunk.document_id,
-              docnm_kwd: target_chunk.document_name,
-              img_id: target_chunk.image_id,
-              important_kwd: target_chunk.important_kwd,
-              kb_id: target_chunk.kb_id,
-              positions: target_chunk.positions,
-              similarity: target_chunk.similarity,
-              term_similarity: target_chunk.term_similarity,
-              vector_similarity: target_chunk.vector_similarity
-            }
-          };
-
-          unmount = dynamicRegRefFlag(item, current_refference_obj);
-        }
-      }
-    });
-  }
-
-  return () => {
-    if (typeof unmount === 'function') {
-      unmount();
-    }
-  };
-}

+ 0 - 38
src/modules/answer-refference/document.js

@@ -1,38 +0,0 @@
-import { getConfigField } from '../../config';
-
-/**
- * 切记 配置文件中的配置项 REFFERENCE_ASSETS_FILE_URL 不能为空
- * 否则,文档引用效果将会异常,无法看到图片和文档
- */
-
-/**
- * 获取一个文档的链接
- * 使用位置1:文档引用效果中的pdf文件展示
- * @param {string} doc_id
- * @returns
- */
-export const getDocumentUrl = (doc_id) => {
-  if (!doc_id) {
-    return '';
-  }
-
-  const server_url = getConfigField('REFFERENCE_ASSETS_FILE_URL');
-
-  return `${server_url}/v1/document/get/${doc_id}`;
-};
-
-/**
- * 获取一个图片的链接
- * 使用位置1:文档引用效果中,浮层左侧小图片展示
- * @param {string} image_id
- * @returns
- */
-export const getImageUrl = (image_id) => {
-  if (!image_id) {
-    return '';
-  }
-
-  const server_url = getConfigField('REFFERENCE_ASSETS_FILE_URL');
-
-  return `${server_url}/v1/document/image/${image_id}`;
-};

+ 0 - 17
src/modules/answer-refference/effect-download-links.js

@@ -1,17 +0,0 @@
-import DownloadFileList from './DownloadFileList.vue';
-
-import initDynamicApp from './init-dynamic-app';
-
-/**
- * 创建一个vue APP,并将此APP挂载到对应的DOM节点中
- * @param {Element} mount_element - 挂载点元素
- * @param {Object[]} files - props值
- * @param {object} files.file_name - 文件名
- * @param {object} files.file_url - 下载链接
- */
-export default function dynamicEffectDownloadLinks(mount_element, files = []) {
-  console.log(files);
-  return initDynamicApp(mount_element, DownloadFileList, {
-    files: files
-  });
-}

+ 0 - 28
src/modules/answer-refference/effect-refference-filename.js

@@ -1,28 +0,0 @@
-import RefferenceFileBlocks from './RefferenceFileBlocks.vue';
-
-import initDynamicApp from './init-dynamic-app';
-
-/**
- * 创建一个vue APP,并将此APP挂载到对应的DOM节点中
- * @param {Element} mount_element - 挂载点元素
- * @param {Object} propsObject - props值
- * @param {string} propsObject.refference.chunk_id - 目标ID
- * @param {string} propsObject.refference.content_ltks - 主要内容
- * @param {string} propsObject.refference.content_with_weight - 重点描述文本
- * @param {string} propsObject.refference.doc_id - 文档ID
- * @param {string} propsObject.refference.docnm_kwd - 文档名称
- * @param {string} propsObject.refference.img_id - 图片ID
- * @param {string} propsObject.refference.important_kwd - 关键词
- * @param {string} propsObject.refference.kb_id - 目标ID
- * @param {string} propsObject.refference.positions - 目标ID
- * @param {string} propsObject.refference.similarity - 目标ID
- * @param {string} propsObject.refference.term_similarity - 目标ID
- * @param {string} propsObject.refference.vector_similarity - 目标ID
- */
-export default function dynamicRegRefFileName(mount_element, propsObject = {}) {
-  return initDynamicApp(mount_element, RefferenceFileBlocks, {
-    doc_aggs: propsObject.doc_aggs,
-    chunks: propsObject.chunks,
-    total: propsObject.total
-  });
-}

+ 0 - 31
src/modules/answer-refference/effect-refference-flag.js

@@ -1,31 +0,0 @@
-import RefferenceFlag from './RefferenceFlag.vue';
-
-import initDynamicApp from './init-dynamic-app';
-
-/**
- * 创建一个vue APP,并将此APP挂载到对应的DOM节点中
- * @param {Element} mount_element - 挂载点元素
- * @param {Object} propsObject - props值
- * @param {string} propsObject.refference.chunk_id - 目标ID
- * @param {string} propsObject.refference.content_ltks - 主要内容
- * @param {string} propsObject.refference.content_with_weight - 重点描述文本
- * @param {string} propsObject.refference.doc_id - 文档ID
- * @param {string} propsObject.refference.docnm_kwd - 文档名称
- * @param {string} propsObject.refference.img_id - 图片ID
- * @param {string} propsObject.refference.important_kwd - 关键词
- * @param {string} propsObject.refference.kb_id - 目标ID
- * @param {string} propsObject.refference.positions - 目标ID
- * @param {string} propsObject.refference.similarity - 目标ID
- * @param {string} propsObject.refference.term_similarity - 目标ID
- * @param {string} propsObject.refference.vector_similarity - 目标ID
- */
-export default function dynamicRegRefFlag(mount_element, propsObject = {}) {
-  return initDynamicApp(mount_element, RefferenceFlag, {
-    img: propsObject.refference.img_id || '',
-    image_id: propsObject.refference.img_id,
-    text: propsObject.refference.content_with_weight || '',
-    doc_id: propsObject.refference.doc_id,
-    doc_name: propsObject.refference.docnm_kwd,
-    positions: propsObject.refference.positions
-  });
-}

+ 0 - 17
src/modules/answer-refference/i18n-message/en.json

@@ -1,17 +0,0 @@
-{
-  "conversation": {
-    "back": "Back",
-    "related_docs": "Documents",
-    "doc_total": "There are a total of {total}",
-    "fragments": "Retrieve fragments",
-    "source": "Source",
-    "view_links": "View all associations",
-    "btn_ok": "Confirm",
-    "btn_cancel": "Cancel",
-    "doc_details": "Document Details",
-    "view_details": "View details"
-  },
-  "common": {
-    "click_2_download": "Click to download the file"
-  }
-}

+ 0 - 15
src/modules/answer-refference/i18n-message/i18n.js

@@ -1,15 +0,0 @@
-import { createI18n } from 'vue-i18n';
-
-import zh from './zh.json';
-import en from './en.json';
-
-const i18n = createI18n({
-  locale: 'zh',
-  fallbackLocale: 'en',
-  messages: {
-    zh: zh,
-    en: en
-  }
-});
-
-export default i18n;

+ 0 - 17
src/modules/answer-refference/i18n-message/zh.json

@@ -1,17 +0,0 @@
-{
-  "conversation": {
-    "back": "返回",
-    "related_docs": "以下是根据您的提问搜索到的相关文档",
-    "doc_total": "共{total}条",
-    "fragments": "检索片段",
-    "source": "来源",
-    "view_links": "查看全部关联",
-    "btn_ok": "确定",
-    "btn_cancel": "取消",
-    "doc_details": "文档详情",
-    "view_details": "查看详情"
-  },
-  "common": {
-    "click_2_download": "点击下载文件"
-  }
-}

+ 0 - 15
src/modules/answer-refference/icon.svg

@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<svg width="13px" height="16px" viewBox="0 0 13 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-    <title>编组备份 5</title>
-    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
-        <g id="智能对话切图" transform="translate(-47, -481)">
-            <rect fill="#E6E6E6" x="0" y="0" width="428" height="564"></rect>
-            <g id="编组备份-5" transform="translate(47, 481)" fill-rule="nonzero">
-                <path d="M8.72857143,0 C8.8763349,0 9.01804637,0.0588038179 9.12253092,0.163475285 L12.8368166,3.88440552 C12.9413012,3.98907698 13,4.13104196 13,4.27906977 L13,14.6976744 C13,15.4169403 12.4179815,16 11.7,16 L1.3,16 C0.582027083,16 0,15.4169378 0,14.6976744 L0,1.30232558 C0,0.583070837 0.582029639,0 1.3,0 L8.72857143,0 Z" id="路径" fill="#FFC34C"></path>
-                <g id="w" transform="translate(2.05, 6.45)" fill="#FFFFFF">
-                    <polygon id="路径" points="1.81 5.64 0 0 1.38 0 2.48 4.03 2.53 4.03 3.63 0 4.96 0 6.07 4.03 6.12 4.03 7.21 0 8.59 0 6.79 5.64 5.45 5.64 4.32 1.63 4.27 1.63 3.14 5.64"></polygon>
-                </g>
-            </g>
-        </g>
-    </g>
-</svg>

+ 0 - 41
src/modules/answer-refference/init-dynamic-app.js

@@ -1,41 +0,0 @@
-import { createApp } from 'vue';
-
-// import ArcoVue from '@arco-design/web-vue';
-// import ArcoVueIcon from '@arco-design/web-vue/es/icon';
-import installArcoVue from '../../3rd-libs/arco-vue-install-icon';
-
-import i18n from './i18n-message/i18n';
-
-/**
- * 创建一个vue APP,并将此APP挂载到对应的DOM节点中
- * @param {Element} mount_point - 挂载点元素
- * @param {VueElement} RootComponent - 根组件
- * @param {object} props - props对象
- */
-export default function initDynamicApp(mount_point, RootComponent, props) {
-  /**
-   * @see https://cn.vuejs.org/api/application.html#createapp
-   */
-  const app = createApp(RootComponent, props);
-
-  /**
-   * 此目录下用到的多语言配置
-   * 位于此目录下的 i18n-message 中
-   * 与 public 下的多语言互相不干涉
-   * 但是,有可能此目录下会引用目录外其他通用的组件,如果引用的通用的组件中有多语言配置,则需要在此目录下也进行同样的配置
-   * 否则,在此目录下的组件动态加载时会有报错
-   */
-  app.use(i18n);
-
-  // // 引用字节跳动相关的组件
-  // app.use(ArcoVueIcon);
-  // app.use(ArcoVue);
-  installArcoVue(app);
-
-  app.mount(mount_point);
-
-  // 返回一个卸载APP的方法
-  return () => {
-    app.unmount();
-  };
-}

+ 0 - 73
src/modules/btn-iframe-chujuan/BtnConfigChujuan.vue

@@ -1,73 +0,0 @@
-<template>
-  <a-button @click="handleClick" class="chujuan-btn">
-    <img class="chujuan-logo-img" :src="logo" /> {{ $t('wendangchujuan.agent_title') }}
-  </a-button>
-
-  <a-modal
-    v-model:visible="visible"
-    @ok="handleOk"
-    @cancel="handleCancel"
-    modal-class="chujuan-config-container-modal"
-    body-class="chujuan-config-container-body"
-  >
-    <template #title> <img class="chujuan-logo-img" :src="logo" /> {{ $t('wendangchujuan.agent_title') }} </template>
-
-    <ConversationChujuan ref="confForm" />
-  </a-modal>
-</template>
-
-<script setup>
-import { ref } from 'vue';
-
-import logo from '../../assets/1.png';
-
-import ConversationChujuan from '../conversation-chujuan/ConversationChujuan.vue';
-
-const emits = defineEmits(['confirm']);
-
-const confForm = ref(null);
-const visible = ref(false);
-
-const handleClick = () => {
-  visible.value = true;
-};
-const handleOk = () => {
-  const target = confForm.value;
-  if (target && typeof target.getValues === 'function') {
-    const data = target.getValues();
-
-    emits('confirm', data);
-  }
-
-  visible.value = false;
-};
-const handleCancel = () => {
-  visible.value = false;
-};
-</script>
-
-<style scoped>
-.chujuan-btn {
-  border-radius: 30px;
-  color: #353535;
-}
-.chujuan-logo-img {
-  width: 22px;
-  display: inline-block;
-  margin-right: 5px;
-}
-</style>
-
-<style>
-.chujuan-config-container-modal.arco-modal {
-  width: 50%;
-}
-.chujuan-config-container-body.arco-modal-body {
-  /* width: 50%; */
-  padding: 30px;
-}
-.chujuan-config-container-body.arco-modal-body .chujuan-iframe {
-  width: 100%;
-  height: 80vh;
-}
-</style>

+ 0 - 64
src/modules/btn-iframe-chujuan/BtnIframeChujuan.vue

@@ -1,64 +0,0 @@
-<template>
-  <a-button @click="handleClick" class="chujuan-btn"> <img class="chujuan-logo-img" :src="logo" /> 出卷 </a-button>
-
-  <a-modal
-    v-model:visible="visible"
-    @ok="handleOk"
-    @cancel="handleCancel"
-    modal-class="chujuan-container-modal"
-    body-class="chujuan-container-body"
-    width="90%"
-  >
-    <template #title> <img class="chujuan-logo-img" :src="logo" /> 出卷 </template>
-
-    <iframe :src="iframe_src" class="chujuan-iframe"></iframe>
-  </a-modal>
-</template>
-
-<script setup>
-import { ref } from 'vue';
-
-import logo from '../../assets/1.png';
-
-import { getConfigField } from '../../config';
-
-// const iframe_src = 'http://192.168.20.119:8501';
-const iframe_src = getConfigField('IFRAME_URL_CHUJUAN');
-
-const visible = ref(false);
-
-const handleClick = () => {
-  visible.value = true;
-};
-const handleOk = () => {
-  visible.value = false;
-};
-const handleCancel = () => {
-  visible.value = false;
-};
-</script>
-
-<style scoped>
-.chujuan-btn {
-  border-radius: 30px;
-  color: #353535;
-}
-.chujuan-logo-img {
-  width: 22px;
-  display: inline-block;
-  margin-right: 5px;
-}
-</style>
-
-<style>
-.chujuan-container-modal {
-}
-.chujuan-container-body.arco-modal-body {
-  width: 100%;
-  padding: 0;
-}
-.chujuan-container-body.arco-modal-body .chujuan-iframe {
-  width: 100%;
-  height: 80vh;
-}
-</style>

+ 0 - 106
src/modules/common/CardItem.vue

@@ -1,106 +0,0 @@
-<template>
-  <div class="card-container" :style="{ height: `${height}px` }">
-    <div class="card-name">
-      <img v-if="!is_model" :src="img_src" class="logo" @click.stop="handleClickIcon" />
-      <img v-if="is_model" :src="getIconModel(img_src)" class="logo" @click.stop="handleClickIcon" />
-      <div class="name">{{ name }}</div>
-    </div>
-    <div class="card-label">
-      <slot name="labels"></slot>
-    </div>
-    <div class="card-des">
-      <slot name="description"></slot>
-    </div>
-    <div class="card-label">
-      <slot name="labelBtn"></slot>
-    </div>
-    <div class="card-bottom">
-      <slot name="bottom"></slot>
-    </div>
-    <div class="card-settings">
-      <slot name="settings"></slot>
-    </div>
-  </div>
-</template>
-
-<script setup>
-import { getIconModel } from './icon-map';
-const props = defineProps({
-  name: {
-    type: String
-  },
-  img_src: {
-    type: String
-  },
-  height: {
-    type: Number,
-    default: 175
-  },
-  is_model: {
-    type: Boolean,
-    default: false
-  }
-});
-
-const emit = defineEmits(['clickIcon']);
-const handleClickIcon = () => {
-  emit('clickIcon', props.img_src);
-};
-</script>
-<style scoped lang="css">
-.card-container {
-  position: relative;
-  padding: 10px 20px;
-  background-color: var(--color-bg-1);
-  border-radius: 5px;
-  overflow: hidden;
-  cursor: pointer;
-}
-.card-container:hover {
-  box-shadow: 0 0 10px var(--color-border-3);
-}
-.card-name .name {
-  margin-top: 10px;
-  font-size: 16px;
-  font-weight: bold;
-  color: var(--color-text-1);
-  white-space: nowrap;
-  text-overflow: ellipsis;
-  overflow: hidden;
-}
-.card-name .logo {
-  width: 44px;
-}
-.card-label {
-  width: 100%;
-  color: var(--color-text-3);
-}
-
-.card-des {
-  display: -webkit-box;
-  overflow: hidden;
-  height: 68px;
-  margin-top: 5px;
-  font-size: 12px;
-  line-height: 18px;
-  color: var(--color-text-3);
-  -webkit-line-clamp: 4;
-  -webkit-box-orient: vertical;
-  text-overflow: ellipsis;
-}
-
-.card-bottom {
-  position: absolute;
-  bottom: 10px;
-  left: 20px;
-  width: calc(100% - 40px);
-  font-size: 12px;
-  color: var(--color-text-3);
-}
-.card-settings {
-  position: absolute;
-  right: 20px;
-  top: 20px;
-  cursor: pointer;
-}
-</style>

+ 0 - 181
src/modules/common/icon-map.js

@@ -1,181 +0,0 @@
-import knowledgeFrame1 from '../../assets/image/management/knowledge-frame1.png';
-import knowledgeFrame2 from '../../assets/image/management/knowledge-frame2.png';
-import knowledgeFrame3 from '../../assets/image/management/knowledge-frame3.png';
-import knowledgeFrame4 from '../../assets/image/management/knowledge-frame4.png';
-import intelligentFrame1 from '../../assets/image/management/intelligent-frame1.png';
-import intelligentFrame2 from '../../assets/image/management/intelligent-frame2.png';
-import intelligentFrame3 from '../../assets/image/management/intelligent-frame3.png';
-import intelligentFrame4 from '../../assets/image/management/intelligent-frame4.png';
-import intelligentFrame5 from '../../assets/image/management/intelligent-frame5.png';
-import intelligentFrame6 from '../../assets/image/management/intelligent-frame6.png';
-import intelligentFrame7 from '../../assets/image/management/intelligent-frame7.png';
-import intelligentFrame8 from '../../assets/image/management/intelligent-frame8.png';
-import intellFrame1 from '../../assets/image/management/intellFrame1.png';
-import intellFrame2 from '../../assets/image/management/intellFrame2.png';
-import intellFrame3 from '../../assets/image/management/intellFrame3.png';
-import intellFrame4 from '../../assets/image/management/intellFrame4.png';
-import intellFrame5 from '../../assets/image/management/intellFrame5.png';
-import intellFrame6 from '../../assets/image/management/intellFrame6.png';
-import intellFrame19 from '../../assets/image/management/intellFrame19.png';
-import intellFrame20 from '../../assets/image/management/intellFrame20.png';
-import intellFrame21 from '../../assets/image/management/intellFrame21.png';
-import intellFrame22 from '../../assets/image/management/intellFrame22.png';
-import intellFrame23 from '../../assets/image/management/intellFrame23.png';
-import intellFrame24 from '../../assets/image/management/intellFrame24.png';
-import intellFrame25 from '../../assets/image/management/intellFrame25.png';
-import intellFrame26 from '../../assets/image/management/intellFrame26.png';
-import intellFrame27 from '../../assets/image/management/intellFrame27.png';
-import intellFrame28 from '../../assets/image/management/intellFrame28.png';
-import intellFrame29 from '../../assets/image/management/intellFrame29.png';
-import intellFrame30 from '../../assets/image/management/intellFrame30.png';
-
-import intellFrame31 from '../../assets/image/management/intellFrame31.png';
-import intellFrame32 from '../../assets/image/management/intellFrame32.png';
-import intellFrame33 from '../../assets/image/management/intellFrame33.png';
-import intellFrame34 from '../../assets/image/management/intellFrame34.png';
-import intellFrame35 from '../../assets/image/management/intellFrame35.png';
-import intellFrame36 from '../../assets/image/management/intellFrame36.png';
-import intellFrame37 from '../../assets/image/management/intellFrame37.png';
-import intellFrame38 from '../../assets/image/management/intellFrame38.png';
-import intellFrame39 from '../../assets/image/management/intellFrame39.png';
-import intellFrame40 from '../../assets/image/management/intellFrame40.png';
-import intellFrame41 from '../../assets/image/management/intellFrame41.png';
-import intellFrame42 from '../../assets/image/management/intellFrame42.png';
-import intellFrame43 from '../../assets/image/management/intellFrame43.png';
-import intellFrame44 from '../../assets/image/management/intellFrame44.png';
-import intellFrame45 from '../../assets/image/management/intellFrame45.png';
-import intellFrame46 from '../../assets/image/management/intellFrame46.png';
-import intellFrame47 from '../../assets/image/management/intellFrame47.png';
-import intellFrame48 from '../../assets/image/management/intellFrame48.png';
-import intellFrame50 from '../../assets/image/management/intellFrame50.png';
-import intellFrame51 from '../../assets/image/management/intellFrame51.png';
-import intellFrame52 from '../../assets/image/management/intellFrame52.png';
-import intellFrame53 from '../../assets/image/management/intellFrame53.png';
-import intellFrame54 from '../../assets/image/management/intellFrame54.png';
-import intellFrame55 from '../../assets/image/management/intellFrame55.png';
-import intellFrame56 from '../../assets/image/management/intellFrame56.png';
-import intellFrame57 from '../../assets/image/management/intellFrame57.png';
-import intellFrame58 from '../../assets/image/management/intellFrame58.png';
-
-import intellFrame60 from '../../assets/image/management/intellFrame60.png';
-import intellFrame61 from '../../assets/image/management/intellFrame61.png';
-import intellFrame62 from '../../assets/image/management/intellFrame62.png';
-import intellFrame63 from '../../assets/image/management/intellFrame63.png';
-import intellFrame64 from '../../assets/image/management/intellFrame64.png';
-import intellFrame65 from '../../assets/image/management/intellFrame65.png';
-import intellFrame66 from '../../assets/image/management/intellFrame66.png';
-import intellFrame67 from '../../assets/image/management/intellFrame67.png';
-import intellFrame68 from '../../assets/image/management/intellFrame68.png';
-
-import modelFrame1 from '../../assets/image/management/modelFrame1.svg';
-import modelFrame2 from '../../assets/image/management/modelFrame2.svg';
-import modelFrame3 from '../../assets/image/management/modelFrame3.svg';
-import modelFrame4 from '../../assets/image/management/modelFrame4.svg';
-import modelFrame5 from '../../assets/image/management/modelFrame5.svg';
-import modelFrame6 from '../../assets/image/management/modelFrame6.svg';
-import modelFrame7 from '../../assets/image/management/modelFrame7.svg';
-import modelFrame8 from '../../assets/image/management/modelFrame8.svg';
-import modelFrame9 from '../../assets/image/management/modelFrame9.svg';
-import modelFrame10 from '../../assets/image/management/modelFrame10.svg';
-
-const image_knowLedge_map = {
-  knowledgeFrame1: knowledgeFrame1,
-  knowledgeFrame2: knowledgeFrame2,
-  knowledgeFrame3: knowledgeFrame3,
-  knowledgeFrame4: knowledgeFrame4
-};
-const image_intelligent_map = {
-  intelligentFrame1: intelligentFrame1,
-  intelligentFrame2: intelligentFrame2,
-  intelligentFrame3: intelligentFrame3,
-  intelligentFrame4: intelligentFrame4,
-  intelligentFrame5: intelligentFrame5,
-  intelligentFrame6: intelligentFrame6,
-  intelligentFrame7: intelligentFrame7,
-  intelligentFrame8: intelligentFrame8
-};
-const icon_intelligent_map = {
-  intellFrame1: intellFrame1,
-  intellFrame2: intellFrame2,
-  intellFrame3: intellFrame3,
-  intellFrame4: intellFrame4,
-  intellFrame5: intellFrame5,
-  intellFrame6: intellFrame6,
-  intellFrame19: intellFrame19,
-  intellFrame20: intellFrame20,
-  intellFrame21: intellFrame21,
-  intellFrame22: intellFrame22,
-  intellFrame23: intellFrame23,
-  intellFrame24: intellFrame24,
-  intellFrame25: intellFrame25,
-  intellFrame26: intellFrame26,
-  intellFrame27: intellFrame27,
-  intellFrame28: intellFrame28,
-  intellFrame29: intellFrame29,
-  intellFrame30: intellFrame30,
-  intellFrame31: intellFrame31,
-  intellFrame32: intellFrame32,
-  intellFrame33: intellFrame33,
-  intellFrame34: intellFrame34,
-  intellFrame35: intellFrame35,
-  intellFrame36: intellFrame36,
-  intellFrame37: intellFrame37,
-  intellFrame38: intellFrame38,
-  intellFrame39: intellFrame39,
-  intellFrame40: intellFrame40,
-  intellFrame41: intellFrame41,
-  intellFrame42: intellFrame42,
-  intellFrame43: intellFrame43,
-  intellFrame44: intellFrame44,
-  intellFrame45: intellFrame45,
-  intellFrame46: intellFrame46,
-  intellFrame47: intellFrame47,
-  intellFrame48: intellFrame48,
-  intellFrame50: intellFrame50,
-  intellFrame51: intellFrame51,
-  intellFrame52: intellFrame52,
-  intellFrame53: intellFrame53,
-  intellFrame54: intellFrame54,
-  intellFrame55: intellFrame55,
-  intellFrame56: intellFrame56,
-  intellFrame57: intellFrame57,
-  intellFrame58: intellFrame58,
-  intellFrame60: intellFrame60,
-  intellFrame61: intellFrame61,
-  intellFrame62: intellFrame62,
-  intellFrame63: intellFrame63,
-  intellFrame64: intellFrame64,
-  intellFrame65: intellFrame65,
-  intellFrame66: intellFrame66,
-  intellFrame67: intellFrame67,
-  intellFrame68: intellFrame68
-};
-const image_model_map = {
-  modelFrame1: modelFrame1,
-  modelFrame2: modelFrame2,
-  modelFrame3: modelFrame3,
-  modelFrame4: modelFrame4,
-  modelFrame5: modelFrame5,
-  modelFrame6: modelFrame6,
-  modelFrame7: modelFrame7,
-  modelFrame8: modelFrame8,
-  modelFrame9: modelFrame9,
-  modelFrame10: modelFrame10
-};
-
-/**
- * @description: 图片映射表
- * avatar: 图片名称
- */
-export const getImageKnowLedge = (avatar) => {
-  return image_knowLedge_map[avatar] || knowledgeFrame1;
-};
-export const getImageIntelligent = (avatar) => {
-  return image_intelligent_map[avatar];
-};
-export const getIconIntelligent = (avatar) => {
-  return icon_intelligent_map[avatar] || intellFrame1;
-};
-export const getIconModel = (avatar) => {
-  return image_model_map[avatar] || modelFrame1;
-};

+ 0 - 110
src/modules/conversation-board/BoardAgentItem.vue

@@ -1,110 +0,0 @@
-<template>
-  <div class="conversation-agent-item">
-    <div class="agent-item-icon" @click="handleClick">
-      <img :src="img_icon" />
-    </div>
-
-    <div class="agent-item-intro" @click="handleClick">
-      <a-tooltip :content="title" position="top">
-        <div class="agent-item-intro-title">{{ title }}</div>
-      </a-tooltip>
-
-      <a-tooltip :content="desc" position="top">
-        <div class="agent-item-intro-desc">{{ desc }}</div>
-      </a-tooltip>
-    </div>
-  </div>
-</template>
-
-<script setup>
-import { computed } from 'vue';
-import { getIconIntelligent } from '../common/icon-map';
-
-const props = defineProps({
-  title: String,
-  desc: String,
-  id: String,
-  icon: String
-});
-
-const img_icon = computed(() => {
-  return getIconIntelligent(props.icon);
-});
-
-const emit = defineEmits(['active']);
-
-const handleClick = () => {
-  emit('active', props.id);
-};
-</script>
-
-<style lang="css" scoped>
-.conversation-agent-item {
-  background-color: var(--color-bg-1);
-  /* padding: 30px 40px 30px 40px; */
-  padding-bottom: 14px;
-  padding-top: 14px;
-  padding-left: 4%;
-  padding-right: 4%;
-
-  border-radius: 10px;
-
-  height: 78px;
-
-  display: flex;
-  align-items: center;
-
-  color: var(--color-text-1);
-}
-
-.agent-item-icon {
-  width: 44px;
-  height: 44px;
-  /* background-color: #ccc; */
-  border-radius: 50%;
-
-  margin-right: 10px;
-  margin-left: 10px;
-
-  flex-shrink: 0;
-
-  cursor: pointer;
-}
-
-.agent-item-icon img {
-  width: 100%;
-}
-
-.agent-item-intro {
-  cursor: pointer;
-  overflow: hidden;
-
-  margin-right: 10px;
-}
-
-.agent-item-intro-title {
-  font-size: 18px;
-  font-weight: 600;
-  line-height: 25.2px;
-
-  margin-bottom: 8px;
-
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-line-clamp: 1; /* 这里设置显示的行数 */
-  line-clamp: 1;
-  overflow: hidden;
-}
-
-.agent-item-intro-desc {
-  display: -webkit-box;
-  -webkit-box-orient: vertical;
-  -webkit-line-clamp: 2; /* 这里设置显示的行数 */
-  line-clamp: 2;
-  overflow: hidden;
-
-  font-size: 14px;
-  font-weight: 400;
-  line-height: 19.6px;
-}
-</style>

+ 0 - 40
src/modules/conversation-board/BoardAgentList.vue

@@ -1,40 +0,0 @@
-<template>
-  <div class="conversation-agent-list">
-    <BoardAgentItem
-      v-for="(item, index) of list"
-      :key="index"
-      :title="item.name"
-      :desc="item.description"
-      :id="item.id"
-      :icon="item.icon"
-      @active="handleActive($event, item, index)"
-    />
-  </div>
-</template>
-
-<script setup>
-import BoardAgentItem from './BoardAgentItem.vue';
-
-const props = defineProps({
-  list: Array
-});
-
-const emit = defineEmits(['itemActive']);
-
-const handleActive = (target_id, item, index) => {
-  emit('itemActive', {
-    id: target_id,
-    agent: item,
-    index: index
-  });
-};
-</script>
-
-<style lang="css" scoped>
-.conversation-agent-list {
-  display: grid;
-  /* grid-template-columns: 1fr 1fr 1fr; */
-  grid-template-columns: 33% 33% 33%;
-  gap: 20px;
-}
-</style>

+ 0 - 104
src/modules/conversation-board/BoardTags.vue

@@ -1,104 +0,0 @@
-<template>
-  <div class="conversation-board-tags">
-    <div class="board-tag" :class="{ 'is-active': is_all }" @click="handleClickAll">
-      <span>{{ $t('conversation.tag_all') }}</span>
-    </div>
-
-    <div
-      v-for="(item, index) of list_labels"
-      class="board-tag"
-      :class="{ 'is-active': item.labelId === current_id }"
-      :key="item.labelId"
-      @click="handleClick(item)"
-    >
-      <span>{{ item.labelName }}</span>
-    </div>
-  </div>
-</template>
-
-<script setup>
-import { ref, computed, onMounted } from 'vue';
-
-import useTagList from './use-tag-list';
-
-/**
- * 单选版本
- * 在V0的基础上,新增了一个 全部 按钮
- */
-
-const emits = defineEmits(['change']);
-
-const current_id = ref('');
-
-// 是否是所有
-// 当前未选中任何标签,即为所有
-const is_all = computed(() => {
-  return !current_id.value;
-});
-
-/**
- * 选择标签的某一项
- * @param item
- */
-const handleClick = (item) => {
-  const target_id = item.labelId;
-
-  if (target_id === current_id.value) {
-    // 已经选中了: 取消选中
-    current_id.value = '';
-  } else {
-    // 没有选中: 选中操作
-    current_id.value = target_id;
-  }
-
-  emits('change', current_id.value);
-};
-
-/**
- * 选择所有
- */
-const handleClickAll = () => {
-  current_id.value = '';
-
-  emits('change', current_id.value);
-};
-
-const { getTagList, api_status, api_message, list_labels } = useTagList();
-
-onMounted(() => {
-  getTagList();
-});
-</script>
-
-<style lang="css" scoped>
-.conversation-board-tags {
-  display: flex;
-  justify-content: center;
-  margin-top: 40px;
-  margin-bottom: 20px;
-}
-
-.conversation-board-tags .board-tag {
-  margin-left: 5px;
-  margin-right: 5px;
-
-  cursor: pointer;
-
-  padding: 10px;
-  padding-left: 16px;
-  padding-right: 16px;
-
-  border-radius: 5px;
-
-  background-color: var(--color-bg-1);
-  /* color: var(--color-text-1); */
-  color: var(--color-text-3);
-
-  font-size: 14px;
-}
-
-.conversation-board-tags .board-tag.is-active {
-  background-color: rgb(var(--primary-6));
-  color: #fff;
-}
-</style>

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff