refactor(接口测试): 每次打开文件管理列表及时加载最新内容

--bug=1017893 --user=赵勇 【接口测试】接口测试关联文件时,点开关联弹窗没有刷新文件列表 https://www.tapd.cn/55049933/s/1261073
This commit is contained in:
fit2-zhao 2022-10-13 18:30:10 +08:00 committed by f2c-ci-robot[bot]
parent 9c6a06a3b8
commit 5fdf2127d4
2 changed files with 3 additions and 35 deletions

View File

@ -1259,7 +1259,7 @@ export default {
}
this.customizeRequest = {};
this.sort();
this.reload();
this.cancelBatchProcessing();
},
addScenario(arr) {
if (arr && arr.length > 0) {

View File

@ -139,8 +139,6 @@ export default {
};
},
created() {
this.getTypes();
this.getProjectFiles();
},
methods: {
submit() {
@ -151,11 +149,6 @@ export default {
this.$warning("请选择一条数据");
}
},
changeList(pageSize, currentPage) {
this.currentPage = currentPage;
this.pageSize = pageSize;
this.getProjectFiles();
},
change(value) {
this.showView = value;
},
@ -166,15 +159,9 @@ export default {
this.visible = false;
},
open() {
this.visible = true;
},
myFile() {
if (!this.condition.filters) {
this.condition.filters = {createUser: [getCurrentUserId()]};
} else {
this.condition.filters.createUser = [getCurrentUserId()];
}
this.getTypes();
this.getProjectFiles();
this.visible = true;
},
getProjectFiles() {
this.data.loading = getFileMetadataList(this.projectId, this.currentPage, this.pageSize, this.condition).then(res => {
@ -188,17 +175,6 @@ export default {
});
});
},
fileValidator(file) {
/// todo:
return file.size > 0;
},
beforeUploadFile(file) {
if (!this.fileValidator(file)) {
/// todo:
return false;
}
return true;
},
handleExceed() {
this.$error(this.$t('load_test.file_size_limit'));
},
@ -224,14 +200,6 @@ export default {
})
});
},
moduleChange(ids) {
if (!this.condition.filters) {
this.condition.filters = {moduleIds: ids};
} else {
this.condition.filters.moduleIds = ids;
}
this.getProjectFiles();
},
moveSave(param) {
this.buildBatchParam(param);
}