refactor: --story=1003124 --user=刘瑞斌 性能测试压力配置持续时间时分秒可以同时配置 https://www.tapd.cn/55049933/s/1054450

This commit is contained in:
Captain.B 2021-10-11 18:06:47 +08:00 committed by 刘瑞斌
parent 55e170c54c
commit 14799275d8
1 changed files with 8 additions and 4 deletions

View File

@ -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;