From b58e7eb9ec4c7c732b110ec2668cc7682d2fb9be Mon Sep 17 00:00:00 2001 From: baiqi Date: Tue, 25 Jul 2023 15:51:37 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=B5=84=E6=BA=90=E6=B1=A0finished&?= =?UTF-8?q?=E6=8A=BD=E5=B1=89=E6=8F=8F=E8=BF=B0=E5=88=97=E8=A1=A8=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E9=AA=A8=E6=9E=B6=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/modules/setting/orgnization.ts | 10 + .../src/api/requrls/setting/orgnization.ts | 2 + .../components/pure/ms-description/index.vue | 16 +- .../src/components/pure/ms-drawer/index.vue | 10 +- frontend/src/models/setting/orgnization.ts | 36 ++ .../setting/system/resourcePool/detail.vue | 19 +- .../setting/system/resourcePool/index.vue | 318 +++++++++--------- 7 files changed, 254 insertions(+), 157 deletions(-) create mode 100644 frontend/src/api/modules/setting/orgnization.ts create mode 100644 frontend/src/api/requrls/setting/orgnization.ts create mode 100644 frontend/src/models/setting/orgnization.ts diff --git a/frontend/src/api/modules/setting/orgnization.ts b/frontend/src/api/modules/setting/orgnization.ts new file mode 100644 index 0000000000..2717bab7b5 --- /dev/null +++ b/frontend/src/api/modules/setting/orgnization.ts @@ -0,0 +1,10 @@ +import MSR from '@/api/http/index'; +import { OrganizationListItem } from '@/models/setting/orgnization'; +import { GetAllOrgUrl } from '@/api/requrls/setting/orgnization'; + +// 获取全部组织列表 +export function getAllOrgList() { + return MSR.post({ url: GetAllOrgUrl }); +} + +export function other() {} diff --git a/frontend/src/api/requrls/setting/orgnization.ts b/frontend/src/api/requrls/setting/orgnization.ts new file mode 100644 index 0000000000..45c46c373a --- /dev/null +++ b/frontend/src/api/requrls/setting/orgnization.ts @@ -0,0 +1,2 @@ +export const GetAllOrgUrl = '/system/organization/list-all'; +export const Other = ''; diff --git a/frontend/src/components/pure/ms-description/index.vue b/frontend/src/components/pure/ms-description/index.vue index 7bceca1fda..9b3a3f4f21 100644 --- a/frontend/src/components/pure/ms-description/index.vue +++ b/frontend/src/components/pure/ms-description/index.vue @@ -1,5 +1,13 @@ @@ -39,12 +44,15 @@ descriptions?: Description[]; footer?: boolean; mask?: boolean; + showDescription?: boolean; + showSkeleton?: boolean; [key: string]: any; } const props = withDefaults(defineProps(), { footer: true, mask: true, + showSkeleton: false, }); const emit = defineEmits(['update:visible']); diff --git a/frontend/src/models/setting/orgnization.ts b/frontend/src/models/setting/orgnization.ts new file mode 100644 index 0000000000..e16126f5c8 --- /dev/null +++ b/frontend/src/models/setting/orgnization.ts @@ -0,0 +1,36 @@ +export interface OrgAdmin { + id: string; + name: string; + email: string; + password: string; + enable: boolean; + createTime: number; + updateTime: number; + language: string; + lastOrganizationId: string; // 当前组织ID + phone: string; + source: string; // 来源:LOCAL OIDC CAS OAUTH2 + lastProjectId: string; + createUser: string; + updateUser: string; + deleted: boolean; +} + +export interface OrganizationListItem { + id: string; + num: number; // 组织编号 + name: string; + description: string; + createTime: number; + updateTime: number; + createUser: string; + updateUser: string; + deleted: boolean; + deleteUser: string; + deleteTime: number; + enable: boolean; + memberCount: number; + projectCount: number; + orgAdmins: OrgAdmin[]; // 列表组织管理员集合 + memberIds: string[]; // 组织管理员ID集合 +} diff --git a/frontend/src/views/setting/system/resourcePool/detail.vue b/frontend/src/views/setting/system/resourcePool/detail.vue index 2287cf23c8..4af099a14a 100644 --- a/frontend/src/views/setting/system/resourcePool/detail.vue +++ b/frontend/src/views/setting/system/resourcePool/detail.vue @@ -60,7 +60,7 @@ multiple allow-clear > - {{ org.label }} + {{ org.name }}