From 19201310c943f2fdecc25c5dd707a1161fb07ee8 Mon Sep 17 00:00:00 2001 From: opensnail <598092184@qq.com> Date: Sat, 20 Apr 2024 11:40:29 +0800 Subject: [PATCH] =?UTF-8?q?feat(sj=5F1.0.0):=20=E4=BC=98=E5=8C=96=E9=80=9A?= =?UTF-8?q?=E7=9F=A5=E4=BA=BA=E5=88=97=E8=A1=A8=E5=92=8C=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/constants/business.ts | 4 +- src/locales/langs/en-us.ts | 9 +- src/locales/langs/zh-cn.ts | 9 +- src/service/api/notify.ts | 10 +- src/typings/api.d.ts | 8 +- src/typings/app.d.ts | 5 + src/views/notify/recipient/index.vue | 4 +- .../modules/notify-config-operate-drawer.vue | 111 +++++++++++++++--- 8 files changed, 132 insertions(+), 28 deletions(-) diff --git a/src/constants/business.ts b/src/constants/business.ts index a3f960b..6457837 100644 --- a/src/constants/business.ts +++ b/src/constants/business.ts @@ -13,8 +13,8 @@ export const enableStatusRecord: Record = { - '0': 'page.manage.common.status.enable', - '1': 'page.manage.common.status.disable' + 0: 'page.manage.common.status.enable', + 1: 'page.manage.common.status.disable' }; export const enableStatus01Options = transformRecordToOption(enableStatus01Record); diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts index 77cba0a..992f0d5 100644 --- a/src/locales/langs/en-us.ts +++ b/src/locales/langs/en-us.ts @@ -549,7 +549,9 @@ const local: App.I18n.Schema = { groupName: 'Please select Group name', notifyThreshold: 'Please enter Notification threshold', notifyStatus: 'Please select State', - systemTaskType: '请选择任务类型' + systemTaskType: '请选择任务类型', + notifyRecipient: '请选择通知人', + rateLimiterThreshold: '请选择阈值' }, addNotifyConfig: 'Add Alarm notification', editNotifyConfig: 'Add Alarm notification', @@ -564,7 +566,10 @@ const local: App.I18n.Schema = { }, jobNotifyScene: { jobTaskError: '任务执行失败' - } + }, + notifyRecipient: '通知人信息', + rateLimiterStatus: '限流开关', + rateLimiterThreshold: '每秒限流阈值' }, notifyRecipient: { title: 'Notify Recipient List', diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index b115b0b..7c74222 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -545,7 +545,9 @@ const local: App.I18n.Schema = { groupName: '请选择组名称', notifyThreshold: '请输入通知阈值', notifyStatus: '请选择状态', - systemTaskType: '请选择任务类型' + systemTaskType: '请选择任务类型', + notifyRecipient: '请选择通知人', + rateLimiterThreshold: '请选择阈值' }, addNotifyConfig: '新增告警通知', editNotifyConfig: '编辑告警通知', @@ -560,7 +562,10 @@ const local: App.I18n.Schema = { }, jobNotifyScene: { jobTaskError: '任务执行失败' - } + }, + notifyRecipient: '通知人信息', + rateLimiterStatus: '限流开关', + rateLimiterThreshold: '每秒限流阈值' }, notifyRecipient: { title: '通知人列表', diff --git a/src/service/api/notify.ts b/src/service/api/notify.ts index 3170462..ac168cc 100644 --- a/src/service/api/notify.ts +++ b/src/service/api/notify.ts @@ -28,7 +28,7 @@ export function fetchEditNotify(data: Api.NotifyConfig.NotifyConfig) { } /** get notify recipient list */ -export function fetchGetNotifyRecipientList(params?: Api.NotifyRecipient.NotifyRecipientParams) { +export function fetchGetNotifyRecipientPageList(params?: Api.NotifyRecipient.NotifyRecipientParams) { return request({ url: '/notify-recipient/page/list', method: 'get', @@ -36,6 +36,14 @@ export function fetchGetNotifyRecipientList(params?: Api.NotifyRecipient.NotifyR }); } +/** get notify recipient list */ +export function fetchGetNotifyRecipientList() { + return request[]>({ + url: '/notify-recipient/list', + method: 'get' + }); +} + /** add notify recipient */ export function fetchAddNotifyRecipient(data: Api.NotifyRecipient.NotifyRecipient) { return request({ diff --git a/src/typings/api.d.ts b/src/typings/api.d.ts index db7f19a..d30e493 100644 --- a/src/typings/api.d.ts +++ b/src/typings/api.d.ts @@ -44,7 +44,7 @@ declare namespace Api { * - "0": enabled * - "1": disabled */ - type EnableStatus01 = '0' | '1'; + type EnableStatus01 = 0 | 1; /** * yes/no status @@ -516,6 +516,8 @@ declare namespace Api { groupName: string; /** 业务ID */ businessId: string; + /** 通知人id */ + notifyRecipientIds: number; /** 任务类型 1、重试任务 2、回调任务、3、JOB任务 4、WORKFLOW任务 */ systemTaskType: SystemTaskType; /** 业务名称 */ @@ -526,6 +528,10 @@ declare namespace Api { notifyScene: string; /** 通知阈值 */ notifyThreshold: number; + /** 限流开关 */ + rateLimiterStatus: number; + /** 每秒限流阈值 */ + rateLimiterThreshold: number; /** 描述 */ description: string; }>; diff --git a/src/typings/app.d.ts b/src/typings/app.d.ts index 0c8c776..923a861 100644 --- a/src/typings/app.d.ts +++ b/src/typings/app.d.ts @@ -721,6 +721,8 @@ declare namespace App { notifyThreshold: string; notifyStatus: string; systemTaskType: string; + notifyRecipient: string; + rateLimiterThreshold: string; }; addNotifyConfig: string; editNotifyConfig: string; @@ -736,6 +738,9 @@ declare namespace App { jobNotifyScene: { jobTaskError: string; }; + notifyRecipient: string; + rateLimiterStatus: string; + rateLimiterThreshold: string; }; notifyRecipient: { title: string; diff --git a/src/views/notify/recipient/index.vue b/src/views/notify/recipient/index.vue index dd1d986..27a16b6 100644 --- a/src/views/notify/recipient/index.vue +++ b/src/views/notify/recipient/index.vue @@ -1,6 +1,6 @@