diff --git a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml index 6c3d0772c3..38415eb977 100644 --- a/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml +++ b/test-track/backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml @@ -258,7 +258,7 @@ project_version.name as versionName, project_version.id as versionId, test_case.last_execute_result, - test_case.prerequisite, test_case.steps, remark, + test_case.prerequisite, test_case.steps, remark, test_case.expected_result, test_case.step_description, ${field} diff --git a/test-track/frontend/src/business/case/components/case/CaseAttachmentItem.vue b/test-track/frontend/src/business/case/components/case/CaseAttachmentItem.vue index 10f23a67d6..a20de1a37b 100644 --- a/test-track/frontend/src/business/case/components/case/CaseAttachmentItem.vue +++ b/test-track/frontend/src/business/case/components/case/CaseAttachmentItem.vue @@ -405,10 +405,13 @@ export default { } .file-info-row { display: flex; - font-size: px2rem(12); line-height: px2rem(20); height: px2rem(20); color: #8f959e; + flex-direction: row; + flex-wrap: nowrap; + align-items: center; + .size { } diff --git a/test-track/frontend/src/business/case/components/case/diff/CaseDiffRelationship.vue b/test-track/frontend/src/business/case/components/case/diff/CaseDiffRelationship.vue index 6a7499a2fb..93b388946b 100644 --- a/test-track/frontend/src/business/case/components/case/diff/CaseDiffRelationship.vue +++ b/test-track/frontend/src/business/case/components/case/diff/CaseDiffRelationship.vue @@ -1,5 +1,5 @@ - - - - - - + diff --git a/test-track/frontend/src/business/case/components/case/diff/CaseDiffViewer.vue b/test-track/frontend/src/business/case/components/case/diff/CaseDiffViewer.vue index 23db01c290..38a710e9e0 100644 --- a/test-track/frontend/src/business/case/components/case/diff/CaseDiffViewer.vue +++ b/test-track/frontend/src/business/case/components/case/diff/CaseDiffViewer.vue @@ -133,17 +133,14 @@
-
+
-
{{ $t("case.none") }}
+
{{ $t("case.none") }}
@@ -324,6 +321,7 @@ export default { contentDiffData: {}, customDiffData: {}, attachmentDiffData: [], + showAttachment: false, baseInfoDiffData: {}, tagDiffData: {}, originCase: {}, @@ -447,11 +445,11 @@ export default { this.fillCustomValue(); this.diffCustomData(); - this.diffAttachment(); - this.diffTestRelate(); - this.diffComments(); - this.diffRelationship(); - this.diffIssues(); + await this.diffAttachment(); + await this.diffTestRelate(); + await this.diffComments(); + await this.diffRelationship(); + await this.diffIssues(); // 初始化 this.initContent(); }, @@ -521,6 +519,9 @@ export default { origin, target ); + if (this.attachmentDiffData && this.attachmentDiffData.length > 0) { + this.showAttachment = true + } }, async fetchTestRelate(id) { let res = await getRelateTest(id); @@ -911,16 +912,21 @@ export default { .content-body-wrap { // 1024 减去左右padding 各24 和 1px右边框 width: px2rem(1024); - height: 1044px; + height: 100%; display: flex; + .tab-pane-wrap { width: px2rem(896); height: 100%; - overflow-y: scroll; border-right: 1px solid rgba(31, 35, 41, 0.15); + :deep(.el-tabs__item) { padding-left: px2rem(24); } + + :deep(.el-tabs__content) { + overflow: auto; + } } .base-info-wrap { width: px2rem(304); @@ -934,6 +940,7 @@ export default { .content-conatiner { padding-left: px2rem(24); padding-right: px2rem(24); + height: calc(100vh - 130px); } } .case-content-wrap { diff --git a/test-track/frontend/src/business/case/components/case/diff/version_diff.js b/test-track/frontend/src/business/case/components/case/diff/version_diff.js index 0d9b45bf34..42c2dc55d8 100644 --- a/test-track/frontend/src/business/case/components/case/diff/version_diff.js +++ b/test-track/frontend/src/business/case/components/case/diff/version_diff.js @@ -277,6 +277,12 @@ class DiffUtil { static diffArray(arr1, arr2) { let resArr = []; //矫正参数 + if (typeof arr1 === 'string') { + arr1 = JSON.parse(arr1); + } + if (typeof arr2 === 'string') { + arr2 = JSON.parse(arr2); + } if (!Array.isArray(arr1)) { arr1 = []; } diff --git a/test-track/frontend/src/business/case/components/common/CaseVersionHistory.vue b/test-track/frontend/src/business/case/components/common/CaseVersionHistory.vue index 8f5048a81e..75de53a685 100644 --- a/test-track/frontend/src/business/case/components/common/CaseVersionHistory.vue +++ b/test-track/frontend/src/business/case/components/common/CaseVersionHistory.vue @@ -197,7 +197,7 @@ export default { return this.versionLeftId && this.versionRightId; }, compareDisable() { - return this.versionCompareOptions || this.versionCompareOptions.length < 2; + return !this.versionCompareOptions || this.versionCompareOptions.length < 2; } }, beforeDestroy() {