diff --git a/frontend/src/App.vue b/frontend/src/App.vue index dc9e75104d..af59467e2c 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -73,6 +73,11 @@ const checkIsLogin = async () => { const isLogin = await userStore.isLogin(); const isLoginPage = route.name === 'login'; + if (isLoginPage && isLogin) { + // 当前页面为登录页面,且已经登录,跳转到首页 + const currentRouteName = getFirstRouteNameByPermission(router.getRoutes()); + router.push({ name: currentRouteName }); + } if (isLogin && appStore.currentProjectId && appStore.currentProjectId !== 'no_such_project') { // 当前为登陆状态,且已经选择了项目,初始化当前项目配置 try { @@ -89,11 +94,6 @@ console.log(err); } } - if (isLoginPage && isLogin) { - // 当前页面为登录页面,且已经登录,跳转到首页 - const currentRouteName = getFirstRouteNameByPermission(router.getRoutes()); - router.push({ name: currentRouteName }); - } }; // 获取公钥 const getPublicKey = async () => { diff --git a/frontend/src/components/business/ms-user-group-comp/authTable.vue b/frontend/src/components/business/ms-user-group-comp/authTable.vue index 8afda6c971..0c400add5a 100644 --- a/frontend/src/components/business/ms-user-group-comp/authTable.vue +++ b/frontend/src/components/business/ms-user-group-comp/authTable.vue @@ -361,7 +361,14 @@ } } else { // 删除权限值 - record.perChecked.splice(record.perChecked.indexOf(currentValue), 1); + const preStr = currentValue.split(':')[0]; + const postStr = currentValue.split(':')[1]; + if (postStr === 'READ') { + // 当前是查询 那 移除所有相关的 + record.perChecked = record.perChecked.filter((item) => !item.includes(preStr)); + } else { + record.perChecked.splice(record.perChecked.indexOf(currentValue), 1); + } } }; @@ -483,5 +490,11 @@ :deep(.arco-table-th-title) { width: 100%; } + :deep(.arco-checkbox-indeterminate) { + .arco-checkbox-icon { + border-color: rgb(var(--primary-5)); + background: rgb(var(--primary-1)); + } + } } diff --git a/frontend/src/router/routes/modules/setting.ts b/frontend/src/router/routes/modules/setting.ts index 023421ec72..253fe82f05 100644 --- a/frontend/src/router/routes/modules/setting.ts +++ b/frontend/src/router/routes/modules/setting.ts @@ -314,7 +314,7 @@ const Setting: AppRouteRecordRaw = { component: () => import('@/views/setting/organization/log/index.vue'), meta: { locale: 'menu.settings.organization.log', - roles: ['*'], + roles: ['ORGANIZATION_LOG:READ'], isTopMenu: true, }, }, diff --git a/frontend/src/views/setting/organization/project/components/addProjectModal.vue b/frontend/src/views/setting/organization/project/components/addProjectModal.vue index c41858d395..e8e59a0353 100644 --- a/frontend/src/views/setting/organization/project/components/addProjectModal.vue +++ b/frontend/src/views/setting/organization/project/components/addProjectModal.vue @@ -56,7 +56,7 @@ - + @@ -137,6 +137,10 @@ (e: 'cancel', shouldSearch: boolean): void; }>(); + const allModuleIds = ['workstation', 'testPlan', 'bugManagement', 'caseManagement', 'apiTest', 'uiTest', 'loadTest']; + + const showPoolModuleIds = ['uiTest', 'apiTest', 'loadTest']; + const form = reactive({ name: '', userIds: [], @@ -144,10 +148,11 @@ description: '', resourcePoolIds: [], enable: true, - moduleIds: ['workstation', 'testPlan', 'bugManagement', 'caseManagement', 'apiTest', 'uiTest', 'loadTest'], + moduleIds: allModuleIds, }); const currentVisible = ref(props.visible); + const showPool = computed(() => showPoolModuleIds.some((item) => form.moduleIds?.includes(item))); const isXpack = computed(() => { return licenseStore.hasLicense(); @@ -163,7 +168,7 @@ form.organizationId = currentOrgId.value; form.description = ''; form.enable = true; - form.moduleIds = ['workstation', 'testPlan', 'bugManagement', 'caseManagement', 'apiTest', 'uiTest', 'loadTest']; + form.moduleIds = allModuleIds; form.resourcePoolIds = []; }; const handleCancel = (shouldSearch: boolean) => { diff --git a/frontend/src/views/setting/organization/project/components/userDrawer.vue b/frontend/src/views/setting/organization/project/components/userDrawer.vue index 4246a09e1c..f3d9760038 100644 --- a/frontend/src/views/setting/organization/project/components/userDrawer.vue +++ b/frontend/src/views/setting/organization/project/components/userDrawer.vue @@ -16,7 +16,7 @@ diff --git a/frontend/src/views/setting/system/organizationAndProject/components/addProjectModal.vue b/frontend/src/views/setting/system/organizationAndProject/components/addProjectModal.vue index e92d5e3646..d66d8c367c 100644 --- a/frontend/src/views/setting/system/organizationAndProject/components/addProjectModal.vue +++ b/frontend/src/views/setting/system/organizationAndProject/components/addProjectModal.vue @@ -59,7 +59,7 @@ - + @@ -137,17 +137,22 @@ (e: 'cancel', shouldSearch: boolean): void; }>(); + const allModuleIds = ['workstation', 'testPlan', 'bugManagement', 'caseManagement', 'apiTest', 'uiTest', 'loadTest']; + + const showPoolModuleIds = ['uiTest', 'apiTest', 'loadTest']; + const form = reactive({ name: '', userIds: [], organizationId: '', description: '', enable: true, - moduleIds: ['workstation', 'testPlan', 'bugManagement', 'caseManagement', 'apiTest', 'uiTest', 'loadTest'], + moduleIds: allModuleIds, resourcePoolIds: [], }); const currentVisible = ref(props.visible); + const showPool = computed(() => showPoolModuleIds.some((item) => form.moduleIds?.includes(item))); const isXpack = computed(() => { return licenseStore.hasLicense(); @@ -159,7 +164,7 @@ form.organizationId = ''; form.description = ''; form.enable = true; - form.moduleIds = ['workstation', 'testPlan', 'bugManagement', 'caseManagement', 'apiTest', 'uiTest', 'loadTest']; + form.moduleIds = allModuleIds; }; const handleCancel = (shouldSearch: boolean) => { emit('cancel', shouldSearch); diff --git a/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue b/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue index 7bc37a4145..7e7d8fc565 100644 --- a/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue +++ b/frontend/src/views/setting/system/organizationAndProject/components/systemProject.vue @@ -181,6 +181,10 @@ title: 'system.organization.createTime', dataIndex: 'createTime', width: 180, + sortable: { + sortDirections: ['ascend', 'descend'], + sorter: true, + }, }, { title: hasOperationPermission.value ? 'system.organization.operation' : '', 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 ef62e567b3..5f1b739a3c 100644 --- a/frontend/src/views/setting/system/organizationAndProject/locale/en-US.ts +++ b/frontend/src/views/setting/system/organizationAndProject/locale/en-US.ts @@ -70,7 +70,7 @@ export default { 'system.project.affiliatedOrgPlaceholder': 'Please select affiliated organization', 'system.project.projectAdmin': 'Project administrator', 'system.project.projectAdminPlaceholder': 'The project administrator defaults to the person who created the project', - 'system.project.moduleSetting': 'Module setting', + 'system.project.moduleSetting': 'Enable module', 'system.project.projectNameRequired': 'Project name cannot be empty', 'system.project.createTip': 'After the project is enabled, it will be displayed in the project switching list', 'system.project.affiliatedOrgRequired': 'Affiliated organization cannot be empty', 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 e2633a77a3..3c0c2f59ee 100644 --- a/frontend/src/views/setting/system/organizationAndProject/locale/zh-CN.ts +++ b/frontend/src/views/setting/system/organizationAndProject/locale/zh-CN.ts @@ -65,7 +65,7 @@ export default { 'system.project.affiliatedOrgPlaceholder': '请选择所属组织', 'system.project.projectAdmin': '项目管理员', 'system.project.projectAdminPlaceholder': '默认选择创建项目人为项目管理员', - 'system.project.moduleSetting': '模块设置', + 'system.project.moduleSetting': '开启模块', 'system.project.projectNameRequired': '项目名称不能为空', 'system.project.createTip': '项目启用后,将展示在项目切换列表', 'system.project.affiliatedOrgRequired': '所属组织不能为空',