diff --git a/apps/web-antd/src/locales/langs/en-US/alert.json b/apps/web-antd/src/locales/langs/en-US/alert.json index 7c3abcf..560cb27 100644 --- a/apps/web-antd/src/locales/langs/en-US/alert.json +++ b/apps/web-antd/src/locales/langs/en-US/alert.json @@ -12,5 +12,19 @@ "descriptionPlaceholder": "Please enter description", "createTime": "Create Time", "updateTime": "Update Time", - "operation": "Operation" + "operation": "Operation", + "day": "day", + "Reminder": "Reminder", + "selectremind": "Please select the person to be reminded.", + "reminderdays": "Reminder days", + "selectday": "Please select the number of days to be reminded", + "content": "Content", + "selectcontent": "Please enter the reminder content", + "status": "Status", + "enable": "enable", + "disable": "disable", + "alerttitle": "Alarm configuration", + "save": "Save", + "reset": "Reset", + "alerttooltip": "Send email reminders at midnight every day" } diff --git a/apps/web-antd/src/locales/langs/en-US/menu.json b/apps/web-antd/src/locales/langs/en-US/menu.json index 7fb32a7..b82cfcf 100644 --- a/apps/web-antd/src/locales/langs/en-US/menu.json +++ b/apps/web-antd/src/locales/langs/en-US/menu.json @@ -84,5 +84,6 @@ }, "customer": "Customer Management", "project": "Project Management", - "license": "License Management" + "license": "License Management", + "alert": "Alarm Management" } diff --git a/apps/web-antd/src/locales/langs/zh-CN/alert.json b/apps/web-antd/src/locales/langs/zh-CN/alert.json index 13f3a2d..2606ce4 100644 --- a/apps/web-antd/src/locales/langs/zh-CN/alert.json +++ b/apps/web-antd/src/locales/langs/zh-CN/alert.json @@ -12,5 +12,19 @@ "descriptionPlaceholder": "请输入描述信息", "createTime": "创建时间", "updateTime": "更新时间", - "operation": "操作" + "operation": "操作", + "day": "天", + "Reminder": "提醒人", + "selectremind": "请选择提醒人", + "reminderdays": "提醒天数", + "selectday": "请选择提醒天数", + "content": "提醒内容", + "selectcontent": "请输入提醒内容", + "status": "启用状态", + "enable": "启用", + "disable": "禁用", + "alerttitle": "告警配置", + "save": "保存", + "reset": "重置", + "alerttooltip": "每天零点发送邮件提醒" } diff --git a/apps/web-antd/src/locales/langs/zh-CN/menu.json b/apps/web-antd/src/locales/langs/zh-CN/menu.json index 4a34e28..546f065 100644 --- a/apps/web-antd/src/locales/langs/zh-CN/menu.json +++ b/apps/web-antd/src/locales/langs/zh-CN/menu.json @@ -84,5 +84,6 @@ }, "customer": "客户管理", "project": "项目管理", - "license": "License管理" + "license": "License管理", + "alert": "告警管理" } diff --git a/apps/web-antd/src/views/alert/index.vue b/apps/web-antd/src/views/alert/index.vue index c313d2c..99554f9 100644 --- a/apps/web-antd/src/views/alert/index.vue +++ b/apps/web-antd/src/views/alert/index.vue @@ -9,6 +9,7 @@ import { Button, Card, message, Space } from 'ant-design-vue'; import { useVbenForm } from '#/adapter/form'; import { getAlertPage, updateAlert } from '#/api/alert/alert'; import { getSimpleUserList } from '#/api/system/user'; +import { $t } from '#/locales'; const { hasAccessByCodes } = useAccess(); @@ -25,10 +26,10 @@ const userOptions = ref([]); // 提醒天数选项 const daysOptions = [ - { label: '15天', value: 15 }, - { label: '7天', value: 7 }, - { label: '2天', value: 2 }, - { label: '1天', value: 1 }, + { label: `15${$t('alert.day')}`, value: 15 }, + { label: `7${$t('alert.day')}`, value: 7 }, + { label: `2${$t('alert.day')}`, value: 2 }, + { label: `1${$t('alert.day')}`, value: 1 }, ]; // 表单配置 @@ -43,11 +44,11 @@ const formSchema = computed(() => [ }, { fieldName: 'days', - label: '提醒天数', + label: $t('alert.reminderdays'), rules: 'required', component: 'Select', componentProps: { - placeholder: '请选择提醒天数', + placeholder: $t('alert.selectday'), mode: 'multiple', allowClear: true, options: daysOptions, @@ -55,11 +56,11 @@ const formSchema = computed(() => [ }, { fieldName: 'content', - label: '提醒内容', + label: $t('alert.content'), rules: 'required', component: 'Textarea', componentProps: { - placeholder: '请输入提醒内容', + placeholder: $t('alert.selectcontent'), rows: 4, showCount: true, maxlength: 500, @@ -67,11 +68,11 @@ const formSchema = computed(() => [ }, { fieldName: 'status', - label: '启用状态', + label: $t('alert.status'), component: 'Switch', componentProps: { - checkedChildren: '启用', - unCheckedChildren: '禁用', + checkedChildren: $t('alert.enable'), + unCheckedChildren: $t('alert.disable'), checkedValue: 1, unCheckedValue: 2, style: { width: 'auto' }, @@ -166,13 +167,13 @@ onMounted(async () => { @click="handleSubmit" v-if="hasAccessByCodes(['license:alert:update'])" > - 保存 + {{ $t('alert.save') }} - +