feat: 初始化菜单项及页面

This commit is contained in:
RubyLiu 2023-07-21 18:19:54 +08:00 committed by 刘瑞斌
parent 546c35f1e5
commit 32eae40ada
22 changed files with 277 additions and 15 deletions

View File

@ -467,7 +467,7 @@
/** 开关 **/
.arco-switch {
background: var(--color-fill-4);
background: var(--color-fill-4) !important;
}
.arco-switch-checked {
background: rgb(var(--primary-6)) !important;

View File

@ -14,7 +14,26 @@
@selection-change="(e) => selectionChange(e, true)"
>
<template #columns>
<a-table-column v-for="(item, idx) in columns" :key="idx">
<a-table-column
v-for="(item, idx) in columns"
:key="idx"
:width="item.width"
:align="item.align"
:fixed="item.fixed"
:ellipsis="item.ellipsis"
:sortable="item.sortable"
:filterable="item.filterable"
:cell-class="item.cellClass"
:header-cell-class="item.headerCellClass"
:body-cell-class="item.bodyCellClass"
:summary-cell-class="item.summaryCellClass"
:cell-style="item.cellStyle"
:header-cell-style="item.headerCellStyle"
:body-cell-style="item.bodyCellStyle"
:summary-cell-style="item.summaryCellStyle"
:index="item.index"
:tooltip="item.tooltip"
>
<template #title>
<div v-if="attrs.showSetting && idx === columns.length - 1" class="column-selector">
<div class="title">{{ t(item.title as string) }}</div>
@ -56,7 +75,7 @@
} from './type';
import BatchAction from './batchAction.vue';
import type { TableData } from '@arco-design/web-vue';
import type { TableColumnData, TableData } from '@arco-design/web-vue';
import ColumnSelector from './columnSelector.vue';
const batchleft = ref('10px');

View File

@ -0,0 +1,13 @@
enum menuEnum {
APITEST = 'apiTest',
BUGMANAGEMENT = 'bugManagement',
FEATURETEST = 'featureTest',
PERFORMANCETEST = 'performanceTest',
PROJECTMANAGEMENT = 'projectManagement',
SETTING = 'setting',
TESTPLAN = 'testPlan',
UITEST = 'uiTest',
WORKPLACE = 'workplace',
}
export default menuEnum;

View File

