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'" />