修改消息提示

This commit is contained in:
shiziyuan9527 2020-04-24 18:04:45 +08:00
parent dcef65f719
commit f3b9026421
4 changed files with 8 additions and 14 deletions

View File

@ -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();
});
},

View File

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

View File

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

View File

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