This commit is contained in:
liqiang-fit2cloud 2022-12-22 17:55:35 +08:00
commit ba68470f7c
2 changed files with 29 additions and 11 deletions

View File

@ -670,6 +670,19 @@ export const TEST_CASE_STATUS = {
}
}
export const TEST_CASE_PRIORITY = {
key: "priority",
name: 'MsTableSearchSelect',
label: "custom_field.case_priority",
operator: {
options: [OPERATORS.IN, OPERATORS.NOT_IN]
},
options: [],
props: {
multiple: true
}
}
export const PLAN_CASE_STATUS = {
key: "planCaseStatus",
name: 'MsTableSearchSelect',
@ -883,7 +896,7 @@ export const UI_CUSTOM_COMMAND_CONFIGS = [NAME, CREATE_TIME, PROJECT_CREATOR, UI
export const UI_CUSTOM_COMMAND_CONFIGS_TRASH = [NAME, CREATE_TIME, PROJECT_CREATOR, UI_CUSTOM_COMMAND_TRASH_MODULE_TREE];
// 测试跟踪-测试用例 列表
export const TEST_CASE_CONFIGS = [ID, NAME, TAGS, TEST_CASE_MODULE_TREE, CREATE_TIME, UPDATE_TIME, CREATOR, CASE_REVIEW_STATUS, FOLLOW_PEOPLE, CASE_DEMAND, TEST_CASE_STATUS];
export const TEST_CASE_CONFIGS = [ID, NAME, TAGS, TEST_CASE_MODULE_TREE, CREATE_TIME, UPDATE_TIME, CREATOR, CASE_REVIEW_STATUS, FOLLOW_PEOPLE, CASE_DEMAND, TEST_CASE_STATUS, TEST_CASE_PRIORITY];
export const TEST_PLAN_CONFIGS = [NAME, UPDATE_TIME, CREATE_TIME, PRINCIPAL, TEST_PLAN_STATUS, STAGE, TAGS, FOLLOW_PEOPLE, ACTUAL_START_TIME, ACTUAL_END_TIME, PLAN_START_TIME, PLAN_END_TIME];

View File

@ -6,16 +6,19 @@ export function initTestCaseConditionComponents(condition, customFields, trashEn
conditionComponents = conditionComponents.filter(item => item.custom !== true);
let comp = getAdvSearchCustomField(condition, customFields);
let statusOption = null;
let priorityOption = null;
// 系统字段国际化处理
comp = comp.filter(element => {
if (element.label === '责任人') {
element.label = i18n.t('custom_field.case_maintainer')
element.label = i18n.t('custom_field.case_maintainer');
}
if (element.label === '用例等级') {
element.label = i18n.t('custom_field.case_priority')
element.label = i18n.t('custom_field.case_priority');
priorityOption = element.options;
return false;
}
if (element.label === '用例状态') {
element.label = i18n.t('custom_field.case_status')
element.label = i18n.t('custom_field.case_status');
// 回收站TAB页处理高级搜索用例状态字段
if (trashEnable) {
element.operator.options = [OPERATORS.IN];
@ -29,13 +32,15 @@ export function initTestCaseConditionComponents(condition, customFields, trashEn
}
return true;
});
if (statusOption) {
conditionComponents.forEach((item) => {
if (item.key === 'status' || item.label === '用例状态') {
item .options = statusOption;
}
});
} else {
conditionComponents.forEach((item) => {
if ((item.key === 'status' || item.label === '用例状态') && statusOption) {
item.options = statusOption;
} else if (item.key === 'priority') {
item.options = priorityOption;
}
});
if (!statusOption) {
// statusOption 为空,则去掉状态选项
conditionComponents = conditionComponents.filter(item => item.key !== 'status' && item.label !== '用例状态');
}