From 24d153ca906625641f8001dac013a1c2adfe8add Mon Sep 17 00:00:00 2001 From: chenjianxing Date: Thu, 10 Feb 2022 20:12:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA):=20?= =?UTF-8?q?=E5=A4=8D=E5=88=B6=E5=8A=9F=E8=83=BD=E7=94=A8=E4=BE=8B=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=85=B3=E8=81=94=E7=BC=BA=E9=99=B7=E6=8A=A5=E9=94=99?= =?UTF-8?q?=20--bug=3D1010182=20--user=3D=E9=99=88=E5=BB=BA=E6=98=9F=20[?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E8=B7=9F=E8=B8=AA]github#10365=E7=82=B9?= =?UTF-8?q?=E5=87=BB=E5=85=B3=E8=81=94=E7=BC=BA=E9=99=B7=E6=8A=A5=E9=94=99?= =?UTF-8?q?=20https://www.tapd.cn/55049933/s/1102940?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/common/components/table/MsTable.vue | 2 +- .../track/case/components/TestCaseEdit.vue | 1 + .../case/components/TestCaseEditOtherInfo.vue | 3 ++- .../track/case/components/TestCaseIssueRelate.vue | 14 ++++++++------ 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/frontend/src/business/components/common/components/table/MsTable.vue b/frontend/src/business/components/common/components/table/MsTable.vue index d789b079d9..325b0bcf6e 100644 --- a/frontend/src/business/components/common/components/table/MsTable.vue +++ b/frontend/src/business/components/common/components/table/MsTable.vue @@ -254,7 +254,7 @@ export default { methods: { initData(){ //初始化数据是否显示提示块 - if(this.data.length > 0){ + if(this.data && this.data.length > 0){ this.data[0].showBatchTip = true; } }, diff --git a/frontend/src/business/components/track/case/components/TestCaseEdit.vue b/frontend/src/business/components/track/case/components/TestCaseEdit.vue index c67906aef6..f21ea59127 100644 --- a/frontend/src/business/components/track/case/components/TestCaseEdit.vue +++ b/frontend/src/business/components/track/case/components/TestCaseEdit.vue @@ -114,6 +114,7 @@ diff --git a/frontend/src/business/components/track/case/components/TestCaseEditOtherInfo.vue b/frontend/src/business/components/track/case/components/TestCaseEditOtherInfo.vue index b2f46ea4d8..fc228d8a1e 100644 --- a/frontend/src/business/components/track/case/components/TestCaseEditOtherInfo.vue +++ b/frontend/src/business/components/track/case/components/TestCaseEditOtherInfo.vue @@ -29,6 +29,7 @@ @@ -90,7 +91,7 @@ export default { DependenciesList, TestCaseTestRelate, FormRichTextItem, TestCaseIssueRelate, TestCaseAttachment, MsRichText, TestCaseRichText}, - props: ['form', 'labelWidth', 'caseId', 'readOnly', 'projectId', 'isTestPlan', 'planId', 'versionEnable'], + props: ['form', 'labelWidth', 'caseId', 'readOnly', 'projectId', 'isTestPlan', 'planId', 'versionEnable', 'isCopy'], data() { return { result: {}, diff --git a/frontend/src/business/components/track/case/components/TestCaseIssueRelate.vue b/frontend/src/business/components/track/case/components/TestCaseIssueRelate.vue index 577dee6829..6e50920171 100644 --- a/frontend/src/business/components/track/case/components/TestCaseIssueRelate.vue +++ b/frontend/src/business/components/track/case/components/TestCaseIssueRelate.vue @@ -124,7 +124,7 @@ export default { issueRelateVisible: false } }, - props: ['caseId', 'readOnly','planId'], + props: ['caseId', 'readOnly','planId', 'isCopy'], computed: { issueStatusMap() { return ISSUE_STATUS_MAP; @@ -171,20 +171,22 @@ export default { return getCustomFieldValue(row, field, this.members); }, getIssues() { - let result = getIssuesByCaseId(this.caseId, this.page); - if (result) { - this.page.result = result; + if (!this.isCopy) { + let result = getIssuesByCaseId(this.caseId, this.page); + if (result) { + this.page.result = result; + } } }, addIssue() { - if (!this.caseId) { + if (!this.caseId || this.isCopy) { this.$warning(this.$t('api_test.automation.save_case_info')); return; } this.$refs.issueEdit.open(); }, relateIssue() { - if (!this.caseId) { + if (!this.caseId || this.isCopy) { this.$warning(this.$t('api_test.automation.save_case_info')); return; }