添加首页
parent
de7bbad069
commit
95a15c4560
|
|
@ -1,3 +1,10 @@
|
||||||
|
/*
|
||||||
|
* @Author: Mm
|
||||||
|
* @Date: 2025-02-20 09:55:11
|
||||||
|
* @LastEditors: Mm
|
||||||
|
* @LastEditTime: 2025-11-08 10:34:16
|
||||||
|
* 不写bug的程序员不是一个好程序员!
|
||||||
|
*/
|
||||||
import type { RouteRecordStringComponent } from '@vben/types';
|
import type { RouteRecordStringComponent } from '@vben/types';
|
||||||
|
|
||||||
import { $t } from '@vben/locales';
|
import { $t } from '@vben/locales';
|
||||||
|
|
@ -49,7 +56,6 @@ const localRoutes: RouteRecordStringComponent[] = [
|
||||||
name: 'RoleAssign',
|
name: 'RoleAssign',
|
||||||
path: '/system/role-assign/:roleId',
|
path: '/system/role-assign/:roleId',
|
||||||
},
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -60,9 +66,11 @@ export const localMenuList: RouteRecordStringComponent[] = [
|
||||||
component: 'BasicLayout',
|
component: 'BasicLayout',
|
||||||
meta: {
|
meta: {
|
||||||
order: -1,
|
order: -1,
|
||||||
title: 'page.dashboard.title',
|
title: '首页',
|
||||||
// 不使用基础布局(仅在顶级生效)
|
// 不使用基础布局(仅在顶级生效)
|
||||||
noBasicLayout: true,
|
noBasicLayout: true,
|
||||||
|
hideChildrenInMenu: true,
|
||||||
|
icon: 'ic:baseline-house',
|
||||||
},
|
},
|
||||||
name: 'Dashboard',
|
name: 'Dashboard',
|
||||||
path: '/',
|
path: '/',
|
||||||
|
|
@ -74,18 +82,19 @@ export const localMenuList: RouteRecordStringComponent[] = [
|
||||||
component: '/dashboard/analytics/index',
|
component: '/dashboard/analytics/index',
|
||||||
meta: {
|
meta: {
|
||||||
affixTab: true,
|
affixTab: true,
|
||||||
title: 'page.dashboard.analytics',
|
icon: 'ic:baseline-house',
|
||||||
},
|
title: '首页',
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'Workspace',
|
|
||||||
path: '/workspace',
|
|
||||||
component: '/dashboard/workspace/index',
|
|
||||||
meta: {
|
|
||||||
title: 'page.dashboard.workspace',
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
|
// name: 'Workspace',
|
||||||
|
// path: '/workspace',
|
||||||
|
// component: '/dashboard/workspace/index',
|
||||||
|
// meta: {
|
||||||
|
// title: 'page.dashboard.workspace',
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
// name: 'VbenDocument',
|
// name: 'VbenDocument',
|
||||||
// path: '/vben-admin/document',
|
// path: '/vben-admin/document',
|
||||||
// component: 'IFrameView',
|
// component: 'IFrameView',
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,90 @@
|
||||||
|
<script lang="ts" setup>
|
||||||
|
import type { AnalysisOverviewItem } from '@vben/common-ui';
|
||||||
|
import type { TabOption } from '@vben/types';
|
||||||
|
|
||||||
|
import {
|
||||||
|
AnalysisChartCard,
|
||||||
|
AnalysisChartsTabs,
|
||||||
|
AnalysisOverview,
|
||||||
|
} from '@vben/common-ui';
|
||||||
|
import {
|
||||||
|
SvgBellIcon,
|
||||||
|
SvgCakeIcon,
|
||||||
|
SvgCardIcon,
|
||||||
|
SvgDownloadIcon,
|
||||||
|
} from '@vben/icons';
|
||||||
|
|
||||||
|
import AnalyticsTrends from './analytics-trends.vue';
|
||||||
|
import AnalyticsVisits from './analytics-visits.vue';
|
||||||
|
import AnalyticsVisitsData from './analytics-visits-data.vue';
|
||||||
|
import AnalyticsVisitsSales from './analytics-visits-sales.vue';
|
||||||
|
import AnalyticsVisitsSource from './analytics-visits-source.vue';
|
||||||
|
|
||||||
|
const overviewItems: AnalysisOverviewItem[] = [
|
||||||
|
{
|
||||||
|
icon: SvgCardIcon,
|
||||||
|
title: '用户量',
|
||||||
|
totalTitle: '总用户量',
|
||||||
|
totalValue: 120_000,
|
||||||
|
value: 2000,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: SvgCakeIcon,
|
||||||
|
title: '访问量',
|
||||||
|
totalTitle: '总访问量',
|
||||||
|
totalValue: 500_000,
|
||||||
|
value: 20_000,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: SvgDownloadIcon,
|
||||||
|
title: '下载量',
|
||||||
|
totalTitle: '总下载量',
|
||||||
|
totalValue: 120_000,
|
||||||
|
value: 8000,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
icon: SvgBellIcon,
|
||||||
|
title: '使用量',
|
||||||
|
totalTitle: '总使用量',
|
||||||
|
totalValue: 50_000,
|
||||||
|
value: 5000,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const chartTabs: TabOption[] = [
|
||||||
|
{
|
||||||
|
label: '流量趋势',
|
||||||
|
value: 'trends',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '月访问量',
|
||||||
|
value: 'visits',
|
||||||
|
},
|
||||||
|
];
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<div class="p-5">
|
||||||
|
<AnalysisOverview :items="overviewItems" />
|
||||||
|
<AnalysisChartsTabs :tabs="chartTabs" class="mt-5">
|
||||||
|
<template #trends>
|
||||||
|
<AnalyticsTrends />
|
||||||
|
</template>
|
||||||
|
<template #visits>
|
||||||
|
<AnalyticsVisits />
|
||||||
|
</template>
|
||||||
|
</AnalysisChartsTabs>
|
||||||
|
|
||||||
|
<div class="mt-5 w-full md:flex">
|
||||||
|
<AnalysisChartCard class="mt-5 md:mr-4 md:mt-0 md:w-1/3" title="访问数量">
|
||||||
|
<AnalyticsVisitsData />
|
||||||
|
</AnalysisChartCard>
|
||||||
|
<AnalysisChartCard class="mt-5 md:mr-4 md:mt-0 md:w-1/3" title="访问来源">
|
||||||
|
<AnalyticsVisitsSource />
|
||||||
|
</AnalysisChartCard>
|
||||||
|
<AnalysisChartCard class="mt-5 md:mt-0 md:w-1/3" title="访问来源">
|
||||||
|
<AnalyticsVisitsSales />
|
||||||
|
</AnalysisChartCard>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -2,7 +2,7 @@
|
||||||
* @Author: Mm
|
* @Author: Mm
|
||||||
* @Date: 2025-02-22 09:28:38
|
* @Date: 2025-02-22 09:28:38
|
||||||
* @LastEditors: Mm
|
* @LastEditors: Mm
|
||||||
* @LastEditTime: 2025-03-13 17:23:32
|
* @LastEditTime: 2025-11-08 10:33:53
|
||||||
* @remarker:
|
* @remarker:
|
||||||
*/
|
*/
|
||||||
import { defineConfig } from '@vben/vite-config';
|
import { defineConfig } from '@vben/vite-config';
|
||||||
|
|
@ -35,7 +35,7 @@ export default defineConfig(async () => {
|
||||||
rewrite: (path) => path.replace(/^\/api/, ''),
|
rewrite: (path) => path.replace(/^\/api/, ''),
|
||||||
// mock代理目标地址
|
// mock代理目标地址
|
||||||
// target: 'http://192.168.0.10:8087',
|
// target: 'http://192.168.0.10:8087',
|
||||||
target: 'http://192.168.0.61:8080',
|
target: 'http://192.168.0.58:8081',
|
||||||
// target: 'http://localhost:8080',
|
// target: 'http://localhost:8080',
|
||||||
ws: true,
|
ws: true,
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue