diff --git a/frontend/src/components/pure/ms-table/base-table.vue b/frontend/src/components/pure/ms-table/base-table.vue
index e702d9d6a0..624c028003 100644
--- a/frontend/src/components/pure/ms-table/base-table.vue
+++ b/frontend/src/components/pure/ms-table/base-table.vue
@@ -129,16 +129,12 @@
-
-
-
{{ item.enableTitle ? t(item.enableTitle) : t('msTable.enable') }}
-
-
-
-
- {{ item.disableTitle ? t(item.disableTitle) : t('msTable.disable') }}
-
-
+
@@ -312,6 +308,7 @@
import { useI18n } from '@/hooks/useI18n';
import { useAppStore, useTableStore } from '@/store';
+ import { hasAnyPermission } from '@/utils/permission';
import { DragSortParams } from '@/models/common';
import { ColumnEditTypeEnum, SelectAllEnum, SpecialColumnEnum, TableKeyEnum } from '@/enums/tableEnum';
@@ -374,6 +371,7 @@
(e: 'expand', record: TableData): void | Promise;
(e: 'cell-click', record: TableData, column: TableColumnData, ev: Event): void | Promise;
(e: 'clearSelector'): void;
+ (e: 'enableChange', record: any, newValue: string | number | boolean): void;
(
e: 'filterChange',
dataIndex: string,
@@ -697,6 +695,11 @@
}
};
+ function handleChangeEnable(newValue: string | number | boolean, record: TableData) {
+ emit('enableChange', record, newValue);
+ return false;
+ }
+
// 根据参数获取全选按钮的位置
const getBatchLeft = () => {
if (attrs.enableDrag) {
diff --git a/frontend/src/models/setting/system/orgAndProject.ts b/frontend/src/models/setting/system/orgAndProject.ts
index 94cc4f02ed..cf083d3d9e 100644
--- a/frontend/src/models/setting/system/orgAndProject.ts
+++ b/frontend/src/models/setting/system/orgAndProject.ts
@@ -1,4 +1,5 @@
import { TableQueryParams } from '@/models/common';
+import type { ResourcePoolItem } from '@/models/setting/resourcePool';
import { UserItem } from '../log';
@@ -59,4 +60,7 @@ export interface OrgProjectTableItem {
memberCount: number;
userIds: string[];
resourcePoolIds: string[];
+ orgAdmins: Record;
+ moduleIds: string[];
+ resourcePoolList: ResourcePoolItem[];
}
diff --git a/frontend/src/views/project-management/fileManagement/components/rightBox.vue b/frontend/src/views/project-management/fileManagement/components/rightBox.vue
index 3b0c7ecc98..cb0ce5ffff 100644
--- a/frontend/src/views/project-management/fileManagement/components/rightBox.vue
+++ b/frontend/src/views/project-management/fileManagement/components/rightBox.vue
@@ -76,9 +76,43 @@
{{ formatFileSize(record.size) }}
-
+
+
+
+ {{ t('project.fileManagement.move') }}
+
+
+
{{ t('project.fileManagement.download') }}
+
e.label !== 'common.enable');
+ } else if (record.enable === false) {
+ enableActions = enableActions.filter((e) => e.label !== 'common.disable');
+ }
+
+ const deleteActions = [
{
label: 'project.fileManagement.delete',
eventTag: 'delete',
danger: true,
},
];
+
+ const jarFileActions: ActionsItem[] = [
+ {
+ label: 'project.fileManagement.move',
+ eventTag: 'move',
+ },
+ {
+ isDivider: true,
+ },
+ ];
+
if (showType.value === 'card') {
- jarFileActions = [
+ return [
{
label: 'project.fileManagement.download',
eventTag: 'download',
},
...jarFileActions,
+ ...enableActions,
+ ...deleteActions,
];
}
+
if (record.storage === 'GIT') {
- jarFileActions = jarFileActions.filter((e) => e.eventTag !== 'move');
+ return jarFileActions.filter((e) => e.eventTag !== 'move');
}
- if (record.enable) {
- jarFileActions = jarFileActions.filter((e) => e.label !== 'common.enable');
- } else if (record.enable === false) {
- jarFileActions = jarFileActions.filter((e) => e.label !== 'common.disable');
- }
- return jarFileActions;
+
+ return [...jarFileActions, ...deleteActions];
}
const hasOperationPermission = computed(() =>
hasAnyPermission([
@@ -594,7 +644,7 @@
slotName: 'action',
dataIndex: 'operation',
fixed: 'right',
- width: hasOperationPermission.value ? 120 : 50,
+ width: hasOperationPermission.value ? 180 : 50,
},
];
const tableStore = useTableStore();
@@ -993,6 +1043,13 @@
}
}
+ // 移动
+ function handleMove(record: FileItem) {
+ isBatchMove.value = false;
+ activeFile.value = record;
+ moveModalVisible.value = true;
+ }
+
/**
* 处理表格更多按钮事件
* @param item
@@ -1000,9 +1057,7 @@
function handleMoreActionSelect(item: ActionsItem, record: FileItem) {
switch (item.eventTag) {
case 'move':
- isBatchMove.value = false;
- activeFile.value = record;
- moveModalVisible.value = true;
+ handleMove(record);
break;
case 'delete':
delFile(record, false);
@@ -1276,6 +1331,12 @@
});
}
+ // 开启|禁用
+ function handleChangeEnable(newValue: string | number | boolean, record: FileItem) {
+ toggleJarFile(record);
+ return false;
+ }
+
await tableStore.initColumn(TableKeyEnum.FILE_MANAGEMENT_FILE, columns, 'drawer');
diff --git a/frontend/src/views/setting/organization/project/orgProject.vue b/frontend/src/views/setting/organization/project/orgProject.vue
index 0bc85cbef8..921ebc2beb 100644
--- a/frontend/src/views/setting/organization/project/orgProject.vue
+++ b/frontend/src/views/setting/organization/project/orgProject.vue
@@ -17,7 +17,7 @@
@clear="fetchData"
>
-
+
@@ -57,9 +57,6 @@
-
- {{ t('common.enable') }}
-
{{ t('common.delete') }}
@@ -185,6 +182,7 @@
dataIndex: 'enable',
disableTitle: 'common.end',
showDrag: true,
+ permission: ['ORGANIZATION_PROJECT:READ+UPDATE'],
},
{
title: 'common.desc',
@@ -261,11 +259,6 @@
});
const tableActions: ActionsItem[] = [
- {
- label: 'common.end',
- eventTag: 'end',
- permission: ['ORGANIZATION_PROJECT:READ+UPDATE'],
- },
{
label: 'system.user.delete',
eventTag: 'delete',
@@ -302,7 +295,11 @@
});
};
- const showAddProjectModal = (record: any) => {
+ function enableChange(record: OrgProjectTableItem, newValue: string | number | boolean) {
+ handleEnableOrDisableProject(record, newValue as boolean);
+ }
+
+ const showAddProjectModal = (record: OrgProjectTableItem) => {
const { id, name, description, enable, adminList, organizationId, moduleIds, resourcePoolList } = record;
currentUpdateProject.value = {
id,
@@ -317,7 +314,7 @@
addProjectVisible.value = true;
};
- const showAddUserModal = (record: any) => {
+ const showAddUserModal = (record: OrgProjectTableItem) => {
currentProjectId.value = record.id;
userVisible.value = true;
};
@@ -406,9 +403,6 @@
const handleMoreAction = (tag: ActionsItem, record: TableData) => {
const { eventTag } = tag;
switch (eventTag) {
- case 'end':
- handleEnableOrDisableProject(record, false);
- break;
case 'delete':
handleDelete(record);
break;
diff --git a/frontend/src/views/setting/system/organizationAndProject/components/systemOrganization.vue b/frontend/src/views/setting/system/organizationAndProject/components/systemOrganization.vue
index 32c87010d4..66fc6a3110 100644
--- a/frontend/src/views/setting/system/organizationAndProject/components/systemOrganization.vue
+++ b/frontend/src/views/setting/system/organizationAndProject/components/systemOrganization.vue
@@ -1,5 +1,5 @@
-
+
@@ -46,11 +46,6 @@
}}
- {{ t('common.enable') }}
{{
t('common.delete')
}}
@@ -62,11 +57,10 @@
{{
t('system.organization.addMember')
}}
- {{ t('common.end') }}
+
+ {{
+ t('system.project.enterOrganization')
+ }}
{
+ const handleEnableOrDisableOrg = async (record: OrgProjectTableItem, isEnable = true) => {
const title = isEnable ? t('system.organization.enableTitle') : t('system.organization.endTitle');
const content = isEnable ? t('system.organization.enableContent') : t('system.organization.endContent');
const okText = isEnable ? t('common.confirmStart') : t('common.confirmEnd');
@@ -276,7 +276,11 @@
});
};
- const showOrganizationModal = (record: any) => {
+ function enableChange(record: OrgProjectTableItem, newValue: string | number | boolean) {
+ handleEnableOrDisableOrg(record, newValue as boolean);
+ }
+
+ const showOrganizationModal = (record: OrgProjectTableItem) => {
currentOrganizationId.value = record.id;
orgVisible.value = true;
currentUpdateOrganization.value = {
@@ -287,7 +291,7 @@
};
};
- const showAddUserModal = (record: any) => {
+ const showAddUserModal = (record: OrgProjectTableItem) => {
currentOrganizationId.value = record.id;
userVisible.value = true;
};
diff --git a/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue b/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue
index 1f15cf5753..45f78d93f8 100644
--- a/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue
+++ b/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue
@@ -1,5 +1,5 @@
-
+
@@ -37,11 +37,6 @@
}}
- {{ t('common.enable') }}
{{
t('common.delete')
}}
@@ -164,6 +159,7 @@
title: 'system.organization.status',
dataIndex: 'enable',
disableTitle: 'common.end',
+ permission: ['SYSTEM_ORGANIZATION_PROJECT:READ+UPDATE'],
},
{
title: 'common.desc',
@@ -238,11 +234,6 @@
});
const tableActions: ActionsItem[] = [
- {
- label: 'common.end',
- eventTag: 'end',
- permission: ['SYSTEM_ORGANIZATION_PROJECT:READ+UPDATE'],
- },
{
label: 'system.user.delete',
eventTag: 'delete',
@@ -250,7 +241,7 @@
},
];
- const handleEnableOrDisableProject = async (record: any, isEnable = true) => {
+ const handleEnableOrDisableProject = async (record: OrgProjectTableItem, isEnable = true) => {
const title = isEnable ? t('system.project.enableTitle') : t('system.project.endTitle');
const content = isEnable ? t('system.project.enableContent') : t('system.project.endContent');
const okText = isEnable ? t('common.confirmStart') : t('common.confirmEnd');
@@ -274,7 +265,11 @@
});
};
- const showAddProjectModal = (record: any) => {
+ function enableChange(record: OrgProjectTableItem, newValue: string | number | boolean) {
+ handleEnableOrDisableProject(record, newValue as boolean);
+ }
+
+ const showAddProjectModal = (record: OrgProjectTableItem) => {
const { id, name, description, enable, adminList, organizationId, moduleIds, resourcePoolList } = record;
addProjectVisible.value = true;
currentUpdateProject.value = {
@@ -289,7 +284,7 @@
};
};
- const showAddUserModal = (record: any) => {
+ const showAddUserModal = (record: OrgProjectTableItem) => {
currentProjectId.value = record.id;
userVisible.value = true;
};
@@ -376,9 +371,6 @@
const handleMoreAction = (tag: ActionsItem, record: TableData) => {
const { eventTag } = tag;
switch (eventTag) {
- case 'end':
- handleEnableOrDisableProject(record, false);
- break;
case 'delete':
handleDelete(record);
break;
diff --git a/frontend/src/views/setting/system/organizationAndProject/locale/en-US.ts b/frontend/src/views/setting/system/organizationAndProject/locale/en-US.ts
index cc53118009..c0992b9ef4 100644
--- a/frontend/src/views/setting/system/organizationAndProject/locale/en-US.ts
+++ b/frontend/src/views/setting/system/organizationAndProject/locale/en-US.ts
@@ -82,4 +82,5 @@ export default {
'system.project.projectAdminIsNotNull': 'Project administrator cannot be empty',
'system.project.pleaseSelectAdmin': 'Please select project administrator',
'system.project.poolIsNotNull': 'Resource pool cannot be empty',
+ 'system.project.enterOrganization': 'Enter the organization',
};
diff --git a/frontend/src/views/setting/system/organizationAndProject/locale/zh-CN.ts b/frontend/src/views/setting/system/organizationAndProject/locale/zh-CN.ts
index df0bb774d7..e2206188cb 100644
--- a/frontend/src/views/setting/system/organizationAndProject/locale/zh-CN.ts
+++ b/frontend/src/views/setting/system/organizationAndProject/locale/zh-CN.ts
@@ -78,4 +78,5 @@ export default {
'system.project.projectAdminIsNotNull': '项目管理员不能为空',
'system.project.pleaseSelectAdmin': '请选择项目管理员',
'system.project.poolIsNotNull': '资源池不能为空',
+ 'system.project.enterOrganization': '进入组织',
};
diff --git a/frontend/src/views/setting/system/pluginManager/components/pluginTable.vue b/frontend/src/views/setting/system/pluginManager/components/pluginTable.vue
index de9b5e99dc..c25152ed86 100644
--- a/frontend/src/views/setting/system/pluginManager/components/pluginTable.vue
+++ b/frontend/src/views/setting/system/pluginManager/components/pluginTable.vue
@@ -60,14 +60,12 @@
-
-
- {{ t('system.user.tableEnable') }}
-
-
-
- {{ t('system.user.tableDisable') }}
-
+
@@ -115,7 +113,7 @@
{{ getTime(record.updateTime) }}
-
+
{{ t('system.plugin.tableColumnsActions') }}
@@ -124,15 +122,6 @@
{{
t('system.plugin.edit')
}}
- {{ t('system.plugin.tableDisable') }}
- {{
- t('system.plugin.tableEnable')
- }}
{
showDrawer.value = true;
config.value = {
diff --git a/frontend/src/views/setting/system/pluginManager/components/uploadModel.vue b/frontend/src/views/setting/system/pluginManager/components/uploadModel.vue
index ad1123927f..696311ebd7 100644
--- a/frontend/src/views/setting/system/pluginManager/components/uploadModel.vue
+++ b/frontend/src/views/setting/system/pluginManager/components/uploadModel.vue
@@ -120,6 +120,7 @@
import { computed, ref, watch, watchEffect } from 'vue';
import { Message } from '@arco-design/web-vue';
+ import MsButton from '@/components/pure/ms-button/index.vue';
import MsUpload from '@/components/pure/ms-upload/index.vue';
import { addPlugin } from '@/api/modules/setting/pluginManger';
diff --git a/frontend/src/views/setting/system/user/index.vue b/frontend/src/views/setting/system/user/index.vue
index 9be6f93857..79710b00b9 100644
--- a/frontend/src/views/setting/system/user/index.vue
+++ b/frontend/src/views/setting/system/user/index.vue
@@ -37,6 +37,7 @@
:action-config="tableBatchActions"
v-on="propsEvent"
@batch-action="handleTableBatch"
+ @enable-change="enableChange"
>
-
- {{ t('system.user.enable') }}
-
{{ t('system.user.delete') }}
@@ -387,6 +385,7 @@
slotName: 'enable',
dataIndex: 'enable',
showDrag: true,
+ permission: ['SYSTEM_USER:READ+UPDATE'],
},
{
title: hasOperationSysUserPermission.value ? 'system.user.tableColumnActions' : '',
@@ -543,6 +542,14 @@
});
}
+ function enableChange(record: UserListItem, newValue: string | number | boolean) {
+ if (newValue) {
+ enableUser(record);
+ } else {
+ disabledUser(record);
+ }
+ }
+
/**
* 删除用户
*/
@@ -589,11 +596,6 @@
eventTag: 'resetPassword',
permission: ['SYSTEM_USER:READ+UPDATE'],
},
- {
- label: 'system.user.disable',
- eventTag: 'disabled',
- permission: ['SYSTEM_USER:READ+UPDATE'],
- },
{
isDivider: true,
},
@@ -705,9 +707,6 @@
case 'resetPassword':
resetPassword(record);
break;
- case 'disabled':
- disabledUser(record);
- break;
case 'delete':
deleteUser(record);
break;
diff --git a/frontend/src/views/setting/utils.ts b/frontend/src/views/setting/utils.ts
index 79f73db65c..2614516a50 100644
--- a/frontend/src/views/setting/utils.ts
+++ b/frontend/src/views/setting/utils.ts
@@ -17,6 +17,28 @@ const userStore = useUserStore();
const appStore = useAppStore();
const licenseStore = useLicenseStore();
+// 进入组织
+export async function enterOrganization(organizationId: string) {
+ try {
+ appStore.showLoading();
+ if (appStore.currentOrgId !== organizationId) {
+ if (!licenseStore.hasLicense()) {
+ router.push({
+ name: NO_PROJECT_ROUTE_NAME,
+ });
+ return;
+ }
+ await switchUserOrg(organizationId, userStore.id || '');
+ await userStore.isLogin();
+ await userStore.checkIsLogin(true);
+ }
+ } catch (error) {
+ console.log(error);
+ } finally {
+ appStore.hideLoading();
+ }
+}
+
export async function enterProject(projectId: string, organizationId?: string) {
try {
appStore.showLoading();