fix(性能设置): 加载关联JMX文件提示多次问题
--bug=1027555 --user=宋昌昌 【性能测试】github#25351,性能模块-场景配置,加载jmx文件后,修改jmx文件再次上传,提示文件已存在,删除资源文件下的jmx后也会提示已存在,只能在项目文件下删除jmx文件后才可以上传,建议在资源文件列表中删除jmx文件后即可重新上传文件。 https://www.tapd.cn/55049933/s/1396989
This commit is contained in:
parent
7850d9034f
commit
c3104c327c
|
@ -159,8 +159,12 @@ export default {
|
|||
handleSelectAll(selection) {
|
||||
if (selection.length > 0) {
|
||||
this.existFiles.forEach(item => {
|
||||
this.selectIds.add(item.id);
|
||||
this.selectFiles.push(item);
|
||||
if (!this.selectIds.has(item.id)) {
|
||||
this.selectIds.add(item.id);
|
||||
}
|
||||
if (this.selectFiles.filter(f => f.id === item.id).length === 0) {
|
||||
this.selectFiles.push(item);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.existFiles.forEach(item => {
|
||||
|
@ -184,8 +188,12 @@ export default {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
this.selectIds.add(row.id);
|
||||
this.selectFiles.push(row);
|
||||
if (!this.selectIds.has(row.id)) {
|
||||
this.selectIds.add(row.id);
|
||||
}
|
||||
if (this.selectFiles.filter(f => f.id === row.id).length === 0) {
|
||||
this.selectFiles.push(row);
|
||||
}
|
||||
}
|
||||
},
|
||||
getProjectFiles() {
|
||||
|
@ -202,8 +210,12 @@ export default {
|
|||
},
|
||||
handleImport(file) {
|
||||
if (file) { // 接口测试创建的性能测试
|
||||
this.selectIds.add(file.id);
|
||||
this.selectFiles.push(file)
|
||||
if (!this.selectIds.has(file.id)) {
|
||||
this.selectIds.add(file.id);
|
||||
}
|
||||
if (this.selectFiles.filter(f => f.id === file.id).length === 0) {
|
||||
this.selectFiles.push(file)
|
||||
}
|
||||
this.getJmxContents();
|
||||
return;
|
||||
}
|
||||
|
@ -239,6 +251,7 @@ export default {
|
|||
}
|
||||
|
||||
this.getJmxContents(jmxIds);
|
||||
this.selectFiles = [];
|
||||
},
|
||||
getJmxContents(jmxIds) {
|
||||
getJmxContents(jmxIds)
|
||||
|
|
|
@ -465,7 +465,7 @@ public class AttachmentService {
|
|||
fileAttachmentMetadata.setSize(file.getSize());
|
||||
fileAttachmentMetadata.setCreateTime(System.currentTimeMillis());
|
||||
fileAttachmentMetadata.setUpdateTime(System.currentTimeMillis());
|
||||
fileAttachmentMetadata.setCreator(SessionUtils.getUser().getName());
|
||||
fileAttachmentMetadata.setCreator(SessionUtils.getUser() == null ? "admin" : SessionUtils.getUser().getName());
|
||||
fileAttachmentMetadata.setFilePath(uploadPath);
|
||||
fileAttachmentMetadataMapper.insert(fileAttachmentMetadata);
|
||||
return fileAttachmentMetadata;
|
||||
|
@ -494,7 +494,7 @@ public class AttachmentService {
|
|||
fileAttachmentMetadata.setSize(Integer.valueOf(total).longValue());
|
||||
fileAttachmentMetadata.setCreateTime(System.currentTimeMillis());
|
||||
fileAttachmentMetadata.setUpdateTime(System.currentTimeMillis());
|
||||
fileAttachmentMetadata.setCreator(SessionUtils.getUser().getName());
|
||||
fileAttachmentMetadata.setCreator(SessionUtils.getUser() == null ? "admin" : SessionUtils.getUser().getName());
|
||||
fileAttachmentMetadata.setFilePath(uploadPath);
|
||||
fileAttachmentMetadataMapper.insert(fileAttachmentMetadata);
|
||||
return fileAttachmentMetadata;
|
||||
|
@ -527,7 +527,7 @@ public class AttachmentService {
|
|||
fileAttachmentMetadata.setId(UUID.randomUUID().toString());
|
||||
fileAttachmentMetadata.setCreateTime(System.currentTimeMillis());
|
||||
fileAttachmentMetadata.setUpdateTime(System.currentTimeMillis());
|
||||
fileAttachmentMetadata.setCreator(SessionUtils.getUser().getName());
|
||||
fileAttachmentMetadata.setCreator(SessionUtils.getUser() == null ? "admin" : SessionUtils.getUser().getName());
|
||||
fileAttachmentMetadata.setFilePath(copyPath);
|
||||
fileAttachmentMetadataMapper.insert(fileAttachmentMetadata);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue