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

View File

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

View File

@ -83,7 +83,16 @@
<a-spin class="min-h-[calc(100vh-110px)] w-full p-4" :loading="loading"> <a-spin class="min-h-[calc(100vh-110px)] w-full p-4" :loading="loading">
<div class="diff-normal"> <div class="diff-normal">
<div class="diff-item"> <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 <DiffItem
:diff-distance-map="diffDistanceMap" :diff-distance-map="diffDistanceMap"
mode="add" mode="add"
@ -91,8 +100,16 @@
:detail="apiDefinedRequest as RequestParam" :detail="apiDefinedRequest as RequestParam"
/> />
</div> </div>
<div class="diff-item ml-[24px]"> <div class="diff-item">
<div class="title-type"> [{{ caseDetail?.num }}] {{ caseDetail?.name }} </div> <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" /> <DiffItem :diff-distance-map="diffDistanceMap" mode="delete" :detail="caseDetail as RequestParam" />
</div> </div>
</div> </div>
@ -499,7 +516,8 @@
padding: 0 16px; padding: 0 16px;
min-height: calc(100vh - 110px); min-height: calc(100vh - 110px);
.diff-normal { .diff-normal {
@apply flex; gap: 24px;
@apply grid grid-cols-2;
.diff-item { .diff-item {
@apply flex-1; @apply flex-1;
.title-type { .title-type {

View File

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