From a18c682e09cd24a1b062a821a90e30d9e73a2710 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Mon, 21 Mar 2022 18:04:45 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=BA=E6=99=AF=E5=8F=98=E9=87=8F=E4=B8=8D?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/automation/scenario/EditApiScenario.vue | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index 6a778f75c5..ef72ed377b 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -1528,6 +1528,21 @@ export default { if (obj.headers) { this.currentScenario.headers = obj.headers; } + let index = 1; + if (obj.variables) { + obj.variables.forEach(item => { + // 兼容历史数据 + if (item.name) { + if (!item.type) { + item.type = "CONSTANT"; + item.id = getUUID(); + } + item.num = index; + this.currentScenario.variables.push(item); + index++; + } + }) + } this.enableCookieShare = obj.enableCookieShare; if (obj.onSampleError === undefined) { this.onSampleError = true;