fix(项目管理): 文件管理增加路径列显示,并优化文件查看逻辑
--bug=1025466 --user=宋天阳 【项目设置】github#23686,文件管理拉取git文件存在三问题 https://www.tapd.cn/55049933/s/1363277
This commit is contained in:
parent
67d9d20448
commit
c98f8707e5
|
@ -53,7 +53,7 @@
|
|||
:filters="typeFilters"
|
||||
:label="$t('load_test.file_type')">
|
||||
</ms-table-column>
|
||||
|
||||
<ms-table-column :min-width="120" :label="$t('project.project_file.file.path')" prop="path" />
|
||||
<ms-table-column prop="description" :min-width="100" :label="$t('group.description')"></ms-table-column>
|
||||
|
||||
<ms-table-column prop="tags" width="100px" :show-overflow-tooltip="false" :label="$t('commons.tag')">
|
||||
|
|
|
@ -353,8 +353,8 @@ public class FileMetadataService {
|
|||
}
|
||||
fileMetadata.setUpdateTime(System.currentTimeMillis());
|
||||
fileMetadata.setUpdateUser(SessionUtils.getUserId());
|
||||
// 历史数据的路径不做更新
|
||||
if (StringUtils.isNotEmpty(fileMetadata.getStorage()) && StringUtils.isEmpty(fileMetadata.getResourceType())) {
|
||||
// 历史数据和Git数据的路径不做更新
|
||||
if (!StringUtils.equalsIgnoreCase(StorageConstants.GIT.name(), fileMetadata.getStorage()) && (StringUtils.isNotEmpty(fileMetadata.getStorage()) && StringUtils.isEmpty(fileMetadata.getResourceType()))) {
|
||||
fileMetadata.setPath(FileUtils.getFilePath(fileMetadata));
|
||||
}
|
||||
//latest字段只能在git/pull时更新
|
||||
|
@ -365,6 +365,13 @@ public class FileMetadataService {
|
|||
public boolean isFileChanged(FileMetadataWithBLOBs newFile) {
|
||||
FileMetadataWithBLOBs oldFile = this.getFileMetadataById(newFile.getId());
|
||||
if (oldFile != null) {
|
||||
if (StringUtils.equals("[]", oldFile.getTags())) {
|
||||
oldFile.setTags(null);
|
||||
}
|
||||
if (StringUtils.equals("[]", newFile.getTags())) {
|
||||
newFile.setTags(null);
|
||||
}
|
||||
|
||||
return !StringUtils.equals(newFile.getDescription(), oldFile.getDescription())
|
||||
|| !StringUtils.equals(newFile.getAttachInfo(), oldFile.getAttachInfo())
|
||||
|| !StringUtils.equals(newFile.getName(), oldFile.getName())
|
||||
|
|
|
@ -77,9 +77,12 @@
|
|||
:label="$t('load_test.file_type')"
|
||||
>
|
||||
</ms-table-column>
|
||||
|
||||
<ms-table-column prop="description" :label="$t('group.description')">
|
||||
</ms-table-column>
|
||||
<ms-table-column
|
||||
:min-width="120"
|
||||
:label="$t('project.project_file.file.path')"
|
||||
prop="path"
|
||||
/>
|
||||
<ms-table-column prop="description" :label="$t('group.description')" />
|
||||
|
||||
<ms-table-column
|
||||
prop="tags"
|
||||
|
|
|
@ -224,6 +224,7 @@ export default {
|
|||
refresh() {
|
||||
this.myFiles();
|
||||
this.list(getCurrentProjectID());
|
||||
this.$emit("nodeSelectEvent", { data: { id: "root" } }, [], null);
|
||||
},
|
||||
myFile() {
|
||||
this.$nextTick(() => {
|
||||
|
|
Loading…
Reference in New Issue