From 15ceb139776badd4583d7b22b6d8c205c82f7866 Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Thu, 8 Jul 2021 10:15:51 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E5=9B=BA=E5=AE=9A=20rampup=20=E5=8D=95=E4=BD=8D=EF=BC=8C?= =?UTF-8?q?=E9=99=90=E5=88=B6=E5=89=8D=E7=AB=AF=E8=BE=93=E5=85=A5=E7=9A=84?= =?UTF-8?q?=E6=9C=80=E5=A4=A7=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/PerformancePressureConfig.vue | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue b/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue index 023e164d19..9374729fb7 100644 --- a/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue +++ b/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue @@ -89,7 +89,7 @@ size="mini"/> - + {{ $t('schedule.cron.seconds') }} {{ $t('schedule.cron.minutes') }} {{ $t('schedule.cron.hours') }} @@ -113,7 +113,8 @@ @@ -134,8 +135,9 @@ @@ -251,6 +253,7 @@ export default { autoStop: false, autoStopDelay: 30, isReadOnly: false, + rampUpTimeVisible: true, }; }, mounted() { @@ -652,6 +655,24 @@ export default { return true; }, + getMaxRampUp(tg) { + if (tg.unit === 'S') { + return tg.duration; + } + if (tg.unit === 'M') { + return tg.duration * 60; + } + if (tg.unit === 'H') { + return tg.duration * 60 * 60; + } + return tg.duration; + }, + changeUnit(tg) { + this.rampUpTimeVisible = false; + this.$nextTick(() => { + this.rampUpTimeVisible = true; + }); + }, getUnitLabel(tg) { if (tg.unit === 'S') { return this.$t('schedule.cron.seconds');