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" /> - + - + - + 生成密钥对 + + + + + +