fix(接口测试): 修复请求参数缺少属性问题 #16078

This commit is contained in:
fit2-zhao 2022-07-22 10:31:44 +08:00 committed by f2c-ci-robot[bot]
parent 55c922199b
commit a66e773adf
1 changed files with 18 additions and 11 deletions

View File

@ -24,8 +24,7 @@
</el-button>
</p>
<!-- HTTP 请求参数 -->
<el-tree node-key=" resourceId
"
<el-tree node-key="resourceId"
:props="props"
:data="request.hashTree"
:allow-drop="allowDrop"
@ -138,6 +137,7 @@ import BatchAddParameter from "../basis/BatchAddParameter";
import MsJsr233Processor from "../../../automation/scenario/component/Jsr233Processor";
import MsConstantTimer from "../../../automation/scenario/component/ConstantTimer";
import MsJdbcProcessor from "@/business/components/api/automation/scenario/component/JDBCProcessor";
import {TYPE_TO_C} from "@/business/components/api/automation/scenario/Setting";
export default {
name: "MsJmxStep",
@ -459,19 +459,26 @@ export default {
sort() {
let index = 1;
for (let i in this.request.hashTree) {
if (this.tabType === 'pre' && (this.request.hashTree[i].type === 'JSR223PreProcessor' ||
this.request.hashTree[i].type === 'JDBCPreProcessor' || this.request.hashTree[i].type === 'ConstantTimer')) {
this.request.hashTree[i].index = Number(index);
let step = this.request.hashTree[i];
if (this.tabType === 'pre' &&
(step.type === 'JSR223PreProcessor' ||
step.type === 'JDBCPreProcessor' || step.type === 'ConstantTimer')) {
step.index = Number(index);
index++;
} else if (this.tabType === 'post' && (this.request.hashTree[i].type === 'JSR223PostProcessor' ||
this.request.hashTree[i].type === 'JDBCPostProcessor' ||
this.request.hashTree[i].type === 'Extract')) {
this.request.hashTree[i].index = Number(index);
} else if (this.tabType === 'post' &&
(step.type === 'JSR223PostProcessor' ||
step.type === 'JDBCPostProcessor' ||
step.type === 'Extract')) {
step.index = Number(index);
index++;
} else if (this.tabType === 'assertionsRule' && this.request.hashTree[i].type === 'Assertions') {
this.request.hashTree[i].index = Number(index);
} else if (this.tabType === 'assertionsRule' && step.type === 'Assertions') {
step.index = Number(index);
index++;
}
//
if (!step.clazzName) {
step.clazzName = TYPE_TO_C.get(step.type);
}
}
},
// body