diff --git a/frontend/src/api/modules/project-management/fileManagement.ts b/frontend/src/api/modules/project-management/fileManagement.ts index 85e5db9149..70d72310da 100644 --- a/frontend/src/api/modules/project-management/fileManagement.ts +++ b/frontend/src/api/modules/project-management/fileManagement.ts @@ -175,7 +175,7 @@ export function addRepositoryFile(data: AddRepositoryFileParams) { // 更新存储库文件 export function updateRepositoryFile(id: string) { - return MSR.get({ url: UpdateRepositoryFileUrl, params: id }); + return MSR.get({ url: UpdateRepositoryFileUrl, params: id }); } // 获取存储库信息 diff --git a/frontend/src/assets/style/var.less b/frontend/src/assets/style/var.less index 1d4125075c..9ecf1963fa 100644 --- a/frontend/src/assets/style/var.less +++ b/frontend/src/assets/style/var.less @@ -273,3 +273,13 @@ } } } + +/** 表格 **/ +.ms-table--special-small() { + :deep(.arco-table-cell) { + padding: 8px; + } + :deep(#ms-table-footer-wrapper) { + margin-top: 8px; + } +} diff --git a/frontend/src/components/business/ms-message/MessageCenterDrawer.vue b/frontend/src/components/business/ms-message/MessageCenterDrawer.vue index f53711b104..696af7229f 100644 --- a/frontend/src/components/business/ms-message/MessageCenterDrawer.vue +++ b/frontend/src/components/business/ms-message/MessageCenterDrawer.vue @@ -14,12 +14,8 @@
-
- +
+
{{ t('ms.message.all') }} @@ -33,16 +29,18 @@
-
- -
- +
+
+
{{ t('ms.message.setting') }}
- -
+ +
{{ t('ms.message.list.all') }} {{ t('ms.message.list.me', { var: '@' }) }} @@ -54,7 +52,7 @@ {{ t('ms.message.make.as.read') }} -
+
@@ -204,31 +158,37 @@ } from '@/api/modules/message'; import { getMessageList } from '@/api/modules/project-management/messageManagement'; import { useI18n } from '@/hooks/useI18n'; - import usePathMap from '@/hooks/usePathMap'; - import { translateTextToPX } from '@/utils/css'; + import useOpenNewPage from '@/hooks/useOpenNewPage'; + import useAppStore from '@/store/modules/app'; + import useUserStore from '@/store/modules/user'; import { MessageItem } from '@/models/projectManagement/message'; - import { ProjectManagementRouteEnum } from '@/enums/routeEnum'; + import { MessageResourceType } from '@/enums/messageEnum'; + import { + ApiTestRouteEnum, + BugManagementRouteEnum, + CaseManagementRouteEnum, + ProjectManagementRouteEnum, + } from '@/enums/routeEnum'; - import useAppStore from '../../../store/modules/app'; - import useUserStore from '../../../store/modules/user'; - - const options = ref([]); - const messageHistoryList = ref([]); - const appStore = useAppStore(); - const userStore = useUserStore(); - const projectId = ref(appStore.currentProjectId); const props = defineProps<{ visible: boolean; }>(); const emit = defineEmits<{ (e: 'update:visible', val: boolean): void; }>(); + + const appStore = useAppStore(); + const userStore = useUserStore(); const router = useRouter(); const { t } = useI18n(); - const { jumpRouteByMapKey, getRouteMapByAlias } = usePathMap(); + const { openNewPage } = useOpenNewPage(); + const innerVisible = useVModel(props, 'visible', emit); + const projectId = ref(appStore.currentProjectId); const position = ref('all'); + const options = ref([]); + const messageHistoryList = ref([]); const noMoreData = ref(false); const moduleList = ref([]); const defaultModule = ref('all'); @@ -330,7 +290,7 @@ } // 切换消息状态 - function changeShowType(value: string | number | boolean, ev: Event) { + function changeShowType(value: string | number | boolean) { messageHistoryList.value = []; pageNation.value.current = 1; loadMessageHistoryList(value as string, currentResourceType.value); @@ -381,21 +341,34 @@ return count; } + const resourceTypeRouteMap = { + [MessageResourceType.BUG_TASK]: BugManagementRouteEnum.BUG_MANAGEMENT_DETAIL, + [MessageResourceType.BUG_SYNC_TASK]: BugManagementRouteEnum.BUG_MANAGEMENT_DETAIL, + [MessageResourceType.FUNCTIONAL_CASE_TASK]: CaseManagementRouteEnum.CASE_MANAGEMENT_CASE_DETAIL, + [MessageResourceType.CASE_REVIEW_TASK]: CaseManagementRouteEnum.CASE_MANAGEMENT_REVIEW_DETAIL, + [MessageResourceType.API_DEFINITION_TASK]: ApiTestRouteEnum.API_TEST_MANAGEMENT, + [MessageResourceType.API_SCENARIO_TASK]: ApiTestRouteEnum.API_TEST_SCENARIO, + }; + // 点击名称跳转 function handleNameClick(item: MessageHistoryItem) { const routeQuery: Record = { - orgId: item.organizationId, pId: item.projectId, id: item.resourceId, }; - if (item.organizationId === 'SYSTEM') { - delete routeQuery.organizationId; - } if (item.projectId === 'SYSTEM' || item.projectId === 'ORGANIZATION') { delete routeQuery.projectId; } - const routeMap = getRouteMapByAlias(item.resourceType); - jumpRouteByMapKey(routeMap?.key, routeQuery, true); + if (item.resourceType === MessageResourceType.API_DEFINITION_TASK) { + delete routeQuery.id; + if (item.operation.includes('CASE')) { + routeQuery.cId = item.resourceId; + } else if (!item.operation.includes('MOCK')) { + routeQuery.dId = item.resourceId; + } + } + const route = resourceTypeRouteMap[item.resourceType]; + openNewPage(route, routeQuery); } // 全部标记为已读 @@ -425,6 +398,28 @@ ); + + diff --git a/frontend/src/components/business/ms-transfer/index.vue b/frontend/src/components/business/ms-transfer/index.vue index c953dccb0b..5983dd2842 100644 --- a/frontend/src/components/business/ms-transfer/index.vue +++ b/frontend/src/components/business/ms-transfer/index.vue @@ -35,6 +35,12 @@ block-node default-expand-all :selectable="false" + :virtual-list-props="{ + height: '100%', + threshold: 200, + fixedSize: true, + buffer: 15, // 缓冲区默认 10 的时候,虚拟滚动的底部 padding 计算有问题 + }" @check="onSelect" > @@ -29,6 +29,7 @@ defineProps<{ avatar?: 'default' | 'word' | string; size?: number; + word?: string; // 用于显示文字头像 }>(), { avatar: 'default', diff --git a/frontend/src/components/pure/ms-table/base-table.vue b/frontend/src/components/pure/ms-table/base-table.vue index dd1dda45c2..8ad78dd55b 100644 --- a/frontend/src/components/pure/ms-table/base-table.vue +++ b/frontend/src/components/pure/ms-table/base-table.vue @@ -210,7 +210,8 @@ -
- -
+
(); const emit = defineEmits<{ (e: 'batchAction', value: BatchActionParams, queryParams: BatchActionQueryParams): void; diff --git a/frontend/src/components/pure/ms-table/batchAction.vue b/frontend/src/components/pure/ms-table/batchAction.vue index fee8b3370b..d0f633999f 100644 --- a/frontend/src/components/pure/ms-table/batchAction.vue +++ b/frontend/src/components/pure/ms-table/batchAction.vue @@ -8,7 +8,7 @@ class="ml-[12px]" :class="{ 'arco-btn-outline--danger': element.danger, - 'ml-[16px]': idx === 0, + 'ml-[8px]': idx === 0, }" type="outline" @click="handleSelect(element)" @@ -24,7 +24,7 @@ class="ml-[12px]" :class="{ 'arco-btn-outline--danger': element.danger, - 'ml-[16px]': idx === 0, + 'ml-[8px]': idx === 0, }" type="outline" @click="handleSelect" @@ -41,7 +41,7 @@ - @@ -79,6 +79,7 @@ const props = defineProps<{ selectRowCount?: number; actionConfig?: BatchActionConfig; + wrapperId: string; }>(); const emit = defineEmits<{ (e: 'batchAction', value: BatchActionParams): void; @@ -120,7 +121,8 @@ computedStatus.value = true; return; } - const wrapperWidth = getNodeWidth(refWrapper.value); + + const wrapperWidth = (document.querySelector(`#${props.wrapperId}`)?.clientWidth || 0) - 370; // 370为分页按钮区域宽度 const childNodeList = [].slice.call(refWrapper.value.children) as HTMLElement[]; @@ -140,24 +142,24 @@ // title宽度为固定值100px totalWidth += 100; } else if (isDropDown) { - // dropDown宽度为固定值48px + MarginLeft 16px - totalWidth += 64; + // dropDown宽度为固定值48px + MarginLeft 8px + totalWidth += 56; } else if (isClearBtn) { - // 清空选择按钮 60px + MarginLeft 16px - totalWidth += 76; + // 清空选择按钮 60px + MarginLeft 8px + totalWidth += 68; } else { - // 普通按钮宽度为内容宽度 + marginLeft 16px - totalWidth += getNodeWidth(node) + 16; - menuItemIndex++; + // 普通按钮宽度为内容宽度 + marginLeft 8px + totalWidth += getNodeWidth(node) + 8; } if (totalWidth > wrapperWidth) { - const value = menuItemIndex - 1; + const value = isClearBtn ? menuItemIndex - 1 : menuItemIndex - 2; baseAction.value = allAction.value.slice(0, value); moreAction.value = allAction.value.slice(value); handleMoreActionLength(); computedStatus.value = false; return; } + menuItemIndex++; } moreAction.value = props.actionConfig?.moreAction || []; baseAction.value = props.actionConfig?.baseAction || []; diff --git a/frontend/src/components/pure/ms-table/type.ts b/frontend/src/components/pure/ms-table/type.ts index e880d85f57..7c2425a94e 100644 --- a/frontend/src/components/pure/ms-table/type.ts +++ b/frontend/src/components/pure/ms-table/type.ts @@ -106,6 +106,7 @@ export interface MsTableProps { showJumpMethod?: boolean; // 是否展示跳转方法 isSimpleSetting?: boolean; // 是否是简单的设置 filterIconAlignLeft?: boolean; // 筛选图标是否靠左 + paginationSize?: 'small' | 'mini' | 'medium' | 'large'; [key: string]: any; } diff --git a/frontend/src/enums/messageEnum.ts b/frontend/src/enums/messageEnum.ts new file mode 100644 index 0000000000..eb0c443391 --- /dev/null +++ b/frontend/src/enums/messageEnum.ts @@ -0,0 +1,18 @@ +export enum MessageResourceType { + TEST_PLAN_TASK = 'TEST_PLAN_TASK', + TEST_PLAN_REPORT_TASK = 'TEST_PLAN_REPORT_TASK', + BUG_TASK = 'BUG_TASK', + BUG_SYNC_TASK = 'BUG_SYNC_TASK', + FUNCTIONAL_CASE_TASK = 'FUNCTIONAL_CASE_TASK', + CASE_REVIEW_TASK = 'CASE_REVIEW_TASK', + API_DEFINITION_TASK = 'API_DEFINITION_TASK', + API_SCENARIO_TASK = 'API_SCENARIO_TASK', + API_REPORT_TASK = 'API_REPORT_TASK', + UI_SCENARIO_TASK = 'UI_SCENARIO_TASK', + UI_REPORT_TASK = 'UI_REPORT_TASK', + LOAD_TEST_TASK = 'LOAD_TEST_TASK', + LOAD_REPORT_TASK = 'LOAD_REPORT_TASK', + SCHEDULE_TASK = 'SCHEDULE_TASK', +} + +export default {}; diff --git a/frontend/src/enums/taskCenter.ts b/frontend/src/enums/taskCenter.ts index 8d7e5ae435..3cff3dcb2c 100644 --- a/frontend/src/enums/taskCenter.ts +++ b/frontend/src/enums/taskCenter.ts @@ -23,4 +23,3 @@ export enum ExecutionMethodsLabel { API = 'project.taskCenter.interfaceCall', // 接口调用 BATCH = 'project.taskCenter.batchExecution', // 批量执行 } -export default {}; diff --git a/frontend/src/router/routes/modules/bugManagement.ts b/frontend/src/router/routes/modules/bugManagement.ts index 02782145e0..4a1adb7c69 100644 --- a/frontend/src/router/routes/modules/bugManagement.ts +++ b/frontend/src/router/routes/modules/bugManagement.ts @@ -49,7 +49,7 @@ const BugManagement: AppRouteRecordRaw = { ], }, }, - // 创建用例成功 + // 缺陷创建成功 { path: 'create-success', name: BugManagementRouteEnum.BUG_MANAGEMENT_CREATE_SUCCESS, diff --git a/frontend/src/views/api-test/components/fastExtraction/index.vue b/frontend/src/views/api-test/components/fastExtraction/index.vue index e3128b7b3a..4d2464a7fe 100644 --- a/frontend/src/views/api-test/components/fastExtraction/index.vue +++ b/frontend/src/views/api-test/components/fastExtraction/index.vue @@ -89,7 +89,10 @@
{{ t('apiTestDebug.matchResult') }}
- + = 2 && filterKeyValParams([arr[arr.length - 2]], arr[arr.length - 1]).lastDataIsDefault); if ( hasNoIdItem && diff --git a/frontend/src/views/api-test/components/requestComposition/postcondition.vue b/frontend/src/views/api-test/components/requestComposition/postcondition.vue index 6816697b97..a5ecbbdb03 100644 --- a/frontend/src/views/api-test/components/requestComposition/postcondition.vue +++ b/frontend/src/views/api-test/components/requestComposition/postcondition.vue @@ -18,7 +18,7 @@ type="line" >
{{ t('apiTestDebug.openGlobalPostCondition') }}
- + (); const emit = defineEmits<{ (e: 'update:params', params: ExecuteConditionProcessor[]): void; diff --git a/frontend/src/views/api-test/components/requestComposition/precondition.vue b/frontend/src/views/api-test/components/requestComposition/precondition.vue index da3582f26e..58b44677eb 100644 --- a/frontend/src/views/api-test/components/requestComposition/precondition.vue +++ b/frontend/src/views/api-test/components/requestComposition/precondition.vue @@ -16,7 +16,7 @@ type="line" >
{{ t('apiTestDebug.openGlobalPrecondition') }}
- + (); const emit = defineEmits<{ (e: 'update:config', params: ExecuteConditionConfig): void; diff --git a/frontend/src/views/api-test/management/components/management/api/apiTable.vue b/frontend/src/views/api-test/management/components/management/api/apiTable.vue index a6f189aa64..ad1365e734 100644 --- a/frontend/src/views/api-test/management/components/management/api/apiTable.vue +++ b/frontend/src/views/api-test/management/components/management/api/apiTable.vue @@ -1,6 +1,6 @@