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 6a5747a6ec
commit ca22307006
1 changed files with 11 additions and 1 deletions

View File

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