fix: ui
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 4m36s

This commit is contained in:
luo
2026-07-31 09:38:41 +08:00
parent 055fed0cf1
commit 83f1c88c65
2 changed files with 10 additions and 12 deletions

View File

@@ -10,7 +10,7 @@
:close-on-press-escape="!createDrawerBusy"
@closed="handleCreateDrawerClosed"
>
<ElForm ref="formRef" :model="form" label-width="80px" class="create-form">
<ElForm ref="formRef" :model="form" label-width="100px" class="create-form">
<ElFormItem label="操作类型" prop="operation_type">
<ElSelect
v-model="form.operation_type"

View File

@@ -17,12 +17,7 @@
</ElCol>
<ElCol :xs="24" :sm="12">
<ElFormItem label="AgentID" prop="agent_id">
<ElInputNumber
v-model="form.agent_id"
:min="1"
controls-position="right"
class="full-width"
/>
<ElInput v-model="form.agent_id" placeholder="请输入 AgentID" />
</ElFormItem>
</ElCol>
<ElCol :xs="24" :sm="12">
@@ -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<FormRules>({
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,