refactor(菜单): 左侧菜单样式

This commit is contained in:
baiqi 2024-05-14 20:39:24 +08:00 committed by Craftsman
parent 98a7cc61a2
commit 5f2accc982
21 changed files with 208 additions and 42 deletions

View File

@ -1,7 +1,7 @@
@font-face {
font-family: iconfont; /* Project id 3462279 */
src: url('iconfont.woff2?t=1714372635707') format('woff2'), url('iconfont.woff?t=1714372635707') format('woff'),
url('iconfont.ttf?t=1714372635707') format('truetype'), url('iconfont.svg?t=1714372635707#iconfont') format('svg');
src: url('iconfont.woff2?t=1715686154177') format('woff2'), url('iconfont.woff?t=1715686154177') format('woff'),
url('iconfont.ttf?t=1715686154177') format('truetype'), url('iconfont.svg?t=1715686154177#iconfont') format('svg');
}
.iconfont {
font-size: 16px;
@ -10,6 +10,33 @@
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-a-icon_test-tracking_filled1::before {
content: '\e7b3';
}
.icon-icon_functional_testing1::before {
content: '\e7b2';
}
.icon-icon_bug::before {
content: '\e7b1';
}
.icon-icon_threshold::before {
content: '\e7b0';
}
.icon-icon_filter::before {
content: '\e7af';
}
.icon-icon_chevron-down::before {
content: '\e7ad';
}
.icon-icon_chevron-up::before {
content: '\e7ae';
}
.icon-icon_audit::before {
content: '\e7ac';
}
.icon-icon_api-test-filled1::before {
content: '\e7ab';
}
.icon-icon_menu_unfold::before {
content: '\e7a9';
}

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,69 @@
"css_prefix_text": "icon-",
"description": "DE、MS项目icon管理",
"glyphs": [
{
"icon_id": "40334819",
"name": "icon_test-tracking_filled",
"font_class": "a-icon_test-tracking_filled1",
"unicode": "e7b3",
"unicode_decimal": 59315
},
{
"icon_id": "40334248",
"name": "icon_functional_testing",
"font_class": "icon_functional_testing1",
"unicode": "e7b2",
"unicode_decimal": 59314
},
{
"icon_id": "40282308",
"name": "icon_bug",
"font_class": "icon_bug",
"unicode": "e7b1",
"unicode_decimal": 59313
},
{
"icon_id": "40273551",
"name": "icon_threshold",
"font_class": "icon_threshold",
"unicode": "e7b0",
"unicode_decimal": 59312
},
{
"icon_id": "40270604",
"name": "icon_filter",
"font_class": "icon_filter",
"unicode": "e7af",
"unicode_decimal": 59311
},
{
"icon_id": "40270615",
"name": "icon_chevron-down",
"font_class": "icon_chevron-down",
"unicode": "e7ad",
"unicode_decimal": 59309
},
{
"icon_id": "40270614",
"name": "icon_chevron-up",
"font_class": "icon_chevron-up",
"unicode": "e7ae",
"unicode_decimal": 59310
},
{
"icon_id": "40177791",
"name": "icon_audit",
"font_class": "icon_audit",
"unicode": "e7ac",
"unicode_decimal": 59308
},
{
"icon_id": "40164987",
"name": "icon_api-test-filled",
"font_class": "icon_api-test-filled1",
"unicode": "e7ab",
"unicode_decimal": 59307
},
{
"icon_id": "39725024",
"name": "icon_menu_unfold",

View File

@ -14,6 +14,24 @@
/>
<missing-glyph />
<glyph glyph-name="a-icon_test-tracking_filled1" unicode="&#59315;" d="M981.333333 85.333333a170.666667 170.666667 0 1 0-341.333333 0 170.666667 170.666667 0 0 0 341.333333 0z m-153.514666 102.4a17.066667 17.066667 0 0 1-34.133334 0v-102.485333a17.066667 17.066667 0 0 1 4.992-12.074667l72.32-72.32a17.066667 17.066667 0 0 1 24.149334 24.106667l-67.370667 67.370667V187.733333zM341.333333 853.333333a42.666667 42.666667 0 0 1-42.666666-42.666666v-170.666667a42.538667 42.538667 0 0 1 42.666666-42.666667 42.453333 42.453333 0 0 1 41.813334 34.048C383.701333 634.197333 384 637.056 384 640V810.666667a42.666667 42.666667 0 0 1-42.666667 42.666666z m341.333334 0a42.666667 42.666667 0 0 1-42.666667-42.666666v-170.666667a42.666667 42.666667 0 1 1 85.333333 0V810.666667a42.666667 42.666667 0 0 1-42.666666 42.666666zM128 725.333333h128v-85.333333a85.333333 85.333333 0 1 1 170.666667 0V725.333333h170.666666v-85.333333a85.333333 85.333333 0 1 1 170.666667 0V725.333333h128a42.666667 42.666667 0 0 0 42.666667-42.666666v-426.666667a213.333333 213.333333 0 0 1-298.666667-298.666667H128a42.666667 42.666667 0 0 0-42.666667 42.666667V682.666667a42.666667 42.666667 0 0 0 42.666667 42.666666z m85.333333-469.333333a42.666667 42.666667 0 0 1 0-85.333333h298.666667a42.666667 42.666667 0 0 1 0 85.333333H213.333333z m0 170.666667a42.666667 42.666667 0 0 1 0-85.333334h170.666667a42.666667 42.666667 0 0 1 0 85.333334H213.333333z" horiz-adv-x="1024" />
<glyph glyph-name="icon_functional_testing1" unicode="&#59314;" d="M256 853.333333a42.666667 42.666667 0 0 1-42.666667-42.666666v-42.666667h597.333334V810.666667a42.666667 42.666667 0 0 1-42.666667 42.666666H256zM128 640a42.666667 42.666667 0 0 0 42.666667 42.666667h682.666666a42.666667 42.666667 0 0 0 42.666667-42.666667v-42.666667H128V640zM85.333333 512a42.666667 42.666667 0 0 1-42.666666-42.666667v-512a42.666667 42.666667 0 0 1 42.666666-42.666666h853.333334a42.666667 42.666667 0 0 1 42.666666 42.666666V469.333333a42.666667 42.666667 0 0 1-42.666666 42.666667H85.333333z m192-128a64 64 0 0 1 0-128h469.333334a64 64 0 0 1 0 128h-469.333334z" horiz-adv-x="1024" />
<glyph glyph-name="icon_bug" unicode="&#59313;" d="M341.333333 554.666667H256v-256c0-31.061333 9.472-96.938667 46.421333-153.642667 30.464-46.762667 80.682667-89.301333 166.912-99.84V554.666667H341.333333z m213.333334 0v-509.525334c86.357333 10.496 136.533333 52.778667 166.954666 99.285334C758.485333 200.832 768 266.666667 768 298.666667V554.666667h-213.333333z m170.538666 85.333333h67.797334l115.498666 115.498667a42.666667 42.666667 0 1 0 60.330667-60.330667L853.333333 579.669333V362.666667h85.333334a42.666667 42.666667 0 1 0 0-85.333334h-86.186667c-3.370667-45.909333-17.92-115.626667-58.794667-178.645333l111.146667-111.189333a42.666667 42.666667 0 0 0-60.330667-60.330667l-106.794666 106.794667C685.653333-11.306667 612.394667-42.666667 512-42.666667c-100.266667 0-173.44 31.488-225.493333 76.842667l-107.008-107.008a42.666667 42.666667 0 0 0-60.330667 60.330667l111.445333 111.445333C189.610667 162.090667 174.933333 231.808 171.52 277.333333H85.333333a42.666667 42.666667 0 1 0 0 85.333334h85.333334V579.669333L55.168 695.168a42.666667 42.666667 0 0 0 60.330667 60.330667L230.997333 640h67.797334C302.378667 756.906667 394.922667 853.333333 512 853.333333c117.077333 0 209.621333-96.426667 213.205333-213.333333z m-85.376 0C636.288 712.789333 578.901333 768 512 768S387.712 712.789333 384.170667 640h255.658666z" horiz-adv-x="1024" />
<glyph glyph-name="icon_threshold" unicode="&#59312;" d="M42.666667 384C42.666667 643.2 252.8 853.333333 512 853.333333c85.632 0 166.058667-22.997333 235.264-63.146666a42.666667 42.666667 0 1 0-42.837333-73.813334A382.037333 382.037333 0 0 1 512 768a384 384 0 1 1 384-384 382.037333 382.037333 0 0 1-50.944 191.232 42.666667 42.666667 0 1 0 73.984 42.581333A467.370667 467.370667 0 0 0 981.333333 384c0-259.2-210.133333-469.333333-469.333333-469.333333S42.666667 124.8 42.666667 384zM721.536 538.624l-39.936 14.933333-14.933333 39.978667a42.666667 42.666667 0 0 0 54.869333-54.912z m-116.309333-61.397333l-7.594667-3.2c-25.856-10.965333-52.138667-22.698667-73.728-33.578667a391.381333 391.381333 0 0 1-27.050667-14.762667c-3.541333-2.133333-6.314667-4.010667-8.405333-5.546666-2.048-1.450667-2.986667-2.304-2.986667-2.304a42.666667 42.666667 0 0 1 60.373334-60.330667s0.853333 0.853333 2.346666 2.986667c1.493333 2.048 3.328 4.821333 5.504 8.362666 4.352 7.082667 9.301333 16.213333 14.762667 27.050667a1306.965333 1306.965333 0 0 1 36.778667 81.322667z m-59.392-119.722667z m135.765333 196.096l-14.933333 39.936-0.64-0.213333-1.706667-0.64a2033.536 2033.536 0 0 1-28.970667-11.178667c-18.816-7.381333-44.373333-17.621333-71.04-28.928a1388.8 1388.8 0 0 1-78.762666-35.925333c-11.946667-5.973333-23.338667-12.117333-33.152-18.133334a148.778667 148.778667 0 0 1-27.264-20.352 128 128 0 1 1 181.034666-181.034666c7.850667 7.850667 14.72 18.048 20.352 27.264 5.973333 9.813333 12.117333 21.205333 18.176 33.152 12.032 23.978667 24.618667 52.181333 35.84 78.72a2824.576 2824.576 0 0 1 40.149334 100.053333l0.64 1.706667 0.213333 0.597333-39.936 14.933333z" horiz-adv-x="1024" />
<glyph glyph-name="icon_filter" unicode="&#59311;" d="M128 704a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64v-114.304l-272-160V0h-224V429.696L128 589.696V704z m704 0H192v-77.696l272-160V64h96V466.304l272 160V704z" horiz-adv-x="1024" />
<glyph glyph-name="icon_chevron-down" unicode="&#59309;" d="M226.56 482.56l58.88 58.88L512 314.88l226.56 226.56 58.88-58.88L512 197.12 226.56 482.56z" horiz-adv-x="1024" />
<glyph glyph-name="icon_chevron-up" unicode="&#59310;" d="M797.44 285.44l-58.88-58.88L512 453.12l-226.56-226.56-58.88 58.88L512 570.752l285.44-285.44z" horiz-adv-x="1024" />
<glyph glyph-name="icon_audit" unicode="&#59308;" d="M518.826667 810.666667c134.4 0 230.741333-78.08 230.741333-231.509334 0-73.557333-21.632-125.781333-62.122667-173.568-4.821333-5.674667-34.688-37.888-38.997333-44.074666a20.949333 20.949333 0 0 1-2.901333-4.821334v-12.416l0.042666-3.84h186.453334a64 64 0 0 0 63.658666-57.856l0.298667-6.144V106.666667a42.666667 42.666667 0 0 0-42.666667-42.666667H170.666667a42.666667 42.666667 0 0 0-42.666667 42.666667l0.085333 169.813333a64.042667 64.042667 0 0 0 64 63.957333H382.293333l0.085334 3.584v9.258667a155.136 155.136 0 0 1-6.186667 7.594667l-1.365333 1.536a1308.288 1308.288 0 0 0-35.157334 39.466666c-39.893333 49.066667-61.824 103.808-61.824 177.28C277.802667 732.16 381.653333 810.666667 518.826667 810.666667z m0-85.333334C424.405333 725.333333 363.136 679.04 363.136 579.157333c0-52.522667 14.506667-88.746667 42.752-123.477333 4.48-5.546667 9.258667-10.965333 15.445333-17.749333-0.512 0.554667 12.373333-13.354667 15.786667-17.194667 15.232-17.024 23.765333-29.568 28.202667-46.08 1.578667-5.888 2.389333-11.861333 2.389333-17.92v-8.362667c-0.085333-26.581333-0.682667-35.413333-3.84-47.530666-7.253333-27.989333-28.8-45.738667-58.368-45.738667H213.418667L213.333333 149.333333h597.333334v105.770667h-191.146667c-24.874667 0-45.312 10.837333-54.058667 35.541333l-1.792 5.973334c-2.730667 10.581333-3.328 17.706667-3.413333 44.8v15.274666c0 19.541333 6.485333 36.778667 18.090667 53.461334 8.405333 12.117333 42.666667 48.981333 43.989333 50.602666 28.16 33.194667 41.898667 66.432 41.898667 118.4C664.234667 681.045333 609.578667 725.333333 518.826667 725.333333zM853.333333 21.333333a42.666667 42.666667 0 0 0 0-85.333333H170.666667a42.666667 42.666667 0 0 0 0 85.333333h682.666666z" horiz-adv-x="1024" />
<glyph glyph-name="icon_api-test-filled1" unicode="&#59307;" d="M85.312 768c0 23.552 19.136 42.688 42.688 42.688h768c23.552 0 42.688-19.136 42.688-42.688v-85.312H85.312V768zM85.312 597.312h853.376v-352.256A234.688 234.688 0 0 1 563.52 0H128a42.688 42.688 0 0 0-42.688 42.688V597.312zM789.312-106.688a170.688 170.688 0 1 1 0 341.376 170.688 170.688 0 0 1 0-341.376z m4.608 272.128l15.36-1.92a7.744 7.744 0 0 0 6.784-8.576l-22.656-184.832a7.744 7.744 0 0 0-8.704-6.72l-15.36 1.92a7.744 7.744 0 0 0-6.784 8.576l22.72 184.832a7.744 7.744 0 0 0 8.64 6.72zM709.12 64l22.016-31.488a7.744 7.744 0 0 0-1.92-10.816l-12.672-8.896a7.744 7.744 0 0 0-10.88 1.92l-31.104 44.48a7.744 7.744 0 0 0-0.832 7.424 7.808 7.808 0 0 0 1.28 2.688l31.104 44.48a7.744 7.744 0 0 0 10.816 1.92l12.672-8.96a7.744 7.744 0 0 0 1.92-10.752l-22.4-32z m138.368 31.616a7.744 7.744 0 0 0 1.92 10.816l12.736 8.896a7.744 7.744 0 0 0 10.752-1.92l31.168-44.48a7.744 7.744 0 0 0 0.832-7.424 7.68 7.68 0 0 0-1.216-2.688l-31.168-44.48a7.744 7.744 0 0 0-10.752-1.92l-12.8 8.96a7.744 7.744 0 0 0-1.856 10.752l22.4 32-22.016 31.488zM353.536 381.12l27.712 78.208h0.64l26.88-78.208h-55.232z m4.48 130.816l-80.64-213.248h47.168l16.704 47.488h79.744l16.128-47.488h48.64L406.144 511.936h-48.128zM551.04 411.52v64h36.48c5.376 0 10.56-0.448 15.552-1.28a34.56 34.56 0 0 0 13.12-4.736c3.84-2.176 6.784-5.376 8.96-9.6 2.368-4.16 3.584-9.6 3.584-16.384a32.96 32.96 0 0 0-3.584-16.448 25.28 25.28 0 0 0-8.96-9.856 37.952 37.952 0 0 0-13.12-4.48 98.24 98.24 0 0 0-15.552-1.152h-36.48zM504.256 512v-213.248h46.912V375.04h49.28c13.312 0 24.704 1.92 34.048 5.696a63.744 63.744 0 0 1 22.656 15.552c6.016 6.4 10.24 13.632 12.864 21.76a79.936 79.936 0 0 1 0 50.816 56.576 56.576 0 0 1-12.8 21.76 60.8 60.8 0 0 1-22.72 15.232A86.848 86.848 0 0 1 600.32 512H504.192zM703.36 511.936v-213.248h46.912V511.936h-46.848z" horiz-adv-x="1024" />
<glyph glyph-name="icon_menu_unfold" unicode="&#59305;" d="M853.333333 714.666667a42.666667 42.666667 0 0 0 0-85.333334H170.666667a42.666667 42.666667 0 1 0 0 85.333334h682.666666z m0-192a42.666667 42.666667 0 0 0 0-85.333334h-341.333333a42.666667 42.666667 0 0 0 0 85.333334h341.333333z m0-192a42.666667 42.666667 0 0 0 0-85.333334h-341.333333a42.666667 42.666667 0 0 0 0 85.333334h341.333333z m0-192a42.666667 42.666667 0 0 0 0-85.333334H170.666667a42.666667 42.666667 0 0 0 0 85.333334h682.666666zM318.72 526.848A42.666667 42.666667 0 0 0 384 490.666667v-213.333334a42.666667 42.666667 0 0 0-65.28-36.181333l-170.666667 106.666667a42.666667 42.666667 0 0 0 0 72.362666l170.666667 106.666667zM298.666667 413.738667L251.093333 384 298.666667 354.304v59.434667z" horiz-adv-x="1024" />
<glyph glyph-name="icon_menu_fold" unicode="&#59306;" d="M853.333333 714.666667a42.666667 42.666667 0 0 0 0-85.333334H170.666667a42.666667 42.666667 0 1 0 0 85.333334h682.666666z m0-192a42.666667 42.666667 0 0 0 0-85.333334h-341.333333a42.666667 42.666667 0 0 0 0 85.333334h341.333333z m0-192a42.666667 42.666667 0 0 0 0-85.333334h-341.333333a42.666667 42.666667 0 0 0 0 85.333334h341.333333z m0-192a42.666667 42.666667 0 0 0 0-85.333334H170.666667a42.666667 42.666667 0 0 0 0 85.333334h682.666666zM128 490.666667a42.666667 42.666667 0 0 0 65.28 36.181333l170.666667-106.666667a42.666667 42.666667 0 0 0 0-72.362666l-170.666667-106.666667A42.666667 42.666667 0 0 0 128 277.333333v213.333334z m85.333333-76.928v-59.434667l47.530667 29.738667L213.333333 413.738667z" horiz-adv-x="1024" />

Before

Width:  |  Height:  |  Size: 444 KiB

After

Width:  |  Height:  |  Size: 453 KiB

View File

@ -20,7 +20,7 @@
import { getFirstRouterNameByCurrentRoute } from '@/utils/permission';
import { listenerRouteChange } from '@/utils/route-listener';
import { ProjectManagementRouteEnum, RouteEnum, SettingRouteEnum } from '@/enums/routeEnum';
import { ProjectManagementRouteEnum, SettingRouteEnum } from '@/enums/routeEnum';
import useMenuTree from './use-menu-tree';
import type { RouteMeta } from 'vue-router';
@ -123,11 +123,6 @@
selectedKey.value = [activeMenu || menuOpenKeys[menuOpenKeys.length - 1]];
}
if (newRoute.fullPath.includes(RouteEnum.SETTING)) {
appStore.updateSettings({ menuCollapse: false });
} else {
appStore.updateSettings({ menuCollapse: true });
}
}, true);
const setCollapse = (val: boolean) => {
if (appStore.device === 'desktop') appStore.updateSettings({ menuCollapse: val });
@ -395,12 +390,22 @@
),
}}
>
<a-menu-item class="flex items-center justify-between" key="personalInfo">
<div class="relative flex items-center gap-[8px] hover:!bg-transparent">
<MsAvatar avatar={userStore.avatar} size={20} />
{userStore.name}
</div>
<icon-caret-down class="!m-0" />
<a-menu-item
class={['flex items-center justify-between', collapsed.value ? 'h-[56px] w-[56px]' : '']}
key="personalInfo"
>
{collapsed.value ? (
<div class="relative flex h-full items-center justify-center hover:!bg-transparent">
<MsAvatar avatar={userStore.avatar} size={30} class="hover:!bg-transparent" />
</div>
) : (
<div class="relative flex items-center gap-[8px] hover:!bg-transparent">
<MsAvatar avatar={userStore.avatar} size={20} />
{userStore.name}
</div>
)}
{collapsed.value ? null : <icon-caret-down class="!m-0" />}
</a-menu-item>
</a-trigger>
);
@ -423,7 +428,11 @@
element?.name === SettingRouteEnum.SETTING_ORGANIZATION ? (
<a-menu-item key={element?.name} v-slots={{ icon }} onClick={() => goto(element)}>
<div class="inline-flex w-[calc(100%-34px)] items-center justify-between !bg-transparent">
{t(element?.meta?.locale || '')}
{t(
collapsed.value
? element?.meta?.collapsedLocale || element?.meta?.locale || ''
: element?.meta?.locale || ''
)}
{xPack.value
? orgTrigger(element, menuSwitchOrgVisible, () => (
<div
@ -445,7 +454,11 @@
</a-menu-item>
) : (
<a-menu-item key={element?.name} v-slots={{ icon }} onClick={() => goto(element)}>
{t(element?.meta?.locale || '')}
{t(
collapsed.value
? element?.meta?.collapsedLocale || element?.meta?.locale || ''
: element?.meta?.locale || ''
)}
</a-menu-item>
);
@ -461,7 +474,11 @@
key={element?.name}
v-slots={{
icon,
title: () => h('div', t(element?.meta?.locale || '')),
title: () =>
h(
'div',
t(collapsed.value ? element?.meta?.collapsedLocale || '' : element?.meta?.locale || '')
),
}}
class={BOTTOM_MENU_LIST.includes(element?.name as string) ? 'arco-menu-inline--bottom' : ''}
>
@ -496,11 +513,11 @@
'popup-offset': -4,
}}
v-slots={{
'collapse-icon': () => (appStore.menuCollapse ? <icon-right /> : <icon-left />),
'collapse-icon': () => (collapsed.value ? <icon-right /> : <icon-left />),
}}
>
<div class="flex flex-1 flex-col">{renderSubMenu()}</div>
<div class="flex flex-col">{personalInfoMenu()}</div>
<div class="flex flex-1 flex-col gap-[4px]">{renderSubMenu()}</div>
<div class="flex flex-col items-center">{personalInfoMenu()}</div>
</a-menu>
{personalInfoDrawer()}
</>
@ -551,7 +568,7 @@
margin-right: 8px;
.arco-icon {
&:not(.arco-icon-down) {
font-size: 18px;
font-size: 16px;
}
color: var(--color-text-4);
@ -590,11 +607,26 @@
.arco-menu-overflow-sub-menu {
min-width: 60px;
}
.arco-menu-collapsed {
width: 72px;
.arco-avatar,
.arco-icon {
margin-right: 2px !important;
.arco-menu-vertical.arco-menu-collapsed {
width: 56px;
.arco-menu-inner {
@apply !p-0;
padding-bottom: 32px !important;
.arco-menu-item,
.arco-menu-inline--bottom {
@apply flex-col p-0;
gap: 4px;
line-height: normal;
padding: 8px 14px;
.arco-menu-icon {
@apply mr-0;
}
.arco-menu-title {
@apply opacity-100;
}
}
}
}
.arco-menu {

View File

@ -21,11 +21,14 @@ export default {
message: {
'menu.workbench': 'Workbench',
'menu.testPlan': 'Test Plan',
'menu.testPlanShort': 'Plan',
'menu.bugManagement': 'Bug',
'menu.bugManagementShort': 'Bug',
'menu.bugManagement.bugDetail': 'Bug',
'menu.bugManagement.bugRecycle': 'Recycle',
'menu.caseManagement': 'Functional',
'menu.apiTest': 'API Test',
'menu.apiTestShort': 'API',
'menu.apiTest.debug': 'Debug',
'menu.apiTest.debug.debug': 'Debug',
'menu.apiTest.management': 'API',
@ -36,6 +39,7 @@ export default {
'menu.uiTest': 'UI Test',
'menu.performanceTest': 'Performance Test',
'menu.projectManagement': 'Project',
'menu.projectManagementShort': 'Project',
'menu.projectManagement.fileManagement': 'File',
'menu.projectManagement.messageManagement': 'Message',
'menu.projectManagement.commonScript': 'Common Script',
@ -60,7 +64,9 @@ export default {
'menu.projectManagement.taskCenter': 'Task center',
'menu.projectManagement.environmentManagement': 'Environment',
'menu.settings': 'Settings',
'menu.settingsShort': 'System',
'menu.settings.system': 'System',
'menu.settings.systemManagement': 'System Management',
'menu.settings.system.usergroup': 'User Group',
'menu.settings.system.authorizedManagement': 'Authorized',
'menu.settings.system.pluginManager': 'Plugin',
@ -72,6 +78,7 @@ export default {
'menu.settings.system.parameter': 'System Parameter',
'menu.settings.system.log': 'Log',
'menu.settings.organization': 'Organization',
'menu.settings.organizationManagement': 'Organization Management',
'menu.settings.organization.member': 'Member',
'menu.settings.organization.userGroup': 'User Group',
'menu.settings.organization.project': 'Project',

View File

@ -20,12 +20,16 @@ export default {
message: {
'menu.workbench': '工作台',
'menu.testPlan': '测试计划',
'menu.testPlanShort': '计划',
'menu.testPlan.testPlanDetail': '测试计划详情',
'menu.bugManagement': '缺陷管理',
'menu.bugManagementShort': '缺陷',
'menu.bugManagement.bugDetail': '缺陷',
'menu.bugManagement.bugRecycle': '回收站',
'menu.caseManagement': '用例管理',
'menu.caseManagement': '测试用例',
'menu.caseManagementShort': '用例',
'menu.apiTest': '接口测试',
'menu.apiTestShort': '接口',
'menu.apiTest.debug': '调试',
'menu.apiTest.debug.debug': '调试',
'menu.apiTest.management': '定义',
@ -40,6 +44,7 @@ export default {
'menu.loadTest': '性能测试',
'menu.performanceTest': '性能测试',
'menu.projectManagement': '项目管理',
'menu.projectManagementShort': '项目',
'menu.projectManagement.templateManager': '模板管理',
'menu.projectManagement.log': '日志',
'menu.projectManagement.taskCenter': '任务中心',
@ -63,7 +68,9 @@ export default {
'menu.caseManagement.caseManagementCaseDetail': '用例详情',
'menu.projectManagement.projectPermission': '项目与权限',
'menu.settings': '系统设置',
'menu.settingsShort': '系统',
'menu.settings.system': '系统',
'menu.settings.systemManagement': '系统管理',
'menu.settings.system.user': '用户',
'menu.settings.system.usergroup': '用户组',
'menu.settings.system.authorizedManagement': '授权',
@ -75,6 +82,7 @@ export default {
'menu.settings.system.parameter': '系统参数',
'menu.settings.system.log': '日志',
'menu.settings.organization': '组织',
'menu.settings.organizationManagement': '组织管理',
'menu.settings.organization.member': '成员',
'menu.settings.organization.userGroup': '用户组',
'menu.settings.organization.project': '项目',

View File

@ -10,7 +10,8 @@ const ApiTest: AppRouteRecordRaw = {
component: DEFAULT_LAYOUT,
meta: {
locale: 'menu.apiTest',
icon: 'icon-icon_api-test-filled',
collapsedLocale: 'menu.apiTestShort',
icon: 'icon-icon_api-test-filled1',
order: 4,
hideChildrenInMenu: true,
roles: [

View File

@ -10,6 +10,7 @@ const BugManagement: AppRouteRecordRaw = {
component: DEFAULT_LAYOUT,
meta: {
locale: 'menu.bugManagement',
collapsedLocale: 'menu.bugManagementShort',
icon: 'icon-icon_defect',
order: 7,
roles: ['PROJECT_BUG:READ'],

View File

@ -10,7 +10,8 @@ const CaseManagement: AppRouteRecordRaw = {
component: DEFAULT_LAYOUT,
meta: {
locale: 'menu.caseManagement',
icon: 'icon-icon_functional_testing',
collapsedLocale: 'menu.caseManagementShort',
icon: 'icon-icon_functional_testing1',
order: 3,
hideChildrenInMenu: true,
roles: ['FUNCTIONAL_CASE:READ', 'CASE_REVIEW:READ'],

View File

@ -10,8 +10,9 @@ const ProjectManagement: AppRouteRecordRaw = {
component: DEFAULT_LAYOUT,
meta: {
locale: 'menu.projectManagement',
collapsedLocale: 'menu.projectManagementShort',
icon: 'icon-icon_project-settings-filled',
order: 2,
order: 1,
hideChildrenInMenu: true,
roles: [
'PROJECT_BASE_INFO:READ',

View File

@ -9,6 +9,7 @@ const Setting: AppRouteRecordRaw = {
component: DEFAULT_LAYOUT,
meta: {
locale: 'menu.settings',
collapsedLocale: 'menu.settingsShort',
icon: 'icon-a-icon_system_settings',
order: 8,
roles: [
@ -39,6 +40,7 @@ const Setting: AppRouteRecordRaw = {
component: null,
meta: {
locale: 'menu.settings.system',
collapsedLocale: 'menu.settings.systemManagement',
roles: [
'SYSTEM_USER:READ',
'SYSTEM_USER_ROLE:READ',
@ -182,6 +184,7 @@ const Setting: AppRouteRecordRaw = {
component: null,
meta: {
locale: 'menu.settings.organization',
collapsedLocale: 'menu.settings.organizationManagement',
roles: [
'ORGANIZATION_MEMBER:READ',
'ORGANIZATION_USER_ROLE:READ',

View File

@ -10,8 +10,9 @@ const TestPlan: AppRouteRecordRaw = {
component: DEFAULT_LAYOUT,
meta: {
locale: 'menu.testPlan',
icon: 'icon-icon_test-tracking_filled',
order: 1,
collapsedLocale: 'menu.testPlanShort',
icon: 'icon-a-icon_test-tracking_filled1',
order: 2,
hideChildrenInMenu: true,
roles: ['*'],
},

View File

@ -14,6 +14,7 @@ export interface RouteMeta {
requiresAuth?: boolean; // 是否需要权限,默认需要
icon?: string; // 菜单icon
locale?: string; // 国际化语言单词
collapsedLocale?: string; // 收起时的国际化语言单词
hideInMenu?: boolean; // 此路由不在菜单展示
hideChildrenInMenu?: boolean; // 子路由不展示在菜单
activeMenu?: string; // 激活状态

View File

@ -6,6 +6,7 @@ declare module 'vue-router' {
requiresAuth?: boolean; // 是否需要权限,默认需要
icon?: string; // 菜单icon
locale?: string; // 国际化语言单词
collapsedLocale?: string; // 收起时的国际化语言单词
hideInMenu?: boolean; // 此路由不在菜单展示
hideChildrenInMenu?: boolean; // 子路由不展示在菜单
activeMenu?: string; // 激活状态

View File

@ -383,7 +383,7 @@ const useAppStore = defineStore('app', {
},
},
persist: {
paths: ['currentOrgId', 'currentProjectId', 'pageConfig'],
paths: ['currentOrgId', 'currentProjectId', 'pageConfig', 'menuCollapse'],
},
});

View File

@ -4,7 +4,6 @@ import type { BreadcrumbItem } from '@/components/business/ms-breadcrumb/types';
import { EnvConfig, EnvironmentItem } from '@/models/projectManagement/environmental';
import type { LoginConfig, PageConfig, PlatformConfig, ThemeConfig } from '@/models/setting/config';
import { ProjectListItem } from '@/models/setting/project';
import type { TaskCenterEnum } from '@/enums/taskCenter';
import type { RouteRecordNormalized, RouteRecordRaw } from 'vue-router';

View File

@ -95,7 +95,7 @@
<span>{{ statusIconMap[record.reviewStatus]?.statusText || '' }} </span>
</template>
<template #lastExecuteResult="{ record }">
<executeResult :execute-result="record.lastExecuteResult" />
<ExecuteStatusTag :execute-result="record.lastExecuteResult" />
</template>
<template #moduleId="{ record }">
<a-tree-select
@ -323,8 +323,10 @@
import useTable from '@/components/pure/ms-table/useTable';
import MsTableMoreAction from '@/components/pure/ms-table-more-action/index.vue';
import { ActionsItem } from '@/components/pure/ms-table-more-action/types';
import MsTag from '@/components/pure/ms-tag/ms-tag.vue';
import caseLevel from '@/components/business/ms-case-associate/caseLevel.vue';
import executeResult from '@/components/business/ms-case-associate/executeResult.vue';
import ExecuteStatusTag from '@/components/business/ms-case-associate/executeResult.vue';
import MsMinder from '@/components/business/ms-minders/index.vue';
import BatchEditModal from './batchEditModal.vue';
import CaseDetailDrawer from './caseDetailDrawer.vue';
import FeatureCaseTree from './caseTree.vue';