fix(接口自动化): 修复参数设置中提取参数无法获取 jsonpath 数据问题

This commit is contained in:
junhong 2022-01-12 14:56:20 +08:00 committed by jianxing
parent e93296167e
commit 330dfa0f2e
1 changed files with 14 additions and 1 deletions

View File

@ -128,12 +128,13 @@
<!-- 步骤组件-->
<ms-component-config
:isMax="true"
:node="node"
:project-list="projectList"
:if-from-variable-advance="ifFromVariableAdvance"
:type="data.type"
:scenario="data"
:env-map="projectEnvMap"
:node="node"/>
/>
</span>
</el-tree>
</div>
@ -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)"/>
</div>
</div>
@ -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];
}
},
}
}
</script>