diff --git a/src/constants/business.ts b/src/constants/business.ts index 09c51ec..3642dbc 100644 --- a/src/constants/business.ts +++ b/src/constants/business.ts @@ -42,3 +42,11 @@ export const idGeneratorModeRecord: Record = { + '1': 'page.notifyRecipient.dingDing', + '2': 'page.notifyRecipient.email', + '3': 'page.notifyRecipient.weCom', + '4': 'page.notifyRecipient.lark' +}; +export const alarmTypeRecordOptions = transformRecordToOption(alarmTypeRecord); diff --git a/src/locales/langs/en-us.ts b/src/locales/langs/en-us.ts index 1e92d1d..d5302b4 100644 --- a/src/locales/langs/en-us.ts +++ b/src/locales/langs/en-us.ts @@ -548,26 +548,30 @@ const local: App.I18n.Schema = { editNotifyConfig: 'Add Alarm notification' }, notifyRecipient: { - title: 'NotifyRecipient List', - recipientName: 'Recipient name', - notifyType: 'Notification type', - notifyAttribute: 'Attribute information', - description: 'Describe', + title: 'Notify Recipient List', + recipientName: 'Recipient Name', + notifyType: 'Notification Type', + notifyAttribute: 'Attribute Information', + description: 'Description', form: { - description: 'Please enter Describe', - notifyAttribute: 'Please enter Attribute information', - recipientName: 'Please enter Recipient name', - notifyType: 'lease select Notification type', - dingdingAts: "请输入被{'@'}人手机号或钉钉号", - qiYeWechatAts: "请输入被{'@'}人企业微信用户id", - larkAts: "请输入被{'@'}人open_id", - webhookUrl: '请输入URL' + description: 'Please enter description', + notifyAttribute: 'Please enter attribute information', + recipientName: 'Please enter recipient name', + notifyType: 'Please select notification type', + dingDingAts: "Please enter the {'@'} phone number or DingTalk ID", + weComAts: "Please enter the {'@'} Enterprise WeChat user ID", + larkAts: "Please enter the {'@'} open_id", + webhookUrl: 'Please enter URL' }, - addNotifyRecipient: 'Add Notify recipients', - editNotifyRecipient: 'Add Notify recipients', - ats: "{'@'}通知人", - webhookUrl: '通知地址', - tos: '通知人邮箱地址' + addNotifyRecipient: 'Add Notify Recipient', + editNotifyRecipient: 'Edit Notify Recipient', + ats: "{'@'} Notification Recipient", + webhookUrl: 'Notification Address', + tos: 'Recipient Email Address', + dingDing: 'DingTalk', + email: 'Email', + weCom: 'WeCom', + lark: 'Lark' } }, form: { diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index 0bb9779..64490cc 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -544,7 +544,7 @@ const local: App.I18n.Schema = { editNotifyConfig: '编辑告警通知' }, notifyRecipient: { - title: 'NotifyRecipient 列表', + title: '通知人列表', recipientName: '接收人名称', notifyType: '通知类型', notifyAttribute: '属性信息', @@ -554,8 +554,8 @@ const local: App.I18n.Schema = { notifyAttribute: '请输入属性信息', recipientName: '请输入接收人名称', notifyType: '请选择通知类型', - dingdingAts: "请输入被{'@'}人手机号或钉钉号", - qiYeWechatAts: "请输入被{'@'}人企业微信用户id", + dingDingAts: "请输入被{'@'}人手机号或钉钉号", + weComAts: "请输入被{'@'}人企业微信用户id", larkAts: "请输入被{'@'}人open_id", webhookUrl: '请输入URL' }, @@ -563,7 +563,11 @@ const local: App.I18n.Schema = { editNotifyRecipient: '编辑通知接收人', ats: "{'@'}通知人", webhookUrl: '通知地址', - tos: '通知人邮箱地址' + tos: '通知人邮箱地址', + dingDing: '钉钉', + email: '邮箱', + weCom: '企业微信', + lark: '飞书' } }, form: { diff --git a/src/typings/api.d.ts b/src/typings/api.d.ts index 4abe5ee..b75171b 100644 --- a/src/typings/api.d.ts +++ b/src/typings/api.d.ts @@ -590,6 +590,6 @@ declare namespace Api { type NotifyRecipientList = Common.PaginatingQueryRecord; /** 1: 钉钉通知 2: 邮件通知 3: 企业通知 4: 飞书 */ - type AlarmType = 1 | 2 | 3 | 4; + type AlarmType = '1' | '2' | '3' | '4'; } } diff --git a/src/typings/app.d.ts b/src/typings/app.d.ts index 702df3d..10389d9 100644 --- a/src/typings/app.d.ts +++ b/src/typings/app.d.ts @@ -729,8 +729,8 @@ declare namespace App { notifyAttribute: string; recipientName: string; notifyType: string; - dingdingAts: string; - qiYeWechatAts: string; + dingDingAts: string; + weComAts: string; larkAts: string; webhookUrl: string; }; @@ -739,6 +739,10 @@ declare namespace App { ats: string; webhookUrl: string; tos: string; + dingDing: string; + email: string; + weCom: string; + lark: string; }; }; form: { diff --git a/src/views/notify/recipient/index.vue b/src/views/notify/recipient/index.vue index 218b761..dd1d986 100644 --- a/src/views/notify/recipient/index.vue +++ b/src/views/notify/recipient/index.vue @@ -1,9 +1,10 @@