fix(测试计划): 修复测试计划执行用例脑图新建缺陷三方处理人不正确&用例列表对比抽屉table样式修改

This commit is contained in:
xinxin.wu 2024-08-13 18:45:06 +08:00 committed by 刘瑞斌
parent 86dd4b1f74
commit 62ce36e2ba
4 changed files with 57 additions and 13 deletions

View File

@ -49,6 +49,7 @@
:columns="headerColumns"
:data="previewDetail.headers?.filter((e) => e.key !== '') || []"
:selectable="false"
:scroll="{ x: '100%' }"
/>
<MsCodeEditor
v-show="headerShowType === 'raw'"
@ -90,6 +91,7 @@
:selectable="false"
:show-setting="true"
:table-key="TableKeyEnum.API_TEST_DEBUG_QUERY"
:scroll="{ x: '100%' }"
/>
<MsCodeEditor
v-show="queryShowType === 'raw'"
@ -131,6 +133,7 @@
:selectable="false"
:show-setting="true"
:table-key="TableKeyEnum.API_TEST_DEBUG_REST"
:scroll="{ x: '100%' }"
/>
<MsCodeEditor
v-show="restShowType === 'raw'"
@ -190,6 +193,7 @@
:selectable="false"
:show-setting="true"
:table-key="TableKeyEnum.API_TEST_DEBUG_FORM_DATA"
:scroll="{ x: '100%' }"
/>
<template
v-else-if="
@ -246,6 +250,7 @@
:columns="pluginTableColumns"
:data="pluginTableData?.filter((e) => e.key !== '')"
:selectable="false"
:scroll="{ x: '100%' }"
/>
<MsCodeEditor
v-show="pluginShowType === 'raw'"
@ -359,6 +364,7 @@
:columns="responseBodyColumns"
:data="responseBodyTableData"
:selectable="false"
:scroll="{ x: '100%' }"
/>
<MsJsonSchema
v-else-if="
@ -388,6 +394,7 @@
:columns="responseHeaderColumns"
:data="activeResponse?.headers?.filter((e) => e.key !== '') || []"
:selectable="false"
:scroll="{ x: '100%' }"
/>
</div>
</template>
@ -575,6 +582,7 @@
dataIndex: 'description',
inputType: 'text',
showTooltip: true,
width: 300,
},
];
const headerShowType = ref('table');

View File

@ -9,6 +9,7 @@
:data="previewDetail?.headers?.filter((e) => e.key !== '') || []"
:selectable="false"
:diff-mode="props.mode"
:scroll="{ x: '100%' }"
/>
</div>
<div
@ -28,6 +29,7 @@
:data="previewDetail?.query?.filter((e) => e.key !== '') || []"
:selectable="false"
:diff-mode="props.mode"
:scroll="{ x: '100%' }"
/>
</div>
<div
@ -47,6 +49,7 @@
:data="previewDetail?.rest || []"
:selectable="false"
:diff-mode="props.mode"
:scroll="{ x: '100%' }"
/>
</div>
<div
@ -72,6 +75,7 @@
:show-setting="true"
:table-key="TableKeyEnum.API_TEST_DEBUG_FORM_DATA"
:diff-mode="props.mode"
:scroll="{ x: '100%' }"
/>
</div>
<div
@ -128,18 +132,21 @@
dataIndex: 'key',
inputType: 'text',
width: 220,
showTooltip: true,
},
{
title: 'apiTestManagement.paramVal',
dataIndex: 'value',
inputType: 'text',
width: 220,
showTooltip: true,
},
{
title: 'common.desc',
dataIndex: 'description',
inputType: 'text',
showTooltip: true,
width: 300,
},
];
@ -152,6 +159,7 @@
dataIndex: 'key',
inputType: 'text',
width: 220,
showTooltip: true,
columnSelectorDisabled: true,
},
{
@ -206,6 +214,7 @@
dataIndex: 'description',
inputType: 'text',
showTooltip: true,
width: 200,
},
{
title: '',
@ -228,6 +237,7 @@
dataIndex: 'key',
inputType: 'text',
width: 220,
showTooltip: true,
columnSelectorDisabled: true,
},
{
@ -253,6 +263,7 @@
dataIndex: 'value',
inputType: 'text',
showTooltip: true,
width: 200,
},
{
title: 'apiTestDebug.paramLengthRange',
@ -283,6 +294,7 @@
dataIndex: 'description',
inputType: 'text',
showTooltip: true,
width: 200,
},
{
title: '',
@ -299,12 +311,14 @@
dataIndex: 'description',
inputType: 'text',
showTooltip: true,
width: 300,
},
{
title: 'apiTestManagement.paramVal',
dataIndex: 'value',
inputType: 'text',
showTooltip: true,
width: 300,
},
];
}

