Merge 496e6a2eef
into 6a7019ec1a
commit
cd211bfa9b
|
@ -10,16 +10,10 @@ declare module '@vue/runtime-core' {
|
||||||
Countup: typeof import('./src/components/countup.vue')['default']
|
Countup: typeof import('./src/components/countup.vue')['default']
|
||||||
ElAvatar: typeof import('element-plus/es')['ElAvatar']
|
ElAvatar: typeof import('element-plus/es')['ElAvatar']
|
||||||
ElButton: typeof import('element-plus/es')['ElButton']
|
ElButton: typeof import('element-plus/es')['ElButton']
|
||||||
ElCalendar: typeof import('element-plus/es')['ElCalendar']
|
|
||||||
ElCard: typeof import('element-plus/es')['ElCard']
|
ElCard: typeof import('element-plus/es')['ElCard']
|
||||||
ElCarousel: typeof import('element-plus/es')['ElCarousel']
|
|
||||||
ElCarouselItem: typeof import('element-plus/es')['ElCarouselItem']
|
|
||||||
ElCascader: typeof import('element-plus/es')['ElCascader']
|
ElCascader: typeof import('element-plus/es')['ElCascader']
|
||||||
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
|
||||||
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
|
|
||||||
ElCol: typeof import('element-plus/es')['ElCol']
|
ElCol: typeof import('element-plus/es')['ElCol']
|
||||||
ElColorPicker: typeof import('element-plus/es')['ElColorPicker']
|
|
||||||
ElCountdown: typeof import('element-plus/es')['ElCountdown']
|
|
||||||
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
ElDatePicker: typeof import('element-plus/es')['ElDatePicker']
|
||||||
ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
|
ElDescriptions: typeof import('element-plus/es')['ElDescriptions']
|
||||||
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
|
ElDescriptionsItem: typeof import('element-plus/es')['ElDescriptionsItem']
|
||||||
|
@ -31,7 +25,6 @@ declare module '@vue/runtime-core' {
|
||||||
ElForm: typeof import('element-plus/es')['ElForm']
|
ElForm: typeof import('element-plus/es')['ElForm']
|
||||||
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
ElFormItem: typeof import('element-plus/es')['ElFormItem']
|
||||||
ElIcon: typeof import('element-plus/es')['ElIcon']
|
ElIcon: typeof import('element-plus/es')['ElIcon']
|
||||||
ElImage: typeof import('element-plus/es')['ElImage']
|
|
||||||
ElInput: typeof import('element-plus/es')['ElInput']
|
ElInput: typeof import('element-plus/es')['ElInput']
|
||||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||||
ElLink: typeof import('element-plus/es')['ElLink']
|
ElLink: typeof import('element-plus/es')['ElLink']
|
||||||
|
@ -43,15 +36,8 @@ declare module '@vue/runtime-core' {
|
||||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||||
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
||||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||||
ElRate: typeof import('element-plus/es')['ElRate']
|
|
||||||
ElResult: typeof import('element-plus/es')['ElResult']
|
|
||||||
ElRow: typeof import('element-plus/es')['ElRow']
|
ElRow: typeof import('element-plus/es')['ElRow']
|
||||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||||
ElSlider: typeof import('element-plus/es')['ElSlider']
|
|
||||||
ElSpace: typeof import('element-plus/es')['ElSpace']
|
|
||||||
ElStatistic: typeof import('element-plus/es')['ElStatistic']
|
|
||||||
ElStep: typeof import('element-plus/es')['ElStep']
|
|
||||||
ElSteps: typeof import('element-plus/es')['ElSteps']
|
|
||||||
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
|
||||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||||
ElTable: typeof import('element-plus/es')['ElTable']
|
ElTable: typeof import('element-plus/es')['ElTable']
|
||||||
|
@ -61,13 +47,8 @@ declare module '@vue/runtime-core' {
|
||||||
ElTag: typeof import('element-plus/es')['ElTag']
|
ElTag: typeof import('element-plus/es')['ElTag']
|
||||||
ElTimeline: typeof import('element-plus/es')['ElTimeline']
|
ElTimeline: typeof import('element-plus/es')['ElTimeline']
|
||||||
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
|
ElTimelineItem: typeof import('element-plus/es')['ElTimelineItem']
|
||||||
ElTimePicker: typeof import('element-plus/es')['ElTimePicker']
|
|
||||||
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
ElTooltip: typeof import('element-plus/es')['ElTooltip']
|
||||||
ElTour: typeof import('element-plus/es')['ElTour']
|
|
||||||
ElTourStep: typeof import('element-plus/es')['ElTourStep']
|
|
||||||
ElTransfer: typeof import('element-plus/es')['ElTransfer']
|
|
||||||
ElUpload: typeof import('element-plus/es')['ElUpload']
|
ElUpload: typeof import('element-plus/es')['ElUpload']
|
||||||
ElWatermark: typeof import('element-plus/es')['ElWatermark']
|
|
||||||
Header: typeof import('./src/components/header.vue')['default']
|
Header: typeof import('./src/components/header.vue')['default']
|
||||||
RouterLink: typeof import('vue-router')['RouterLink']
|
RouterLink: typeof import('vue-router')['RouterLink']
|
||||||
RouterView: typeof import('vue-router')['RouterView']
|
RouterView: typeof import('vue-router')['RouterView']
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -12,6 +12,7 @@
|
||||||
<Fold />
|
<Fold />
|
||||||
</el-icon>
|
</el-icon>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="analysis-page" @click="handleAnalysisPage">订单分析页面</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-right">
|
<div class="header-right">
|
||||||
<div class="header-user-con">
|
<div class="header-user-con">
|
||||||
|
@ -94,6 +95,10 @@ const handleCommand = (command: string) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleAnalysisPage = () => {
|
||||||
|
router.push('/analysis');
|
||||||
|
};
|
||||||
|
|
||||||
const setFullScreen = () => {
|
const setFullScreen = () => {
|
||||||
if (document.fullscreenElement) {
|
if (document.fullscreenElement) {
|
||||||
document.exitFullscreen();
|
document.exitFullscreen();
|
||||||
|
@ -176,6 +181,15 @@ const setFullScreen = () => {
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#analysis-page {
|
||||||
|
margin-left: 20px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
#analysis-page:hover {
|
||||||
|
color: rgb(190, 190, 255);
|
||||||
|
}
|
||||||
|
|
||||||
.btn-bell-badge {
|
.btn-bell-badge {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 4px;
|
right: 4px;
|
||||||
|
|
|
@ -1,293 +1,362 @@
|
||||||
import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router';
|
import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
|
||||||
import { usePermissStore } from '../store/permiss';
|
import { usePermissStore } from "../store/permiss";
|
||||||
import Home from '../views/home.vue';
|
import Home from "../views/home.vue";
|
||||||
import NProgress from 'nprogress';
|
import NProgress from "nprogress";
|
||||||
import 'nprogress/nprogress.css';
|
import "nprogress/nprogress.css";
|
||||||
|
import { pa } from "element-plus/es/locale";
|
||||||
|
|
||||||
const routes: RouteRecordRaw[] = [
|
const routes: RouteRecordRaw[] = [
|
||||||
{
|
{
|
||||||
path: '/',
|
path: "/",
|
||||||
redirect: '/dashboard',
|
redirect: "/dashboard",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: '/',
|
path: "/",
|
||||||
name: 'Home',
|
name: "Home",
|
||||||
component: Home,
|
component: Home,
|
||||||
children: [
|
children: [
|
||||||
{
|
{
|
||||||
path: '/dashboard',
|
path: "/dashboard",
|
||||||
name: 'dashboard',
|
name: "dashboard",
|
||||||
meta: {
|
meta: {
|
||||||
title: '系统首页',
|
title: "系统首页",
|
||||||
noAuth: true,
|
noAuth: true,
|
||||||
},
|
},
|
||||||
component: () => import(/* webpackChunkName: "dashboard" */ '../views/dashboard.vue'),
|
component: () =>
|
||||||
},
|
import(/* webpackChunkName: "dashboard" */ "../views/dashboard.vue"),
|
||||||
{
|
},
|
||||||
path: '/system-user',
|
{
|
||||||
name: 'system-user',
|
path: "/system-user",
|
||||||
meta: {
|
name: "system-user",
|
||||||
title: '用户管理',
|
meta: {
|
||||||
permiss: '11',
|
title: "用户管理",
|
||||||
},
|
permiss: "11",
|
||||||
component: () => import(/* webpackChunkName: "system-user" */ '../views/system/user.vue'),
|
},
|
||||||
},
|
component: () =>
|
||||||
{
|
import(
|
||||||
path: '/system-role',
|
/* webpackChunkName: "system-user" */ "../views/system/user.vue"
|
||||||
name: 'system-role',
|
),
|
||||||
meta: {
|
},
|
||||||
title: '角色管理',
|
{
|
||||||
permiss: '12',
|
path: "/system-role",
|
||||||
},
|
name: "system-role",
|
||||||
component: () => import(/* webpackChunkName: "system-role" */ '../views/system/role.vue'),
|
meta: {
|
||||||
},
|
title: "角色管理",
|
||||||
{
|
permiss: "12",
|
||||||
path: '/system-menu',
|
},
|
||||||
name: 'system-menu',
|
component: () =>
|
||||||
meta: {
|
import(
|
||||||
title: '菜单管理',
|
/* webpackChunkName: "system-role" */ "../views/system/role.vue"
|
||||||
permiss: '13',
|
),
|
||||||
},
|
},
|
||||||
component: () => import(/* webpackChunkName: "system-menu" */ '../views/system/menu.vue'),
|
{
|
||||||
},
|
path: "/system-menu",
|
||||||
{
|
name: "system-menu",
|
||||||
path: '/table',
|
meta: {
|
||||||
name: 'basetable',
|
title: "菜单管理",
|
||||||
meta: {
|
permiss: "13",
|
||||||
title: '基础表格',
|
},
|
||||||
permiss: '31',
|
component: () =>
|
||||||
},
|
import(
|
||||||
component: () => import(/* webpackChunkName: "table" */ '../views/table/basetable.vue'),
|
/* webpackChunkName: "system-menu" */ "../views/system/menu.vue"
|
||||||
},
|
),
|
||||||
{
|
},
|
||||||
path: '/table-editor',
|
{
|
||||||
name: 'table-editor',
|
path: "/table",
|
||||||
meta: {
|
name: "basetable",
|
||||||
title: '可编辑表格',
|
meta: {
|
||||||
permiss: '32',
|
title: "基础表格",
|
||||||
},
|
permiss: "31",
|
||||||
component: () => import(/* webpackChunkName: "table-editor" */ '../views/table/table-editor.vue'),
|
},
|
||||||
},
|
component: () =>
|
||||||
{
|
import(
|
||||||
path: '/schart',
|
/* webpackChunkName: "table" */ "../views/table/basetable.vue"
|
||||||
name: 'schart',
|
),
|
||||||
meta: {
|
},
|
||||||
title: 'schart图表',
|
{
|
||||||
permiss: '41',
|
path: "/table-editor",
|
||||||
},
|
name: "table-editor",
|
||||||
component: () => import(/* webpackChunkName: "schart" */ '../views/chart/schart.vue'),
|
meta: {
|
||||||
},
|
title: "可编辑表格",
|
||||||
{
|
permiss: "32",
|
||||||
path: '/echarts',
|
},
|
||||||
name: 'echarts',
|
component: () =>
|
||||||
meta: {
|
import(
|
||||||
title: 'echarts图表',
|
/* webpackChunkName: "table-editor" */ "../views/table/table-editor.vue"
|
||||||
permiss: '42',
|
),
|
||||||
},
|
},
|
||||||
component: () => import(/* webpackChunkName: "echarts" */ '../views/chart/echarts.vue'),
|
{
|
||||||
},
|
path: "/schart",
|
||||||
|
name: "schart",
|
||||||
|
meta: {
|
||||||
|
title: "schart图表",
|
||||||
|
permiss: "41",
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "schart" */ "../views/chart/schart.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/echarts",
|
||||||
|
name: "echarts",
|
||||||
|
meta: {
|
||||||
|
title: "echarts图表",
|
||||||
|
permiss: "42",
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "echarts" */ "../views/chart/echarts.vue"
|
||||||
|
),
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
path: '/icon',
|
path: "/icon",
|
||||||
name: 'icon',
|
name: "icon",
|
||||||
meta: {
|
|
||||||
title: '图标',
|
|
||||||
permiss: '5',
|
|
||||||
},
|
|
||||||
component: () => import(/* webpackChunkName: "icon" */ '../views/pages/icon.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/ucenter',
|
|
||||||
name: 'ucenter',
|
|
||||||
meta: {
|
|
||||||
title: '个人中心',
|
|
||||||
},
|
|
||||||
component: () => import(/* webpackChunkName: "ucenter" */ '../views/pages/ucenter.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/editor',
|
|
||||||
name: 'editor',
|
|
||||||
meta: {
|
|
||||||
title: '富文本编辑器',
|
|
||||||
permiss: '291',
|
|
||||||
},
|
|
||||||
component: () => import(/* webpackChunkName: "editor" */ '../views/pages/editor.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/markdown',
|
|
||||||
name: 'markdown',
|
|
||||||
meta: {
|
|
||||||
title: 'markdown编辑器',
|
|
||||||
permiss: '292',
|
|
||||||
},
|
|
||||||
component: () => import(/* webpackChunkName: "markdown" */ '../views/pages/markdown.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/export',
|
|
||||||
name: 'export',
|
|
||||||
meta: {
|
|
||||||
title: '导出Excel',
|
|
||||||
permiss: '34',
|
|
||||||
},
|
|
||||||
component: () => import(/* webpackChunkName: "export" */ '../views/table/export.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/import',
|
|
||||||
name: 'import',
|
|
||||||
meta: {
|
|
||||||
title: '导入Excel',
|
|
||||||
permiss: '33',
|
|
||||||
},
|
|
||||||
component: () => import(/* webpackChunkName: "import" */ '../views/table/import.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/theme',
|
|
||||||
name: 'theme',
|
|
||||||
meta: {
|
|
||||||
title: '主题设置',
|
|
||||||
permiss: '7',
|
|
||||||
},
|
|
||||||
component: () => import(/* webpackChunkName: "theme" */ '../views/pages/theme.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/calendar',
|
|
||||||
name: 'calendar',
|
|
||||||
meta: {
|
|
||||||
title: '日历',
|
|
||||||
permiss: '24',
|
|
||||||
},
|
|
||||||
component: () => import(/* webpackChunkName: "calendar" */ '../views/element/calendar.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/watermark',
|
|
||||||
name: 'watermark',
|
|
||||||
meta: {
|
|
||||||
title: '水印',
|
|
||||||
permiss: '25',
|
|
||||||
},
|
|
||||||
component: () => import(/* webpackChunkName: "watermark" */ '../views/element/watermark.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/carousel',
|
|
||||||
name: 'carousel',
|
|
||||||
meta: {
|
|
||||||
title: '走马灯',
|
|
||||||
permiss: '23',
|
|
||||||
},
|
|
||||||
component: () => import(/* webpackChunkName: "carousel" */ '../views/element/carousel.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/tour',
|
|
||||||
name: 'tour',
|
|
||||||
meta: {
|
|
||||||
title: '分步引导',
|
|
||||||
permiss: '26',
|
|
||||||
},
|
|
||||||
component: () => import(/* webpackChunkName: "tour" */ '../views/element/tour.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/steps',
|
|
||||||
name: 'steps',
|
|
||||||
meta: {
|
|
||||||
title: '步骤条',
|
|
||||||
permiss: '27',
|
|
||||||
},
|
|
||||||
component: () => import(/* webpackChunkName: "steps" */ '../views/element/steps.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/form',
|
|
||||||
name: 'forms',
|
|
||||||
meta: {
|
|
||||||
title: '表单',
|
|
||||||
permiss: '21',
|
|
||||||
},
|
|
||||||
component: () => import(/* webpackChunkName: "form" */ '../views/element/form.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/upload',
|
|
||||||
name: 'upload',
|
|
||||||
meta: {
|
|
||||||
title: '上传',
|
|
||||||
permiss: '22',
|
|
||||||
},
|
|
||||||
component: () => import(/* webpackChunkName: "upload" */ '../views/element/upload.vue'),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/statistic',
|
|
||||||
name: 'statistic',
|
|
||||||
meta: {
|
|
||||||
title: '统计',
|
|
||||||
permiss: '28',
|
|
||||||
},
|
|
||||||
component: () => import(/* webpackChunkName: "statistic" */ '../views/element/statistic.vue'),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/login',
|
|
||||||
meta: {
|
meta: {
|
||||||
title: '登录',
|
title: "图标",
|
||||||
noAuth: true,
|
permiss: "5",
|
||||||
},
|
},
|
||||||
component: () => import(/* webpackChunkName: "login" */ '../views/pages/login.vue'),
|
component: () =>
|
||||||
},
|
import(/* webpackChunkName: "icon" */ "../views/pages/icon.vue"),
|
||||||
{
|
},
|
||||||
path: '/register',
|
{
|
||||||
|
path: "/ucenter",
|
||||||
|
name: "ucenter",
|
||||||
meta: {
|
meta: {
|
||||||
title: '注册',
|
title: "个人中心",
|
||||||
noAuth: true,
|
|
||||||
},
|
},
|
||||||
component: () => import(/* webpackChunkName: "register" */ '../views/pages/register.vue'),
|
component: () =>
|
||||||
},
|
import(
|
||||||
{
|
/* webpackChunkName: "ucenter" */ "../views/pages/ucenter.vue"
|
||||||
path: '/reset-pwd',
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/editor",
|
||||||
|
name: "editor",
|
||||||
meta: {
|
meta: {
|
||||||
title: '重置密码',
|
title: "富文本编辑器",
|
||||||
noAuth: true,
|
permiss: "291",
|
||||||
},
|
},
|
||||||
component: () => import(/* webpackChunkName: "reset-pwd" */ '../views/pages/reset-pwd.vue'),
|
component: () =>
|
||||||
},
|
import(/* webpackChunkName: "editor" */ "../views/pages/editor.vue"),
|
||||||
{
|
},
|
||||||
path: '/403',
|
{
|
||||||
|
path: "/markdown",
|
||||||
|
name: "markdown",
|
||||||
meta: {
|
meta: {
|
||||||
title: '没有权限',
|
title: "markdown编辑器",
|
||||||
noAuth: true,
|
permiss: "292",
|
||||||
},
|
},
|
||||||
component: () => import(/* webpackChunkName: "403" */ '../views/pages/403.vue'),
|
component: () =>
|
||||||
},
|
import(
|
||||||
{
|
/* webpackChunkName: "markdown" */ "../views/pages/markdown.vue"
|
||||||
path: '/404',
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/export",
|
||||||
|
name: "export",
|
||||||
meta: {
|
meta: {
|
||||||
title: '找不到页面',
|
title: "导出Excel",
|
||||||
noAuth: true,
|
permiss: "34",
|
||||||
},
|
},
|
||||||
component: () => import(/* webpackChunkName: "404" */ '../views/pages/404.vue'),
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "export" */ "../views/table/export.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/import",
|
||||||
|
name: "import",
|
||||||
|
meta: {
|
||||||
|
title: "导入Excel",
|
||||||
|
permiss: "33",
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "import" */ "../views/table/import.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/theme",
|
||||||
|
name: "theme",
|
||||||
|
meta: {
|
||||||
|
title: "主题设置",
|
||||||
|
permiss: "7",
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "theme" */ "../views/pages/theme.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/calendar",
|
||||||
|
name: "calendar",
|
||||||
|
meta: {
|
||||||
|
title: "日历",
|
||||||
|
permiss: "24",
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "calendar" */ "../views/element/calendar.vue"
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/watermark",
|
||||||
|
name: "watermark",
|
||||||
|
meta: {
|
||||||
|
title: "水印",
|
||||||
|
permiss: "25",
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "watermark" */ "../views/element/watermark.vue"
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/carousel",
|
||||||
|
name: "carousel",
|
||||||
|
meta: {
|
||||||
|
title: "走马灯",
|
||||||
|
permiss: "23",
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "carousel" */ "../views/element/carousel.vue"
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/tour",
|
||||||
|
name: "tour",
|
||||||
|
meta: {
|
||||||
|
title: "分步引导",
|
||||||
|
permiss: "26",
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "tour" */ "../views/element/tour.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/steps",
|
||||||
|
name: "steps",
|
||||||
|
meta: {
|
||||||
|
title: "步骤条",
|
||||||
|
permiss: "27",
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "steps" */ "../views/element/steps.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/form",
|
||||||
|
name: "forms",
|
||||||
|
meta: {
|
||||||
|
title: "表单",
|
||||||
|
permiss: "21",
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "form" */ "../views/element/form.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/upload",
|
||||||
|
name: "upload",
|
||||||
|
meta: {
|
||||||
|
title: "上传",
|
||||||
|
permiss: "22",
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "upload" */ "../views/element/upload.vue"
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/statistic",
|
||||||
|
name: "statistic",
|
||||||
|
meta: {
|
||||||
|
title: "统计",
|
||||||
|
permiss: "28",
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "statistic" */ "../views/element/statistic.vue"
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/analysis",
|
||||||
|
name: "analysis",
|
||||||
|
meta: {
|
||||||
|
title: "订单分析",
|
||||||
|
permiss: "1",
|
||||||
|
},
|
||||||
|
component: () => import(/* webpackChunkName: "theme" */ "../views/pages/Analysis.vue"),
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/login",
|
||||||
|
meta: {
|
||||||
|
title: "登录",
|
||||||
|
noAuth: true,
|
||||||
},
|
},
|
||||||
{ path: '/:path(.*)', redirect: '/404' },
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "login" */ "../views/pages/login.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/register",
|
||||||
|
meta: {
|
||||||
|
title: "注册",
|
||||||
|
noAuth: true,
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "register" */ "../views/pages/register.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/reset-pwd",
|
||||||
|
meta: {
|
||||||
|
title: "重置密码",
|
||||||
|
noAuth: true,
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import(
|
||||||
|
/* webpackChunkName: "reset-pwd" */ "../views/pages/reset-pwd.vue"
|
||||||
|
),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/403",
|
||||||
|
meta: {
|
||||||
|
title: "没有权限",
|
||||||
|
noAuth: true,
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "403" */ "../views/pages/403.vue"),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path: "/404",
|
||||||
|
meta: {
|
||||||
|
title: "找不到页面",
|
||||||
|
noAuth: true,
|
||||||
|
},
|
||||||
|
component: () =>
|
||||||
|
import(/* webpackChunkName: "404" */ "../views/pages/404.vue"),
|
||||||
|
},
|
||||||
|
{ path: "/:path(.*)", redirect: "/404" },
|
||||||
];
|
];
|
||||||
|
|
||||||
const router = createRouter({
|
const router = createRouter({
|
||||||
history: createWebHashHistory(),
|
history: createWebHashHistory(),
|
||||||
routes,
|
routes,
|
||||||
});
|
});
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
NProgress.start();
|
NProgress.start();
|
||||||
const role = localStorage.getItem('vuems_name');
|
const role = localStorage.getItem("vuems_name");
|
||||||
const permiss = usePermissStore();
|
const permiss = usePermissStore();
|
||||||
|
|
||||||
if (!role && to.meta.noAuth !== true) {
|
if (!role && to.meta.noAuth !== true) {
|
||||||
next('/login');
|
next("/login");
|
||||||
} else if (typeof to.meta.permiss == 'string' && !permiss.key.includes(to.meta.permiss)) {
|
} else if (
|
||||||
// 如果没有权限,则进入403
|
typeof to.meta.permiss == "string" &&
|
||||||
next('/403');
|
!permiss.key.includes(to.meta.permiss)
|
||||||
} else {
|
) {
|
||||||
next();
|
// 如果没有权限,则进入403
|
||||||
}
|
next("/403");
|
||||||
|
} else {
|
||||||
|
next();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
router.afterEach(() => {
|
router.afterEach(() => {
|
||||||
NProgress.done();
|
NProgress.done();
|
||||||
});
|
});
|
||||||
|
|
||||||
export default router;
|
export default router;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue