fix: 修复文件加载时文件名重复没有显示文件名的bug

This commit is contained in:
Captain.B 2021-03-30 10:27:04 +08:00
parent 391a2924c8
commit f2a6341b4c
3 changed files with 4 additions and 4 deletions

View File

@ -157,7 +157,7 @@ export default {
for (let i = 0; i < rows.length; i++) { for (let i = 0; i < rows.length; i++) {
let row = rows[i]; let row = rows[i];
if (this.tableData.filter(f => f.name === row.name).length > 0) { if (this.tableData.filter(f => f.name === row.name).length > 0) {
this.$error(this.$t('load_test.delete_file')); this.$error(this.$t('load_test.delete_file') + ', name: ' + row.name);
this.selectIds.clear(); this.selectIds.clear();
return; return;
} }
@ -216,7 +216,7 @@ export default {
} }
if (this.tableData.filter(f => f.name === file.name).length > 0) { if (this.tableData.filter(f => f.name === file.name).length > 0) {
this.$error(this.$t('load_test.delete_file')); this.$error(this.$t('load_test.delete_file') + ', name: ' + file.name);
return false; return false;
} }
}, },

View File

@ -121,7 +121,7 @@ export default {
for (let i = 0; i < rows.length; i++) { for (let i = 0; i < rows.length; i++) {
let row = rows[i]; let row = rows[i];
if (this.tableData.filter(f => f.name === row.name + ".jmx").length > 0) { if (this.tableData.filter(f => f.name === row.name + ".jmx").length > 0) {
this.$error(this.$t('load_test.delete_file')); this.$error(this.$t('load_test.delete_file') + ', name: ' + row.name);
return; return;
} }
} }

View File

@ -923,7 +923,7 @@ export default {
} }
if (this.tableData.filter(f => f.name === file.name).length > 0) { if (this.tableData.filter(f => f.name === file.name).length > 0) {
this.$error(this.$t('load_test.delete_file')); this.$error(this.$t('load_test.delete_file') + ', name: ' + file.name);
return false; return false;
} }