feat: 普通用户静态路由定义
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
const viewEn: any = {
|
||||||
|
"view.endpoint": "endpoint",
|
||||||
|
"view.endpoint_access": "current",
|
||||||
|
"view.endpoint_records": "Historical",
|
||||||
|
"view.billing": "Billing",
|
||||||
|
"view.billing_histories": "Historical",
|
||||||
|
"view.set-meal": "Set Meal",
|
||||||
|
};
|
||||||
|
|
||||||
const local: any = {
|
const local: any = {
|
||||||
system: {
|
system: {
|
||||||
title: 'WANFi Platform'
|
title: 'WANFi Platform'
|
||||||
@@ -522,7 +531,8 @@ const local: any = {
|
|||||||
expand: 'Expand Menu',
|
expand: 'Expand Menu',
|
||||||
pin: 'Pin',
|
pin: 'Pin',
|
||||||
unpin: 'Unpin'
|
unpin: 'Unpin'
|
||||||
}
|
},
|
||||||
|
...viewEn
|
||||||
};
|
};
|
||||||
|
|
||||||
export default local;
|
export default local;
|
||||||
|
|||||||
@@ -1,3 +1,12 @@
|
|||||||
|
const viewZh: any = {
|
||||||
|
"view.endpoint": "终端设备",
|
||||||
|
"view.endpoint_access": "当前设备",
|
||||||
|
"view.endpoint_records": "历史设备",
|
||||||
|
"view.billing": "账单",
|
||||||
|
"view.billing_histories": "历史查询",
|
||||||
|
"view.set-meal": "套餐",
|
||||||
|
};
|
||||||
|
|
||||||
const local:any = {
|
const local:any = {
|
||||||
system: {
|
system: {
|
||||||
title: 'WANFi 平台',
|
title: 'WANFi 平台',
|
||||||
@@ -522,7 +531,8 @@ const local:any = {
|
|||||||
expand: '展开菜单',
|
expand: '展开菜单',
|
||||||
pin: '固定',
|
pin: '固定',
|
||||||
unpin: '取消固定'
|
unpin: '取消固定'
|
||||||
}
|
},
|
||||||
|
...viewZh
|
||||||
};
|
};
|
||||||
|
|
||||||
export default local;
|
export default local;
|
||||||
|
|||||||
@@ -212,3 +212,77 @@ export const generatedRoutes: GeneratedRoute[] = [
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
/**自定义静态菜单 */
|
||||||
|
export const customRoutes: GeneratedRoute[] = [
|
||||||
|
{
|
||||||
|
name: 'endpoint',
|
||||||
|
path: '/endpoint',
|
||||||
|
component: 'layout.base',
|
||||||
|
meta: {
|
||||||
|
title: '终端设备',
|
||||||
|
i18nKey: 'view.endpoint',
|
||||||
|
icon: 'icon-park-outline:all-application',
|
||||||
|
order: 11,
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: 'endpoint_access',
|
||||||
|
path: '/endpoint/access',
|
||||||
|
component: 'view.endpoint_access',
|
||||||
|
meta: {
|
||||||
|
title: '当前',
|
||||||
|
i18nKey: 'view.endpoint_access',
|
||||||
|
icon: 'material-symbols:filter-list-off',
|
||||||
|
order: 1
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'endpoint_records',
|
||||||
|
path: '/endpoint/records',
|
||||||
|
component: 'view.endpoint_records',
|
||||||
|
meta: {
|
||||||
|
title: '历史',
|
||||||
|
i18nKey: 'view.endpoint_records',
|
||||||
|
icon: 'ic:round-supervisor-account',
|
||||||
|
order: 3,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'billing',
|
||||||
|
path: '/billing',
|
||||||
|
component: 'layout.base',
|
||||||
|
meta: {
|
||||||
|
title: '账单',
|
||||||
|
i18nKey: 'view.billing',
|
||||||
|
icon: 'icon-park-outline:all-application',
|
||||||
|
order: 13,
|
||||||
|
},
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
name: 'billing_histories',
|
||||||
|
path: '/billing/histories',
|
||||||
|
component: 'view.billing_histories',
|
||||||
|
meta: {
|
||||||
|
title: '历史查询',
|
||||||
|
i18nKey: 'view.billing_histories',
|
||||||
|
icon: 'material-symbols:filter-list-off',
|
||||||
|
order: 2
|
||||||
|
},
|
||||||
|
},
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: 'set-meal',
|
||||||
|
path: '/set-meal',
|
||||||
|
component: 'layout.base$view.set-meal',
|
||||||
|
meta: {
|
||||||
|
title: '套餐',
|
||||||
|
i18nKey: 'view.set-meal',
|
||||||
|
icon: 'icon-park-outline:all-application',
|
||||||
|
order: 15,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import type {ElegantConstRoute} from '@elegant-router/types';
|
import type {ElegantConstRoute} from '@elegant-router/types';
|
||||||
import {generatedRoutes} from '../elegant/routes';
|
import {customRoutes, generatedRoutes} from '../elegant/routes';
|
||||||
import {transformElegantRoutesToVueRoutes} from '../elegant/transform';
|
import {transformElegantRoutesToVueRoutes} from '../elegant/transform';
|
||||||
|
|
||||||
/** create routes when the auth route mode is static */
|
/** create routes when the auth route mode is static */
|
||||||
@@ -8,7 +8,7 @@ export function createStaticRoutes() {
|
|||||||
|
|
||||||
const authRoutes: any[] = [];
|
const authRoutes: any[] = [];
|
||||||
|
|
||||||
generatedRoutes.forEach(item => {
|
[...generatedRoutes, ...customRoutes].forEach(item => {
|
||||||
if (item.meta?.constant) {
|
if (item.meta?.constant) {
|
||||||
constantRoutes.push(item);
|
constantRoutes.push(item);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
403
src/typings/app.d.ts
vendored
403
src/typings/app.d.ts
vendored
@@ -243,408 +243,7 @@ declare namespace App {
|
|||||||
};
|
};
|
||||||
|
|
||||||
type Schema = {
|
type Schema = {
|
||||||
system: {
|
[key: string]: string;
|
||||||
title: string;
|
|
||||||
};
|
|
||||||
common: {
|
|
||||||
action: string;
|
|
||||||
add: string;
|
|
||||||
addSuccess: string;
|
|
||||||
backToHome: string;
|
|
||||||
batchDelete: string;
|
|
||||||
cancel: string;
|
|
||||||
close: string;
|
|
||||||
check: string;
|
|
||||||
columnSetting: string;
|
|
||||||
config: string;
|
|
||||||
confirm: string;
|
|
||||||
delete: string;
|
|
||||||
deleteSuccess: string;
|
|
||||||
confirmDelete: string;
|
|
||||||
edit: string;
|
|
||||||
index: string;
|
|
||||||
keywordSearch: string;
|
|
||||||
logout: string;
|
|
||||||
logoutConfirm: string;
|
|
||||||
lookForward: string;
|
|
||||||
modify: string;
|
|
||||||
modifySuccess: string;
|
|
||||||
noData: string;
|
|
||||||
operate: string;
|
|
||||||
pleaseCheckValue: string;
|
|
||||||
refresh: string;
|
|
||||||
reset: string;
|
|
||||||
search: string;
|
|
||||||
switch: string;
|
|
||||||
tip: string;
|
|
||||||
trigger: string;
|
|
||||||
update: string;
|
|
||||||
updateSuccess: string;
|
|
||||||
userCenter: string;
|
|
||||||
yesOrNo: {
|
|
||||||
yes: string;
|
|
||||||
no: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
request: {
|
|
||||||
logout: string;
|
|
||||||
logoutMsg: string;
|
|
||||||
logoutWithModal: string;
|
|
||||||
logoutWithModalMsg: string;
|
|
||||||
refreshToken: string;
|
|
||||||
tokenExpired: string;
|
|
||||||
};
|
|
||||||
theme: {
|
|
||||||
themeSchema: { title: string } & Record<UnionKey.ThemeScheme, string>;
|
|
||||||
layoutMode: { title: string } & Record<UnionKey.ThemeLayoutMode, string>;
|
|
||||||
themeColor: {
|
|
||||||
title: string;
|
|
||||||
followPrimary: string;
|
|
||||||
} & Theme.ThemeColor;
|
|
||||||
scrollMode: { title: string } & Record<UnionKey.ThemeScrollMode, string>;
|
|
||||||
page: {
|
|
||||||
animate: string;
|
|
||||||
mode: { title: string } & Record<UnionKey.ThemePageAnimateMode, string>;
|
|
||||||
};
|
|
||||||
fixedHeaderAndTab: string;
|
|
||||||
header: {
|
|
||||||
height: string;
|
|
||||||
breadcrumb: {
|
|
||||||
visible: string;
|
|
||||||
showIcon: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
tab: {
|
|
||||||
visible: string;
|
|
||||||
cache: string;
|
|
||||||
height: string;
|
|
||||||
mode: { title: string } & Record<UnionKey.ThemeTabMode, string>;
|
|
||||||
};
|
|
||||||
sider: {
|
|
||||||
inverted: string;
|
|
||||||
width: string;
|
|
||||||
collapsedWidth: string;
|
|
||||||
mixWidth: string;
|
|
||||||
mixCollapsedWidth: string;
|
|
||||||
mixChildMenuWidth: string;
|
|
||||||
};
|
|
||||||
footer: {
|
|
||||||
visible: string;
|
|
||||||
fixed: string;
|
|
||||||
height: string;
|
|
||||||
right: string;
|
|
||||||
};
|
|
||||||
themeDrawerTitle: string;
|
|
||||||
pageFunTitle: string;
|
|
||||||
configOperation: {
|
|
||||||
copyConfig: string;
|
|
||||||
copySuccessMsg: string;
|
|
||||||
resetConfig: string;
|
|
||||||
resetSuccessMsg: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
route: Record<I18nRouteKey, string>;
|
|
||||||
page: {
|
|
||||||
login: {
|
|
||||||
common: {
|
|
||||||
loginOrRegister: string;
|
|
||||||
userNamePlaceholder: string;
|
|
||||||
phonePlaceholder: string;
|
|
||||||
codePlaceholder: string;
|
|
||||||
passwordPlaceholder: string;
|
|
||||||
confirmPasswordPlaceholder: string;
|
|
||||||
codeLogin: string;
|
|
||||||
confirm: string;
|
|
||||||
back: string;
|
|
||||||
validateSuccess: string;
|
|
||||||
loginSuccess: string;
|
|
||||||
registerSuccess: string;
|
|
||||||
welcomeBack: string;
|
|
||||||
checkCode: string;
|
|
||||||
};
|
|
||||||
pwdLogin: {
|
|
||||||
title: string;
|
|
||||||
rememberMe: string;
|
|
||||||
forgetPassword: string;
|
|
||||||
register: string;
|
|
||||||
otherAccountLogin: string;
|
|
||||||
otherLoginMode: string;
|
|
||||||
superAdmin: string;
|
|
||||||
admin: string;
|
|
||||||
user: string;
|
|
||||||
};
|
|
||||||
codeLogin: {
|
|
||||||
title: string;
|
|
||||||
getCode: string;
|
|
||||||
reGetCode: string;
|
|
||||||
sendCodeSuccess: string;
|
|
||||||
imageCodePlaceholder: string;
|
|
||||||
};
|
|
||||||
register: {
|
|
||||||
title: string;
|
|
||||||
agreement: string;
|
|
||||||
protocol: string;
|
|
||||||
policy: string;
|
|
||||||
};
|
|
||||||
resetPwd: {
|
|
||||||
title: string;
|
|
||||||
};
|
|
||||||
bindWeChat: {
|
|
||||||
title: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
about: {
|
|
||||||
title: string;
|
|
||||||
introduction: string;
|
|
||||||
projectInfo: {
|
|
||||||
title: string;
|
|
||||||
version: string;
|
|
||||||
latestBuildTime: string;
|
|
||||||
githubLink: string;
|
|
||||||
previewLink: string;
|
|
||||||
};
|
|
||||||
prdDep: string;
|
|
||||||
devDep: string;
|
|
||||||
};
|
|
||||||
home: {
|
|
||||||
greeting: string;
|
|
||||||
weatherDesc: string;
|
|
||||||
projectCount: string;
|
|
||||||
todo: string;
|
|
||||||
message: string;
|
|
||||||
downloadCount: string;
|
|
||||||
registerCount: string;
|
|
||||||
schedule: string;
|
|
||||||
study: string;
|
|
||||||
work: string;
|
|
||||||
rest: string;
|
|
||||||
entertainment: string;
|
|
||||||
visitCount: string;
|
|
||||||
turnover: string;
|
|
||||||
dealCount: string;
|
|
||||||
projectNews: {
|
|
||||||
title: string;
|
|
||||||
moreNews: string;
|
|
||||||
desc1: string;
|
|
||||||
desc2: string;
|
|
||||||
desc3: string;
|
|
||||||
desc4: string;
|
|
||||||
desc5: string;
|
|
||||||
};
|
|
||||||
creativity: string;
|
|
||||||
};
|
|
||||||
function: {
|
|
||||||
tab: {
|
|
||||||
tabOperate: {
|
|
||||||
title: string;
|
|
||||||
addTab: string;
|
|
||||||
addTabDesc: string;
|
|
||||||
closeTab: string;
|
|
||||||
closeCurrentTab: string;
|
|
||||||
closeAboutTab: string;
|
|
||||||
addMultiTab: string;
|
|
||||||
addMultiTabDesc1: string;
|
|
||||||
addMultiTabDesc2: string;
|
|
||||||
};
|
|
||||||
tabTitle: {
|
|
||||||
title: string;
|
|
||||||
changeTitle: string;
|
|
||||||
change: string;
|
|
||||||
resetTitle: string;
|
|
||||||
reset: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
multiTab: {
|
|
||||||
routeParam: string;
|
|
||||||
backTab: string;
|
|
||||||
};
|
|
||||||
toggleAuth: {
|
|
||||||
toggleAccount: string;
|
|
||||||
authHook: string;
|
|
||||||
superAdminVisible: string;
|
|
||||||
adminVisible: string;
|
|
||||||
adminOrUserVisible: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
manage: {
|
|
||||||
common: {
|
|
||||||
status: {
|
|
||||||
enable: string;
|
|
||||||
disable: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
role: {
|
|
||||||
title: string;
|
|
||||||
roleName: string;
|
|
||||||
roleCode: string;
|
|
||||||
roleStatus: string;
|
|
||||||
roleDesc: string;
|
|
||||||
form: {
|
|
||||||
roleName: string;
|
|
||||||
roleCode: string;
|
|
||||||
roleStatus: string;
|
|
||||||
roleDesc: string;
|
|
||||||
};
|
|
||||||
addRole: string;
|
|
||||||
editRole: string;
|
|
||||||
menuAuth: string;
|
|
||||||
buttonAuth: string;
|
|
||||||
};
|
|
||||||
user: {
|
|
||||||
userName: string;
|
|
||||||
nickName: string;
|
|
||||||
email: string;
|
|
||||||
phonenumber: string;
|
|
||||||
status: string;
|
|
||||||
dept: string;
|
|
||||||
title: string;
|
|
||||||
addUser: string;
|
|
||||||
remark: string;
|
|
||||||
editUser: string;
|
|
||||||
post: string;
|
|
||||||
role: string;
|
|
||||||
password: string;
|
|
||||||
form: {
|
|
||||||
userName: string;
|
|
||||||
email: string;
|
|
||||||
status: string;
|
|
||||||
nickName: string;
|
|
||||||
phonenumber: string;
|
|
||||||
remark: string;
|
|
||||||
password: string;
|
|
||||||
dept: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
menu: {
|
|
||||||
home: string;
|
|
||||||
title: string;
|
|
||||||
id: string;
|
|
||||||
parentId: string;
|
|
||||||
menuType: string;
|
|
||||||
menuName: string;
|
|
||||||
routeName: string;
|
|
||||||
routePath: string;
|
|
||||||
routeParams: string;
|
|
||||||
layout: string;
|
|
||||||
page: string;
|
|
||||||
i18nKey: string;
|
|
||||||
icon: string;
|
|
||||||
localIcon: string;
|
|
||||||
iconTypeTitle: string;
|
|
||||||
order: string;
|
|
||||||
keepAlive: string;
|
|
||||||
href: string;
|
|
||||||
hideInMenu: string;
|
|
||||||
activeMenu: string;
|
|
||||||
multiTab: string;
|
|
||||||
fixedIndexInTab: string;
|
|
||||||
button: string;
|
|
||||||
buttonCode: string;
|
|
||||||
buttonDesc: string;
|
|
||||||
menuStatus: string;
|
|
||||||
form: {
|
|
||||||
home: string;
|
|
||||||
menuType: string;
|
|
||||||
menuName: string;
|
|
||||||
routeName: string;
|
|
||||||
routePath: string;
|
|
||||||
layout: string;
|
|
||||||
page: string;
|
|
||||||
i18nKey: string;
|
|
||||||
icon: string;
|
|
||||||
localIcon: string;
|
|
||||||
order: string;
|
|
||||||
keepAlive: string;
|
|
||||||
href: string;
|
|
||||||
hideInMenu: string;
|
|
||||||
activeMenu: string;
|
|
||||||
multiTab: string;
|
|
||||||
fixedInTab: string;
|
|
||||||
fixedIndexInTab: string;
|
|
||||||
button: string;
|
|
||||||
buttonCode: string;
|
|
||||||
buttonDesc: string;
|
|
||||||
menuStatus: string;
|
|
||||||
};
|
|
||||||
addMenu: string;
|
|
||||||
editMenu: string;
|
|
||||||
addChildMenu: string;
|
|
||||||
type: {
|
|
||||||
directory: string;
|
|
||||||
menu: string;
|
|
||||||
};
|
|
||||||
iconType: {
|
|
||||||
iconify: string;
|
|
||||||
local: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
dept: {
|
|
||||||
deptName: string;
|
|
||||||
leader: string;
|
|
||||||
status: string;
|
|
||||||
form: {
|
|
||||||
deptName: string;
|
|
||||||
leader: string;
|
|
||||||
status: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
post: {
|
|
||||||
addPost: string;
|
|
||||||
editPost: string;
|
|
||||||
postName: string;
|
|
||||||
postCode: string;
|
|
||||||
postSort: string;
|
|
||||||
status: string;
|
|
||||||
remark: string;
|
|
||||||
title: string;
|
|
||||||
form: {
|
|
||||||
postName: string;
|
|
||||||
postCode: string;
|
|
||||||
postSort: string;
|
|
||||||
remark: string;
|
|
||||||
status: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
dict: {
|
|
||||||
title: string;
|
|
||||||
dictName: string;
|
|
||||||
dictType: string;
|
|
||||||
status: string;
|
|
||||||
remark: string;
|
|
||||||
form: {
|
|
||||||
dictName: string;
|
|
||||||
dictType: string;
|
|
||||||
status: string;
|
|
||||||
remark: string;
|
|
||||||
};
|
|
||||||
addDict: string;
|
|
||||||
editDict: string;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
form: {
|
|
||||||
required: string;
|
|
||||||
username: FormMsg;
|
|
||||||
phone: FormMsg;
|
|
||||||
pwd: FormMsg;
|
|
||||||
confirmPwd: FormMsg;
|
|
||||||
code: FormMsg;
|
|
||||||
email: FormMsg;
|
|
||||||
};
|
|
||||||
dropdown: Record<Global.DropdownKey, string>;
|
|
||||||
icon: {
|
|
||||||
themeConfig: string;
|
|
||||||
themeSchema: string;
|
|
||||||
lang: string;
|
|
||||||
fullscreen: string;
|
|
||||||
fullscreenExit: string;
|
|
||||||
reload: string;
|
|
||||||
collapse: string;
|
|
||||||
expand: string;
|
|
||||||
pin: string;
|
|
||||||
unpin: string;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
type GetI18nKey<T extends Record<string, unknown>, K extends keyof T = keyof T> = K extends string
|
type GetI18nKey<T extends Record<string, unknown>, K extends keyof T = keyof T> = K extends string
|
||||||
|
|||||||
7
src/views/set-meal/index.vue
Normal file
7
src/views/set-meal/index.vue
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
<script setup lang="ts"></script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div>套餐</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<style scoped></style>
|
||||||
Reference in New Issue
Block a user