fix(接口测试): 场景部分 bug 修复

This commit is contained in:
baiqi 2024-05-28 16:13:57 +08:00 committed by 刘瑞斌
parent 60650c7958
commit 718ec6c03e
2 changed files with 26 additions and 21 deletions

View File

@ -1117,6 +1117,7 @@
return;
}
emit('addStep', cloneDeep(makeRequestParams()) as RequestParam);
requestVModel.value.stepId = getGenerateId(); // id
}
function handleSave() {

View File

@ -1234,29 +1234,33 @@
scenario.value.unSaved = true;
}
if (activeStep.value) {
const _stepType = getStepType(activeStep.value);
if (_stepType.isQuoteCase && !activeStep.value.isQuoteScenarioStep) {
activeStep.value.name = request.stepName || request.name;
stepDetails.value[activeStep.value.id] = request; // polymorphicName
return;
const realStep = findNodeByKey<ScenarioStepItem>(steps.value, activeStep.value.uniqueId, 'uniqueId');
if (realStep) {
const _stepType = getStepType(realStep as ScenarioStepItem);
if (_stepType.isQuoteCase && !realStep.isQuoteScenarioStep) {
realStep.name = request.stepName || request.name;
stepDetails.value[realStep.id] = request; // polymorphicName
return;
}
}
if (realStep && !realStep.isQuoteScenarioStep) {
request.isNew = false;
stepDetails.value[realStep.id] = request;
scenario.value.stepFileParam[realStep?.id] = {
linkFileIds: request.linkFileIds,
uploadFileIds: request.uploadFileIds,
deleteFileIds: request.deleteFileIds,
unLinkFileIds: request.unLinkFileIds,
};
realStep.config = {
...realStep.config,
method: request.method,
};
realStep.name = request.stepName || request.name;
emit('updateResource', request.uploadFileIds, request.linkFileIds);
}
activeStep.value = undefined;
}
if (activeStep.value && !activeStep.value.isQuoteScenarioStep) {
request.isNew = false;
stepDetails.value[activeStep.value.id] = request;
scenario.value.stepFileParam[activeStep.value?.id] = {
linkFileIds: request.linkFileIds,
uploadFileIds: request.uploadFileIds,
deleteFileIds: request.deleteFileIds,
unLinkFileIds: request.unLinkFileIds,
};
activeStep.value.config = {
...activeStep.value.config,
method: request.method,
};
emit('updateResource', request.uploadFileIds, request.linkFileIds);
}
activeStep.value = undefined;
}
/**