From 14799275d81751d3e0c5e4ad910f05d83a37b184 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Mon, 11 Oct 2021 18:06:47 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20--story=3D1003124=20--user=3D?= =?UTF-8?q?=E5=88=98=E7=91=9E=E6=96=8C=20=E6=80=A7=E8=83=BD=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E5=8E=8B=E5=8A=9B=E9=85=8D=E7=BD=AE=E6=8C=81=E7=BB=AD?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E6=97=B6=E5=88=86=E7=A7=92=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E5=90=8C=E6=97=B6=E9=85=8D=E7=BD=AE=20https://www.tapd.cn/5504?= =?UTF-8?q?9933/s/1054450?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../test/components/PerformancePressureConfig.vue | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue b/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue index 975cd599e8..9e61574651 100644 --- a/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue +++ b/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue @@ -604,16 +604,20 @@ export default { this.$emit('changeActive', '1'); return false; } - for (let i = 0; i < this.threadGroups.length; i++) { - if (!this.threadGroups[i].threadNumber || !this.threadGroups[i].duration - || !this.threadGroups[i].rampUpTime || !this.threadGroups[i].step || !this.threadGroups[i].iterateNum) { + let tg = this.threadGroups[i]; + tg.durationHours = tg.durationHours || 0; + tg.durationMinutes = tg.durationMinutes || 0; + tg.durationSeconds = tg.durationSeconds || 0; + this.getDuration(tg); + if (!tg.threadNumber || !tg.duration + || !tg.rampUpTime || !tg.step || !tg.iterateNum) { this.$warning(this.$t('load_test.pressure_config_params_is_empty')); this.$emit('changeActive', '1'); return false; } - if (this.threadGroups[i].rpsLimitEnable && !this.threadGroups[i].rpsLimit) { + if (tg.rpsLimitEnable && !tg.rpsLimit) { this.$warning(this.$t('load_test.pressure_config_params_is_empty')); this.$emit('changeActive', '1'); return false;