From c4e81c568dc3caba5c42bf81d9dc885c9892f996 Mon Sep 17 00:00:00 2001 From: liangdaliang Date: Fri, 14 Mar 2025 10:01:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E5=8F=96=E6=A0=A1=E9=AA=8C=E4=B8=8B?= =?UTF-8?q?=E6=8B=89=E8=8F=9C=E5=8D=95=E9=80=89=E6=8B=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test-ui/src/views/test/case/detail/page1.vue | 17 ++++++--- test-ui/src/views/test/case/detail/step.vue | 37 ++++++++++++++++++++ 2 files changed, 50 insertions(+), 4 deletions(-) diff --git a/test-ui/src/views/test/case/detail/page1.vue b/test-ui/src/views/test/case/detail/page1.vue index ca8d6ad..2d4ceb3 100644 --- a/test-ui/src/views/test/case/detail/page1.vue +++ b/test-ui/src/views/test/case/detail/page1.vue @@ -90,12 +90,18 @@ @@ -124,7 +130,10 @@ @@ -170,7 +179,7 @@ import {listApi} from "@/api/test/api"; export default { components: {FolderPage, JsonEditorVue}, - dicts: ['http_method', 'http_protocol'], + dicts: ['http_method', 'http_protocol','extract_type','extract_object','assert_condition'], props: { form: { type: Object diff --git a/test-ui/src/views/test/case/detail/step.vue b/test-ui/src/views/test/case/detail/step.vue index b6e6f28..bd5fbc9 100644 --- a/test-ui/src/views/test/case/detail/step.vue +++ b/test-ui/src/views/test/case/detail/step.vue @@ -74,6 +74,43 @@ export default { this.list = []; res.data.forEach(item => { this.id = item.caseId; + let childrenList = item.childrenList; + if (childrenList) { + childrenList.forEach((children) => { + if (children.requestHeader === '[]') { + children.requestHeader = []; + children.requestHeader.push({ + key: "", + value: "", + }) + } + if (children.requestParams === '[]') { + children.requestParams = []; + children.requestParams.push({ + key: "", + value: "", + }) + } + if (children.assignment === '[]') { + children.assignment = []; + children.assignment.push({ + name: "", + type: "", + content: "", + path: "", + }) + } + if (children.assertion === '[]') { + children.assertion = []; + children.assertion.push({ + name: "", + source: "", + fn: "", + target: "" + }) + } + }); + } let p = { ...item, assertion: item.assertion ? JSON.parse(item.assertion) : [],