From cb60220cb89bb3c43d034a39b3dce97c7492c1b9 Mon Sep 17 00:00:00 2001 From: wangdan-fit2cloud Date: Sat, 21 Jun 2025 11:22:40 +0800 Subject: [PATCH] feat: shared --- .../authorization.ts | 0 .../api/{shared => system-shared}/document.ts | 0 .../{shared => system-shared}/knowledge.ts | 0 ui/src/api/{shared => system-shared}/model.ts | 0 .../{shared => system-shared}/paragraph.ts | 0 .../api/{shared => system-shared}/problem.ts | 0 ui/src/api/{shared => system-shared}/tool.ts | 0 ui/src/components/codemirror-editor/index.vue | 2 +- .../generate-related-shared-dialog/index.vue | 6 +- ui/src/router/modules/system.ts | 104 ++++---- .../stores/modules-shared-system/document.ts | 2 +- .../stores/modules-shared-system/knowledge.ts | 2 +- ui/src/stores/modules-shared-system/model.ts | 4 +- .../stores/modules-shared-system/paragraph.ts | 2 +- .../stores/modules-shared-system/problem.ts | 2 +- ui/src/views/chat/base/index.vue | 100 -------- ui/src/views/chat/embed/index.vue | 10 +- ui/src/views/chat/mobile/index.vue | 10 +- ui/src/views/chat/pc/index.vue | 13 +- .../tool/ToolDebugDrawer.vue | 2 +- .../tool/ToolFormDrawer.vue | 2 +- .../tool/component/EditAvatarDialog.vue | 2 +- .../tool/component/InitParamDrawer.vue | 2 +- .../shared/AuthorizedWorkspaceDialog.vue | 2 +- .../document-shared/ImportLarkDocument.vue | 2 +- .../shared/document-shared/UploadDocument.vue | 2 +- .../component/ImportDocumentDialog.vue | 2 +- .../component/SelectKnowledgeDialog.vue | 2 +- ui/src/views/shared/document-shared/index.vue | 2 +- .../document-shared/upload/SetRules.vue | 2 +- .../upload/UploadComponent.vue | 2 +- ui/src/views/shared/hit-test-shared/index.vue | 2 +- .../knowledge-shared/KnowledgeSetting.vue | 2 +- .../knowledge-shared/SharedWorkspace.vue | 2 +- .../component/SyncWebDialog.vue | 2 +- .../CreateKnowledgeDialog.vue | 2 +- .../CreateLarkKnowledgeDialog.vue | 2 +- .../CreateWebKnowledgeDialog.vue | 2 +- .../views/shared/knowledge-shared/index.vue | 2 +- .../shared/model-shared/SharedWorkspace.vue | 4 +- .../component/CreateModelDialog.vue | 4 +- .../model-shared/component/EditModel.vue | 4 +- .../model-shared/component/ModelCard.vue | 2 +- .../component/ModelCardSharedWorkspace.vue | 2 +- .../component/ParamSettingDialog.vue | 2 +- .../component/SelectProviderDialog.vue | 2 +- ui/src/views/shared/model-shared/index.vue | 2 +- .../component/ParagraphDialog.vue | 2 +- .../component/ProblemComponent.vue | 2 +- .../component/SelectDocumentDialog.vue | 2 +- .../views/shared/paragraph-shared/index.vue | 4 +- .../component/DetailProblemDrawer.vue | 2 +- .../component/RelateProblemDialog.vue | 4 +- ui/src/views/shared/problem-shared/index.vue | 2 +- .../shared/tool-shared/SharedWorkspace.vue | 2 +- .../shared/tool-shared/ToolDebugDrawer.vue | 2 +- .../shared/tool-shared/ToolFormDrawer.vue | 2 +- .../component/EditAvatarDialog.vue | 2 +- .../tool-shared/component/InitParamDrawer.vue | 2 +- ui/src/views/shared/tool-shared/index.vue | 2 +- .../authentication/component/CAS.vue | 0 .../authentication/component/EditModal.vue | 0 .../authentication/component/LDAP.vue | 0 .../authentication/component/OAuth2.vue | 0 .../authentication/component/OIDC.vue | 0 .../authentication/component/SCAN.vue | 0 .../authentication/index.vue | 0 .../{ => system-setting}/email/index.vue | 0 .../theme/LoginPreview.vue | 0 .../{ => system-setting}/theme/index.vue | 0 .../views/system-shared/ModelSharedIndex.vue | 239 ++++++++++++++++++ .../operate-log/component/DetailDialog.vue | 0 .../views/{ => system}/operate-log/index.vue | 0 .../component/PermissionSetting.vue | 0 .../resource-authorization/index.vue | 0 .../role/component/AddMemberDrawer.vue | 0 .../component/CreateOrUpdateRoleDialog.vue | 0 .../{ => system}/role/component/Member.vue | 0 .../role/component/MemberFormContent.vue | 0 .../component/PermissionConfiguration.vue | 0 ui/src/views/{ => system}/role/index.ts | 0 ui/src/views/{ => system}/role/index.vue | 0 .../user-manage/component/UserDrawer.vue | 2 +- .../user-manage/component/UserPwdDialog.vue | 0 .../views/{ => system}/user-manage/index.vue | 0 .../workspace/component/AddMemberDrawer.vue | 2 +- .../CreateOrUpdateWorkspaceDialog.vue | 0 .../workspace/component/Member.vue | 0 ui/src/views/{ => system}/workspace/index.vue | 0 89 files changed, 360 insertions(+), 232 deletions(-) rename ui/src/api/{shared => system-shared}/authorization.ts (100%) rename ui/src/api/{shared => system-shared}/document.ts (100%) rename ui/src/api/{shared => system-shared}/knowledge.ts (100%) rename ui/src/api/{shared => system-shared}/model.ts (100%) rename ui/src/api/{shared => system-shared}/paragraph.ts (100%) rename ui/src/api/{shared => system-shared}/problem.ts (100%) rename ui/src/api/{shared => system-shared}/tool.ts (100%) delete mode 100644 ui/src/views/chat/base/index.vue rename ui/src/views/{ => system-setting}/authentication/component/CAS.vue (100%) rename ui/src/views/{ => system-setting}/authentication/component/EditModal.vue (100%) rename ui/src/views/{ => system-setting}/authentication/component/LDAP.vue (100%) rename ui/src/views/{ => system-setting}/authentication/component/OAuth2.vue (100%) rename ui/src/views/{ => system-setting}/authentication/component/OIDC.vue (100%) rename ui/src/views/{ => system-setting}/authentication/component/SCAN.vue (100%) rename ui/src/views/{ => system-setting}/authentication/index.vue (100%) rename ui/src/views/{ => system-setting}/email/index.vue (100%) rename ui/src/views/{ => system-setting}/theme/LoginPreview.vue (100%) rename ui/src/views/{ => system-setting}/theme/index.vue (100%) create mode 100644 ui/src/views/system-shared/ModelSharedIndex.vue rename ui/src/views/{ => system}/operate-log/component/DetailDialog.vue (100%) rename ui/src/views/{ => system}/operate-log/index.vue (100%) rename ui/src/views/{ => system}/resource-authorization/component/PermissionSetting.vue (100%) rename ui/src/views/{ => system}/resource-authorization/index.vue (100%) rename ui/src/views/{ => system}/role/component/AddMemberDrawer.vue (100%) rename ui/src/views/{ => system}/role/component/CreateOrUpdateRoleDialog.vue (100%) rename ui/src/views/{ => system}/role/component/Member.vue (100%) rename ui/src/views/{ => system}/role/component/MemberFormContent.vue (100%) rename ui/src/views/{ => system}/role/component/PermissionConfiguration.vue (100%) rename ui/src/views/{ => system}/role/index.ts (100%) rename ui/src/views/{ => system}/role/index.vue (100%) rename ui/src/views/{ => system}/user-manage/component/UserDrawer.vue (98%) rename ui/src/views/{ => system}/user-manage/component/UserPwdDialog.vue (100%) rename ui/src/views/{ => system}/user-manage/index.vue (100%) rename ui/src/views/{ => system}/workspace/component/AddMemberDrawer.vue (97%) rename ui/src/views/{ => system}/workspace/component/CreateOrUpdateWorkspaceDialog.vue (100%) rename ui/src/views/{ => system}/workspace/component/Member.vue (100%) rename ui/src/views/{ => system}/workspace/index.vue (100%) diff --git a/ui/src/api/shared/authorization.ts b/ui/src/api/system-shared/authorization.ts similarity index 100% rename from ui/src/api/shared/authorization.ts rename to ui/src/api/system-shared/authorization.ts diff --git a/ui/src/api/shared/document.ts b/ui/src/api/system-shared/document.ts similarity index 100% rename from ui/src/api/shared/document.ts rename to ui/src/api/system-shared/document.ts diff --git a/ui/src/api/shared/knowledge.ts b/ui/src/api/system-shared/knowledge.ts similarity index 100% rename from ui/src/api/shared/knowledge.ts rename to ui/src/api/system-shared/knowledge.ts diff --git a/ui/src/api/shared/model.ts b/ui/src/api/system-shared/model.ts similarity index 100% rename from ui/src/api/shared/model.ts rename to ui/src/api/system-shared/model.ts diff --git a/ui/src/api/shared/paragraph.ts b/ui/src/api/system-shared/paragraph.ts similarity index 100% rename from ui/src/api/shared/paragraph.ts rename to ui/src/api/system-shared/paragraph.ts diff --git a/ui/src/api/shared/problem.ts b/ui/src/api/system-shared/problem.ts similarity index 100% rename from ui/src/api/shared/problem.ts rename to ui/src/api/system-shared/problem.ts diff --git a/ui/src/api/shared/tool.ts b/ui/src/api/system-shared/tool.ts similarity index 100% rename from ui/src/api/shared/tool.ts rename to ui/src/api/system-shared/tool.ts diff --git a/ui/src/components/codemirror-editor/index.vue b/ui/src/components/codemirror-editor/index.vue index f11affa72..044c39652 100644 --- a/ui/src/components/codemirror-editor/index.vue +++ b/ui/src/components/codemirror-editor/index.vue @@ -44,7 +44,7 @@ import {Codemirror} from 'vue-codemirror' import {python} from '@codemirror/lang-python' import {oneDark} from '@codemirror/theme-one-dark' import {linter, type Diagnostic} from '@codemirror/lint' -import ToolApi from '@/api/shared/tool' +import ToolApi from '@/api/system-shared/tool' defineOptions({name: 'CodemirrorEditor'}) diff --git a/ui/src/components/generate-related-shared-dialog/index.vue b/ui/src/components/generate-related-shared-dialog/index.vue index dee27568f..1bfb02188 100644 --- a/ui/src/components/generate-related-shared-dialog/index.vue +++ b/ui/src/components/generate-related-shared-dialog/index.vue @@ -77,9 +77,9 @@ - diff --git a/ui/src/views/chat/embed/index.vue b/ui/src/views/chat/embed/index.vue index f79fec715..0dc06842c 100644 --- a/ui/src/views/chat/embed/index.vue +++ b/ui/src/views/chat/embed/index.vue @@ -50,11 +50,7 @@ -
+
+
import { ref, reactive, watch } from 'vue' -import ToolApi from '@/api/shared/tool' +import ToolApi from '@/api/system-shared/tool' import type { FormInstance } from 'element-plus' import DynamicsForm from '@/components/dynamics-form/index.vue' diff --git a/ui/src/views/resource-management/tool/ToolFormDrawer.vue b/ui/src/views/resource-management/tool/ToolFormDrawer.vue index 7a31b08b2..ad22c4816 100644 --- a/ui/src/views/resource-management/tool/ToolFormDrawer.vue +++ b/ui/src/views/resource-management/tool/ToolFormDrawer.vue @@ -262,7 +262,7 @@ import ToolDebugDrawer from './ToolDebugDrawer.vue' import UserFieldFormDialog from '@/views/resource-management/tool/component/UserFieldFormDialog.vue' import EditAvatarDialog from '@/views/resource-management/tool/component/EditAvatarDialog.vue' import type {toolData} from '@/api/type/tool' -import ToolApi from '@/api/shared/tool' +import ToolApi from '@/api/system-shared/tool' import type {FormInstance} from 'element-plus' import {MsgSuccess, MsgConfirm} from '@/utils/message' import {cloneDeep} from 'lodash' diff --git a/ui/src/views/resource-management/tool/component/EditAvatarDialog.vue b/ui/src/views/resource-management/tool/component/EditAvatarDialog.vue index b8fadc982..056288511 100644 --- a/ui/src/views/resource-management/tool/component/EditAvatarDialog.vue +++ b/ui/src/views/resource-management/tool/component/EditAvatarDialog.vue @@ -56,7 +56,7 @@ + + diff --git a/ui/src/views/operate-log/component/DetailDialog.vue b/ui/src/views/system/operate-log/component/DetailDialog.vue similarity index 100% rename from ui/src/views/operate-log/component/DetailDialog.vue rename to ui/src/views/system/operate-log/component/DetailDialog.vue diff --git a/ui/src/views/operate-log/index.vue b/ui/src/views/system/operate-log/index.vue similarity index 100% rename from ui/src/views/operate-log/index.vue rename to ui/src/views/system/operate-log/index.vue diff --git a/ui/src/views/resource-authorization/component/PermissionSetting.vue b/ui/src/views/system/resource-authorization/component/PermissionSetting.vue similarity index 100% rename from ui/src/views/resource-authorization/component/PermissionSetting.vue rename to ui/src/views/system/resource-authorization/component/PermissionSetting.vue diff --git a/ui/src/views/resource-authorization/index.vue b/ui/src/views/system/resource-authorization/index.vue similarity index 100% rename from ui/src/views/resource-authorization/index.vue rename to ui/src/views/system/resource-authorization/index.vue diff --git a/ui/src/views/role/component/AddMemberDrawer.vue b/ui/src/views/system/role/component/AddMemberDrawer.vue similarity index 100% rename from ui/src/views/role/component/AddMemberDrawer.vue rename to ui/src/views/system/role/component/AddMemberDrawer.vue diff --git a/ui/src/views/role/component/CreateOrUpdateRoleDialog.vue b/ui/src/views/system/role/component/CreateOrUpdateRoleDialog.vue similarity index 100% rename from ui/src/views/role/component/CreateOrUpdateRoleDialog.vue rename to ui/src/views/system/role/component/CreateOrUpdateRoleDialog.vue diff --git a/ui/src/views/role/component/Member.vue b/ui/src/views/system/role/component/Member.vue similarity index 100% rename from ui/src/views/role/component/Member.vue rename to ui/src/views/system/role/component/Member.vue diff --git a/ui/src/views/role/component/MemberFormContent.vue b/ui/src/views/system/role/component/MemberFormContent.vue similarity index 100% rename from ui/src/views/role/component/MemberFormContent.vue rename to ui/src/views/system/role/component/MemberFormContent.vue diff --git a/ui/src/views/role/component/PermissionConfiguration.vue b/ui/src/views/system/role/component/PermissionConfiguration.vue similarity index 100% rename from ui/src/views/role/component/PermissionConfiguration.vue rename to ui/src/views/system/role/component/PermissionConfiguration.vue diff --git a/ui/src/views/role/index.ts b/ui/src/views/system/role/index.ts similarity index 100% rename from ui/src/views/role/index.ts rename to ui/src/views/system/role/index.ts diff --git a/ui/src/views/role/index.vue b/ui/src/views/system/role/index.vue similarity index 100% rename from ui/src/views/role/index.vue rename to ui/src/views/system/role/index.vue diff --git a/ui/src/views/user-manage/component/UserDrawer.vue b/ui/src/views/system/user-manage/component/UserDrawer.vue similarity index 98% rename from ui/src/views/user-manage/component/UserDrawer.vue rename to ui/src/views/system/user-manage/component/UserDrawer.vue index 7ba169fb5..f997a8560 100644 --- a/ui/src/views/user-manage/component/UserDrawer.vue +++ b/ui/src/views/system/user-manage/component/UserDrawer.vue @@ -74,7 +74,7 @@ import {MsgSuccess} from '@/utils/message' import {t} from '@/locales' import type {FormItemModel} from '@/api/type/role' import WorkspaceApi from '@/api/workspace/workspace' -import MemberFormContent from '@/views/role/component/MemberFormContent.vue' +import MemberFormContent from '@/views/system/role/component/MemberFormContent.vue' import {RoleTypeEnum} from '@/enums/system' import useStore from "@/stores"; diff --git a/ui/src/views/user-manage/component/UserPwdDialog.vue b/ui/src/views/system/user-manage/component/UserPwdDialog.vue similarity index 100% rename from ui/src/views/user-manage/component/UserPwdDialog.vue rename to ui/src/views/system/user-manage/component/UserPwdDialog.vue diff --git a/ui/src/views/user-manage/index.vue b/ui/src/views/system/user-manage/index.vue similarity index 100% rename from ui/src/views/user-manage/index.vue rename to ui/src/views/system/user-manage/index.vue diff --git a/ui/src/views/workspace/component/AddMemberDrawer.vue b/ui/src/views/system/workspace/component/AddMemberDrawer.vue similarity index 97% rename from ui/src/views/workspace/component/AddMemberDrawer.vue rename to ui/src/views/system/workspace/component/AddMemberDrawer.vue index 3067ea7bd..4aa5ba672 100644 --- a/ui/src/views/workspace/component/AddMemberDrawer.vue +++ b/ui/src/views/system/workspace/component/AddMemberDrawer.vue @@ -22,7 +22,7 @@ import { onBeforeMount, ref } from 'vue' import UserApi from '@/api/user/user' import WorkspaceApi from '@/api/workspace/workspace' -import MemberFormContent from '@/views/role/component/MemberFormContent.vue' +import MemberFormContent from '@/views/system/role/component/MemberFormContent.vue' import { t } from '@/locales' import { MsgSuccess } from '@/utils/message' import type { CreateWorkspaceMemberParamsItem, WorkspaceItem } from '@/api/type/workspace' diff --git a/ui/src/views/workspace/component/CreateOrUpdateWorkspaceDialog.vue b/ui/src/views/system/workspace/component/CreateOrUpdateWorkspaceDialog.vue similarity index 100% rename from ui/src/views/workspace/component/CreateOrUpdateWorkspaceDialog.vue rename to ui/src/views/system/workspace/component/CreateOrUpdateWorkspaceDialog.vue diff --git a/ui/src/views/workspace/component/Member.vue b/ui/src/views/system/workspace/component/Member.vue similarity index 100% rename from ui/src/views/workspace/component/Member.vue rename to ui/src/views/system/workspace/component/Member.vue diff --git a/ui/src/views/workspace/index.vue b/ui/src/views/system/workspace/index.vue similarity index 100% rename from ui/src/views/workspace/index.vue rename to ui/src/views/system/workspace/index.vue