fix(接口自动化): 修复参数设置中提取参数无法获取 jsonpath 数据问题
This commit is contained in:
parent
e93296167e
commit
330dfa0f2e
|
@ -128,12 +128,13 @@
|
||||||
<!-- 步骤组件-->
|
<!-- 步骤组件-->
|
||||||
<ms-component-config
|
<ms-component-config
|
||||||
:isMax="true"
|
:isMax="true"
|
||||||
|
:node="node"
|
||||||
:project-list="projectList"
|
:project-list="projectList"
|
||||||
:if-from-variable-advance="ifFromVariableAdvance"
|
:if-from-variable-advance="ifFromVariableAdvance"
|
||||||
:type="data.type"
|
:type="data.type"
|
||||||
:scenario="data"
|
:scenario="data"
|
||||||
:env-map="projectEnvMap"
|
:env-map="projectEnvMap"
|
||||||
:node="node"/>
|
/>
|
||||||
</span>
|
</span>
|
||||||
</el-tree>
|
</el-tree>
|
||||||
</div>
|
</div>
|
||||||
|
@ -161,8 +162,10 @@
|
||||||
:type="item.type"
|
:type="item.type"
|
||||||
:scenario="item"
|
:scenario="item"
|
||||||
:env-map="projectEnvMap"
|
:env-map="projectEnvMap"
|
||||||
|
:response="response"
|
||||||
:draggable="false"
|
:draggable="false"
|
||||||
@savePreParams="savePreParams"
|
@savePreParams="savePreParams"
|
||||||
|
@suggestClick="suggestClick"
|
||||||
v-if="selectedTreeNode && selectedNode && filterSonNode(item)"/>
|
v-if="selectedTreeNode && selectedNode && filterSonNode(item)"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -315,6 +318,7 @@
|
||||||
asideHidden: false,
|
asideHidden: false,
|
||||||
scenarioRootTree: undefined,
|
scenarioRootTree: undefined,
|
||||||
insideClick: false,
|
insideClick: false,
|
||||||
|
response: {},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -655,6 +659,15 @@
|
||||||
// 获取全部前置提取
|
// 获取全部前置提取
|
||||||
this.getAllExtractDataByNode();
|
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>
|
</script>
|
||||||
|
|
Loading…
Reference in New Issue