diff --git a/test-track/frontend/src/business/case/components/TestCaseEdit.vue b/test-track/frontend/src/business/case/components/TestCaseEdit.vue index 68584df419..8dfea54a7e 100644 --- a/test-track/frontend/src/business/case/components/TestCaseEdit.vue +++ b/test-track/frontend/src/business/case/components/TestCaseEdit.vue @@ -373,7 +373,7 @@ import {buildTree} from "metersphere-frontend/src/model/NodeTree"; import {versionEnableByProjectId} from "@/api/project"; import {openCaseEdit} from "@/business/case/test-case"; import ListItemDeleteConfirm from "metersphere-frontend/src/components/ListItemDeleteConfirm"; -import CaseDiffSideViewer from "./case/diff/CaseDiffSideViewer" +import CaseDiffSideViewer from "./case/diff/CaseDiffSideViewer"; export default { name: "TestCaseEdit", @@ -715,7 +715,12 @@ export default { } this.compareBranchWithVersionId(this.latestVersionId, this.currentTestCaseInfo.versionId); }, - checkIsLatestVersion(id){ + async checkIsLatestVersion(id){ + let allCaseVersions = await getTestCaseVersions(this.currentTestCaseInfo.id); + if (allCaseVersions.data) { + this.isLastedVersion = allCaseVersions.data.length === 1; + return true; + } if(!this.versionOptions || this.versionOptions.length <= 0){ this.isLastedVersion = true; return true; diff --git a/test-track/frontend/src/business/case/components/case/relate/CaseRelateApiList.vue b/test-track/frontend/src/business/case/components/case/relate/CaseRelateApiList.vue index 170da40f08..ada29e4201 100644 --- a/test-track/frontend/src/business/case/components/case/relate/CaseRelateApiList.vue +++ b/test-track/frontend/src/business/case/components/case/relate/CaseRelateApiList.vue @@ -142,7 +142,7 @@ export default { { text: "P3", value: "P3" }, ], methodColorMap: new Map(API_METHOD_COLOUR), - screenHeight: "calc(100vh - 400px)", //屏幕高度 + screenHeight: "calc(100vh - 300px)", //屏幕高度 tableData: [], currentPage: 1, pageSize: 10, diff --git a/test-track/frontend/src/business/case/components/case/relate/CaseRelateLoadList.vue b/test-track/frontend/src/business/case/components/case/relate/CaseRelateLoadList.vue index b8ecc3f41c..d989dcea09 100644 --- a/test-track/frontend/src/business/case/components/case/relate/CaseRelateLoadList.vue +++ b/test-track/frontend/src/business/case/components/case/relate/CaseRelateLoadList.vue @@ -30,6 +30,7 @@ :page-size="pageSize" :total="total" :showSelectAll="false" + :screenHeight="screenHeight" @selectCountChange="selectCountChange" @refresh="initTable" ref="table" @@ -126,7 +127,7 @@ export default { components: TEST_CASE_RELEVANCE_LOAD_CASE, }, result: {}, - screenHeight: "100vh - 400px", //屏幕高度 + screenHeight: "100vh - 300px", //屏幕高度 tableData: [], currentPage: 1, pageSize: 10, diff --git a/test-track/frontend/src/business/case/components/case/relate/CaseRelateScenarioList.vue b/test-track/frontend/src/business/case/components/case/relate/CaseRelateScenarioList.vue index 76af3bb95d..f9d9ec6fc1 100644 --- a/test-track/frontend/src/business/case/components/case/relate/CaseRelateScenarioList.vue +++ b/test-track/frontend/src/business/case/components/case/relate/CaseRelateScenarioList.vue @@ -152,7 +152,7 @@ export default { { text: "P2", value: "P2" }, { text: "P3", value: "P3" }, ], - screenHeight: "calc(100vh - 400px)", //屏幕高度 + screenHeight: "calc(100vh - 300px)", //屏幕高度 tableData: [], currentPage: 1, pageSize: 10, diff --git a/test-track/frontend/src/business/case/components/case/relate/CaseRelateUiScenarioList.vue b/test-track/frontend/src/business/case/components/case/relate/CaseRelateUiScenarioList.vue index e88ef33b87..d6ff380908 100644 --- a/test-track/frontend/src/business/case/components/case/relate/CaseRelateUiScenarioList.vue +++ b/test-track/frontend/src/business/case/components/case/relate/CaseRelateUiScenarioList.vue @@ -150,7 +150,7 @@ export default { { text: "P2", value: "P2" }, { text: "P3", value: "P3" }, ], - screenHeight: "calc(100vh - 400px)", //屏幕高度 + screenHeight: "calc(100vh - 300px)", //屏幕高度 tableData: [], currentPage: 1, pageSize: 10, 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 aca433e9f1..9bb4a1989b 100644 --- a/test-track/frontend/src/business/case/components/common/CaseVersionHistory.vue +++ b/test-track/frontend/src/business/case/components/common/CaseVersionHistory.vue @@ -296,7 +296,7 @@ export default { return; } let latestData = versionData.filter((v) => v.latest === true); - if (latestData) { + if (latestData && latestData.length > 0) { this.dataLatestId = latestData[0].versionId; } this.versionOptions.forEach((version) => {