diff --git a/frontend/nginx.conf b/frontend/nginx.conf
index 644799f2c2..560ec53fd4 100644
--- a/frontend/nginx.conf
+++ b/frontend/nginx.conf
@@ -17,8 +17,8 @@ http{
add_header X-Frame-Options "SAMEORIGIN";
try_files $uri $uri/ /index.html;
- location ^~ /app/ {
- proxy_pass http://172.16.200.18:8081/app/;
+ location ^~ /front/ {
+ proxy_pass http://172.16.200.18:8081/;
proxy_connect_timeout 2s;
proxy_read_timeout 600s;
proxy_send_timeout 600s;
diff --git a/frontend/src/api/modules/setting/system/organizationAndProject.ts b/frontend/src/api/modules/setting/system/organizationAndProject.ts
new file mode 100644
index 0000000000..597f28b465
--- /dev/null
+++ b/frontend/src/api/modules/setting/system/organizationAndProject.ts
@@ -0,0 +1,23 @@
+import MSR from '@/api/http/index';
+import * as orgUrl from '@/api/requrls/setting/system/organizationAndProject';
+import { TableQueryParams } from '@/models/common';
+
+// 获取组织列表
+export function postOrgTable(data: TableQueryParams) {
+ return MSR.post({ url: orgUrl.postOrgTableUrl, data });
+}
+
+// 获取项目列表
+export function postProjectTable(data: TableQueryParams) {
+ return MSR.post({ url: orgUrl.postProjectTableUrl, data });
+}
+
+// 根据组织id获取项目列表
+export function postProjectTableByOrgId(data: TableQueryParams) {
+ return MSR.post({ url: orgUrl.postProjectTableByOrgUrl, data });
+}
+
+// 根据组织id获取用户列表
+export function postUserTableByOrgId(data: TableQueryParams) {
+ return MSR.post({ url: orgUrl.postOrgMemberUrl, data });
+}
diff --git a/frontend/src/api/requrls/setting/system/organizationAndProject.ts b/frontend/src/api/requrls/setting/system/organizationAndProject.ts
new file mode 100644
index 0000000000..b50b428738
--- /dev/null
+++ b/frontend/src/api/requrls/setting/system/organizationAndProject.ts
@@ -0,0 +1,46 @@
+// 修改组织
+export const postModifyOrgUrl = '/system/organization/update';
+// 获取系统下所有组织-下拉选项
+export const postOrgOptionsUrl = '/system/organization/option/all';
+// 获取系统下所有组织-Table
+export const postOrgTableUrl = '/system/organization/list';
+// 获取组织下所有项目-Table
+export const postProjectTableByOrgUrl = '/system/organization/list-project';
+// 获取组织成员
+export const postOrgMemberUrl = '/system/organization/list-member';
+// 添加组织
+export const postAddOrgUrl = '/system/organization/add';
+// 添加组织成员
+export const postAddOrgMemberUrl = '/system/organization/member/add';
+// 删除组织成员
+export const getDeleteOrgMemberUrl = '/system/organization/remove-member/';
+// 恢复组织
+export const getRecoverOrgUrl = '/system/organization/recover/';
+// 启用组织
+export const getEnableOrgUrl = '/system/organization/enable/';
+// 禁用组织
+export const getDisableOrgUrl = '/system/organization/disable/';
+// 删除组织
+export const getDeleteOrgUrl = '/system/organization/delete/';
+// 获取系统默认组织
+export const getOrgDefaultUrl = '/system/organization/default';
+
+// 项目
+// 更新项目信息
+export const postModifyProjectUrl = '/system/project/update';
+// 获取项目列表
+export const postProjectTableUrl = '/system/project/list';
+// 获取项目成员
+export const postProjectMemberUrl = '/system/project/member/list';
+// 添加项目
+export const postAddProjectUrl = '/system/project/add';
+// 添加项目成员
+export const postAddProjectMemberUrl = '/system/project/member/add';
+// 撤销项目
+export const getRevokeProjectUrl = '/system/project/revoke/';
+// 移除项目成员
+export const getDeleteProjectMemberUrl = '/system/project/remove-member/';
+// 根据ID获取项目信息
+export const getProjectInfoUrl = '/system/project/get/';
+// 删除项目
+export const getDeleteProjectUrl = '/system/project/delete/';
diff --git a/frontend/src/components/bussiness/ms-user-selector/index.vue b/frontend/src/components/bussiness/ms-user-selector/index.vue
new file mode 100644
index 0000000000..f09752d520
--- /dev/null
+++ b/frontend/src/components/bussiness/ms-user-selector/index.vue
@@ -0,0 +1,72 @@
+
+
+
+ {{ data.name }}
+
+
+ {{ data.name }}
+ {{ `(${data.email})` }}
+
+
+
+
+
diff --git a/frontend/src/components/pure/ms-pagination/pagination.tsx b/frontend/src/components/pure/ms-pagination/pagination.tsx
index 883a5f329d..53d744a355 100644
--- a/frontend/src/components/pure/ms-pagination/pagination.tsx
+++ b/frontend/src/components/pure/ms-pagination/pagination.tsx
@@ -390,6 +390,8 @@ export default defineComponent({
return null;
}
+ if (props.total === 0) return null;
+
return (
{props.showTotal && (
diff --git a/frontend/src/components/pure/ms-table/base-table.vue b/frontend/src/components/pure/ms-table/base-table.vue
index c8437d8d47..638efa19a7 100644
--- a/frontend/src/components/pure/ms-table/base-table.vue
+++ b/frontend/src/components/pure/ms-table/base-table.vue
@@ -1,7 +1,7 @@
-
+
{{ t(item.title as string) }}
@@ -45,14 +45,16 @@
-
-
- {{ t('system.user.tableEnable') }}
-
-
-
- {{ t('system.user.tableDisable') }}
-
+
+
+
+ {{ t('msTable.enable') }}
+
+
+
+ {{ t('msTable.disable') }}
+
+
([]);
+ const currentColumns = ref([]);
const props = defineProps<{
selectedKeys?: (string | number)[];
actionConfig?: BatchActionConfig;
noDisable?: boolean;
+ showSetting?: boolean;
+ columns: MsTableColumn;
}>();
const emit = defineEmits<{
(e: 'selectedChange', value: (string | number)[]): void;
@@ -160,7 +164,13 @@
};
const initColumn = () => {
- columns.value = tableStore.getShowInTableColumns(attrs.tableKey as string);
+ let tmpArr: MsTableColumn = [];
+ if (props.showSetting) {
+ tmpArr = tableStore.getShowInTableColumns(attrs.tableKey as string);
+ } else {
+ tmpArr = props.columns;
+ }
+ currentColumns.value = tmpArr;
};
// 选择公共执行方法
const selectionChange = (arr: (string | number)[], setCurrentSelect: boolean, isAll = false) => {
diff --git a/frontend/src/components/pure/ms-table/batchAction.vue b/frontend/src/components/pure/ms-table/batchAction.vue
index bd4278cbae..f60c2a83db 100644
--- a/frontend/src/components/pure/ms-table/batchAction.vue
+++ b/frontend/src/components/pure/ms-table/batchAction.vue
@@ -16,7 +16,7 @@
-
+
@@ -34,6 +34,7 @@
diff --git a/frontend/src/views/setting/system/organizationAndProject/components/projectDrawer.vue b/frontend/src/views/setting/system/organizationAndProject/components/projectDrawer.vue
new file mode 100644
index 0000000000..4c32449163
--- /dev/null
+++ b/frontend/src/views/setting/system/organizationAndProject/components/projectDrawer.vue
@@ -0,0 +1,98 @@
+
+
+
+
+
+
+
diff --git a/frontend/src/views/setting/system/organizationAndProject/components/systemOrganization.vue b/frontend/src/views/setting/system/organizationAndProject/components/systemOrganization.vue
new file mode 100644
index 0000000000..64ed578a80
--- /dev/null
+++ b/frontend/src/views/setting/system/organizationAndProject/components/systemOrganization.vue
@@ -0,0 +1,196 @@
+
+
+
+ {{ record.memberCount }}
+
+
+ {{ record.projectCount }}
+
+
+
+ {{ t('system.organization.enable') }}
+ {{ t('system.organization.delete') }}
+
+
+ {{ t('system.organization.edit') }}
+ {{ t('system.organization.addMember') }}
+ {{ t('system.organization.end') }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue b/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue
new file mode 100644
index 0000000000..8aeb073b5d
--- /dev/null
+++ b/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue
@@ -0,0 +1,137 @@
+
+
+
+
+ {{ t('system.organization.enable') }}
+ {{ t('system.organization.delete') }}
+
+
+ {{ t('system.organization.edit') }}
+ {{ t('system.organization.addUser') }}
+ {{ t('system.organization.end') }}
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/setting/system/organizationAndProject/components/userDrawer.vue b/frontend/src/views/setting/system/organizationAndProject/components/userDrawer.vue
new file mode 100644
index 0000000000..b0af469c9f
--- /dev/null
+++ b/frontend/src/views/setting/system/organizationAndProject/components/userDrawer.vue
@@ -0,0 +1,106 @@
+
+
+
+
+
+ {{ t('system.organization.addMember') }}
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/setting/system/organizationAndProject/index.vue b/frontend/src/views/setting/system/organizationAndProject/index.vue
new file mode 100644
index 0000000000..924c75aa03
--- /dev/null
+++ b/frontend/src/views/setting/system/organizationAndProject/index.vue
@@ -0,0 +1,59 @@
+
+
+
+
+
{{
+ currentTable === 'organization'
+ ? t('system.organization.createOrganization')
+ : t('system.organization.createProject')
+ }}
+
+
+
+
+ {{
+ t('system.organization.organizationCount', { count: organizationCount })
+ }}
+ {{ t('system.organization.projectCount', { count: projectCount }) }}
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/views/setting/system/organizationAndProject/locale/en-US.ts b/frontend/src/views/setting/system/organizationAndProject/locale/en-US.ts
new file mode 100644
index 0000000000..3366925639
--- /dev/null
+++ b/frontend/src/views/setting/system/organizationAndProject/locale/en-US.ts
@@ -0,0 +1,37 @@
+export default {
+ 'system.organization.create': 'Create',
+ 'system.organization.cancel': 'Cancel',
+ 'system.organization.add': 'Add',
+ 'system.organization.delete': 'Delete',
+ 'system.organization.edit': 'Edit',
+ 'system.organization.save': 'Save',
+ 'system.organization.end': 'End',
+ 'system.organization.addMember': 'Add Member',
+ 'system.organization.addMemberPlaceholder': 'Please select member',
+ 'system.organization.addMemberRequired': 'Please select member',
+ 'system.organization.searchPlaceholder': 'Please enter the organization name to query',
+ 'system.organization.addOrganization': 'Add organization',
+ 'system.organization.createOrganization': 'Create organization',
+ 'system.organization.organizationName': 'Organization name',
+ 'system.organization.organizationNamePlaceholder':
+ 'Please enter the organization name, which cannot be duplicated with other organization names',
+ 'system.organization.organizationNameRequired': 'Organization name cannot be empty',
+ 'system.organization.organizationNameDuplicate': 'Already have {name} please change',
+ 'system.organization.organizationAdmin': 'Organization administrator',
+ 'system.organization.organizationAdminPlaceholder':
+ 'The organization administrator defaults to the person who created the organization',
+ 'system.organization.description': 'Description',
+ 'system.organization.descriptionPlaceholder': 'Please describe the organization',
+ 'system.organization.ID': 'ID',
+ 'system.organization.name': 'Name',
+ 'system.organization.member': 'Member',
+ 'system.organization.project': 'Project',
+ 'system.organization.status': 'Status',
+ 'system.organization.creator': 'Creator',
+ 'system.organization.createTime': 'Create Time',
+ 'system.organization.operation': 'Operation',
+ 'system.organization.organizationCount': 'Organization({count})',
+ 'system.organization.projectCount': 'Project({count})',
+ 'system.organization.projectName': 'Project({name})',
+ 'system.project.name': 'Project name',
+};
diff --git a/frontend/src/views/setting/system/organizationAndProject/locale/zh-CN.ts b/frontend/src/views/setting/system/organizationAndProject/locale/zh-CN.ts
new file mode 100644
index 0000000000..d371af8257
--- /dev/null
+++ b/frontend/src/views/setting/system/organizationAndProject/locale/zh-CN.ts
@@ -0,0 +1,35 @@
+export default {
+ 'system.organization.create': '创建',
+ 'system.organization.cancel': '取消',
+ 'system.organization.add': '添加',
+ 'system.organization.delete': '删除',
+ 'system.organization.edit': '编辑',
+ 'system.organization.save': '保存',
+ 'system.organization.end': '结束',
+ 'system.organization.addMember': '添加成员',
+ 'system.organization.addMemberPlaceholder': '请选择成员',
+ 'system.organization.addMemberRequired': '请选择成员',
+ 'system.organization.searchPlaceholder': '请输入组织名称回车查询',
+ 'system.organization.addOrganization': '添加组织',
+ 'system.organization.createOrganization': '创建组织',
+ 'system.organization.organizationName': '组织名称',
+ 'system.organization.organizationNamePlaceholder': '请输入组织名称,不可与其他组织名称重复',
+ 'system.organization.organizationNameRequired': '组织名称不能为空',
+ 'system.organization.organizationNameDuplicate': '已有 {name} 请更改',
+ 'system.organization.organizationAdmin': '组织管理员',
+ 'system.organization.organizationAdminPlaceholder': '默认选择创建组织人为组织管理员',
+ 'system.organization.description': '描述',
+ 'system.organization.descriptionPlaceholder': '请对组织进行描述',
+ 'system.organization.ID': 'ID',
+ 'system.organization.name': '名称',
+ 'system.organization.member': '成员',
+ 'system.organization.project': '项目',
+ 'system.organization.status': '状态',
+ 'system.organization.creator': '创建人',
+ 'system.organization.createTime': '创建时间',
+ 'system.organization.operation': '操作',
+ 'system.organization.organizationCount': '组织({count})',
+ 'system.organization.projectCount': '项目({count})',
+ 'system.organization.projectName': '项目({name})',
+ 'system.project.name': '项目名称',
+};
diff --git a/frontend/src/views/setting/system/usergroup/components/addUserModal.vue b/frontend/src/views/setting/system/usergroup/components/addUserModal.vue
index 23bb4cd0d1..fafbac49c5 100644
--- a/frontend/src/views/setting/system/usergroup/components/addUserModal.vue
+++ b/frontend/src/views/setting/system/usergroup/components/addUserModal.vue
@@ -16,23 +16,7 @@
:label="t('system.userGroup.user')"
:rules="[{ required: true, message: t('system.userGroup.pleaseSelectUser') }]"
>
-
-
- {{ data.name }}
-
-
- {{ data.name }}
- {{ `(${data.email})` }}
-
-
+
@@ -46,6 +30,7 @@
import { useUserGroupStore } from '@/store';
import { getUserList, addUserToUserGroup } from '@/api/modules/setting/usergroup';
import type { FormInstance, ValidatedError } from '@arco-design/web-vue';
+ import MsUserSelector from '@/components/bussiness/ms-user-selector/index.vue';
const { t } = useI18n();
const props = defineProps<{
@@ -59,8 +44,6 @@
(e: 'submit', value: string[]): void;
}>();
- const fieldNames = { value: 'id', label: 'name' };
-
const currentVisible = ref(props.visible);
const loading = ref(false);
@@ -102,18 +85,6 @@
});
};
- const handleSearch = (value: string) => {
- if (value) {
- loading.value = true;
- window.setTimeout(() => {
- userOptions.value = userOptions.value.filter((item) => item.name.includes(value));
- loading.value = false;
- }, 60);
- } else {
- userOptions.value = allOption.value;
- }
- };
-
onMounted(() => {
initUserList();
});
diff --git a/frontend/src/views/setting/system/usergroup/components/authTable.vue b/frontend/src/views/setting/system/usergroup/components/authTable.vue
index 320cf10068..cd6dd1e7b4 100644
--- a/frontend/src/views/setting/system/usergroup/components/authTable.vue
+++ b/frontend/src/views/setting/system/usergroup/components/authTable.vue
@@ -2,7 +2,7 @@
.usergroup-auth-table {
position: relative;
+ min-height: calc(100vh - 230px);
:deep(.arco-table-container) {
border-top: 1px solid var(--color-text-n8) !important;
border-right: 1px solid var(--color-text-n8) !important;
diff --git a/frontend/src/views/setting/system/usergroup/components/userTable.vue b/frontend/src/views/setting/system/usergroup/components/userTable.vue
index 70c38d3e32..1d3fd8c230 100644
--- a/frontend/src/views/setting/system/usergroup/components/userTable.vue
+++ b/frontend/src/views/setting/system/usergroup/components/userTable.vue
@@ -59,7 +59,7 @@
const { propsRes, propsEvent, loadList, setLoadListParams } = useTable(postUserByUserGroup, {
tableKey: TableKeyEnum.USERGROUPUSER,
- scroll: { y: 'auto', x: '600px' },
+ scroll: { x: '600px' },
selectable: true,
noDisable: true,
});
diff --git a/frontend/src/views/setting/system/usergroup/index.vue b/frontend/src/views/setting/system/usergroup/index.vue
index 740d5194f2..e4a3219907 100644
--- a/frontend/src/views/setting/system/usergroup/index.vue
+++ b/frontend/src/views/setting/system/usergroup/index.vue
@@ -8,8 +8,8 @@
-