fix(测试跟踪): 功能用例修改版本时隐藏未开启的版本

--bug=1040843 --user=宋天阳 【项目管理】版本管理-某个版本是关闭状态,创建用例/批量编辑用例时仍可以选中关闭的版本号 https://www.tapd.cn/55049933/s/1517771
This commit is contained in:
Jianguo-Genius 2024-05-21 16:54:47 +08:00 committed by Craftsman
parent 16851d8d1b
commit 56e391770b
2 changed files with 6 additions and 5 deletions

View File

@ -664,7 +664,7 @@ export default {
id: "version", id: "version",
name: this.$t('commons.version') name: this.$t('commons.version')
}) })
let versionOptions = this.$refs.versionSelect.versionOptions; let versionOptions = this.$refs.versionSelect.versionOptions.filter(r => r.status === 'open');
// console.info("version-options", versionOptions); // console.info("version-options", versionOptions);
this.valueArr['version'] = versionOptions; this.valueArr['version'] = versionOptions;
} }

View File

@ -347,6 +347,7 @@ import BaseEditItemComponent from "../BaseEditItemComponent";
import {issueDemandList} from "@/api/issue"; import {issueDemandList} from "@/api/issue";
import {getTestCaseNodesByCaseFilter} from "@/api/testCase"; import {getTestCaseNodesByCaseFilter} from "@/api/testCase";
import {buildTree} from "@/business/utils/sdk-utils"; import {buildTree} from "@/business/utils/sdk-utils";
export default { export default {
name: "CaseBaseInfo", name: "CaseBaseInfo",
components: { components: {
@ -572,7 +573,7 @@ export default {
if (hasLicense()) { if (hasLicense()) {
if (this.projectId) { if (this.projectId) {
getProjectVersions(this.projectId).then( getProjectVersions(this.projectId).then(
(r) => (this.versionFilters = r.data) (r) => (this.versionFilters = r.data.filter(r => r.status === 'open'))
); );
} }
} }