From bcdfb828c2e8588e0fa76c31a2de9b335e427d98 Mon Sep 17 00:00:00 2001 From: fit2-zhao Date: Mon, 20 Jun 2022 17:41:14 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E6=B5=8B=E8=AF=95):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B9=B6=E5=8F=91=E6=8E=A7=E5=88=B6=E5=99=A8?= =?UTF-8?q?=E6=8F=92=E4=BB=B6=E5=A4=9A=E5=87=BA=E4=B8=80=E4=B8=AA=E5=9C=BA?= =?UTF-8?q?=E6=99=AF=E6=96=AD=E8=A8=80=E6=AD=A5=E9=AA=A4=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1014257 --user=赵勇 【接口测试】github#15083并行处理器插件在页面保存再另打开后,会自动带出场景断言组件,功能实现有误,请修改 https://www.tapd.cn/55049933/s/1187025 --- .../automation/scenario/EditApiScenario.vue | 30 +++++++++++++++---- .../api/automation/scenario/Setting.js | 2 +- 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue index 3b4470f1de..570028cf85 100644 --- a/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue +++ b/frontend/src/business/components/api/automation/scenario/EditApiScenario.vue @@ -195,9 +195,9 @@ + @click="openOrClose(node,data)"/> + @click="openOrClose(node,data)"/> v.type !== "Assertions"); + for (let i = 0; i < data.length; i++) { + data[i].index = (i + 1); + } + } }, hideNode(node) { node.isLeaf = true; @@ -1310,7 +1320,12 @@ export default { }) } this.isBtnHide = false; - this.sort(); + // 历史数据兼容处理 + if (this.selectedTreeNode && this.selectedTreeNode.type === 'GenericController') { + this.plugnOrder(this.selectedTreeNode); + } else { + this.sort(); + } this.cancelBatchProcessing(); }, setApiParameter(item, refType, referenced) { @@ -1366,7 +1381,12 @@ export default { }); this.isBtnHide = false; this.$refs.scenarioApiRelevance.changeButtonLoadingType(); - this.sort(); + // 历史数据兼容处理 + if (this.selectedTreeNode && this.selectedTreeNode.type === 'GenericController') { + this.plugnOrder(this.selectedTreeNode); + } else { + this.sort(); + } this.cancelBatchProcessing(); }, getMaintainerOptions() { diff --git a/frontend/src/business/components/api/automation/scenario/Setting.js b/frontend/src/business/components/api/automation/scenario/Setting.js index 1f61fa132c..308d2c3f4b 100644 --- a/frontend/src/business/components/api/automation/scenario/Setting.js +++ b/frontend/src/business/components/api/automation/scenario/Setting.js @@ -24,7 +24,7 @@ export function STEP() { ['MaxSamplerProxy', getDefaultSamplerMenu()], ['GenericController', getAll()], ['SpecialSteps', ['HTTPSamplerProxy', 'Assertions', 'DubboSampler', 'JDBCSampler', 'TCPSampler', 'Sampler', 'AbstractSampler', 'JSR223Processor', 'API', 'MsUiCommand']], - ['AllSamplerProxy', ['HTTPSamplerProxy', 'DubboSampler', 'JDBCSampler', 'TCPSampler', 'Sampler', 'AbstractSampler', 'JSR223Processor', 'API', 'MsUiCommand']], + ['AllSamplerProxy', ['GenericController','HTTPSamplerProxy', 'DubboSampler', 'JDBCSampler', 'TCPSampler', 'Sampler', 'AbstractSampler', 'JSR223Processor', 'API', 'MsUiCommand']], ['DEFINITION', ['HTTPSamplerProxy', 'DubboSampler', 'JDBCSampler', 'TCPSampler']], ['ALlSamplerStep', ['JSR223PreProcessor', 'JSR223PostProcessor', 'JDBCPreProcessor', 'JDBCPostProcessor', 'Assertions', 'Extract', 'ConstantTimer']], ['AllCanExecType', ['HTTPSamplerProxy', 'DubboSampler', 'JDBCSampler', 'TCPSampler', 'JSR223Processor', 'AbstractSampler']]]);