diff --git a/test-track/frontend/src/business/plan/view/comonents/functional/FunctionalTestCaseList.vue b/test-track/frontend/src/business/plan/view/comonents/functional/FunctionalTestCaseList.vue index 7a7b3b3b71..e5b52cace2 100644 --- a/test-track/frontend/src/business/plan/view/comonents/functional/FunctionalTestCaseList.vue +++ b/test-track/frontend/src/business/plan/view/comonents/functional/FunctionalTestCaseList.vue @@ -218,7 +218,7 @@ { - this.members = data; - }); + let p1 = getProjectMember() + .then((response) => { + this.members = response.data; + }); let p2 = getTestTemplate(); Promise.all([p1, p2]).then((data) => { let template = data[1]; this.testCaseTemplate = template; this.fields = getTableHeaderWithCustomFields(this.tableHeaderKey, this.testCaseTemplate.customFields); - if (this.$refs.table) { - this.$refs.table.resetHeader(); - } - this.result.loading = false; + this.$nextTick(() => { + if (this.$refs.table) { + this.$refs.table.resetHeader(); + } + this.result.loading = false; + }); }); }, - getCustomFieldValue(row, field) { - return getCustomFieldValueForTrack(row, field, this.members); + getCustomFieldFilter(field) { + if (field.name === '用例状态') { + let option = []; + field.options.forEach((item) => { + option.push({ + text: this.$t(item.text), + value: item.value + }) + }); + return option; + } + return getCustomFieldFilter(field, this.userFilters); + }, + getCustomFieldValue(row, field, defaultVal = '') { + let value = getCustomFieldValueForTrack(row, field, this.members); + if (field.name === '用例等级') { + return row.priority; + } else if (field.name === '责任人') { + return row.maintainerName; + } + return value ? value : defaultVal; }, initTableData(callback) { initCondition(this.condition, this.condition.selectAll);