fix:仪表盘跳转(AP、注册用户、装置)
This commit is contained in:
@@ -10,7 +10,22 @@ import {
|
||||
import { computed, ref, onMounted } from 'vue';
|
||||
import { getDashboardOverview } from '@/service/api/auth';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useRouter } from 'vue-router';
|
||||
const { t } = useI18n();
|
||||
const router = useRouter();
|
||||
//AP跳转
|
||||
const handleApClick = () => {
|
||||
router.push('/device/apdevice');
|
||||
};
|
||||
//用户跳转
|
||||
const handleUserClick = () =>{
|
||||
router.push('/user-center/user')
|
||||
};
|
||||
//终端跳转
|
||||
const handleterminalClick = () => {
|
||||
router.push('/device/terminal');
|
||||
};
|
||||
|
||||
|
||||
defineOptions({
|
||||
name: 'HeaderBanner'
|
||||
@@ -200,8 +215,8 @@ const otherDevices = computed(() => ({
|
||||
<!-- Register Users -->
|
||||
<div class="flex flex-col p-6px">
|
||||
<div class="flex items-center gap-6px mb-6px">
|
||||
<div class="size-48px flex-center bg-blue-50 rounded-lg">
|
||||
<user-add-outlined class="text-primary text-24px" />
|
||||
<div class="size-48px flex-center bg-blue-50 rounded-lg relative hover:bg-green-100">
|
||||
<user-add-outlined class="text-primary text-24px cursor-pointer" @click="handleUserClick"/>
|
||||
</div>
|
||||
<div class="text-16px font-medium">{{ t('page.headerbanner.register') }}</div>
|
||||
</div>
|
||||
@@ -226,10 +241,10 @@ const otherDevices = computed(() => ({
|
||||
</div>
|
||||
|
||||
<!-- AP Status -->
|
||||
<div class="flex flex-col p-6px">
|
||||
<div class="flex flex-col p-6px" >
|
||||
<div class="flex items-center gap-6px mb-6px">
|
||||
<div class="size-48px flex-center bg-green-50 rounded-lg relative">
|
||||
<icon-mdi-access-point class="text-primary text-24px" />
|
||||
<div class="size-48px flex-center bg-green-50 rounded-lg relative hover:bg-green-100">
|
||||
<icon-mdi-access-point class="text-primary text-24px cursor-pointer" @click="handleApClick" />
|
||||
<span class="text-20px font-semibold absolute -right-2 -top-2 bg-primary text-white rounded-full w-6 h-6 flex-center">
|
||||
{{ overviewData.totalApNum }}
|
||||
</span>
|
||||
@@ -247,8 +262,8 @@ const otherDevices = computed(() => ({
|
||||
<!-- Client Status -->
|
||||
<div class="flex flex-col p-6px">
|
||||
<div class="flex items-center gap-6px mb-6px">
|
||||
<div class="size-48px flex-center bg-purple-50 rounded-lg relative">
|
||||
<icon-mdi-laptop class="text-primary text-24px" />
|
||||
<div class="size-48px flex-center bg-purple-50 rounded-lg relative hover:bg-green-100">
|
||||
<icon-mdi-laptop class="text-primary text-24px cursor-pointer" @click="handleterminalClick"/>
|
||||
<span class="text-20px font-semibold absolute -right-2 -top-2 bg-primary text-white rounded-full w-6 h-6 flex-center">
|
||||
{{ overviewData.totalClientNum }}
|
||||
</span>
|
||||
|
||||
Reference in New Issue
Block a user