From f3b9026421d0a91a923951b720f8e224fd98e048 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Fri, 24 Apr 2020 18:04:45 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B6=88=E6=81=AF=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/performance/test/PerformanceTestPlan.vue | 5 +---- .../test/components/PerformanceAdvancedConfig.vue | 8 ++++---- .../test/components/PerformanceBasicConfig.vue | 4 ++-- .../test/components/PerformancePressureConfig.vue | 5 +---- 4 files changed, 8 insertions(+), 14 deletions(-) diff --git a/frontend/src/business/components/performance/test/PerformanceTestPlan.vue b/frontend/src/business/components/performance/test/PerformanceTestPlan.vue index 1521b3ddcf..c1abc82e2c 100644 --- a/frontend/src/business/components/performance/test/PerformanceTestPlan.vue +++ b/frontend/src/business/components/performance/test/PerformanceTestPlan.vue @@ -167,10 +167,7 @@ }; this.result = this.$post(this.deletePath, data, () => { - this.$message({ - message: this.$t('commons.delete_success'), - type: 'success' - }); + this.$success(this.$t('commons.delete_success')); this.initTableData(); }); }, diff --git a/frontend/src/business/components/performance/test/components/PerformanceAdvancedConfig.vue b/frontend/src/business/components/performance/test/components/PerformanceAdvancedConfig.vue index 30e5749eb6..85d36b88aa 100644 --- a/frontend/src/business/components/performance/test/components/PerformanceAdvancedConfig.vue +++ b/frontend/src/business/components/performance/test/components/PerformanceAdvancedConfig.vue @@ -306,23 +306,23 @@ let counts = this.groupBy(this.domains, 'domain'); for (let c in counts) { if (counts[c] > 1) { - this.$message.error(this.$t('load_test.domain_is_duplicate')); + this.$error(this.$t('load_test.domain_is_duplicate')); return false; } } counts = this.groupBy(this.params, 'name'); for (let c in counts) { if (counts[c] > 1) { - this.$message.error(this.$t('load_test.param_is_duplicate')); + this.$error(this.$t('load_test.param_is_duplicate')); return false; } } if (this.domains.filter(d => !d.domain || !d.ip).length > 0) { - this.$message.error(this.$t('load_test.domain_ip_is_empty')); + this.$error(this.$t('load_test.domain_ip_is_empty')); return false; } if (this.params.filter(d => !d.name || !d.value).length > 0) { - this.$message.error(this.$t('load_test.param_name_value_is_empty')); + this.$error(this.$t('load_test.param_name_value_is_empty')); return false; } return true; diff --git a/frontend/src/business/components/performance/test/components/PerformanceBasicConfig.vue b/frontend/src/business/components/performance/test/components/PerformanceBasicConfig.vue index de50acab13..ed5e55a26c 100644 --- a/frontend/src/business/components/performance/test/components/PerformanceBasicConfig.vue +++ b/frontend/src/business/components/performance/test/components/PerformanceBasicConfig.vue @@ -107,7 +107,7 @@ } if (this.tableData.filter(f => f.name === file.name).length > 0) { - this.$message.error(this.$t('load_test.delete_file')); + this.$error(this.$t('load_test.delete_file')); return false; } @@ -175,7 +175,7 @@ } }, handleExceed() { - this.$message.error(this.$t('load_test.delete_file')); + this.$error(this.$t('load_test.delete_file')); }, fileValidator(file) { /// todo: 是否需要对文件内容和大小做限制 diff --git a/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue b/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue index ec566028ca..6363dae7b5 100644 --- a/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue +++ b/frontend/src/business/components/performance/test/components/PerformancePressureConfig.vue @@ -281,10 +281,7 @@ }, validConfig() { if (!this.resourcePool) { - this.$message({ - message: this.$t('load_test.resource_pool_is_null'), - type: 'warning' - }); + this.$warning(this.$t('load_test.resource_pool_is_null')); return false; }