From 27195c044825e92bf15cb35937d617cbf782b658 Mon Sep 17 00:00:00 2001
From: Shikong <919411476@qq.com>
Date: Tue, 25 Jul 2023 15:53:20 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=20=E9=80=9F=E5=BA=A6?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=20=E5=8F=8A=20=E5=8A=A8=E7=94=BB=E6=94=AF?=
=?UTF-8?q?=E6=8C=81?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
app/wails/frontend/components.d.ts | 1 +
app/wails/frontend/package.json | 1 +
.../components/system/cpu/CPUUsageChart.vue | 7 +++-
.../system/memory/MemoryUsageChart.vue | 6 ++-
.../system/network/NetworkSumRateChart.vue | 6 ++-
.../src/views/tabs/location-record/index.vue | 38 +++++++++++--------
app/wails/frontend/yarn.lock | 2 +-
7 files changed, 41 insertions(+), 20 deletions(-)
diff --git a/app/wails/frontend/components.d.ts b/app/wails/frontend/components.d.ts
index 7003c82..e79a511 100644
--- a/app/wails/frontend/components.d.ts
+++ b/app/wails/frontend/components.d.ts
@@ -10,6 +10,7 @@ declare module 'vue' {
CPUUsage: typeof import('./src/components/system/cpu/CPUUsage.vue')['default']
CPUUsageChart: typeof import('./src/components/system/cpu/CPUUsageChart.vue')['default']
ElButton: typeof import('element-plus/es')['ElButton']
+ ElCheckbox: typeof import('element-plus/es')['ElCheckbox']
ElCheckboxGroup: typeof import('element-plus/es')['ElCheckboxGroup']
ElCol: typeof import('element-plus/es')['ElCol']
ElConfigProvider: typeof import('element-plus/es')['ElConfigProvider']
diff --git a/app/wails/frontend/package.json b/app/wails/frontend/package.json
index ec8fe88..2b63037 100644
--- a/app/wails/frontend/package.json
+++ b/app/wails/frontend/package.json
@@ -20,6 +20,7 @@
},
"dependencies": {
"@amap/amap-jsapi-loader": "^1.0.1",
+ "@element-plus/icons-vue": "^2.1.0",
"@vueuse/core": "^10.2.1",
"axios": "^1.4.0",
"echarts": "^5.4.2",
diff --git a/app/wails/frontend/src/components/system/cpu/CPUUsageChart.vue b/app/wails/frontend/src/components/system/cpu/CPUUsageChart.vue
index 50a1ea8..81c6f7e 100644
--- a/app/wails/frontend/src/components/system/cpu/CPUUsageChart.vue
+++ b/app/wails/frontend/src/components/system/cpu/CPUUsageChart.vue
@@ -1,6 +1,6 @@
diff --git a/app/wails/frontend/src/components/system/memory/MemoryUsageChart.vue b/app/wails/frontend/src/components/system/memory/MemoryUsageChart.vue
index 3f87261..8ed1da2 100644
--- a/app/wails/frontend/src/components/system/memory/MemoryUsageChart.vue
+++ b/app/wails/frontend/src/components/system/memory/MemoryUsageChart.vue
@@ -3,7 +3,7 @@ import {
useMemoryTotalSizeWithByte,
useMemoryUsageSizeWithByte
} from "src/utils/system/memory";
-import {computed, onMounted, reactive, ref, watch} from "vue";
+import {computed, onActivated, onMounted, reactive, ref, watch} from "vue";
import * as echarts from "echarts";
import moment from "moment";
import {bytesToSizeWithUnit} from "src/utils/file/file";
@@ -133,6 +133,10 @@ onMounted(()=>{
chartInst.setOption(chart)
chartInst.resize()
+ onActivated(()=>{
+ chartInst.resize()
+ })
+
watch(memoryUsage,(v)=>{
chart.visualMap = getVisualMap()
let data = chart.series[0].data
diff --git a/app/wails/frontend/src/components/system/network/NetworkSumRateChart.vue b/app/wails/frontend/src/components/system/network/NetworkSumRateChart.vue
index 92a107b..4efd923 100644
--- a/app/wails/frontend/src/components/system/network/NetworkSumRateChart.vue
+++ b/app/wails/frontend/src/components/system/network/NetworkSumRateChart.vue
@@ -1,5 +1,5 @@