From c6ca83273779ed84de1b23b5e477063af043d015 Mon Sep 17 00:00:00 2001 From: xiaojunnuo Date: Mon, 9 Mar 2026 23:34:11 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E6=94=AF=E6=8C=81=E8=BF=81=E7=A7=BB?= =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E6=95=B0=E6=8D=AE=E5=88=B0=E4=BC=81=E4=B8=9A?= =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E4=B8=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/router/source/modules/certd.ts | 30 ++-- .../ui/certd-client/src/use/use-dialog.ts | 22 +-- .../src/views/certd/project/detail/api.ts | 14 ++ .../src/views/certd/project/detail/index.vue | 16 ++- .../src/views/certd/project/detail/use.ts | 46 ------ .../src/views/certd/project/detail/use.tsx | 131 ++++++++++++++++++ .../user/enterprise/transfer-controller.ts | 42 ++++++ .../enterprise/service/transfer-service.ts | 90 ++++++++++++ 8 files changed, 321 insertions(+), 70 deletions(-) delete mode 100644 packages/ui/certd-client/src/views/certd/project/detail/use.ts create mode 100644 packages/ui/certd-client/src/views/certd/project/detail/use.tsx create mode 100644 packages/ui/certd-server/src/controller/user/enterprise/transfer-controller.ts create mode 100644 packages/ui/certd-server/src/modules/sys/enterprise/service/transfer-service.ts diff --git a/packages/ui/certd-client/src/router/source/modules/certd.ts b/packages/ui/certd-client/src/router/source/modules/certd.ts index e38745825..d2b17c166 100644 --- a/packages/ui/certd-client/src/router/source/modules/certd.ts +++ b/packages/ui/certd-client/src/router/source/modules/certd.ts @@ -127,6 +127,21 @@ export const certdResources = [ keepAlive: true, }, }, + { + title: "certd.sysResources.currentProject", + name: "ProjectMemberManager", + path: "/certd/project/detail", + component: "/certd/project/detail/index.vue", + meta: { + show: () => { + const projectStore = useProjectStore(); + return projectStore.isEnterprise; + }, + isMenu: true, + icon: "ion:apps", + auth: true, + }, + }, { title: "certd.settings", name: "MineSetting", @@ -263,21 +278,6 @@ export const certdResources = [ isMenu: false, }, }, - { - title: "certd.sysResources.projectMemberManager", - name: "ProjectMemberManager", - path: "/certd/project/detail", - component: "/certd/project/detail/index.vue", - meta: { - show: () => { - const projectStore = useProjectStore(); - return projectStore.isEnterprise; - }, - isMenu: true, - icon: "ion:apps", - auth: true, - }, - }, ], }, { diff --git a/packages/ui/certd-client/src/use/use-dialog.ts b/packages/ui/certd-client/src/use/use-dialog.ts index 741de8a6c..71421b0e5 100644 --- a/packages/ui/certd-client/src/use/use-dialog.ts +++ b/packages/ui/certd-client/src/use/use-dialog.ts @@ -1,4 +1,5 @@ import { useFormWrapper } from "@fast-crud/fast-crud"; +import { merge } from "lodash-es"; export type FormOptionReq = { title: string; @@ -7,6 +8,7 @@ export type FormOptionReq = { body?: any; initialForm?: any; zIndex?: number; + wrapper?: any; }; export function useFormDialog() { @@ -14,19 +16,23 @@ export function useFormDialog() { async function openFormDialog(req: FormOptionReq) { function createCrudOptions() { + const warpper = merge( + { + zIndex: req.zIndex, + title: req.title, + saveRemind: false, + slots: { + "form-body-top": req.body, + }, + }, + req.wrapper + ); return { crudOptions: { columns: req.columns, form: { initialForm: req.initialForm, - wrapper: { - zIndex: req.zIndex, - title: req.title, - saveRemind: false, - slots: { - "form-body-top": req.body, - }, - }, + wrapper: warpper, async afterSubmit() {}, async doSubmit({ form }: any) { if (req.onSubmit) { diff --git a/packages/ui/certd-client/src/views/certd/project/detail/api.ts b/packages/ui/certd-client/src/views/certd/project/detail/api.ts index 2a2c8af83..eca4c5b82 100644 --- a/packages/ui/certd-client/src/views/certd/project/detail/api.ts +++ b/packages/ui/certd-client/src/views/certd/project/detail/api.ts @@ -73,3 +73,17 @@ export async function ApproveJoin(form: any) { data: form, }); } + +export async function GetSelfResources() { + return await request({ + url: "/enterprise/transfer/selfResources", + method: "post", + }); +} + +export async function TransferResources() { + return await request({ + url: "/enterprise/transfer/doTransfer", + method: "post", + }); +} diff --git a/packages/ui/certd-client/src/views/certd/project/detail/index.vue b/packages/ui/certd-client/src/views/certd/project/detail/index.vue index 6358c644b..f3cce0f7c 100644 --- a/packages/ui/certd-client/src/views/certd/project/detail/index.vue +++ b/packages/ui/certd-client/src/views/certd/project/detail/index.vue @@ -9,8 +9,12 @@ --> + + 个人数据迁移 + {{ t("certd.project.projectManage") }} +