fix(接口测试): 报告筛选步骤问题
--bug=1039085 --user=宋昌昌 【接口测试】报告筛选步骤为通过显示内容不正确 https://www.tapd.cn/55049933/s/1495619
This commit is contained in:
parent
7861bca060
commit
a42b9d9cbb
|
@ -100,16 +100,13 @@
|
|||
function searchStep() {
|
||||
const splitLevel = props.keyWords.split('-');
|
||||
const stepTypeStatus = splitLevel[1];
|
||||
const requestType = ['API', 'API_CASE', 'CUSTOM_REQUEST'];
|
||||
const stepType = splitLevel[0] === 'CUSTOM_REQUEST' ? ['API', 'API_CASE', 'CUSTOM_REQUEST'] : splitLevel[0];
|
||||
const search = (_data: ScenarioItemType[]) => {
|
||||
const result: ScenarioItemType[] = [];
|
||||
_data.forEach((item) => {
|
||||
const isStepChildren = item.children && item?.children.length && showApiType.value.includes(item.stepType);
|
||||
if (
|
||||
stepType.includes(item.stepType) &&
|
||||
((item.status && item.status === stepTypeStatus && stepTypeStatus !== 'scriptIdentifier') ||
|
||||
(stepTypeStatus.includes('scriptIdentifier') && item.scriptIdentifier))
|
||||
(item.status && item.status === stepTypeStatus && stepTypeStatus !== 'scriptIdentifier') ||
|
||||
(stepTypeStatus.includes('scriptIdentifier') && item.scriptIdentifier)
|
||||
) {
|
||||
const resItem = {
|
||||
...item,
|
||||
|
@ -118,7 +115,7 @@
|
|||
children: isStepChildren ? [] : item.children,
|
||||
};
|
||||
result.push(resItem);
|
||||
} else if (item.children) {
|
||||
} else if (item.children && splitLevel[0] === ScenarioStepType.CUSTOM_REQUEST) {
|
||||
const filterData = search(item.children);
|
||||
if (filterData.length) {
|
||||
const filterItem = {
|
||||
|
@ -165,4 +162,4 @@
|
|||
min-height: calc(100vh - 424px);
|
||||
border-radius: 4px;
|
||||
}
|
||||
</style>
|
||||
</style>
|
|
@ -242,7 +242,7 @@
|
|||
if (!valid) {
|
||||
try {
|
||||
// 保存Host-Tab的数据(目前只加了Host)
|
||||
if (activeKey.value === 'host') {
|
||||
if (activeKey.value === EnvTabTypeEnum.ENVIRONMENT_HOST) {
|
||||
hostTabRef.value?.validateForm(saveCallBack);
|
||||
} else {
|
||||
await saveCallBack();
|
||||
|
@ -331,4 +331,4 @@
|
|||
gap: 16px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
|
@ -272,9 +272,6 @@
|
|||
border-radius: 4px;
|
||||
background: white;
|
||||
@apply flex flex-col justify-between;
|
||||
.icon {
|
||||
border: 1px solid var(--color-text-n9);
|
||||
}
|
||||
.ms-enable {
|
||||
font-size: 12px;
|
||||
border-radius: var(--border-radius-small);
|
||||
|
@ -299,4 +296,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
Loading…
Reference in New Issue