pull/410/merge
Lycoris 2025-07-05 13:17:31 +08:00 committed by GitHub
commit cd211bfa9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 5963 additions and 1768 deletions

19
components.d.ts vendored
View File

@ -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']

2846
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -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;

View File

@ -1,269 +1,335 @@
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', path: "/system-user",
name: 'system-user', name: "system-user",
meta: { meta: {
title: '用户管理', title: "用户管理",
permiss: '11', permiss: "11",
}, },
component: () => import(/* webpackChunkName: "system-user" */ '../views/system/user.vue'), component: () =>
import(
/* webpackChunkName: "system-user" */ "../views/system/user.vue"
),
}, },
{ {
path: '/system-role', path: "/system-role",
name: 'system-role', name: "system-role",
meta: { meta: {
title: '角色管理', title: "角色管理",
permiss: '12', permiss: "12",
}, },
component: () => import(/* webpackChunkName: "system-role" */ '../views/system/role.vue'), component: () =>
import(
/* webpackChunkName: "system-role" */ "../views/system/role.vue"
),
}, },
{ {
path: '/system-menu', path: "/system-menu",
name: 'system-menu', name: "system-menu",
meta: { meta: {
title: '菜单管理', title: "菜单管理",
permiss: '13', permiss: "13",
}, },
component: () => import(/* webpackChunkName: "system-menu" */ '../views/system/menu.vue'), component: () =>
import(
/* webpackChunkName: "system-menu" */ "../views/system/menu.vue"
),
}, },
{ {
path: '/table', path: "/table",
name: 'basetable', name: "basetable",
meta: { meta: {
title: '基础表格', title: "基础表格",
permiss: '31', permiss: "31",
}, },
component: () => import(/* webpackChunkName: "table" */ '../views/table/basetable.vue'), component: () =>
import(
/* webpackChunkName: "table" */ "../views/table/basetable.vue"
),
}, },
{ {
path: '/table-editor', path: "/table-editor",
name: 'table-editor', name: "table-editor",
meta: { meta: {
title: '可编辑表格', title: "可编辑表格",
permiss: '32', permiss: "32",
}, },
component: () => import(/* webpackChunkName: "table-editor" */ '../views/table/table-editor.vue'), component: () =>
import(
/* webpackChunkName: "table-editor" */ "../views/table/table-editor.vue"
),
}, },
{ {
path: '/schart', path: "/schart",
name: 'schart', name: "schart",
meta: { meta: {
title: 'schart图表', title: "schart图表",
permiss: '41', permiss: "41",
}, },
component: () => import(/* webpackChunkName: "schart" */ '../views/chart/schart.vue'), component: () =>
import(/* webpackChunkName: "schart" */ "../views/chart/schart.vue"),
}, },
{ {
path: '/echarts', path: "/echarts",
name: 'echarts', name: "echarts",
meta: { meta: {
title: 'echarts图表', title: "echarts图表",
permiss: '42', permiss: "42",
}, },
component: () => import(/* webpackChunkName: "echarts" */ '../views/chart/echarts.vue'), component: () =>
import(
/* webpackChunkName: "echarts" */ "../views/chart/echarts.vue"
),
}, },
{ {
path: '/icon', path: "/icon",
name: 'icon', name: "icon",
meta: { meta: {
title: '图标', title: "图标",
permiss: '5', permiss: "5",
}, },
component: () => import(/* webpackChunkName: "icon" */ '../views/pages/icon.vue'), component: () =>
import(/* webpackChunkName: "icon" */ "../views/pages/icon.vue"),
}, },
{ {
path: '/ucenter', path: "/ucenter",
name: 'ucenter', name: "ucenter",
meta: { meta: {
title: '个人中心', title: "个人中心",
}, },
component: () => import(/* webpackChunkName: "ucenter" */ '../views/pages/ucenter.vue'), component: () =>
import(
/* webpackChunkName: "ucenter" */ "../views/pages/ucenter.vue"
),
}, },
{ {
path: '/editor', path: "/editor",
name: 'editor', name: "editor",
meta: { meta: {
title: '富文本编辑器', title: "富文本编辑器",
permiss: '291', permiss: "291",
}, },
component: () => import(/* webpackChunkName: "editor" */ '../views/pages/editor.vue'), component: () =>
import(/* webpackChunkName: "editor" */ "../views/pages/editor.vue"),
}, },
{ {
path: '/markdown', path: "/markdown",
name: 'markdown', name: "markdown",
meta: { meta: {
title: 'markdown编辑器', title: "markdown编辑器",
permiss: '292', permiss: "292",
}, },
component: () => import(/* webpackChunkName: "markdown" */ '../views/pages/markdown.vue'), component: () =>
import(
/* webpackChunkName: "markdown" */ "../views/pages/markdown.vue"
),
}, },
{ {
path: '/export', path: "/export",
name: 'export', name: "export",
meta: { meta: {
title: '导出Excel', title: "导出Excel",
permiss: '34', permiss: "34",
}, },
component: () => import(/* webpackChunkName: "export" */ '../views/table/export.vue'), component: () =>
import(/* webpackChunkName: "export" */ "../views/table/export.vue"),
}, },
{ {
path: '/import', path: "/import",
name: 'import', name: "import",
meta: { meta: {
title: '导入Excel', title: "导入Excel",
permiss: '33', permiss: "33",
}, },
component: () => import(/* webpackChunkName: "import" */ '../views/table/import.vue'), component: () =>
import(/* webpackChunkName: "import" */ "../views/table/import.vue"),
}, },
{ {
path: '/theme', path: "/theme",
name: 'theme', name: "theme",
meta: { meta: {
title: '主题设置', title: "主题设置",
permiss: '7', permiss: "7",
}, },
component: () => import(/* webpackChunkName: "theme" */ '../views/pages/theme.vue'), component: () =>
import(/* webpackChunkName: "theme" */ "../views/pages/theme.vue"),
}, },
{ {
path: '/calendar', path: "/calendar",
name: 'calendar', name: "calendar",
meta: { meta: {
title: '日历', title: "日历",
permiss: '24', permiss: "24",
}, },
component: () => import(/* webpackChunkName: "calendar" */ '../views/element/calendar.vue'), component: () =>
import(
/* webpackChunkName: "calendar" */ "../views/element/calendar.vue"
),
}, },
{ {
path: '/watermark', path: "/watermark",
name: 'watermark', name: "watermark",
meta: { meta: {
title: '水印', title: "水印",
permiss: '25', permiss: "25",
}, },
component: () => import(/* webpackChunkName: "watermark" */ '../views/element/watermark.vue'), component: () =>
import(
/* webpackChunkName: "watermark" */ "../views/element/watermark.vue"
),
}, },
{ {
path: '/carousel', path: "/carousel",
name: 'carousel', name: "carousel",
meta: { meta: {
title: '走马灯', title: "走马灯",
permiss: '23', permiss: "23",
}, },
component: () => import(/* webpackChunkName: "carousel" */ '../views/element/carousel.vue'), component: () =>
import(
/* webpackChunkName: "carousel" */ "../views/element/carousel.vue"
),
}, },
{ {
path: '/tour', path: "/tour",
name: 'tour', name: "tour",
meta: { meta: {
title: '分步引导', title: "分步引导",
permiss: '26', permiss: "26",
}, },
component: () => import(/* webpackChunkName: "tour" */ '../views/element/tour.vue'), component: () =>
import(/* webpackChunkName: "tour" */ "../views/element/tour.vue"),
}, },
{ {
path: '/steps', path: "/steps",
name: 'steps', name: "steps",
meta: { meta: {
title: '步骤条', title: "步骤条",
permiss: '27', permiss: "27",
}, },
component: () => import(/* webpackChunkName: "steps" */ '../views/element/steps.vue'), component: () =>
import(/* webpackChunkName: "steps" */ "../views/element/steps.vue"),
}, },
{ {
path: '/form', path: "/form",
name: 'forms', name: "forms",
meta: { meta: {
title: '表单', title: "表单",
permiss: '21', permiss: "21",
}, },
component: () => import(/* webpackChunkName: "form" */ '../views/element/form.vue'), component: () =>
import(/* webpackChunkName: "form" */ "../views/element/form.vue"),
}, },
{ {
path: '/upload', path: "/upload",
name: 'upload', name: "upload",
meta: { meta: {
title: '上传', title: "上传",
permiss: '22', permiss: "22",
}, },
component: () => import(/* webpackChunkName: "upload" */ '../views/element/upload.vue'), component: () =>
import(
/* webpackChunkName: "upload" */ "../views/element/upload.vue"
),
}, },
{ {
path: '/statistic', path: "/statistic",
name: 'statistic', name: "statistic",
meta: { meta: {
title: '统计', title: "统计",
permiss: '28', permiss: "28",
}, },
component: () => import(/* webpackChunkName: "statistic" */ '../views/element/statistic.vue'), 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', path: "/login",
meta: { meta: {
title: '登录', title: "登录",
noAuth: true, noAuth: true,
}, },
component: () => import(/* webpackChunkName: "login" */ '../views/pages/login.vue'), component: () =>
import(/* webpackChunkName: "login" */ "../views/pages/login.vue"),
}, },
{ {
path: '/register', path: "/register",
meta: { meta: {
title: '注册', title: "注册",
noAuth: true, noAuth: true,
}, },
component: () => import(/* webpackChunkName: "register" */ '../views/pages/register.vue'), component: () =>
import(/* webpackChunkName: "register" */ "../views/pages/register.vue"),
}, },
{ {
path: '/reset-pwd', path: "/reset-pwd",
meta: { meta: {
title: '重置密码', title: "重置密码",
noAuth: true, noAuth: true,
}, },
component: () => import(/* webpackChunkName: "reset-pwd" */ '../views/pages/reset-pwd.vue'), component: () =>
import(
/* webpackChunkName: "reset-pwd" */ "../views/pages/reset-pwd.vue"
),
}, },
{ {
path: '/403', path: "/403",
meta: { meta: {
title: '没有权限', title: "没有权限",
noAuth: true, noAuth: true,
}, },
component: () => import(/* webpackChunkName: "403" */ '../views/pages/403.vue'), component: () =>
import(/* webpackChunkName: "403" */ "../views/pages/403.vue"),
}, },
{ {
path: '/404', path: "/404",
meta: { meta: {
title: '找不到页面', title: "找不到页面",
noAuth: true, noAuth: true,
}, },
component: () => import(/* webpackChunkName: "404" */ '../views/pages/404.vue'), component: () =>
import(/* webpackChunkName: "404" */ "../views/pages/404.vue"),
}, },
{ path: '/:path(.*)', redirect: '/404' }, { path: "/:path(.*)", redirect: "/404" },
]; ];
const router = createRouter({ const router = createRouter({
@ -273,14 +339,17 @@ const router = createRouter({
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 (
typeof to.meta.permiss == "string" &&
!permiss.key.includes(to.meta.permiss)
) {
// 如果没有权限则进入403 // 如果没有权限则进入403
next('/403'); next("/403");
} else { } else {
next(); next();
} }

1280
src/views/pages/Analysis.vue Normal file

File diff suppressed because it is too large Load Diff

505
yarn.lock

File diff suppressed because it is too large Load Diff