fix(接口测试): 场景请求步骤另存为新接口弹窗关闭清理激活步骤数据
This commit is contained in:
parent
903b5fa378
commit
21ca4c8b3e
|
@ -5,6 +5,7 @@
|
||||||
class="ms-modal-form"
|
class="ms-modal-form"
|
||||||
title-align="start"
|
title-align="start"
|
||||||
body-class="!p-0"
|
body-class="!p-0"
|
||||||
|
@close="emit('close')"
|
||||||
>
|
>
|
||||||
<a-form ref="saveModalFormRef" :model="saveModalForm" layout="vertical">
|
<a-form ref="saveModalFormRef" :model="saveModalForm" layout="vertical">
|
||||||
<a-form-item
|
<a-form-item
|
||||||
|
@ -86,6 +87,7 @@
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
detail: RequestParam | ApiDefinitionRequestParam;
|
detail: RequestParam | ApiDefinitionRequestParam;
|
||||||
}>();
|
}>();
|
||||||
|
const emit = defineEmits(['close']);
|
||||||
|
|
||||||
const appStore = useAppStore();
|
const appStore = useAppStore();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
|
@ -398,6 +398,7 @@
|
||||||
v-if="tempApiDetail"
|
v-if="tempApiDetail"
|
||||||
v-model:visible="saveNewApiModalVisible"
|
v-model:visible="saveNewApiModalVisible"
|
||||||
:detail="tempApiDetail"
|
:detail="tempApiDetail"
|
||||||
|
@close="() => (tempApiDetail = undefined)"
|
||||||
></saveAsApiModal>
|
></saveAsApiModal>
|
||||||
<a-modal
|
<a-modal
|
||||||
v-model:visible="saveCaseModalVisible"
|
v-model:visible="saveCaseModalVisible"
|
||||||
|
@ -808,6 +809,7 @@
|
||||||
tags: [],
|
tags: [],
|
||||||
};
|
};
|
||||||
saveCaseModalVisible.value = false;
|
saveCaseModalVisible.value = false;
|
||||||
|
activeStep.value = undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
function saveAsCase(done: (closed: boolean) => void) {
|
function saveAsCase(done: (closed: boolean) => void) {
|
||||||
|
@ -1012,13 +1014,12 @@
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'saveAsApi':
|
case 'saveAsApi':
|
||||||
activeStep.value = node as ScenarioStepItem;
|
if (!stepDetails.value[node.id]) {
|
||||||
if (!stepDetails.value[activeStep.value.id]) {
|
|
||||||
// 详情映射中没有对应数据,初始化步骤详情(复制的步骤没有加载详情前就被复制,打开复制后的步骤就初始化被复制步骤的详情)
|
// 详情映射中没有对应数据,初始化步骤详情(复制的步骤没有加载详情前就被复制,打开复制后的步骤就初始化被复制步骤的详情)
|
||||||
await getStepDetail(activeStep.value);
|
await getStepDetail(node as ScenarioStepItem);
|
||||||
}
|
}
|
||||||
const detail = stepDetails.value[activeStep.value.id] as RequestParam;
|
const detail = stepDetails.value[node.id] as RequestParam;
|
||||||
const fileParams = scenario.value.stepFileParam[activeStep.value.id];
|
const fileParams = scenario.value.stepFileParam[node.id];
|
||||||
tempApiDetail.value = {
|
tempApiDetail.value = {
|
||||||
...detail,
|
...detail,
|
||||||
uploadFileIds: fileParams?.uploadFileIds || [],
|
uploadFileIds: fileParams?.uploadFileIds || [],
|
||||||
|
|
Loading…
Reference in New Issue