From 60c2eef8ed86d69c6fc8500991db7fd97046487a Mon Sep 17 00:00:00 2001 From: wangdan Date: Wed, 8 Mar 2023 10:43:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=B0=81=E8=A3=85echart=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E4=B9=8Bline=E7=BB=84=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/components.d.ts | 2 + .../components/v-charts/components/Line.vue | 152 ++++++++ frontend/src/components/v-charts/index.vue | 23 ++ frontend/src/views/home/index.vue | 359 ++++++++++-------- frontend/vite.config.ts | 2 +- 5 files changed, 379 insertions(+), 159 deletions(-) create mode 100644 frontend/src/components/v-charts/components/Line.vue create mode 100644 frontend/src/components/v-charts/index.vue diff --git a/frontend/components.d.ts b/frontend/components.d.ts index ef05b9b18..3889f0344 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -75,6 +75,7 @@ declare module 'vue' { Footer: typeof import('./src/components/app-layout/footer/index.vue')['default'] Group: typeof import('./src/components/group/index.vue')['default'] InfiniteScroll: typeof import('element-plus/es')['ElInfiniteScroll'] + Line: typeof import('./src/components/v-charts/components/Line.vue')['default'] Loading: typeof import('element-plus/es')['ElLoadingDirective'] Logo: typeof import('./src/components/app-layout/menu/components/Logo.vue')['default'] Menu: typeof import('./src/components/app-layout/menu/index.vue')['default'] @@ -85,6 +86,7 @@ declare module 'vue' { SvgIcon: typeof import('./src/components/svg-icon/svg-icon.vue')['default'] TableSetting: typeof import('./src/components/table-setting/index.vue')['default'] Upload: typeof import('./src/components/upload/index.vue')['default'] + VCharts: typeof import('./src/components/v-charts/index.vue')['default'] } } diff --git a/frontend/src/components/v-charts/components/Line.vue b/frontend/src/components/v-charts/components/Line.vue new file mode 100644 index 000000000..0e472613b --- /dev/null +++ b/frontend/src/components/v-charts/components/Line.vue @@ -0,0 +1,152 @@ + + + diff --git a/frontend/src/components/v-charts/index.vue b/frontend/src/components/v-charts/index.vue new file mode 100644 index 000000000..49adefb54 --- /dev/null +++ b/frontend/src/components/v-charts/index.vue @@ -0,0 +1,23 @@ + + diff --git a/frontend/src/views/home/index.vue b/frontend/src/views/home/index.vue index 70e3f7590..4f6c5dfaa 100644 --- a/frontend/src/views/home/index.vue +++ b/frontend/src/views/home/index.vue @@ -106,16 +106,23 @@ {{ $t('home.rwPerSecond') }}: {{ currentInfo.ioTime }} ms -
-
+ +
+ +
+
+ +
@@ -188,9 +195,10 @@ diff --git a/frontend/vite.config.ts b/frontend/vite.config.ts index a44b9a548..12e0e622d 100644 --- a/frontend/vite.config.ts +++ b/frontend/vite.config.ts @@ -37,7 +37,7 @@ export default defineConfig(({ mode }: ConfigEnv): UserConfig => { open: viteEnv.VITE_OPEN, proxy: { '/api/v1': { - target: 'http://localhost:9999/', + target: 'http://172.16.10.181:9999/', changeOrigin: true, }, },