From 83f1c88c65bf8843c350813e510d40fbac429c0f Mon Sep 17 00:00:00 2001 From: luo Date: Fri, 31 Jul 2026 09:38:41 +0800 Subject: [PATCH] fix: ui --- .../device-batch-allocation/index.vue | 2 +- .../components/WecomApplicationFormDialog.vue | 20 +++++++++---------- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/views/asset-management/task-management/device-batch-allocation/index.vue b/src/views/asset-management/task-management/device-batch-allocation/index.vue index d58bb73..8ff84f0 100644 --- a/src/views/asset-management/task-management/device-batch-allocation/index.vue +++ b/src/views/asset-management/task-management/device-batch-allocation/index.vue @@ -10,7 +10,7 @@ :close-on-press-escape="!createDrawerBusy" @closed="handleCreateDrawerClosed" > - + - + @@ -112,7 +107,7 @@ const testing = ref(false) const form = reactive({ corp_id: '', - agent_id: 0, + agent_id: '', name: '', secret: '', callback_token: '', @@ -122,7 +117,10 @@ const rules = reactive({ corp_id: [{ required: true, message: '请输入企业 ID', trigger: 'blur' }], - agent_id: [{ required: true, message: '请输入 AgentID', trigger: 'change' }], + agent_id: [ + { required: true, message: '请输入 AgentID', trigger: 'blur' }, + { pattern: /^[1-9]\d*$/, message: 'AgentID 必须为正整数', trigger: 'blur' } + ], name: [{ required: true, message: '请输入应用名称', trigger: 'blur' }], secret: [{ required: true, message: '请输入 Secret', trigger: 'blur' }] }) @@ -133,7 +131,7 @@ application ? { corp_id: application.corp_id, - agent_id: application.agent_id, + agent_id: String(application.agent_id), name: application.name, secret: application.secret || '', callback_token: application.callback_token || '', @@ -142,7 +140,7 @@ } : { corp_id: '', - agent_id: 0, + agent_id: '', name: '', secret: '', callback_token: '', @@ -165,7 +163,7 @@ try { const response = await WecomService.saveApplication({ corp_id: form.corp_id, - agent_id: form.agent_id, + agent_id: Number(form.agent_id), name: form.name, secret: form.secret, callback_token: form.callback_token,