fix(接口测试): 修复请求参数缺少属性问题 #16078
This commit is contained in:
parent
d2d7dc657c
commit
daac8f5109
|
@ -24,8 +24,7 @@
|
||||||
</el-button>
|
</el-button>
|
||||||
</p>
|
</p>
|
||||||
<!-- HTTP 请求参数 -->
|
<!-- HTTP 请求参数 -->
|
||||||
<el-tree node-key=" resourceId
|
<el-tree node-key="resourceId"
|
||||||
"
|
|
||||||
:props="props"
|
:props="props"
|
||||||
:data="request.hashTree"
|
:data="request.hashTree"
|
||||||
:allow-drop="allowDrop"
|
:allow-drop="allowDrop"
|
||||||
|
@ -138,6 +137,7 @@ import BatchAddParameter from "../basis/BatchAddParameter";
|
||||||
import MsJsr233Processor from "../../../automation/scenario/component/Jsr233Processor";
|
import MsJsr233Processor from "../../../automation/scenario/component/Jsr233Processor";
|
||||||
import MsConstantTimer from "../../../automation/scenario/component/ConstantTimer";
|
import MsConstantTimer from "../../../automation/scenario/component/ConstantTimer";
|
||||||
import MsJdbcProcessor from "@/business/components/api/automation/scenario/component/JDBCProcessor";
|
import MsJdbcProcessor from "@/business/components/api/automation/scenario/component/JDBCProcessor";
|
||||||
|
import {TYPE_TO_C} from "@/business/components/api/automation/scenario/Setting";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "MsJmxStep",
|
name: "MsJmxStep",
|
||||||
|
@ -459,19 +459,26 @@ export default {
|
||||||
sort() {
|
sort() {
|
||||||
let index = 1;
|
let index = 1;
|
||||||
for (let i in this.request.hashTree) {
|
for (let i in this.request.hashTree) {
|
||||||
if (this.tabType === 'pre' && (this.request.hashTree[i].type === 'JSR223PreProcessor' ||
|
let step = this.request.hashTree[i];
|
||||||
this.request.hashTree[i].type === 'JDBCPreProcessor' || this.request.hashTree[i].type === 'ConstantTimer')) {
|
if (this.tabType === 'pre' &&
|
||||||
this.request.hashTree[i].index = Number(index);
|
(step.type === 'JSR223PreProcessor' ||
|
||||||
|
step.type === 'JDBCPreProcessor' || step.type === 'ConstantTimer')) {
|
||||||
|
step.index = Number(index);
|
||||||
index++;
|
index++;
|
||||||
} else if (this.tabType === 'post' && (this.request.hashTree[i].type === 'JSR223PostProcessor' ||
|
} else if (this.tabType === 'post' &&
|
||||||
this.request.hashTree[i].type === 'JDBCPostProcessor' ||
|
(step.type === 'JSR223PostProcessor' ||
|
||||||
this.request.hashTree[i].type === 'Extract')) {
|
step.type === 'JDBCPostProcessor' ||
|
||||||
this.request.hashTree[i].index = Number(index);
|
step.type === 'Extract')) {
|
||||||
|
step.index = Number(index);
|
||||||
index++;
|
index++;
|
||||||
} else if (this.tabType === 'assertionsRule' && this.request.hashTree[i].type === 'Assertions') {
|
} else if (this.tabType === 'assertionsRule' && step.type === 'Assertions') {
|
||||||
this.request.hashTree[i].index = Number(index);
|
step.index = Number(index);
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
// 兼容历史数据
|
||||||
|
if (!step.clazzName) {
|
||||||
|
step.clazzName = TYPE_TO_C.get(step.type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 解决修改请求头后 body 显示错位
|
// 解决修改请求头后 body 显示错位
|
||||||
|
|
Loading…
Reference in New Issue