fix(测试跟踪): 功能用例编辑页版本比对问题

This commit is contained in:
song-cc-rock 2023-02-13 19:18:23 +08:00 committed by jianxing
parent 9dd82d4eed
commit 6fe78e7e3c
6 changed files with 13 additions and 7 deletions

View File

@ -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;

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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,

View File

@ -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) => {