fix(接口测试): 场景部分 bug 修复
This commit is contained in:
parent
60650c7958
commit
718ec6c03e
|
@ -1117,6 +1117,7 @@
|
|||
return;
|
||||
}
|
||||
emit('addStep', cloneDeep(makeRequestParams()) as RequestParam);
|
||||
requestVModel.value.stepId = getGenerateId(); // 保存后需要重新生成 id
|
||||
}
|
||||
|
||||
function handleSave() {
|
||||
|
|
|
@ -1234,30 +1234,34 @@
|
|||
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
|
||||
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 (activeStep.value && !activeStep.value.isQuoteScenarioStep) {
|
||||
if (realStep && !realStep.isQuoteScenarioStep) {
|
||||
request.isNew = false;
|
||||
stepDetails.value[activeStep.value.id] = request;
|
||||
scenario.value.stepFileParam[activeStep.value?.id] = {
|
||||
stepDetails.value[realStep.id] = request;
|
||||
scenario.value.stepFileParam[realStep?.id] = {
|
||||
linkFileIds: request.linkFileIds,
|
||||
uploadFileIds: request.uploadFileIds,
|
||||
deleteFileIds: request.deleteFileIds,
|
||||
unLinkFileIds: request.unLinkFileIds,
|
||||
};
|
||||
activeStep.value.config = {
|
||||
...activeStep.value.config,
|
||||
realStep.config = {
|
||||
...realStep.config,
|
||||
method: request.method,
|
||||
};
|
||||
realStep.name = request.stepName || request.name;
|
||||
emit('updateResource', request.uploadFileIds, request.linkFileIds);
|
||||
}
|
||||
activeStep.value = undefined;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加脚本操作步骤
|
||||
|
|
Loading…
Reference in New Issue