From 82f02cd9f3adc1b9d64b444489e5e3114fbe7241 Mon Sep 17 00:00:00 2001 From: shizhong <124974919@qq.com> Date: Tue, 13 Jun 2023 14:05:17 +0800 Subject: [PATCH] =?UTF-8?q?!148=20=E3=80=90=E9=87=8D=E6=9E=84=E3=80=91Vue3?= =?UTF-8?q?=20=E7=AE=A1=E7=90=86=E5=90=8E=E5=8F=B0=EF=BC=9A[=E5=9F=BA?= =?UTF-8?q?=E7=A1=80=E7=AE=A1=E7=90=86=20->=20Redis=E7=9B=91=E6=8E=A7]=20?= =?UTF-8?q?=E4=BD=BF=E7=94=A8Echart=E7=BB=84=E4=BB=B6=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/modules/remaining.ts | 22 ---------------------- src/views/infra/redis/index.vue | 15 ++++++++------- 2 files changed, 8 insertions(+), 29 deletions(-) diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 6691d63e..68e8ef8f 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -342,28 +342,6 @@ const remainingRouter: AppRouteRecordRaw[] = [ } ] }, - { - path: '/infra', - component: Layout, - name: 'InfraRedis', - meta: { - hidden: true - }, - children: [ - { - path: '/infra/redis', - component: () => import('@/views/infra/redis/index.vue'), - name: 'InfraRedis', - meta: { - noCache: true, - hidden: true, - canTo: true, - title: 'REDIS测试测试测试', - activeMenu: 'infra/redis/index' - } - } - ] - }, { path: '/property', component: Layout, diff --git a/src/views/infra/redis/index.vue b/src/views/infra/redis/index.vue index 0d68c88f..011f8e59 100644 --- a/src/views/infra/redis/index.vue +++ b/src/views/infra/redis/index.vue @@ -68,8 +68,6 @@ import { GaugeChart } from 'echarts/charts' import { ToolboxComponent } from 'echarts/components' import * as RedisApi from '@/api/infra/redis' import { RedisMonitorInfoVO } from '@/api/infra/redis/types' -echarts.use([ToolboxComponent]) -echarts.use([GaugeChart]) const cache = ref() // 基本信息 @@ -145,14 +143,14 @@ const usedmemoryEchartChika = reactive({ fontSize: 15 }, pointer: { - //指针的大小 + // 指针的大小 width: 7, show: true }, detail: { textStyle: { fontWeight: 'normal', - //里面文字下的数值大小(50) + // 里面文字下的数值大小(50) fontSize: 15, color: '#FFFFFF' }, @@ -213,13 +211,13 @@ const commandStatsRefChika = reactive({ /** 加载数据 */ const getSummary = () => { - //初始化命令图表 - initcommandStatsChart() + // 初始化命令图表 + initCommandStatsChart() usedMemoryInstance() } /** 命令使用情况 */ -const initcommandStatsChart = async () => { +const initCommandStatsChart = async () => { usedmemoryEchartChika.series[0].data = [] // 发起请求 try { @@ -265,6 +263,9 @@ const usedMemoryInstance = async () => { /** 初始化 **/ onMounted(() => { + echarts.use([ToolboxComponent]) + echarts.use([GaugeChart]) + // 读取 redis 信息 readRedisInfo() // 加载数据 getSummary()