View File

@ -83,7 +83,16 @@
<a-spin class="min-h-[calc(100vh-110px)] w-full p-4" :loading="loading">
<div class="diff-normal">
<div class="diff-item">
<div class="title-type"> [{{ apiDetailInfo?.num }}] {{ apiDetailInfo?.name }} </div>
<div class="flex">
<a-tooltip
:content="`【${apiDetailInfo?.num}】${apiDetailInfo?.name}`"
:mouse-enter-delay="300"
position="br"
>
<div class="title-type one-line-text"> [{{ apiDetailInfo?.num }}] {{ apiDetailInfo?.name }} </div>
</a-tooltip>
</div>
<DiffItem
:diff-distance-map="diffDistanceMap"
mode="add"
@ -91,8 +100,16 @@
:detail="apiDefinedRequest as RequestParam"
/>
</div>
<div class="diff-item ml-[24px]">
<div class="title-type"> [{{ caseDetail?.num }}] {{ caseDetail?.name }} </div>
<div class="diff-item">
<div class="flex">
<a-tooltip
:content="`【${caseDetail?.num}】${caseDetail?.name}`"
:mouse-enter-delay="300"
position="br"
>
<div class="title-type one-line-text"> [{{ caseDetail?.num }}] {{ caseDetail?.name }} </div>
</a-tooltip>
</div>
<DiffItem :diff-distance-map="diffDistanceMap" mode="delete" :detail="caseDetail as RequestParam" />
</div>
</div>
@ -499,7 +516,8 @@
padding: 0 16px;
min-height: calc(100vh - 110px);
.diff-normal {
@apply flex;
gap: 24px;
@apply grid grid-cols-2;
.diff-item {
@apply flex-1;
.title-type {

View File

@ -61,6 +61,7 @@
import {
createOrUpdateBug,
editorUploadFile,
getCustomOptionHeader,
getTemplateDetailInfo,
getTemplateOption,
} from '@/api/modules/bug-management/index';
@ -69,7 +70,6 @@
import { useAppStore } from '@/store';
import { TemplateOption } from '@/models/common';
import type { CustomField, FieldOptions } from '@/models/setting/template';
const appStore = useAppStore();
@ -151,20 +151,23 @@
}
const handleUserOptions = ref<SelectOptionData[]>([]);
async function getThreePartiesOptions() {
const res = await getCustomOptionHeader(appStore.currentProjectId);
handleUserOptions.value = res.handleUserOption.map((e) => {
return {
value: e.value,
label: e.text,
};
});
}
async function initBugTemplate() {
try {
templateOptions.value = await getTemplateOption(appStore.currentProjectId);
form.value.templateId = templateOptions.value.find((item) => item.enableDefault)?.id as string;
defaultTemplateId.value = templateOptions.value.find((item) => item.enableDefault)?.id as string;
const result = await getTemplateDetailInfo({ id: form.value.templateId, projectId: appStore.currentProjectId });
handleUserOptions.value = result.customFields
.find((customField: CustomField) => customField.fieldKey === 'handleUser')
.options.map((item: FieldOptions) => {
return {
value: item.value,
label: item.text,
};
});
templateCustomFields.value = result.customFields.map((item: any) => {
return {
id: item.fieldId,
@ -191,6 +194,7 @@
(val) => {
if (val) {
initBugTemplate();
getThreePartiesOptions();
}
}
);