From 69ff7f9af4ee4e54aa8286317d6e2763b86589c7 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Wed, 16 Jul 2025 13:49:46 +0800 Subject: [PATCH] fix: Embedding mode issue fix --- ui/src/api/shared-workspace.ts | 15 ++- .../components/app-icon/icons/application.ts | 25 +++++ ui/src/components/layout-container/index.vue | 2 +- ui/src/layout/layout-header/avatar/index.vue | 96 ++++++++++++++----- ui/src/layout/login-layout/LoginContainer.vue | 3 +- .../component/AddKnowledgeDialog.vue | 4 +- ui/src/views/chat/auth/component/password.vue | 3 +- ui/src/views/chat/auth/index.vue | 1 - ui/src/views/chat/index.vue | 2 + ui/src/views/chat/pc/index.vue | 2 +- ui/src/views/knowledge/index.vue | 5 +- .../AuthorizedWorkspaceDialog.vue | 60 ++++++------ .../system/resource-authorization/index.vue | 20 ++-- ui/src/views/tool/index.vue | 5 +- 14 files changed, 166 insertions(+), 77 deletions(-) diff --git a/ui/src/api/shared-workspace.ts b/ui/src/api/shared-workspace.ts index 33fdb7a09..802cf2357 100644 --- a/ui/src/api/shared-workspace.ts +++ b/ui/src/api/shared-workspace.ts @@ -119,7 +119,7 @@ const getUserGroupUserList: ( } /** - * 获取工作空间下共享知识库的用户组 + * 获取工作空间下共享知识库的用户组 */ const getUserGroupList: (resource: any, loading?: Ref) => Promise> = (resource, loading) => { return get (`${prefix}/${prefix_workspace.value}/KNOWLEDGE/${resource.resource_id}/user_group`, undefined, loading) @@ -170,6 +170,16 @@ const getToolListPage: ( ) } +/** + * 获取全部用户 + */ +const getAllMemberList: (arg: string, loading?: Ref) => Promise[]>> = ( + arg, + loading, +) => { + return get('/user/list', undefined, loading) +} + export default { getKnowledgeList, getKnowledgeListPage, @@ -182,5 +192,6 @@ export default { getToolList, getToolListPage, getUserGroupList, - getUserGroupUserList + getUserGroupUserList, + getAllMemberList } diff --git a/ui/src/components/app-icon/icons/application.ts b/ui/src/components/app-icon/icons/application.ts index 95ac46e42..5d575c65d 100644 --- a/ui/src/components/app-icon/icons/application.ts +++ b/ui/src/components/app-icon/icons/application.ts @@ -688,4 +688,29 @@ export default { ]) }, }, + 'app-pdf-export': { + iconReader: () => { + return h('i', [ + h( + 'svg', + { + style: { height: '100%', width: '100%' }, + viewBox: '0 0 20 20', + version: '1.1', + xmlns: 'http://www.w3.org/2000/svg', + }, + [ + h('path', { + d: 'M3.33366 5.83342V16.6667H16.667V10.8334H18.3337V17.5001C18.3337 17.9603 17.9606 18.3334 17.5003 18.3334H2.50033C2.04009 18.3334 1.66699 17.9603 1.66699 17.5001V5.00008C1.66699 4.53984 2.04009 4.16675 2.50033 4.16675H9.16699V5.83342H3.33366Z', + fill: 'currentColor', + }), + h('path', { + d: 'M18.3335 2.50008V8.33342H16.6668V4.51175L11.6876 9.49091C11.6095 9.56903 11.5035 9.61291 11.393 9.61291C11.2825 9.61291 11.1766 9.56903 11.0984 9.49091L10.5093 8.90175C10.4312 8.82361 10.3873 8.71765 10.3873 8.60716C10.3873 8.49668 10.4312 8.39072 10.5093 8.31258L15.4884 3.33341H11.6668V1.66675H17.5001C17.7211 1.66675 17.9331 1.75455 18.0894 1.91083C18.2457 2.06711 18.3335 2.27907 18.3335 2.50008Z', + fill: 'currentColor', + }), + ], + ), + ]) + }, + }, } diff --git a/ui/src/components/layout-container/index.vue b/ui/src/components/layout-container/index.vue index a0a335611..355c43956 100644 --- a/ui/src/components/layout-container/index.vue +++ b/ui/src/components/layout-container/index.vue @@ -55,7 +55,7 @@ const showBack = computed(() => { .collapse { position: absolute; top: 36px; - right: -15px; + right: -12px; box-shadow: 0px 5px 10px 0px rgba(31, 35, 41, 0.1); z-index: 1; } diff --git a/ui/src/layout/layout-header/avatar/index.vue b/ui/src/layout/layout-header/avatar/index.vue index a87fa1ede..0c85b4d6b 100644 --- a/ui/src/layout/layout-header/avatar/index.vue +++ b/ui/src/layout/layout-header/avatar/index.vue @@ -21,30 +21,83 @@

{{ user.userInfo?.username }}

- +
+ {{ $t('views.system.title') }} + +
+
+ {{ $t('views.login.resetPassword') }}
- {{ $t('layout.apiKey') }}
-
@@ -78,22 +131,13 @@ - {{ $t('layout.about.title') }} - -
- {{ $t('views.system.title') }} - -
-
- {{ $t('layout.logout') }} @@ -114,10 +158,10 @@ import ResetPassword from './ResetPassword.vue' import AboutDialog from './AboutDialog.vue' // import UserPwdDialog from '@/views/user-manage/component/UserPwdDialog.vue' import APIKeyDialog from './APIKeyDialog.vue' -import {ComplexPermission} from '@/utils/permission/type' -import {langList} from '@/locales/index' +import { ComplexPermission } from '@/utils/permission/type' +import { langList } from '@/locales/index' import { hasPermission } from '@/utils/permission' -import { PermissionConst, RoleConst,EditionConst } from '@/utils/permission/data' +import { PermissionConst, RoleConst, EditionConst } from '@/utils/permission/data' const { user, login } = useStore() const router = useRouter() diff --git a/ui/src/layout/login-layout/LoginContainer.vue b/ui/src/layout/login-layout/LoginContainer.vue index 30e951c17..fd7c3be93 100644 --- a/ui/src/layout/login-layout/LoginContainer.vue +++ b/ui/src/layout/login-layout/LoginContainer.vue @@ -1,5 +1,5 @@ @@ -250,7 +250,7 @@ defineExpose({ open }) } .el-dialog__headerbtn { - top: 3px; + top: 2px; right: 6px; } } diff --git a/ui/src/views/chat/auth/component/password.vue b/ui/src/views/chat/auth/component/password.vue index 151698777..dbbd77ada 100644 --- a/ui/src/views/chat/auth/component/password.vue +++ b/ui/src/views/chat/auth/component/password.vue @@ -18,10 +18,11 @@ const FormRef = ref() const { chatUser } = useStore() const loading = ref(false) const router = useRouter() +const route = useRoute() const auth = () => { return chatUser.passwordAuthentication(form.value.password).then((ok) => { - router.push({ name: 'chat', params: { accessToken: chatUser.accessToken } }) + router.push({ name: 'chat', params: { accessToken: chatUser.accessToken }, query: route.query }) }) } const validator_auth = (rule: any, value: string, callback: any) => { diff --git a/ui/src/views/chat/auth/index.vue b/ui/src/views/chat/auth/index.vue index 0342713eb..354f9c6d5 100644 --- a/ui/src/views/chat/auth/index.vue +++ b/ui/src/views/chat/auth/index.vue @@ -7,7 +7,6 @@