refactor(路由模块): 路由取消i8n判断
This commit is contained in:
parent
882ba89113
commit
d298aea3fb
@ -106,7 +106,7 @@
|
|||||||
key={element?.name}
|
key={element?.name}
|
||||||
v-slots={{
|
v-slots={{
|
||||||
icon,
|
icon,
|
||||||
title: () => h(compile(t(element?.meta?.locale || ''))),
|
title: () => h(compile(`${element?.meta?.locale}`)),
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{travel(element?.children, [])}
|
{travel(element?.children, [])}
|
||||||
|
@ -6,7 +6,7 @@ const DASHBOARD: AppRouteRecordRaw = {
|
|||||||
name: 'dashboard',
|
name: 'dashboard',
|
||||||
component: DEFAULT_LAYOUT,
|
component: DEFAULT_LAYOUT,
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.dashboard',
|
locale: '首页',
|
||||||
title: '首页',
|
title: '首页',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
icon: 'icon-dashboard', // 设置图标
|
icon: 'icon-dashboard', // 设置图标
|
||||||
@ -19,7 +19,7 @@ const DASHBOARD: AppRouteRecordRaw = {
|
|||||||
name: 'Workplace',
|
name: 'Workplace',
|
||||||
component: () => import('@/views/dashboard/workplace/index.vue'),
|
component: () => import('@/views/dashboard/workplace/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale:'menu.dashboard.workplace',
|
locale:'工作台',
|
||||||
title: '工作台',
|
title: '工作台',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
permissions: ['dashboard:workplace'],
|
permissions: ['dashboard:workplace'],
|
||||||
|
@ -6,7 +6,7 @@ const IOT: AppRouteRecordRaw = {
|
|||||||
name: 'iot',
|
name: 'iot',
|
||||||
component: DEFAULT_LAYOUT,
|
component: DEFAULT_LAYOUT,
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.iot',
|
locale: '物联网管理',
|
||||||
title: '物联网管理',
|
title: '物联网管理',
|
||||||
icon: 'icon-empty',
|
icon: 'icon-empty',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
@ -19,7 +19,7 @@ const IOT: AppRouteRecordRaw = {
|
|||||||
name: 'Product',
|
name: 'Product',
|
||||||
component: () => import('@/views/iot/product/index.vue'),
|
component: () => import('@/views/iot/product/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.system.product',
|
locale: '产品管理',
|
||||||
title: '产品管理',
|
title: '产品管理',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
permissions: ['iot:product'],
|
permissions: ['iot:product'],
|
||||||
@ -30,7 +30,7 @@ const IOT: AppRouteRecordRaw = {
|
|||||||
name: 'Device',
|
name: 'Device',
|
||||||
component: () => import('@/views/iot/device/index.vue'),
|
component: () => import('@/views/iot/device/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.system.device',
|
locale: '设备管理',
|
||||||
title: '设备管理',
|
title: '设备管理',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
permissions: ['iot:device'],
|
permissions: ['iot:device'],
|
||||||
@ -41,7 +41,7 @@ const IOT: AppRouteRecordRaw = {
|
|||||||
name: 'productDetail',
|
name: 'productDetail',
|
||||||
component: () => import('@/views/iot/product/components/product-detail.vue'),
|
component: () => import('@/views/iot/product/components/product-detail.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale:'menu.system.product',
|
locale:'产品详情',
|
||||||
title: '产品详情',
|
title: '产品详情',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
showInMenu: false,
|
showInMenu: false,
|
||||||
@ -53,7 +53,7 @@ const IOT: AppRouteRecordRaw = {
|
|||||||
name: 'deviceDetail',
|
name: 'deviceDetail',
|
||||||
component: () => import('@/views/iot/device/components/device-detail.vue'),
|
component: () => import('@/views/iot/device/components/device-detail.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.system.deviceDetail',
|
locale: '设备详情',
|
||||||
title: '设备详情',
|
title: '设备详情',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
showInMenu: false,
|
showInMenu: false,
|
||||||
@ -65,7 +65,7 @@ const IOT: AppRouteRecordRaw = {
|
|||||||
name: 'productTsl',
|
name: 'productTsl',
|
||||||
component: () => import('@/views/iot/product/components/product-tsl.vue'),
|
component: () => import('@/views/iot/product/components/product-tsl.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.system.productTsl',
|
locale: '物模型',
|
||||||
title: '物模型',
|
title: '物模型',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
showInMenu: false,
|
showInMenu: false,
|
||||||
|
@ -6,7 +6,7 @@ const SYSTEM: AppRouteRecordRaw = {
|
|||||||
name: 'system',
|
name: 'system',
|
||||||
component: DEFAULT_LAYOUT,
|
component: DEFAULT_LAYOUT,
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.system',
|
locale: '系统管理',
|
||||||
icon: 'icon-computer',
|
icon: 'icon-computer',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
order: 2,
|
order: 2,
|
||||||
@ -28,6 +28,7 @@ const SYSTEM: AppRouteRecordRaw = {
|
|||||||
name: 'Role',
|
name: 'Role',
|
||||||
component: () => import('@/views/system/role/index.vue'),
|
component: () => import('@/views/system/role/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
|
locale: '角色管理',
|
||||||
title: '角色管理',
|
title: '角色管理',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
permissions: ['system:role'],
|
permissions: ['system:role'],
|
||||||
@ -38,6 +39,7 @@ const SYSTEM: AppRouteRecordRaw = {
|
|||||||
name: 'Dept',
|
name: 'Dept',
|
||||||
component: () => import('@/views/system/dept/index.vue'),
|
component: () => import('@/views/system/dept/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
|
locale: '部门管理',
|
||||||
title: '部门管理',
|
title: '部门管理',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
permissions: ['system:dept'],
|
permissions: ['system:dept'],
|
||||||
@ -48,6 +50,7 @@ const SYSTEM: AppRouteRecordRaw = {
|
|||||||
name: 'User',
|
name: 'User',
|
||||||
component: () => import('@/views/system/user/index.vue'),
|
component: () => import('@/views/system/user/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
|
locale: '用户管理',
|
||||||
title: '用户管理',
|
title: '用户管理',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
permissions: ['system:user'],
|
permissions: ['system:user'],
|
||||||
@ -58,6 +61,7 @@ const SYSTEM: AppRouteRecordRaw = {
|
|||||||
name: 'Authority',
|
name: 'Authority',
|
||||||
component: () => import('@/views/system/authority/index.vue'),
|
component: () => import('@/views/system/authority/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
|
locale: '权限管理',
|
||||||
title: '权限管理',
|
title: '权限管理',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
permissions: ['system:authority'],
|
permissions: ['system:authority'],
|
||||||
|
@ -6,7 +6,7 @@ const USER: AppRouteRecordRaw = {
|
|||||||
name: 'Self',
|
name: 'Self',
|
||||||
component: DEFAULT_LAYOUT,
|
component: DEFAULT_LAYOUT,
|
||||||
meta: {
|
meta: {
|
||||||
locale: 'menu.user',
|
locale: '个人中心',
|
||||||
icon: 'icon-user',
|
icon: 'icon-user',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
order: 3,
|
order: 3,
|
||||||
@ -27,6 +27,7 @@ const USER: AppRouteRecordRaw = {
|
|||||||
name: 'Setting',
|
name: 'Setting',
|
||||||
component: () => import('@/views/user/setting/index.vue'),
|
component: () => import('@/views/user/setting/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
|
locale: '个人设置',
|
||||||
title: '个人设置',
|
title: '个人设置',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
permissions: ['*'],
|
permissions: ['*'],
|
||||||
@ -37,6 +38,7 @@ const USER: AppRouteRecordRaw = {
|
|||||||
name: 'Bulletins',
|
name: 'Bulletins',
|
||||||
component: () => import('@/views/user/bulletins/index.vue'),
|
component: () => import('@/views/user/bulletins/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
|
locale: '公告通知',
|
||||||
title: '公告通知',
|
title: '公告通知',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
permissions: ['*'],
|
permissions: ['*'],
|
||||||
@ -47,6 +49,7 @@ const USER: AppRouteRecordRaw = {
|
|||||||
name: 'Messages',
|
name: 'Messages',
|
||||||
component: () => import('@/views/user/messages/index.vue'),
|
component: () => import('@/views/user/messages/index.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
|
locale: '消息通知',
|
||||||
title: '消息通知',
|
title: '消息通知',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
permissions: ['*'],
|
permissions: ['*'],
|
||||||
@ -57,6 +60,7 @@ const USER: AppRouteRecordRaw = {
|
|||||||
name: 'Details',
|
name: 'Details',
|
||||||
component: () => import('@/views/user/bulletins/components/detail.vue'),
|
component: () => import('@/views/user/bulletins/components/detail.vue'),
|
||||||
meta: {
|
meta: {
|
||||||
|
locale: '公告详情',
|
||||||
title: '公告详情',
|
title: '公告详情',
|
||||||
requiresAuth: true,
|
requiresAuth: true,
|
||||||
showInMenu: false,
|
showInMenu: false,
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
/>
|
/>
|
||||||
</a-avatar>
|
</a-avatar>
|
||||||
<a-statistic
|
<a-statistic
|
||||||
:title="$t('workplace.notAudit')"
|
title="未审计"
|
||||||
:value="formData.notAudit || 0"
|
:value="formData.notAudit || 0"
|
||||||
:value-from="0"
|
:value-from="0"
|
||||||
show-group-separator
|
show-group-separator
|
||||||
@ -85,7 +85,7 @@
|
|||||||
</a-avatar>
|
</a-avatar>
|
||||||
<a-statistic
|
<a-statistic
|
||||||
v-model="formData.notFiled"
|
v-model="formData.notFiled"
|
||||||
:title="$t('workplace.notFiled')"
|
title="未归档"
|
||||||
:value="formData.notFiled || 0"
|
:value="formData.notFiled || 0"
|
||||||
:value-from="0"
|
:value-from="0"
|
||||||
show-group-separator
|
show-group-separator
|
||||||
|
Loading…
Reference in New Issue
Block a user