From dbbac512449a432a209254ee18af68adc3066052 Mon Sep 17 00:00:00 2001 From: RubyLiu Date: Wed, 23 Aug 2023 14:30:04 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E7=B3=BB=E7=BB=9F=E8=AE=BE=E7=BD=AE):=20?= =?UTF-8?q?=E7=BB=84=E7=BB=87=E4=B8=8E=E9=A1=B9=E7=9B=AE=E6=95=B0=E9=87=8F?= =?UTF-8?q?&=E4=BB=A3=E7=A0=81=E7=BB=93=E6=9E=84=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{system => }/organizationAndProject.ts | 7 ++++- .../{system => }/organizationAndProject.ts | 3 +++ .../business/ms-user-selector/index.vue | 3 ++- .../components/addOrganizationModal.vue | 3 ++- .../components/addProjectModal.vue | 3 ++- .../components/addUserModal.vue | 3 ++- .../components/projectDrawer.vue | 3 ++- .../components/systemOrganization.vue | 3 ++- .../components/systemProject.vue | 3 ++- .../components/userDrawer.vue | 3 ++- .../system/organizationAndProject/index.vue | 19 ++++++++++++-- .../usergroup/components/addUserModal.vue | 26 ++++++++++--------- .../system/usergroup/components/authTable.vue | 1 + .../system/usergroup/components/userTable.vue | 1 + 14 files changed, 58 insertions(+), 23 deletions(-) rename frontend/src/api/modules/setting/{system => }/organizationAndProject.ts (94%) rename frontend/src/api/requrls/setting/{system => }/organizationAndProject.ts (95%) diff --git a/frontend/src/api/modules/setting/system/organizationAndProject.ts b/frontend/src/api/modules/setting/organizationAndProject.ts similarity index 94% rename from frontend/src/api/modules/setting/system/organizationAndProject.ts rename to frontend/src/api/modules/setting/organizationAndProject.ts index d70c0a6e7b..56e0c3e7b5 100644 --- a/frontend/src/api/modules/setting/system/organizationAndProject.ts +++ b/frontend/src/api/modules/setting/organizationAndProject.ts @@ -1,5 +1,5 @@ import MSR from '@/api/http/index'; -import * as orgUrl from '@/api/requrls/setting/system/organizationAndProject'; +import * as orgUrl from '@/api/requrls/setting/organizationAndProject'; import { TableQueryParams } from '@/models/common'; import { AddUserToOrgOrProjectParams } from '@/models/setting/systemOrg'; import { @@ -91,3 +91,8 @@ export function createOrUpdateProject(data: CreateOrUpdateSystemProjectParams) { export function getAllUser() { return MSR.get({ url: orgUrl.getOrgOrProjectAdminUrl }); } + +// 获取项目和组织的总数 +export function getOrgAndProjectCount() { + return MSR.get({ url: orgUrl.getOrgAndProjectCountUrl }); +} diff --git a/frontend/src/api/requrls/setting/system/organizationAndProject.ts b/frontend/src/api/requrls/setting/organizationAndProject.ts similarity index 95% rename from frontend/src/api/requrls/setting/system/organizationAndProject.ts rename to frontend/src/api/requrls/setting/organizationAndProject.ts index 71410c7682..bfe6653254 100644 --- a/frontend/src/api/requrls/setting/system/organizationAndProject.ts +++ b/frontend/src/api/requrls/setting/organizationAndProject.ts @@ -52,3 +52,6 @@ export const getEnableProjectUrl = '/system/project/enable/'; export const getDisableProjectUrl = '/system/project/disable/'; // 获取组织或项目的管理员 export const getOrgOrProjectAdminUrl = '/system/project/user-list'; + +// 获取项目和组织的总数 +export const getOrgAndProjectCountUrl = '/system/organization/total'; diff --git a/frontend/src/components/business/ms-user-selector/index.vue b/frontend/src/components/business/ms-user-selector/index.vue index 0e1e6d31b1..6bacf3c967 100644 --- a/frontend/src/components/business/ms-user-selector/index.vue +++ b/frontend/src/components/business/ms-user-selector/index.vue @@ -23,7 +23,7 @@ +@/api/modules/setting/organizationAndProject diff --git a/frontend/src/views/setting/system/organizationAndProject/components/addOrganizationModal.vue b/frontend/src/views/setting/system/organizationAndProject/components/addOrganizationModal.vue index 28db52cd7a..1f0c034d5b 100644 --- a/frontend/src/views/setting/system/organizationAndProject/components/addOrganizationModal.vue +++ b/frontend/src/views/setting/system/organizationAndProject/components/addOrganizationModal.vue @@ -53,7 +53,7 @@ import { reactive, ref, watchEffect, computed } from 'vue'; import type { FormInstance, ValidatedError } from '@arco-design/web-vue'; import MsUserSelector from '@/components/business/ms-user-selector/index.vue'; - import { createOrUpdateOrg } from '@/api/modules/setting/system/organizationAndProject'; + import { createOrUpdateOrg } from '@/api/modules/setting/organizationAndProject'; import { Message } from '@arco-design/web-vue'; import { CreateOrUpdateSystemOrgParams } from '@/models/setting/system/orgAndProject'; @@ -119,3 +119,4 @@ }); const isEdit = computed(() => !!props.currentOrganization?.id); +@/api/modules/setting/organizationAndProject diff --git a/frontend/src/views/setting/system/organizationAndProject/components/addProjectModal.vue b/frontend/src/views/setting/system/organizationAndProject/components/addProjectModal.vue index ba00cb6ceb..776ff5a9e7 100644 --- a/frontend/src/views/setting/system/organizationAndProject/components/addProjectModal.vue +++ b/frontend/src/views/setting/system/organizationAndProject/components/addProjectModal.vue @@ -85,7 +85,7 @@ import { reactive, ref, watchEffect, computed } from 'vue'; import type { FormInstance, ValidatedError } from '@arco-design/web-vue'; import MsUserSelector from '@/components/business/ms-user-selector/index.vue'; - import { createOrUpdateProject, getSystemOrgOption } from '@/api/modules/setting/system/organizationAndProject'; + import { createOrUpdateProject, getSystemOrgOption } from '@/api/modules/setting/organizationAndProject'; import { Message } from '@arco-design/web-vue'; import MsIcon from '@/components/pure/ms-icon-font/index.vue'; import { CreateOrUpdateSystemProjectParams, SystemOrgOption } from '@/models/setting/system/orgAndProject'; @@ -184,3 +184,4 @@ } }); +@/api/modules/setting/organizationAndProject diff --git a/frontend/src/views/setting/system/organizationAndProject/components/addUserModal.vue b/frontend/src/views/setting/system/organizationAndProject/components/addUserModal.vue index ea0c5fccef..e9d77e9370 100644 --- a/frontend/src/views/setting/system/organizationAndProject/components/addUserModal.vue +++ b/frontend/src/views/setting/system/organizationAndProject/components/addUserModal.vue @@ -33,7 +33,7 @@ +@/api/modules/setting/organizationAndProject diff --git a/frontend/src/views/setting/system/organizationAndProject/components/systemOrganization.vue b/frontend/src/views/setting/system/organizationAndProject/components/systemOrganization.vue index 6e1559c529..c64f6ae8e4 100644 --- a/frontend/src/views/setting/system/organizationAndProject/components/systemOrganization.vue +++ b/frontend/src/views/setting/system/organizationAndProject/components/systemOrganization.vue @@ -61,7 +61,7 @@ deleteOrg, enableOrDisableOrg, revokeDeleteOrg, - } from '@/api/modules/setting/system/organizationAndProject'; + } from '@/api/modules/setting/organizationAndProject'; import { TableKeyEnum } from '@/enums/tableEnum'; import { MsTableColumn } from '@/components/pure/ms-table/type'; import MsTableMoreAction from '@/components/pure/ms-table-more-action/index.vue'; @@ -285,3 +285,4 @@ cursor: pointer; } +@/api/modules/setting/organizationAndProject diff --git a/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue b/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue index 2fde371d1e..5cdcaa7d77 100644 --- a/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue +++ b/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue @@ -56,7 +56,7 @@ deleteProject, enableOrDisableProject, revokeDeleteProject, - } from '@/api/modules/setting/system/organizationAndProject'; + } from '@/api/modules/setting/organizationAndProject'; import { TableKeyEnum } from '@/enums/tableEnum'; import { MsTableColumn } from '@/components/pure/ms-table/type'; import MsTableMoreAction from '@/components/pure/ms-table-more-action/index.vue'; @@ -278,3 +278,4 @@ cursor: pointer; } +@/api/modules/setting/organizationAndProject diff --git a/frontend/src/views/setting/system/organizationAndProject/components/userDrawer.vue b/frontend/src/views/setting/system/organizationAndProject/components/userDrawer.vue index af9e7492fd..1f44b8502a 100644 --- a/frontend/src/views/setting/system/organizationAndProject/components/userDrawer.vue +++ b/frontend/src/views/setting/system/organizationAndProject/components/userDrawer.vue @@ -50,7 +50,7 @@ import { postUserTableByOrgIdOrProjectId, deleteUserFromOrgOrProject, - } from '@/api/modules/setting/system/organizationAndProject'; + } from '@/api/modules/setting/organizationAndProject'; import { MsTableColumn } from '@/components/pure/ms-table/type'; import useTable from '@/components/pure/ms-table/useTable'; import { useI18n } from '@/hooks/useI18n'; @@ -161,3 +161,4 @@ } ); +@/api/modules/setting/organizationAndProject diff --git a/frontend/src/views/setting/system/organizationAndProject/index.vue b/frontend/src/views/setting/system/organizationAndProject/index.vue index 1214e51d10..a7b54a295e 100644 --- a/frontend/src/views/setting/system/organizationAndProject/index.vue +++ b/frontend/src/views/setting/system/organizationAndProject/index.vue @@ -33,13 +33,14 @@ diff --git a/frontend/src/views/setting/system/usergroup/components/addUserModal.vue b/frontend/src/views/setting/system/usergroup/components/addUserModal.vue index 08cec9874f..b969a9c669 100644 --- a/frontend/src/views/setting/system/usergroup/components/addUserModal.vue +++ b/frontend/src/views/setting/system/usergroup/components/addUserModal.vue @@ -33,7 +33,7 @@