From 330dfa0f2e7bb7fb27b263a98cd6935784a1ed55 Mon Sep 17 00:00:00 2001 From: junhong Date: Wed, 12 Jan 2022 14:56:20 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=8C=96):=20=E4=BF=AE=E5=A4=8D=E5=8F=82=E6=95=B0=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E4=B8=AD=E6=8F=90=E5=8F=96=E5=8F=82=E6=95=B0=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E8=8E=B7=E5=8F=96=20jsonpath=20=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../definition/components/ApiVariableAdvance.vue | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/frontend/src/business/components/api/definition/components/ApiVariableAdvance.vue b/frontend/src/business/components/api/definition/components/ApiVariableAdvance.vue index 56f7266b09..908f320462 100644 --- a/frontend/src/business/components/api/definition/components/ApiVariableAdvance.vue +++ b/frontend/src/business/components/api/definition/components/ApiVariableAdvance.vue @@ -128,12 +128,13 @@ + /> @@ -161,8 +162,10 @@ :type="item.type" :scenario="item" :env-map="projectEnvMap" + :response="response" :draggable="false" @savePreParams="savePreParams" + @suggestClick="suggestClick" v-if="selectedTreeNode && selectedNode && filterSonNode(item)"/> @@ -315,6 +318,7 @@ asideHidden: false, scenarioRootTree: undefined, insideClick: false, + response: {}, } }, computed: { @@ -655,6 +659,15 @@ // 获取全部前置提取 this.getAllExtractDataByNode(); }, + // 获取响应结果,后续 jsonpath 引用 + suggestClick(node) { + this.response = {}; + if (node && node.parent && node.parent.data.requestResult) { + this.response = node.parent.data.requestResult[0]; + } else if (this.selectedNode) { + this.response = this.selectedNode.data.requestResult[0]; + } + }, } }