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