mirror of
https://gitee.com/fit2cloud-feizhiyun/MeterSphere.git
synced 2024-11-30 11:08:38 +08:00
refactor(接口测试): 每次打开文件管理列表及时加载最新内容
--bug=1017893 --user=赵勇 【接口测试】接口测试关联文件时,点开关联弹窗没有刷新文件列表 https://www.tapd.cn/55049933/s/1261073
This commit is contained in:
parent
9c6a06a3b8
commit
5fdf2127d4
@ -1259,7 +1259,7 @@ export default {
|
||||
}
|
||||
this.customizeRequest = {};
|
||||
this.sort();
|
||||
this.reload();
|
||||
this.cancelBatchProcessing();
|
||||
},
|
||||
addScenario(arr) {
|
||||
if (arr && arr.length > 0) {
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user