fix(测试跟踪): 测试计划及评审用例等级选项值展示有误
--bug=1025905 --user=宋昌昌 【测试跟踪】测试计划-功能用例-用例等级不显示 https://www.tapd.cn/55049933/s/1369289
This commit is contained in:
parent
fc64d0b608
commit
c38955b4c9
|
@ -71,7 +71,7 @@
|
||||||
|
|
||||||
<ms-table-column
|
<ms-table-column
|
||||||
prop="priority"
|
prop="priority"
|
||||||
:filters="priorityFilters"
|
:filters="priorityOptions"
|
||||||
sortable
|
sortable
|
||||||
:label="$t('test_track.case.priority')"
|
:label="$t('test_track.case.priority')"
|
||||||
width="120px">
|
width="120px">
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
prop="priority"
|
prop="priority"
|
||||||
:field="item"
|
:field="item"
|
||||||
:fields-width="fieldsWidth"
|
:fields-width="fieldsWidth"
|
||||||
:filters="priorityFilters"
|
:filters="priorityOptions"
|
||||||
sortable="custom"
|
sortable="custom"
|
||||||
min-width="120px"
|
min-width="120px"
|
||||||
:label="$t('test_track.case.priority')">
|
:label="$t('test_track.case.priority')">
|
||||||
|
@ -605,9 +605,6 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getCustomFieldFilter(field) {
|
getCustomFieldFilter(field) {
|
||||||
if (field.name === '用例状态') {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return getCustomFieldFilter(field, this.userFilters);
|
return getCustomFieldFilter(field, this.userFilters);
|
||||||
},
|
},
|
||||||
getCustomFieldValue(row, field, defaultVal = '') {
|
getCustomFieldValue(row, field, defaultVal = '') {
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
:label="$t('test_track.case.priority')"
|
:label="$t('test_track.case.priority')"
|
||||||
show-overflow-tooltip>
|
show-overflow-tooltip>
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<priority-table-item :value="scope.row.priority"/>
|
<priority-table-item :value="scope.row.priority" :priority-options="priorityFilters"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
||||||
|
@ -189,12 +189,7 @@ export default {
|
||||||
condition: {
|
condition: {
|
||||||
components: TEST_REVIEW_RELEVANCE_CASE_CONFIGS
|
components: TEST_REVIEW_RELEVANCE_CASE_CONFIGS
|
||||||
},
|
},
|
||||||
priorityFilters: [
|
priorityFilters: [],
|
||||||
{text: 'P0', value: 'P0'},
|
|
||||||
{text: 'P1', value: 'P1'},
|
|
||||||
{text: 'P2', value: 'P2'},
|
|
||||||
{text: 'P3', value: 'P3'}
|
|
||||||
],
|
|
||||||
statusFilters: [
|
statusFilters: [
|
||||||
{text: this.$t('test_track.review.prepare'), value: 'Prepare'},
|
{text: this.$t('test_track.review.prepare'), value: 'Prepare'},
|
||||||
{text: this.$t('test_track.review.pass'), value: 'Pass'},
|
{text: this.$t('test_track.review.pass'), value: 'Pass'},
|
||||||
|
@ -247,9 +242,17 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
loadConditionComponents() {
|
loadConditionComponents() {
|
||||||
getTestTemplate(this.projectId).then((template) => {
|
getTestTemplate(this.projectId).then((template) => {
|
||||||
|
this.initPriorityFilters(template);
|
||||||
this.condition.components = initTestCaseConditionComponents(this.condition, template.customFields, false);
|
this.condition.components = initTestCaseConditionComponents(this.condition, template.customFields, false);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
initPriorityFilters(template) {
|
||||||
|
template.customFields.forEach(field => {
|
||||||
|
if (field.name === '用例等级') {
|
||||||
|
this.priorityFilters = field.options;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
fullScreen(){
|
fullScreen(){
|
||||||
this.isFullScreen = !this.isFullScreen;
|
this.isFullScreen = !this.isFullScreen;
|
||||||
this.screenHeight = this.isFullScreen ?'calc(100vh - 180px)' :'calc(100vh - 420px)'
|
this.screenHeight = this.isFullScreen ?'calc(100vh - 180px)' :'calc(100vh - 420px)'
|
||||||
|
|
|
@ -88,7 +88,7 @@
|
||||||
min-width="120px"
|
min-width="120px"
|
||||||
:label="$t('test_track.case.priority')">
|
:label="$t('test_track.case.priority')">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<priority-table-item :value="scope.row.priority" ref="priority"/>
|
<priority-table-item :value="scope.row.priority" ref="priority" :priority-options="priorityFilters"/>
|
||||||
</template>
|
</template>
|
||||||
</ms-table-column>
|
</ms-table-column>
|
||||||
|
|
||||||
|
@ -226,14 +226,15 @@ import {parseTag} from "metersphere-frontend/src/utils"
|
||||||
import {getVersionFilters} from "@/business/utils/sdk-utils";
|
import {getVersionFilters} from "@/business/utils/sdk-utils";
|
||||||
import {getProjectMember, getProjectMemberUserFilter} from "@/api/user";
|
import {getProjectMember, getProjectMemberUserFilter} from "@/api/user";
|
||||||
import {getProjectApplicationConfig} from "@/api/project-application";
|
import {getProjectApplicationConfig} from "@/api/project-application";
|
||||||
import {getTagToolTips, parseColumnTag} from "@/business/case/test-case";
|
import {getTagToolTips, initTestCaseConditionComponents, parseColumnTag} from "@/business/case/test-case";
|
||||||
import {hasLicense} from "metersphere-frontend/src/utils/permission";
|
import {hasLicense} from "metersphere-frontend/src/utils/permission";
|
||||||
import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
import {getCurrentProjectID} from "metersphere-frontend/src/utils/token";
|
||||||
import {editTestReviewTestCaseOrder, getTestReviewTestCase} from "@/api/testCase";
|
import {editTestReviewTestCaseOrder, getTestReviewTestCase} from "@/api/testCase";
|
||||||
import {
|
import {
|
||||||
_handleSelectAll, buildBatchParam, deepClone, getCustomTableWidth, getLastTableSortField, getSelectDataCounts,
|
_handleSelectAll, buildBatchParam, deepClone, getCustomTableWidth, getLastTableSortField, getSelectDataCounts,
|
||||||
getTableHeaderWithCustomFields, initCondition, toggleAllSelection, getCustomFieldBatchEditOption } from "metersphere-frontend/src/utils/tableUtils";
|
getTableHeaderWithCustomFields, initCondition, toggleAllSelection } from "metersphere-frontend/src/utils/tableUtils";
|
||||||
import {batchDeleteTestReviewCase, batchEditTestReviewCaseReviewer, batchEditTestReviewCaseStatus, deleteTestReviewCase, getTesReviewById} from "@/api/test-review";
|
import {batchDeleteTestReviewCase, batchEditTestReviewCaseReviewer, batchEditTestReviewCaseStatus, deleteTestReviewCase, getTesReviewById} from "@/api/test-review";
|
||||||
|
import {getTestTemplate} from "@/api/custom-field-template";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestReviewTestCaseList",
|
name: "TestReviewTestCaseList",
|
||||||
|
@ -278,12 +279,7 @@ export default {
|
||||||
isTestManagerOrTestUser: false,
|
isTestManagerOrTestUser: false,
|
||||||
selectDataCounts: 0,
|
selectDataCounts: 0,
|
||||||
tableHeaderKey: 'TEST_CASE_REVIEW_FUNCTION_TEST_CASE',
|
tableHeaderKey: 'TEST_CASE_REVIEW_FUNCTION_TEST_CASE',
|
||||||
priorityFilters: [
|
priorityFilters: [],
|
||||||
{text: 'P0', value: 'P0'},
|
|
||||||
{text: 'P1', value: 'P1'},
|
|
||||||
{text: 'P2', value: 'P2'},
|
|
||||||
{text: 'P3', value: 'P3'}
|
|
||||||
],
|
|
||||||
statusFilters: [
|
statusFilters: [
|
||||||
{text: this.$t('test_track.review.again'), value: 'Again'},
|
{text: this.$t('test_track.review.again'), value: 'Again'},
|
||||||
{text: this.$t('test_track.review.pass'), value: 'Pass'},
|
{text: this.$t('test_track.review.pass'), value: 'Pass'},
|
||||||
|
@ -387,6 +383,7 @@ export default {
|
||||||
this.userFilter = data;
|
this.userFilter = data;
|
||||||
});
|
});
|
||||||
this.getTemplateField();
|
this.getTemplateField();
|
||||||
|
this.initPriorityFilters();
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$emit('setCondition', this.condition);
|
this.$emit('setCondition', this.condition);
|
||||||
|
@ -398,6 +395,15 @@ export default {
|
||||||
this.getCustomNum();
|
this.getCustomNum();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
initPriorityFilters() {
|
||||||
|
getTestTemplate(this.projectId).then((template) => {
|
||||||
|
template.customFields.forEach(field => {
|
||||||
|
if (field.name === '用例等级') {
|
||||||
|
this.priorityFilters = field.options;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
});
|
||||||
|
},
|
||||||
getTemplateField() {
|
getTemplateField() {
|
||||||
getProjectMember()
|
getProjectMember()
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
|
|
Loading…
Reference in New Issue