fix(测试跟踪): 公共用例库版本字段不支持筛选问题

--bug=1018820 --user=宋昌昌 【测试跟踪】公共用例库-版本字段不支持筛选 https://www.tapd.cn/55049933/s/1282474
This commit is contained in:
song-cc-rock 2022-10-28 17:18:36 +08:00 committed by 刘瑞斌
parent 272519551d
commit 7933e44c0f
1 changed files with 11 additions and 1 deletions

View File

@ -137,6 +137,7 @@
</ms-table-column> </ms-table-column>
<ms-table-column <ms-table-column
:filters="versionFilters"
v-if="versionEnable" v-if="versionEnable"
:label="$t('project.version.name')" :label="$t('project.version.name')"
:field="item" :field="item"
@ -223,6 +224,7 @@ import {useStore} from "@/store";
import {getProjectMemberUserFilter} from "@/api/user"; import {getProjectMemberUserFilter} from "@/api/user";
import {operationConfirm} from "@/business/utils/sdk-utils"; import {operationConfirm} from "@/business/utils/sdk-utils";
import TypeTableItem from "@/business/common/tableItems/planview/TypeTableItem"; import TypeTableItem from "@/business/common/tableItems/planview/TypeTableItem";
import {getVersionFilters} from "@/business/utils/sdk-utils";
export default { export default {
@ -298,7 +300,8 @@ export default {
fieldsWidth: getCustomTableWidth('TRACK_PUBLIC_TEST_CASE'), fieldsWidth: getCustomTableWidth('TRACK_PUBLIC_TEST_CASE'),
rowCase: {}, rowCase: {},
rowCaseResult: {}, rowCaseResult: {},
userFilter: [] userFilter: [],
versionFilters: []
}; };
}, },
props: { props: {
@ -341,6 +344,7 @@ export default {
getProjectMemberUserFilter((data) => { getProjectMemberUserFilter((data) => {
this.userFilter = data; this.userFilter = data;
}); });
this.getVersionOptions();
// tab // tab
this.condition.versionId = this.currentVersion; this.condition.versionId = this.currentVersion;
@ -513,6 +517,12 @@ export default {
this.refresh(); this.refresh();
}); });
}, },
getVersionOptions() {
if (hasLicense()) {
getVersionFilters(getCurrentProjectID())
.then(r => this.versionFilters = r.data);
}
},
} }
}; };
</script> </script>