fix(全局): bug修复

This commit is contained in:
baiqi 2024-04-19 18:17:03 +08:00 committed by Craftsman
parent 332cf2c277
commit 1c59d17c3a
9 changed files with 59 additions and 56 deletions

View File

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

View File

@ -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"
>

View File

@ -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', // 测试计划-消息中心跳转对应别名
},
],
},

View File

@ -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,
};
}

View File

@ -603,6 +603,7 @@
: undefined,
heightUsed: 256,
showSubdirectory: true,
paginationSize: 'mini',
});
const batchActions = {
baseAction: [

View File

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

View File

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

View File

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

View File

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