主页跳转

This commit is contained in:
陈红丽 2024-12-17 11:12:29 +08:00
parent f6d6c68969
commit d713713b3b

View File

@ -204,14 +204,19 @@
<div class="mt-3">
<n-grid cols="1 s:2 m:3 l:8 xl:8 2xl:8" responsive="screen" :x-gap="12" :y-gap="8">
<n-grid-item v-for="(item, index) in iconList" :key="index">
<n-card content-style="padding-top: 0;" size="small" :bordered="false">
<n-card
content-style="padding-top: 0;"
size="small"
:bordered="false"
v-on="item.eventObject || {}"
>
<template #footer>
<n-skeleton v-if="loading" size="medium" />
<div class="cursor-pointer" v-else>
<p class="flex justify-center">
<span>
<n-icon :size="item.size" class="flex-1" :color="item.color">
<component :is="item.icon" v-on="item.eventObject || {}" />
<component :is="item.icon" />
</n-icon>
</span>
</p>
@ -299,6 +304,7 @@
import VisitSource from './components/VisitSource.vue';
import Percent from './components/Percent.vue';
import AreaRanking from './components/AreaRanking.vue';
import { useRouter } from 'vue-router';
import {
CaretUpOutlined,
CaretDownOutlined,
@ -321,6 +327,7 @@
/**
* 定义参数
*/
const router = useRouter();
const loading = ref(true);
const visits = ref<TypeVisits>();
const saleroom = ref<TypeSaleroom>();
@ -335,7 +342,9 @@
title: '用户管理',
color: '#69c0ff',
eventObject: {
click: () => {},
click: () => {
router.push({ path: '/system/user' });
},
},
},
{
@ -344,7 +353,9 @@
title: '租户管理',
color: '#69c0ff',
eventObject: {
click: () => {},
click: () => {
router.push({ path: '/system/tenant' });
},
},
},
{
@ -353,7 +364,9 @@
title: '操作日志',
color: '#ff9c6e',
eventObject: {
click: () => {},
click: () => {
router.push({ path: '/system/logger/operLog' });
},
},
},
{
@ -362,7 +375,9 @@
title: '参数管理',
color: '#b37feb',
eventObject: {
click: () => {},
click: () => {
router.push({ path: '/data/param' });
},
},
},
{
@ -371,7 +386,9 @@
title: '字典管理',
color: '#ffd666',
eventObject: {
click: () => {},
click: () => {
router.push({ path: '/data/dict' });
},
},
},
{
@ -380,7 +397,9 @@
title: '消息管理',
color: '#5cdbd3',
eventObject: {
click: () => {},
click: () => {
router.push({ path: '/data/message' });
},
},
},
{
@ -389,7 +408,9 @@
title: '定时任务',
color: '#ff85c0',
eventObject: {
click: () => {},
click: () => {
router.push({ path: '/monitor/job' });
},
},
},
{
@ -398,7 +419,9 @@
title: '配置管理',
color: '#ffc069',
eventObject: {
click: () => {},
click: () => {
router.push({ path: '/data/config' });
},
},
},
];