From e70d1cb3f283f5ddd35b154b5be273ca0f14ecb6 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Fri, 27 Dec 2024 10:31:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E6=AD=A3=E5=BC=8F=E6=A3=80?= =?UTF-8?q?=E6=B5=8Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/check/interface/index.ts | 18 +- frontend/src/views/home/components/test.vue | 639 +++++++++--------- .../src/views/home/components/testPopup.vue | 5 +- 3 files changed, 320 insertions(+), 342 deletions(-) diff --git a/frontend/src/api/check/interface/index.ts b/frontend/src/api/check/interface/index.ts index ef4ffed..a4b2a1c 100644 --- a/frontend/src/api/check/interface/index.ts +++ b/frontend/src/api/check/interface/index.ts @@ -52,8 +52,8 @@ export namespace CheckData { export enum ChnCheckResultEnum { UNKNOWN = -1, LOADING = 0, - FAIL = 1, - SUCCESS = 2, + SUCCESS = 1, + FAIL = 2, UNCONNECTED=3, ERRORDATA = 4 } @@ -71,12 +71,20 @@ export namespace CheckData { }> } + export enum ButtonColorEnum { + INFO = '#909399', + LOADING = '#607eab', + SUCCESS = '#67c23a', + WARNING ='#e6a23c', + DANGER = '#f56c6c', + } + /** * 用于描述 (设备)通道检测结果展示的按钮类型 */ export interface ButtonResult { - resultType: 'info' | 'info' | 'danger' | 'success' | 'warning' - resultIcon: 'Minus' | 'Loading' | 'Close' | 'CircleCheckFilled' | 'WarnTriangleFilled' + color: ButtonColorEnum + icon: 'Minus' | 'Loading' | 'Close' | 'CircleCheckFilled' | 'Link' | 'WarnTriangleFilled' } /** @@ -99,7 +107,7 @@ export namespace CheckData { * 定义检测日志类型 */ export interface LogItem { - type: 'info' | 'error' + type: 'info' | 'warning' | 'error' log: string } } diff --git a/frontend/src/views/home/components/test.vue b/frontend/src/views/home/components/test.vue index 546ec68..99ccac6 100644 --- a/frontend/src/views/home/components/test.vue +++ b/frontend/src/views/home/components/test.vue @@ -38,7 +38,7 @@
- @@ -51,16 +51,24 @@ :label="'通道'+chnItem" align="center"> @@ -68,18 +76,26 @@