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