From 46da3a57b5cfa8b1e4e00c5d80fc56e6a10be93e Mon Sep 17 00:00:00 2001 From: "xinxin.wu" Date: Wed, 27 Mar 2024 23:28:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=89=8D=E5=90=8E=E7=BD=AE&=E6=96=AD?= =?UTF-8?q?=E8=A8=80=E7=9B=B8=E5=85=B3=E9=97=AE=E9=A2=98=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/project-management/taskCenter.ts | 7 +- .../ms-assertion/comp/ResponseBodyTab.vue | 33 ++-- .../ms-assertion/comp/ResponseHeaderTab.vue | 5 +- .../ms-assertion/comp/StatusCodeTab.vue | 4 +- .../business/ms-assertion/comp/utils.ts | 15 ++ .../business/ms-assertion/index.vue | 169 ++++++++++-------- .../ms-message/MessageCenterDrawer.vue | 2 +- .../pure/ms-advance-filter/index.ts | 44 ++--- frontend/src/enums/tableEnum.ts | 2 + .../api-test/components/condition/index.vue | 5 + .../api-test/components/condition/list.vue | 19 +- .../components/fastExtraction/index.vue | 26 ++- .../views/api-test/components/paramTable.vue | 37 +++- .../response/result/index.vue | 8 +- .../response/result/tiledDisplay.vue | 2 +- .../api-test/report/component/reportList.vue | 7 +- .../component/step/reportInfoHeaders.vue | 33 ++-- .../taskCenter/component/apiCase.vue | 12 +- .../taskCenter/component/scheduledTask.vue | 12 +- 19 files changed, 279 insertions(+), 163 deletions(-) create mode 100644 frontend/src/components/business/ms-assertion/comp/utils.ts diff --git a/frontend/src/api/modules/project-management/taskCenter.ts b/frontend/src/api/modules/project-management/taskCenter.ts index ff42a94930..cd3c99cdd0 100644 --- a/frontend/src/api/modules/project-management/taskCenter.ts +++ b/frontend/src/api/modules/project-management/taskCenter.ts @@ -17,6 +17,7 @@ import { import type { CommonList, TableQueryParams } from '@/models/common'; import type { RealTaskCenterApiCaseItem, TimingTaskCenterApiCaseItem } from '@/models/projectManagement/taskCenter'; +import { TaskCenterEnum } from '@/enums/taskCenter'; // 实时任务 export function getRealSysApiCaseList(data: TableQueryParams) { @@ -43,13 +44,13 @@ export function batchStopRealProjectApi(data: TableQueryParams) { return MSR.post>({ url: batchStopRealProjectApiUrl, data }); } -export function stopRealSysApi(moduleType: string, id: string) { +export function stopRealSysApi(moduleType: keyof typeof TaskCenterEnum, id: string) { return MSR.get({ url: `${stopRealSysApiUrl}/${moduleType}/${id}` }); } -export function stopRealOrdApi(moduleType: string, id: string) { +export function stopRealOrdApi(moduleType: keyof typeof TaskCenterEnum, id: string) { return MSR.get({ url: `${stopRealOrdApiUrl}/${moduleType}/${id}` }); } -export function stopRealProjectApi(moduleType: string, id: string) { +export function stopRealProjectApi(moduleType: keyof typeof TaskCenterEnum, id: string) { return MSR.get({ url: `${stopRealProjectApiUrl}/${moduleType}/${id}` }); } diff --git a/frontend/src/components/business/ms-assertion/comp/ResponseBodyTab.vue b/frontend/src/components/business/ms-assertion/comp/ResponseBodyTab.vue index 306e03d3ae..59d2e18481 100644 --- a/frontend/src/components/business/ms-assertion/comp/ResponseBodyTab.vue +++ b/frontend/src/components/business/ms-assertion/comp/ResponseBodyTab.vue @@ -335,6 +335,7 @@ v-model:visible="fastExtractionVisible" :config="activeRecord" :response="props.response" + :is-show-more-setting="false" @apply="handleFastExtractionApply" /> @@ -342,6 +343,7 @@ - + diff --git a/frontend/src/views/project-management/taskCenter/component/apiCase.vue b/frontend/src/views/project-management/taskCenter/component/apiCase.vue index 0341b72a0b..4c567fdcd8 100644 --- a/frontend/src/views/project-management/taskCenter/component/apiCase.vue +++ b/frontend/src/views/project-management/taskCenter/component/apiCase.vue @@ -113,14 +113,18 @@ import { useI18n } from '@/hooks/useI18n'; import useModal from '@/hooks/useModal'; import useOpenNewPage from '@/hooks/useOpenNewPage'; + import { useTableStore } from '@/store'; import { characterLimit } from '@/utils'; import { hasAnyPermission } from '@/utils/permission'; import { BatchApiParams } from '@/models/common'; + import { TableKeyEnum } from '@/enums/tableEnum'; import { ExecutionMethodsLabel, TaskCenterEnum } from '@/enums/taskCenter'; import { TaskStatus } from './utils'; + const tableStore = useTableStore(); + const { openModal } = useModal(); const { t } = useI18n(); @@ -239,11 +243,11 @@ const { propsRes, propsEvent, loadList, setLoadListParams, resetSelector } = useTable( loadRealMap.value[props.group].list, { - columns, + tableKey: TableKeyEnum.TASK_API_CASE, scroll: { x: '100%', }, - showSetting: false, + showSetting: true, selectable: true, heightUsed: 330, showSelectAll: true, @@ -293,7 +297,6 @@ await loadRealMap.value[props.group].batchStop({ selectIds: selectAll ? [] : selectIds, selectAll, - moduleType: props.moduleType, }); resetSelector(); Message.success(t('project.taskCenter.stopSuccess')); @@ -386,6 +389,9 @@ } } ); + onMounted(async () => { + await tableStore.initColumn(TableKeyEnum.TASK_API_CASE, columns, 'drawer', true); + }); diff --git a/frontend/src/views/project-management/taskCenter/component/scheduledTask.vue b/frontend/src/views/project-management/taskCenter/component/scheduledTask.vue index f6fda6e67a..234742e887 100644 --- a/frontend/src/views/project-management/taskCenter/component/scheduledTask.vue +++ b/frontend/src/views/project-management/taskCenter/component/scheduledTask.vue @@ -55,9 +55,13 @@ getScheduleSysApiCaseList, } from '@/api/modules/project-management/taskCenter'; import { useI18n } from '@/hooks/useI18n'; + import { useTableStore } from '@/store'; + import { TableKeyEnum } from '@/enums/tableEnum'; import { TaskCenterEnum } from '@/enums/taskCenter'; + const tableStore = useTableStore(); + const { t } = useI18n(); const props = defineProps<{ @@ -128,6 +132,7 @@ dataIndex: 'operation', width: 120, fixed: 'right', + showDrag: false, }, ]; @@ -140,11 +145,11 @@ const { propsRes, propsEvent, loadList, setLoadListParams, resetSelector } = useTable( loadRealMap.value[props.group], { - columns, + tableKey: TableKeyEnum.TASK_SCHEDULE_TASK, scroll: { x: '100%', }, - showSetting: false, + showSetting: true, selectable: true, heightUsed: 300, enableDrag: false, @@ -205,6 +210,9 @@ } } ); + onMounted(async () => { + await tableStore.initColumn(TableKeyEnum.TASK_SCHEDULE_TASK, columns, 'drawer', true); + });