fix(接口测试): 修复报告平铺模式不请求数据
This commit is contained in:
parent
ecef0e95d7
commit
53b72d7517
|
@ -87,14 +87,15 @@
|
|||
/>
|
||||
</div>
|
||||
<!-- 平铺 -->
|
||||
<TiledDisplay
|
||||
v-if="props.mode === 'tiled'"
|
||||
:menu-list="responseCompositionTabList"
|
||||
:request-result="activeStepDetailCopy?.content"
|
||||
:console="props.console"
|
||||
:is-definition="props.isDefinition"
|
||||
:report-id="props.reportId"
|
||||
/>
|
||||
<a-spin v-if="props.mode === 'tiled'" class="w-full" :loading="loading">
|
||||
<TiledDisplay
|
||||
:menu-list="responseCompositionTabList"
|
||||
:request-result="activeStepDetailCopy?.content"
|
||||
:console="props.console"
|
||||
:is-definition="props.isDefinition"
|
||||
:report-id="props.reportId"
|
||||
/>
|
||||
</a-spin>
|
||||
<!-- 响应内容tab -->
|
||||
<div v-else class="h-[calc(100%-8px)]">
|
||||
<a-spin :loading="loading" class="h-[calc(100%-8px)] w-full pb-1">
|
||||
|
@ -344,17 +345,18 @@
|
|||
const originStepId = ref<string | undefined>('');
|
||||
|
||||
watchEffect(() => {
|
||||
if (props.stepItem?.stepId && !props.stepItem.fold) {
|
||||
if (isShowLoopControl.value && props.stepItem?.stepChildren) {
|
||||
getStepDetail(props.stepItem?.stepChildren[controlCurrent.value - 1].stepId as string);
|
||||
} else {
|
||||
getStepDetail(props.stepItem.stepId);
|
||||
}
|
||||
if (props.stepItem?.stepId && props.mode === 'tiled') {
|
||||
const stepIds = props.stepItem?.stepChildren || [];
|
||||
getStepDetail(isShowLoopControl.value ? stepIds[controlCurrent.value - 1].stepId : props.stepItem.stepId);
|
||||
}
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
originStepId.value = props.stepItem?.stepId;
|
||||
if (props.stepItem?.stepId && !props.stepItem.fold) {
|
||||
const stepIds = props.stepItem?.stepChildren || [];
|
||||
getStepDetail(isShowLoopControl.value ? stepIds[controlCurrent.value - 1].stepId : props.stepItem.stepId);
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
|
|
|
@ -27,7 +27,6 @@
|
|||
@more-actions-close="() => setFocusNodeKey('')"
|
||||
>
|
||||
<template #title="step">
|
||||
<!-- <div class="absolute h-full w-full top-0" style="border: 1px solid #0cc"></div> -->
|
||||
<div class="flex flex-col" @click="handleStop($event, step)">
|
||||
<div class="flex w-full items-center gap-[8px]">
|
||||
<div
|
||||
|
@ -168,7 +167,7 @@
|
|||
<div v-if="!step.fold" class="line"></div>
|
||||
</div>
|
||||
<!-- 折叠展开内容 -->
|
||||
<div v-show="showResContent(step)" class="foldContent mt-4 pl-2">
|
||||
<div v-if="showResContent(step)" class="foldContent mt-4 pl-2">
|
||||
<StepDetailContent
|
||||
:mode="props.activeType"
|
||||
:step-item="step"
|
||||
|
@ -310,7 +309,12 @@
|
|||
if (!showApiType.value.includes(item.stepType)) {
|
||||
return;
|
||||
}
|
||||
activeItem.value = item;
|
||||
const isNotAllowExpand = item.children && item?.children.length && showApiType.value.includes(item.stepType);
|
||||
if (isNotAllowExpand) {
|
||||
item.stepChildren = cloneDeep(item.children);
|
||||
item.children = [];
|
||||
}
|
||||
activeItem.value = cloneDeep(item);
|
||||
emit('detail', activeItem.value);
|
||||
event.stopPropagation();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue