From 40fb767609aed8e63239ef6e74ebe1e7751938dc Mon Sep 17 00:00:00 2001 From: dhb52 Date: Thu, 9 May 2024 16:03:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=80=9A=E7=9F=A5=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E9=80=9A=E7=9F=A5=E4=BA=BA=E6=B2=A1=E6=9C=89=E5=B8=A6=E5=87=BA?= =?UTF-8?q?=EF=BC=8C=E9=83=A8=E5=88=86=E8=BE=93=E5=85=A5=E8=A6=81=E6=B1=82?= =?UTF-8?q?=E4=B8=8D=E5=8F=AF=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/typings/api.d.ts | 2 +- .../modules/notify-config-operate-drawer.vue | 38 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/typings/api.d.ts b/src/typings/api.d.ts index d6c0287..7fddb6a 100644 --- a/src/typings/api.d.ts +++ b/src/typings/api.d.ts @@ -545,7 +545,7 @@ declare namespace Api { /** 业务ID */ businessId: string; /** 通知人id */ - notifyRecipientIds: number; + recipientIds: number[]; /** 任务类型 1、重试任务 2、回调任务、3、JOB任务 4、WORKFLOW任务 */ systemTaskType: SystemTaskType; /** 业务名称 */ diff --git a/src/views/notify/scene/modules/notify-config-operate-drawer.vue b/src/views/notify/scene/modules/notify-config-operate-drawer.vue index 640b1d2..8781712 100644 --- a/src/views/notify/scene/modules/notify-config-operate-drawer.vue +++ b/src/views/notify/scene/modules/notify-config-operate-drawer.vue @@ -67,7 +67,7 @@ type Model = Pick< | 'id' | 'groupName' | 'businessId' - | 'notifyRecipientIds' + | 'recipientIds' | 'systemTaskType' | 'notifyStatus' | 'notifyScene' @@ -94,26 +94,20 @@ function createDefaultModel(): Model { return { groupName: '', businessId: '', - notifyRecipientIds: 0, + recipientIds: [], systemTaskType: 1, notifyStatus: 1, notifyScene: 1, notifyThreshold: 16, - rateLimiterStatus: 0, - rateLimiterThreshold: 0, + rateLimiterStatus: 1, + rateLimiterThreshold: 1, description: '' }; } type RuleKey = Extract< keyof Model, - | 'groupName' - | 'businessId' - | 'notifyRecipientIds' - | 'notifyStatus' - | 'notifyScene' - | 'rateLimiterStatus' - | 'notifyThreshold' + 'groupName' | 'businessId' | 'recipientIds' | 'notifyStatus' | 'notifyScene' | 'rateLimiterStatus' | 'notifyThreshold' >; const rules: Record = { @@ -121,7 +115,7 @@ const rules: Record = { businessId: defaultRequiredRule, notifyStatus: defaultRequiredRule, notifyScene: defaultRequiredRule, - notifyRecipientIds: defaultRequiredRule, + recipientIds: defaultRequiredRule, rateLimiterStatus: defaultRequiredRule, notifyThreshold: defaultRequiredRule }; @@ -148,7 +142,7 @@ async function handleSubmit() { const { groupName, businessId, - notifyRecipientIds, + recipientIds, systemTaskType, notifyStatus, notifyScene, @@ -160,7 +154,7 @@ async function handleSubmit() { const { error } = await fetchAddNotify({ groupName, businessId, - notifyRecipientIds, + recipientIds, systemTaskType, notifyStatus, notifyScene, @@ -177,7 +171,7 @@ async function handleSubmit() { id, groupName, businessId, - notifyRecipientIds, + recipientIds, notifyStatus, systemTaskType, notifyScene, @@ -190,7 +184,7 @@ async function handleSubmit() { id, groupName, businessId, - notifyRecipientIds, + recipientIds, systemTaskType, notifyStatus, notifyScene, @@ -304,9 +298,9 @@ watch(visible, () => { clearable /> - + { /> - + { v-model:value="model.rateLimiterThreshold" :min="1" :placeholder="$t('page.notifyConfig.form.rateLimiterThreshold')" + :disabled="props.operateType === 'edit'" /> @@ -337,6 +336,7 @@ watch(visible, () => { v-model:value="model.notifyThreshold" :min="1" :placeholder="$t('page.notifyConfig.form.notifyThreshold')" + :disabled="props.operateType === 'edit'" />