fix(系统设置): 过期用户点击其他组织的进入项目跳转到无资源页面&样式调整
This commit is contained in:
parent
f18901a45d
commit
56f3a7bca1
|
@ -149,7 +149,15 @@
|
|||
);
|
||||
|
||||
const keyword = ref('');
|
||||
|
||||
const operationWidth = computed(() => {
|
||||
if (hasOperationPermission.value) {
|
||||
return 250;
|
||||
}
|
||||
if (hasAnyPermission(['PROJECT_BASE_INFO:READ'])) {
|
||||
return 100;
|
||||
}
|
||||
return 50;
|
||||
});
|
||||
const organizationColumns: MsTableColumn = [
|
||||
{
|
||||
title: 'system.organization.ID',
|
||||
|
@ -210,7 +218,7 @@
|
|||
slotName: 'operation',
|
||||
dataIndex: 'operation',
|
||||
fixed: 'right',
|
||||
width: hasOperationPermission.value ? 250 : 50,
|
||||
width: operationWidth.value,
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -133,7 +133,15 @@
|
|||
'SYSTEM_ORGANIZATION_PROJECT:READ+DELETE',
|
||||
])
|
||||
);
|
||||
|
||||
const operationWidth = computed(() => {
|
||||
if (hasOperationPermission.value) {
|
||||
return 250;
|
||||
}
|
||||
if (hasAnyPermission(['PROJECT_BASE_INFO:READ'])) {
|
||||
return 100;
|
||||
}
|
||||
return 50;
|
||||
});
|
||||
const organizationColumns: MsTableColumn = [
|
||||
{
|
||||
title: 'system.organization.ID',
|
||||
|
@ -189,7 +197,7 @@
|
|||
slotName: 'operation',
|
||||
dataIndex: 'operation',
|
||||
fixed: 'right',
|
||||
width: hasOperationPermission.value ? 250 : 50,
|
||||
width: operationWidth.value,
|
||||
},
|
||||
];
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ import router from '@/router';
|
|||
import { NO_PROJECT_ROUTE_NAME } from '@/router/constants';
|
||||
import { useUserStore } from '@/store';
|
||||
import useAppStore from '@/store/modules/app';
|
||||
import useLicenseStore from '@/store/modules/setting/license';
|
||||
import { hasAnyPermission } from '@/utils/permission';
|
||||
|
||||
import { ProjectManagementRouteEnum } from '@/enums/routeEnum';
|
||||
|
@ -16,12 +17,19 @@ import { ProjectManagementRouteEnum } from '@/enums/routeEnum';
|
|||
const { t } = useI18n();
|
||||
const userStore = useUserStore();
|
||||
const appStore = useAppStore();
|
||||
const licenseStore = useLicenseStore();
|
||||
|
||||
export async function enterProject(projectId: string, organizationId?: string) {
|
||||
try {
|
||||
appStore.showLoading();
|
||||
// 切换组织
|
||||
if (organizationId) {
|
||||
if (organizationId && appStore.currentOrgId !== organizationId) {
|
||||
if (!licenseStore.hasLicense()) {
|
||||
router.push({
|
||||
name: NO_PROJECT_ROUTE_NAME,
|
||||
});
|
||||
return;
|
||||
}
|
||||
await switchUserOrg(organizationId, userStore.id || '');
|
||||
}
|
||||
await userStore.isLogin(true);
|
||||
|
|
Loading…
Reference in New Issue