fix(接口测试): 报告筛选步骤问题

--bug=1039085 --user=宋昌昌 【接口测试】报告筛选步骤为通过显示内容不正确 https://www.tapd.cn/55049933/s/1495619
This commit is contained in:
song-cc-rock 2024-04-12 15:05:47 +08:00 committed by Craftsman
parent 7861bca060
commit a42b9d9cbb
3 changed files with 7 additions and 13 deletions

View File

@ -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 = {

View File

@ -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();

View File

@ -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);