fix(接口测试): 用例表格去掉联调中状态&query和rest标签页加上表头设置&用例详情信息过长则省略

--bug=1037770 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001037770
--bug=1038573 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001038573
--bug=1037663 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001037663
--bug=1037978 --user=吕梦园 https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001037978
This commit is contained in:
teukkk 2024-04-08 14:36:24 +08:00 committed by 刘瑞斌
parent 598737f076
commit 19b0bf4251
8 changed files with 20 additions and 14 deletions

View File

@ -103,6 +103,9 @@
border-radius: var(--border-radius-small);
background-color: var(--color-text-n9);
gap: 8px;
.one-line-text {
max-width: 300px;
}
.ms-detail-card-desc {
@apply flex flex-wrap overflow-hidden; // TODO:
}

View File

@ -10,6 +10,8 @@ export enum TableKeyEnum {
API_TEST = 'apiTest',
API_TEST_MANAGEMENT_CASE = 'apiTestMenagementCase',
API_TEST_DEBUG_FORM_DATA = 'apiTestDebugFormData',
API_TEST_DEBUG_REST = 'apiTestDebugRest',
API_TEST_DEBUG_QUERY = 'apiTestDebugQuery',
API_TEST_DEBUG_FORM_URL_ENCODE = 'apiTestDebugFormUrlEncoded',
API_TEST_REPORT = 'apiTestReport',
API_SCENARIO = 'apiScenario',

View File

@ -25,6 +25,8 @@
:columns="columns"
:height-used="heightUsed"
:scroll="{ minWidth: 1160 }"
:show-setting="true"
:table-key="TableKeyEnum.API_TEST_DEBUG_QUERY"
:draggable="!props.disabledExceptParam"
:default-param-item="defaultRequestParamsItem"
@change="handleParamTableChange"
@ -42,6 +44,7 @@
import { ExecuteRequestCommonParam } from '@/models/apiTest/common';
import { RequestParamsType } from '@/enums/apiEnum';
import { TableKeyEnum } from '@/enums/tableEnum';
import { filterKeyValParams } from '../utils';
import { defaultRequestParamsItem } from '@/views/api-test/components/config';

View File

@ -26,6 +26,8 @@
:disabled-except-param="props.disabledExceptParam"
:height-used="heightUsed"
:scroll="{ minWidth: 1160 }"
:show-setting="true"
:table-key="TableKeyEnum.API_TEST_DEBUG_REST"
:default-param-item="defaultRequestParamsItem"
@change="handleParamTableChange"
/>
@ -42,6 +44,7 @@
import { ExecuteRequestCommonParam } from '@/models/apiTest/common';
import { RequestParamsType } from '@/enums/apiEnum';
import { TableKeyEnum } from '@/enums/tableEnum';
import { filterKeyValParams } from '../utils';
import { defaultRequestParamsItem } from '@/views/api-test/components/config';

View File

@ -1,6 +1,6 @@
<template>
<a-collapse v-model:active-key="activeDetailKey" :bordered="false">
<a-collapse-item v-if="previewDetail.body.bodyType !== RequestBodyFormat.NONE" key="request">
<a-collapse-item key="request">
<template #header>
<div class="flex items-center gap-[4px]">
<div v-if="activeDetailKey.includes('request')" class="down-icon">
@ -131,7 +131,7 @@
</MsCodeEditor>
<a-divider type="dashed" :margin="0" class="!mt-[16px] border-[var(--color-text-n8)]" />
</div>
<div class="detail-item">
<div v-if="previewDetail.body.bodyType !== RequestBodyFormat.NONE" class="detail-item">
<div class="detail-item-title">
<div class="detail-item-title-text">
{{ `${t('apiTestManagement.requestBody')}-${previewDetail.body.bodyType}` }}

View File

@ -181,9 +181,3 @@
const activeKey = ref('detail');
</script>
<style lang="less" scoped>
:deep(.ms-detail-card .one-line-text) {
max-width: 300px;
}
</style>

View File

@ -107,7 +107,7 @@
<template #label>
<apiStatus :status="record.status" size="small" />
</template>
<a-option v-for="item of Object.values(RequestDefinitionStatus)" :key="item" :value="item">
<a-option v-for="item of requestCaseStatus" :key="item" :value="item">
<apiStatus :status="item" size="small" />
</a-option>
</a-select>
@ -127,7 +127,7 @@
<div class="arco-table-filters-content">
<div class="ml-[6px] flex items-center justify-start px-[6px] py-[2px]">
<a-checkbox-group v-model:model-value="statusFilters" direction="vertical" size="small">
<a-checkbox v-for="val of Object.values(RequestDefinitionStatus)" :key="val" :value="val">
<a-checkbox v-for="val of requestCaseStatus" :key="val" :value="val">
<apiStatus :status="val" />
</a-checkbox>
</a-checkbox-group>
@ -437,6 +437,9 @@
const keyword = ref('');
const requestCaseStatus = computed(() =>
Object.values(RequestDefinitionStatus).filter((item) => item !== RequestDefinitionStatus.DEBUGGING)
);
const hasOperationPermission = computed(() =>
hasAnyPermission([
'PROJECT_API_DEFINITION_CASE:READ+DELETE',
@ -882,10 +885,6 @@
label: 'apiTestManagement.deprecate',
value: RequestDefinitionStatus.DEPRECATED,
},
{
label: 'apiTestManagement.debugging',
value: RequestDefinitionStatus.DEBUGGING,
},
];
default:
return [];

View File

@ -370,8 +370,10 @@
}
:deep(.ms-detail-card-desc) {
gap: 16px;
justify-content: end;
& > div {
width: auto;
max-width: 50%;
}
}
:deep(.arco-form > .arco-form-item):nth-child(1) .arco-form-item-label-col {