From 50c71ac1f9bfff61e6f415f760fea652d6525e9c Mon Sep 17 00:00:00 2001 From: "Captain.B" Date: Wed, 24 Mar 2021 13:29:27 +0800 Subject: [PATCH] =?UTF-8?q?refactor(=E6=80=A7=E8=83=BD=E6=B5=8B=E8=AF=95):?= =?UTF-8?q?=20=E9=A1=B9=E7=9B=AE=E6=96=87=E4=BB=B6=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../performance/test/components/ResourceFiles.vue | 10 ++++++---- .../business/components/settings/project/MsProject.vue | 8 ++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/frontend/src/business/components/performance/test/components/ResourceFiles.vue b/frontend/src/business/components/performance/test/components/ResourceFiles.vue index 732366068a..fc188f28bf 100644 --- a/frontend/src/business/components/performance/test/components/ResourceFiles.vue +++ b/frontend/src/business/components/performance/test/components/ResourceFiles.vue @@ -84,11 +84,13 @@ export default { fileList: [], uploadList: [], fileNumLimit: 10, - condition: {} + condition: {}, + projectId: getCurrentProjectID(), } }, methods: { - open() { + open(project) { + this.projectId = project.id; this.loadFileVisible = true; this.getProjectFiles(); }, @@ -97,7 +99,7 @@ export default { this.selectIds.clear(); }, getProjectFiles() { - this.projectLoadingResult = this.$post('/performance/project/all/' + getCurrentProjectID() + "/" + this.currentPage + "/" + this.pageSize, this.condition, res => { + this.projectLoadingResult = this.$post('/performance/project/all/' + this.projectId + "/" + this.currentPage + "/" + this.pageSize, this.condition, res => { let data = res.data; this.total = data.itemCount; this.existFiles = data.listObject; @@ -118,7 +120,7 @@ export default { handleUpload(uploadResources) { let file = uploadResources.file; let formData = new FormData(); - let url = '/project/upload/files/' + getCurrentProjectID() + let url = '/project/upload/files/' + this.projectId formData.append("file", file); let options = { method: 'POST', diff --git a/frontend/src/business/components/settings/project/MsProject.vue b/frontend/src/business/components/settings/project/MsProject.vue index d07125ca22..cedfc3fc8e 100644 --- a/frontend/src/business/components/settings/project/MsProject.vue +++ b/frontend/src/business/components/settings/project/MsProject.vue @@ -7,8 +7,6 @@ @@ -45,6 +43,8 @@ @@ -228,8 +228,8 @@ export default { openJarConfig() { this.$refs.jarConfig.open(); }, - openFiles() { - this.$refs.resourceFiles.open(); + openFiles(project) { + this.$refs.resourceFiles.open(project); }, handleDelete(project) { this.$refs.deleteConfirm.open(project);