fix(接口测试): 修复场景的请求上添加参数时,参数无法编辑的缺陷

This commit is contained in:
wxg0103 2023-04-18 17:06:38 +08:00 committed by 建国
parent 186aad2204
commit a198c8cb09
2 changed files with 7 additions and 3 deletions

View File

@ -472,13 +472,16 @@ export default {
scenarioDefinition: t.currentScenario.scenarioDefinition,
};
let v3 = JSON.parse(JSON.stringify(v2));
if (v1.scenarioDefinition) {
if (v1 && v1.scenarioDefinition) {
this.deleteResourceIds(v1.scenarioDefinition);
}
if (v3.scenarioDefinition) {
if (v3 && v3.scenarioDefinition) {
this.deleteResourceIds(v3.scenarioDefinition);
}
let delta = jsondiffpatch.diff(JSON.parse(JSON.stringify(v1)), JSON.parse(JSON.stringify(v3)));
let delta;
if (v1 && v3) {
delta = jsondiffpatch.diff(JSON.parse(JSON.stringify(v1)), JSON.parse(JSON.stringify(v3)));
}
if (delta) {
this.isSave = true;
}

View File

@ -152,6 +152,7 @@ export default {
name: keyValues[0],
required: false,
value: keyValues[1],
isEdit: false,
})
);
}