From b562d02fa139e4b78e028b413f6873f13f0944bc Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Fri, 28 May 2021 16:11:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B):=20?= =?UTF-8?q?=E7=94=A8=E4=BE=8B=E9=99=84=E4=BB=B6=E7=9B=B8=E5=85=B3=E7=BC=BA?= =?UTF-8?q?=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../track/case/components/TestCaseAttachment.vue | 2 +- .../components/track/case/components/TestCaseEdit.vue | 2 ++ .../track/case/components/TestCaseEditOtherInfo.vue | 10 ++++++---- .../components/track/case/components/TestCaseFile.vue | 1 - 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/frontend/src/business/components/track/case/components/TestCaseAttachment.vue b/frontend/src/business/components/track/case/components/TestCaseAttachment.vue index f4fe8cea56..1b8040f1ce 100644 --- a/frontend/src/business/components/track/case/components/TestCaseAttachment.vue +++ b/frontend/src/business/components/track/case/components/TestCaseAttachment.vue @@ -29,7 +29,7 @@ v-if="isPreview(scope.row)" icon="el-icon-view" size="mini" circle/> - 0) { + getFileMetaData(id) { + // 保存用例后传入用例id,刷新文件列表,可以预览和下载 + if (this.uploadList && this.uploadList.length > 0 && !id) { return; } this.fileList = []; this.tableData = []; this.uploadList = []; - if (this.caseId) { - this.result = this.$get("test/case/file/metadata/" + this.caseId, response => { + let testCaseId = id ? id : this.caseId; + if (testCaseId) { + this.result = this.$get("test/case/file/metadata/" + testCaseId, response => { let files = response.data; if (!files) { diff --git a/frontend/src/business/components/track/case/components/TestCaseFile.vue b/frontend/src/business/components/track/case/components/TestCaseFile.vue index 51fcab9bc8..9992518869 100644 --- a/frontend/src/business/components/track/case/components/TestCaseFile.vue +++ b/frontend/src/business/components/track/case/components/TestCaseFile.vue @@ -29,7 +29,6 @@ export default { }, methods: { open(file) { - console.log(file) this.file = file; this.dialogVisible = true; },