fix(测试跟踪): 版本接口响应过长时初始版本设置有误
--bug=1024033 --user=宋昌昌 【测试跟踪】功能用例-新建-版本和tab页标题未显示 https://www.tapd.cn/55049933/s/1354553
This commit is contained in:
parent
20b48ab6fe
commit
1292b00103
|
@ -65,6 +65,10 @@ export default {
|
|||
getProjectVersions(projectId)
|
||||
.then(response => {
|
||||
this.versionOptions = response.data;
|
||||
let latestVersions = this.versionOptions.filter(version => version.latest);
|
||||
if (latestVersions && latestVersions.length === 1) {
|
||||
localStorage.setItem("latest-version", latestVersions[0].id);
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
|
|
@ -651,9 +651,8 @@
|
|||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="request.relevanceCreateTime >0">
|
||||
and test_case.id in (select test_case_id from test_case_test where test_case_test.create_time >=
|
||||
#{request.createTime})
|
||||
<if test="request.relevanceCreateTime > 0">
|
||||
and test_case.id in (select test_case_id from test_case_test where test_case_test.create_time >= #{request.relevanceCreateTime})
|
||||
</if>
|
||||
<if test="request.createTime >0">
|
||||
and test_case.create_time >= #{request.createTime}
|
||||
|
|
|
@ -590,7 +590,8 @@ export default {
|
|||
editableState: false,
|
||||
isNameEdit: false,
|
||||
useUserStore: {},
|
||||
priorityOptions: []
|
||||
priorityOptions: [],
|
||||
initLatestVersionId: ""
|
||||
};
|
||||
},
|
||||
props: {
|
||||
|
@ -742,7 +743,7 @@ export default {
|
|||
(r) => {
|
||||
let latestVersion = r.data.filter(version => version.latest);
|
||||
if (latestVersion && latestVersion.length === 1 && this.editable) {
|
||||
this.initLatestVersionId = latestVersion[0].id;
|
||||
this.initLatestVersionId = latestVersion[0].id
|
||||
}
|
||||
}
|
||||
);
|
||||
|
@ -1003,7 +1004,7 @@ export default {
|
|||
let user = JSON.parse(localStorage.getItem(TokenKey));
|
||||
this.form.maintainer = user.id;
|
||||
this.form.tags = [];
|
||||
this.form.versionId = this.initLatestVersionId;
|
||||
this.form.versionId = localStorage.getItem("latest-version") || this.initLatestVersionId;
|
||||
this.getSelectOptions();
|
||||
this.customFieldForm = parseCustomField(
|
||||
this.form,
|
||||
|
@ -1082,7 +1083,7 @@ export default {
|
|||
//复制的时候只复制当前版本
|
||||
testCase.id = getUUID();
|
||||
testCase.refId = null;
|
||||
testCase.versionId = this.initLatestVersionId;
|
||||
testCase.versionId = localStorage.getItem("latest-version") || this.initLatestVersionId;
|
||||
this.form.id = null;
|
||||
testCase.casePublic = false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue