fix(测试跟踪): 功能用例编辑页版本比对问题
This commit is contained in:
parent
9dd82d4eed
commit
6fe78e7e3c
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue