From e51d4445cf9741f77bc8b91b1cb153811083daca Mon Sep 17 00:00:00 2001 From: coward Date: Thu, 13 Jun 2024 14:28:56 +0800 Subject: [PATCH] =?UTF-8?q?:art:=E6=96=B0=E5=A2=9E=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF=E7=A6=BB=E7=BA=BF=E9=80=9A=E7=9F=A5=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/server/clients.vue | 6 ++++-- src/views/server/component/detail.vue | 23 +++++++++++++++++------ 2 files changed, 21 insertions(+), 8 deletions(-) diff --git a/src/views/server/clients.vue b/src/views/server/clients.vue index 6b58599..743eb96 100644 --- a/src/views/server/clients.vue +++ b/src/views/server/clients.vue @@ -177,7 +177,8 @@ const openAddClientDialog = () => { publicKey: "", presharedKey: "" }, - enabled: 1 + enabled: 1, + offlineMonitoring: 0 } }, beforeSure: (done, { options }) => { @@ -216,7 +217,8 @@ const openEditClientDialog = (client?: any) => { useServerDNS: client.useServerDNS, enableAfterCreation: client.enableAfterCreation, keys: client.keys, - enabled: Number(client.enabled) + enabled: Number(client.enabled), + offlineMonitoring: client.offlineMonitoring } }, beforeSure: (done, { options }) => { diff --git a/src/views/server/component/detail.vue b/src/views/server/component/detail.vue index 4e1f3fe..0365693 100644 --- a/src/views/server/component/detail.vue +++ b/src/views/server/component/detail.vue @@ -4,7 +4,7 @@ import { FormInstance } from "element-plus"; import { storageLocal } from "@pureadmin/utils"; import { userKey } from "@/utils/auth"; import { clientFormRules } from "@/views/server/component/rules"; -import {generateClientKeys} from "@/api/clients"; +import { generateClientKeys } from "@/api/clients"; // 声明 props 类型 export interface DetailFormProps { @@ -26,6 +26,7 @@ export interface DetailFormProps { presharedKey: string; }; enabled: number; + offlineMonitoring: number; }; } @@ -49,7 +50,8 @@ const props = withDefaults(defineProps(), { publicKey: "", presharedKey: "" }, - enabled: 1 + enabled: 1, + offlineMonitoring: 0 }) }); @@ -88,7 +90,10 @@ defineExpose({ getDetailFormRef }); - + @@ -146,27 +151,33 @@ defineExpose({ getDetailFormRef }); v-if="detailForm.id === ''" v-model="detailForm.keys.privateKey" /> - + - + - + 生成密钥对 + + + + + +