@ -17,7 +17,14 @@ Object.keys(_Vmodules).forEach((key) => {
});
export default {
message: {
'menu.apiTest': 'Api Test',
'menu.workplace': 'Workplace',
'menu.testPlan': 'Test plan',
'menu.bugManagement': 'Bug management',
'menu.featureTest': 'Feature test',
'menu.apiTest': 'API test',
'menu.uiTest': 'UI test',
'menu.performanceTest': 'Performance test',
'menu.projectManagement': 'Project management',
'menu.settings': 'System Settings',
'menu.settings.system': 'System',
'menu.settings.organization': 'Organization',

View File

@ -17,7 +17,14 @@ Object.keys(_Vmodules).forEach((key) => {
});
export default {
message: {
'menu.workplace': '工作台',
'menu.testPlan': '测试计划',
'menu.bugManagement': '缺陷管理',
'menu.featureTest': '功能测试',
'menu.apiTest': '接口测试',
'menu.uiTest': 'UI测试',
'menu.performanceTest': '性能测试',
'menu.projectManagement': '项目管理',
'menu.settings': '系统设置',
'menu.settings.system': '系统',
'menu.settings.organization': '组织',

View File

@ -1,26 +1,25 @@
import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';
import menuEnum from '@/enums/menuEnum';
const ApiTest: AppRouteRecordRaw = {
path: '/api-test',
name: 'apiTest',
redirect: '/api-test/list',
name: menuEnum.APITEST,
redirect: '/api-test/index',
component: DEFAULT_LAYOUT,
meta: {
locale: 'menu.apiTest',
icon: 'icon-dashboard',
order: 0,
icon: 'icon_api-test-filled',
order: 4,
hideChildrenInMenu: true,
},
children: [
{
path: 'list',
name: 'apiTestList',
path: 'index',
name: 'ApiTestIndex',
component: () => import('@/views/api-test/index.vue'),
meta: {
locale: 'menu.apiTest',
roles: ['*'],
icon: 'icon-computer',
},
},
],

View File

@ -0,0 +1,28 @@
import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';
import menuEnum from '@/enums/menuEnum';
const BugManagement: AppRouteRecordRaw = {
path: '/bug-management',
name: menuEnum.BUGMANAGEMENT,
redirect: '/bug-management/index',
component: DEFAULT_LAYOUT,
meta: {
locale: 'menu.bugManagement',
icon: 'icon_defect',
order: 2,
hideChildrenInMenu: true,
},
children: [
{
path: 'index',
name: 'BugManagementIndex',
component: () => import('@/views/bug-management/index.vue'),
meta: {
roles: ['*'],
},
},
],
};
export default BugManagement;

View File

@ -0,0 +1,28 @@
import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';
import menuEnum from '@/enums/menuEnum';
const FeatureTest: AppRouteRecordRaw = {
path: '/feature-test',
name: menuEnum.FEATURETEST,
redirect: '/feature-test/index',
component: DEFAULT_LAYOUT,
meta: {
locale: 'menu.featureTest',
icon: 'icon_functional_testing',
order: 3,
hideChildrenInMenu: true,
},
children: [
{
path: 'index',
name: 'FeatureTestIndex',
component: () => import('@/views/feature-test/index.vue'),
meta: {
roles: ['*'],
},
},
],
};
export default FeatureTest;

View File

@ -0,0 +1,28 @@
import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';
import menuEnum from '@/enums/menuEnum';
const PerformanceTest: AppRouteRecordRaw = {
path: '/performtest-test',
name: menuEnum.PERFORMANCETEST,
redirect: '/performtest-test/index',
component: DEFAULT_LAYOUT,
meta: {
locale: 'menu.performanceTest',
icon: 'icon_performance-test-filled',
order: 6,
hideChildrenInMenu: true,
},
children: [
{
path: 'index',
name: 'apiTestList',
component: () => import('@/views/performance-test/index.vue'),
meta: {
roles: ['*'],
},
},
],
};
export default PerformanceTest;

View File

@ -0,0 +1,28 @@
import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';
import menuEnum from '@/enums/menuEnum';
const ProjectManagement: AppRouteRecordRaw = {
path: '/project-management',
name: menuEnum.PROJECTMANAGEMENT,
redirect: '/project-management/index',
component: DEFAULT_LAYOUT,
meta: {
locale: 'menu.projectManagement',
icon: 'icon_project-settings-filled',
order: 7,
hideChildrenInMenu: true,
},
children: [
{
path: 'index',
name: 'ProjectManagementIndex',
component: () => import('@/views/project-management/index.vue'),
meta: {
roles: ['*'],
},
},
],
};
export default ProjectManagement;

View File

@ -8,7 +8,7 @@ const Setting: AppRouteRecordRaw = {
meta: {
locale: 'menu.settings',
icon: 'icon-a-icon_system_settings',
order: 0,
order: 8,
},
children: [
{

View File

@ -0,0 +1,28 @@
import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';
import menuEnum from '@/enums/menuEnum';
const TestPlan: AppRouteRecordRaw = {
path: '/test-plan',
name: menuEnum.TESTPLAN,
redirect: '/test-plan/index',
component: DEFAULT_LAYOUT,
meta: {
locale: 'menu.testPlan',
icon: 'icon_test-tracking_filled',
order: 1,
hideChildrenInMenu: true,
},
children: [
{
path: 'index',
name: 'testPlanIndex',
component: () => import('@/views/test-plan/index.vue'),
meta: {
roles: ['*'],
},
},
],
};
export default TestPlan;

View File

@ -0,0 +1,28 @@
import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';
import menuEnum from '@/enums/menuEnum';
const UiTest: AppRouteRecordRaw = {
path: '/ui-test',
name: menuEnum.UITEST,
redirect: '/ui-test/index',
component: DEFAULT_LAYOUT,
meta: {
locale: 'menu.uiTest',
icon: 'icon_ui-test-filled',
order: 5,
hideChildrenInMenu: true,
},
children: [
{
path: 'index',
name: 'UiTestIndex',
component: () => import('@/views/ui-test/index.vue'),
meta: {
roles: ['*'],
},
},
],
};
export default UiTest;

View File

@ -0,0 +1,28 @@
import { DEFAULT_LAYOUT } from '../base';
import { AppRouteRecordRaw } from '../types';
import menuEnum from '@/enums/menuEnum';
const WorkPlace: AppRouteRecordRaw = {
path: '/workplace',
name: menuEnum.WORKPLACE,
redirect: '/workplace/index',
component: DEFAULT_LAYOUT,
meta: {
locale: 'menu.workplace',
icon: 'icon_pc_filled',
order: 0,
hideChildrenInMenu: true,
},
children: [
{
path: 'index',
name: 'WorkPlaceIndex',
component: () => import('@/views/workplace/index.vue'),
meta: {
roles: ['*'],
},
},
],
};
export default WorkPlace;

View File

@ -0,0 +1,3 @@
<template> loding... </template>
<script setup></script>

View File

@ -0,0 +1,3 @@
<template> Loading ... </template>
<script></script>

View File

@ -2,7 +2,7 @@
<div class="login-form flex flex-col items-center">
<div class="title">
<div class="mt-40 flex justify-center">
<svg-icon :width="'290px'" :height="'60px'" :name="'login-logo'" />
<svg-icon width="290px" height="60px" name="login-logo" />
</div>
<div class="title-0 flex justify-center">
<span class="title-welcome">{{ $t('login.form.title') }}</span>
@ -112,7 +112,7 @@
const { redirect, ...othersQuery } = router.currentRoute.value.query;
setLoginExpires();
router.push({
name: (redirect as string) || 'apiTest',
name: (redirect as string) || 'setting',
query: {
...othersQuery,
},

View File

@ -0,0 +1,3 @@
<template> Loading ... </template>
<script></script>

View File

@ -0,0 +1,3 @@
<template> Loading ... </template>
<script></script>

View File

@ -0,0 +1,3 @@
<template> Loading ... </template>
<script></script>

View File

@ -0,0 +1,3 @@
<template> Loading ... </template>
<script></script>

View File

@ -0,0 +1,3 @@
<template> Loading ... </template>
<script></script>