fix(全局): bug修复
This commit is contained in:
parent
332cf2c277
commit
1c59d17c3a
|
@ -7,25 +7,27 @@
|
|||
</a-button>
|
||||
<template #content>
|
||||
<div class="arco-table-filters-content">
|
||||
<div class="max-h-[300px] overflow-y-auto px-[12px] py-[4px]">
|
||||
<a-checkbox-group v-if="props.multiple" v-model="checkedList" size="mini" direction="vertical">
|
||||
<a-checkbox v-for="item in props.options" :key="item.value" :value="item.value">
|
||||
{{ item.label }}
|
||||
</a-checkbox>
|
||||
</a-checkbox-group>
|
||||
<a-radio-group v-else v-model="checkedValue" size="mini" direction="vertical">
|
||||
<a-radio v-for="item in props.options" :key="item.value" :value="item.value">
|
||||
{{ item.label }}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
<div class="arco-table-filters-bottom">
|
||||
<a-button size="mini" type="secondary" @click="handleFilterReset">
|
||||
{{ t('common.reset') }}
|
||||
</a-button>
|
||||
<a-button size="mini" type="primary" @click="handleFilterSubmit()">
|
||||
{{ t('common.confirm') }}
|
||||
</a-button>
|
||||
<div class="arco-table-filters-content-list">
|
||||
<div class="max-h-[300px] overflow-y-auto px-[12px] py-[4px]">
|
||||
<a-checkbox-group v-if="props.multiple" v-model="checkedList" size="mini" direction="vertical">
|
||||
<a-checkbox v-for="item in props.options" :key="item.value" :value="item.value">
|
||||
{{ item.label }}
|
||||
</a-checkbox>
|
||||
</a-checkbox-group>
|
||||
<a-radio-group v-else v-model="checkedValue" size="mini" direction="vertical">
|
||||
<a-radio v-for="item in props.options" :key="item.value" :value="item.value">
|
||||
{{ item.label }}
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</div>
|
||||
<div class="arco-table-filters-bottom">
|
||||
<a-button size="mini" type="secondary" @click="handleFilterReset">
|
||||
{{ t('common.reset') }}
|
||||
</a-button>
|
||||
<a-button size="mini" type="primary" @click="handleFilterSubmit()">
|
||||
{{ t('common.confirm') }}
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
v-model:model-value="appStore.currentProjectId"
|
||||
class="w-[200px] focus-within:!bg-[var(--color-text-n8)] hover:!bg-[var(--color-text-n8)]"
|
||||
:bordered="false"
|
||||
:fallback-option="() => undefined"
|
||||
:fallback-option="false"
|
||||
allow-search
|
||||
@change="selectProject"
|
||||
>
|
||||
|
|
|
@ -14,7 +14,7 @@ export interface PathMapItem {
|
|||
level: (typeof MENU_LEVEL)[number]; // 系统设置里有系统级别也有组织级别,按最低权限级别配置
|
||||
children?: PathMapItem[];
|
||||
routeQuery?: Record<string, any>;
|
||||
alias?: string; // 别名:用于消息中心跳转映射
|
||||
hideInModule?: boolean; // 在日志选项中隐藏
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -492,6 +492,14 @@ export const pathMap: PathMapItem[] = [
|
|||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
key: 'SETTING_ORGANIZATION_LOG', // 系统设置-组织-日志
|
||||
locale: 'menu.settings.organization.log',
|
||||
route: RouteEnum.SETTING_ORGANIZATION_LOG,
|
||||
permission: [],
|
||||
level: MENU_LEVEL[1],
|
||||
hideInModule: true,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
|
@ -756,7 +764,6 @@ export const pathMap: PathMapItem[] = [
|
|||
route: RouteEnum.TEST_PLAN_INDEX,
|
||||
permission: [],
|
||||
level: MENU_LEVEL[2],
|
||||
alias: 'TEST_PLAN_TASK', // 测试计划-消息中心跳转对应别名
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { MENU_LEVEL, pathMap, PathMapItem, PathMapRoute } from '@/config/pathMap';
|
||||
import router from '@/router';
|
||||
import { findNodeByAlias, findNodeByKey, mapTree, TreeNode } from '@/utils';
|
||||
import { findNodeByKey, mapTree, TreeNode } from '@/utils';
|
||||
|
||||
export default function usePathMap() {
|
||||
/**
|
||||
|
@ -22,7 +22,7 @@ export default function usePathMap() {
|
|||
// 项目级别只展示项目
|
||||
isValid = e.level !== MENU_LEVEL[0] && e.level !== MENU_LEVEL[1];
|
||||
}
|
||||
if (isValid) {
|
||||
if (isValid && !e.hideInModule) {
|
||||
return typeof customNodeFn === 'function' ? customNodeFn(e) : e;
|
||||
}
|
||||
return null;
|
||||
|
@ -58,14 +58,6 @@ export default function usePathMap() {
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据 Alias 获取路由
|
||||
* @param alias 路由的 alias
|
||||
*/
|
||||
const getRouteMapByAlias = (alias: string) => {
|
||||
return findNodeByAlias<PathMapItem>(pathMap, alias as unknown as string);
|
||||
};
|
||||
|
||||
/**
|
||||
* 通过路由的 name 来获取它的菜单级别
|
||||
* @param name 路由的 name
|
||||
|
@ -110,6 +102,5 @@ export default function usePathMap() {
|
|||
jumpRouteByMapKey,
|
||||
getRouteLevelByKey,
|
||||
findLocalePath,
|
||||
getRouteMapByAlias,
|
||||
};
|
||||
}
|
||||
|
|
|
@ -603,6 +603,7 @@
|
|||
: undefined,
|
||||
heightUsed: 256,
|
||||
showSubdirectory: true,
|
||||
paginationSize: 'mini',
|
||||
});
|
||||
const batchActions = {
|
||||
baseAction: [
|
||||
|
|
|
@ -207,7 +207,6 @@
|
|||
import { hasAllPermission, hasAnyPermission } from '@/utils/permission';
|
||||
|
||||
import { ApiDefinitionGetModuleParams } from '@/models/apiTest/management';
|
||||
import { ApiScenarioGetModuleParams } from '@/models/apiTest/scenario';
|
||||
import { ModuleTreeNode } from '@/models/common';
|
||||
|
||||
const props = withDefaults(
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
|
||||
import MsTag from '@/components/pure/ms-tag/ms-tag.vue';
|
||||
|
||||
import { useI18n } from '@/hooks/useI18n';
|
||||
|
@ -117,7 +115,7 @@
|
|||
};
|
||||
|
||||
function getExecutionResult(): IconType {
|
||||
return iconTypeStatus.value[props.moduleType][props.status];
|
||||
return iconTypeStatus[props.moduleType]?.[props.status];
|
||||
}
|
||||
const methodColor = 'rgb(var(--warning-7))';
|
||||
|
||||
|
|
|
@ -65,6 +65,7 @@
|
|||
<!-- 步骤执行 -->
|
||||
<MsIcon
|
||||
v-show="!step.isExecuting"
|
||||
v-permission="['PROJECT_API_SCENARIO:READ+EXECUTE']"
|
||||
type="icon-icon_play-round_filled"
|
||||
:size="18"
|
||||
class="cursor-pointer text-[rgb(var(--link-6))]"
|
||||
|
@ -72,6 +73,7 @@
|
|||
/>
|
||||
<MsIcon
|
||||
v-show="step.isExecuting"
|
||||
v-permission="['PROJECT_API_SCENARIO:READ+EXECUTE']"
|
||||
type="icon-icon_stop"
|
||||
:size="20"
|
||||
class="cursor-pointer text-[rgb(var(--link-6))]"
|
||||
|
@ -1354,6 +1356,7 @@
|
|||
});
|
||||
} else {
|
||||
// 步骤列表找不到该步骤,说明是新建的自定义请求还未保存,则临时创建一个步骤进行调试(不保存步骤信息)
|
||||
delete scenario.value.stepResponses[request.stepId]; // 先移除上一次的执行结果
|
||||
const reportId = getGenerateId();
|
||||
request.executeLoading = true;
|
||||
activeStep.value = {
|
||||
|
|
|
@ -104,25 +104,27 @@
|
|||
</a-button>
|
||||
<template #content>
|
||||
<div class="arco-table-filters-content">
|
||||
<div class="ml-[6px] flex items-center justify-start px-[6px] py-[2px]">
|
||||
<a-checkbox-group v-model:model-value="executeResultFilters" direction="vertical" size="mini">
|
||||
<a-checkbox v-for="key of Object.keys(executionResultMap)" :key="key" :value="key">
|
||||
<MsIcon
|
||||
:type="executionResultMap[key]?.icon || ''"
|
||||
class="mr-1"
|
||||
:class="[executionResultMap[key].color]"
|
||||
></MsIcon>
|
||||
<span>{{ executionResultMap[key]?.statusText || '' }} </span>
|
||||
</a-checkbox>
|
||||
</a-checkbox-group>
|
||||
</div>
|
||||
<div class="filter-button">
|
||||
<a-button size="mini" class="mr-[8px]" @click="resetExecuteResultFilter">
|
||||
{{ t('common.reset') }}
|
||||
</a-button>
|
||||
<a-button type="primary" size="mini" @click="handleFilterHidden(false)">
|
||||
{{ t('system.orgTemplate.confirm') }}
|
||||
</a-button>
|
||||
<div class="arco-table-filters-content-list">
|
||||
<div class="ml-[6px] flex items-center justify-start px-[6px] py-[2px]">
|
||||
<a-checkbox-group v-model:model-value="executeResultFilters" direction="vertical" size="mini">
|
||||
<a-checkbox v-for="key of Object.keys(executionResultMap)" :key="key" :value="key">
|
||||
<MsIcon
|
||||
:type="executionResultMap[key]?.icon || ''"
|
||||
class="mr-1"
|
||||
:class="[executionResultMap[key].color]"
|
||||
></MsIcon>
|
||||
<span>{{ executionResultMap[key]?.statusText || '' }} </span>
|
||||
</a-checkbox>
|
||||
</a-checkbox-group>
|
||||
</div>
|
||||
<div class="filter-button">
|
||||
<a-button size="mini" class="mr-[8px]" @click="resetExecuteResultFilter">
|
||||
{{ t('common.reset') }}
|
||||
</a-button>
|
||||
<a-button type="primary" size="mini" @click="handleFilterHidden(false)">
|
||||
{{ t('system.orgTemplate.confirm') }}
|
||||
</a-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue