From d03e38cb5a3d8380009748b1356b7399fed06dca Mon Sep 17 00:00:00 2001 From: fuguobin Date: Fri, 27 Oct 2023 14:31:54 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=84=E6=80=81=E9=98=80=E9=97=A8=E6=8E=A7?= =?UTF-8?q?=E5=88=B6=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/types/auto-imports.d.ts | 4 ++ src/types/components.d.ts | 2 + src/views/monitoring/components/header.vue | 1 + .../devicemanage/components/main.vue | 51 ++++++++++++++----- src/views/monitoring/devicemanage/index.scss | 4 ++ 5 files changed, 48 insertions(+), 14 deletions(-) diff --git a/src/types/auto-imports.d.ts b/src/types/auto-imports.d.ts index 9ea2d5d..67e581d 100644 --- a/src/types/auto-imports.d.ts +++ b/src/types/auto-imports.d.ts @@ -4,6 +4,8 @@ declare global { const EffectScope: typeof import('vue')['EffectScope'] const ElMessage: typeof import('element-plus/es')['ElMessage'] const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] + const ElNotification: typeof import('element-plus/es')['ElNotification'] + const NEllipsis: typeof import('naive-ui')['NEllipsis'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] const autoResetRef: typeof import('@vueuse/core')['autoResetRef'] const computed: typeof import('vue')['computed'] @@ -272,6 +274,8 @@ declare module 'vue' { readonly EffectScope: UnwrapRef readonly ElMessage: UnwrapRef readonly ElMessageBox: UnwrapRef + readonly ElNotification: UnwrapRef + readonly NEllipsis: UnwrapRef readonly asyncComputed: UnwrapRef readonly autoResetRef: UnwrapRef readonly computed: UnwrapRef diff --git a/src/types/components.d.ts b/src/types/components.d.ts index d39bf46..bbb3b0d 100644 --- a/src/types/components.d.ts +++ b/src/types/components.d.ts @@ -47,6 +47,8 @@ declare module '@vue/runtime-core' { NDrawerContent: typeof import('naive-ui')['NDrawerContent'] NIcon: typeof import('naive-ui')['NIcon'] NInput: typeof import('naive-ui')['NInput'] + NInputGroup: typeof import('naive-ui')['NInputGroup'] + NInputGroupLabel: typeof import('naive-ui')['NInputGroupLabel'] NInputNumber: typeof import('naive-ui')['NInputNumber'] NMenu: typeof import('naive-ui')['NMenu'] NModal: typeof import('naive-ui')['NModal'] diff --git a/src/views/monitoring/components/header.vue b/src/views/monitoring/components/header.vue index 4db10d8..95f731a 100644 --- a/src/views/monitoring/components/header.vue +++ b/src/views/monitoring/components/header.vue @@ -121,6 +121,7 @@ :current-page.sync="params.pageNum" :page-size="params.pageSize" :total="params.total" + hide-on-single-page @current-change="handleCurrentChange" />
diff --git a/src/views/monitoring/devicemanage/components/main.vue b/src/views/monitoring/devicemanage/components/main.vue index 48d46de..e4b3ea7 100644 --- a/src/views/monitoring/devicemanage/components/main.vue +++ b/src/views/monitoring/devicemanage/components/main.vue @@ -147,15 +147,31 @@ - + + 确定 + +
@@ -190,14 +206,22 @@ - + + + 确定 + @@ -288,8 +312,7 @@ function gitDevice() { } infoData.value = Object.keys(res.data).length === 0 ? [] : res.data.datas; zoneType.value = Object.keys(res.data).length === 0 ? 0 : res.data.pCounts; - deviceImg.value = - Object.keys(res.data).length === 0 ? '' : 'src/assets/images/device/' + res.data.imgIndex + '.gif'; + deviceImg.value = Object.keys(res.data).length === 0 ? '' : res.data.imgIndex; console.log(deviceImg.value); } else { clearTimeout(timer.value); @@ -339,7 +362,7 @@ function handleBlur(data: any) { sendCtrl(submitData).then((res: any) => { if (res.code === 200) { console.log(res.data); - ElMessage(res.data.msg); + ElNotification({ message: res.data.msg }); } }); } diff --git a/src/views/monitoring/devicemanage/index.scss b/src/views/monitoring/devicemanage/index.scss index 0584cae..a2d237f 100644 --- a/src/views/monitoring/devicemanage/index.scss +++ b/src/views/monitoring/devicemanage/index.scss @@ -502,6 +502,10 @@ .n-input-number { display: flex; align-items: center; + .n-input__prefix, + .n-input__suffix { + display: none; + } } } .switch {