Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
3feb4828
authored
May 15, 2023
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
!148 【重构】Vue3 管理后台:[基础管理 -> Redis监控] 使用Echart组件实现
parent
ab7032f1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
29 deletions
+8
-29
src/router/modules/remaining.ts
+0
-22
src/views/infra/redis/index.vue
+8
-7
No files found.
src/router/modules/remaining.ts
View file @
3feb4828
...
...
@@ -331,28 +331,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
,
name
:
'property'
,
...
...
src/views/infra/redis/index.vue
View file @
3feb4828
...
...
@@ -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
<
RedisMonitorInfoVO
>
()
// 基本信息
...
...
@@ -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 = () => {
//初始化命令图表
init
c
ommandStatsChart()
//
初始化命令图表
init
C
ommandStatsChart()
usedMemoryInstance()
}
/** 命令使用情况 */
const init
c
ommandStatsChart = async () => {
const init
C
ommandStatsChart = async () => {
usedmemoryEchartChika.series[0].data = []
// 发起请求
try {
...
...
@@ -265,6 +263,9 @@ const usedMemoryInstance = async () => {
/** 初始化 **/
onMounted
(()
=>
{
echarts
.
use
([
ToolboxComponent
])
echarts
.
use
([
GaugeChart
])
// 读取 redis 信息
readRedisInfo
()
// 加载数据
getSummary
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment