feat(1.3.0-beta1): 通知配置列表添加通知名称

This commit is contained in:
opensnail 2024-12-25 23:34:33 +08:00
parent 771b1d7ee9
commit 5be38d0a4a
4 changed files with 15 additions and 10 deletions

View File

@ -541,7 +541,7 @@ const local: App.I18n.Schema = {
title: '告警通知列表',
groupName: '组名称',
businessName: '业务ID',
notifyName: '告警通知名称',
notifyName: '通知名称',
notifyStatus: '通知状态',
notifyType: '通知类型',
notifyScene: '通知场景',

View File

@ -46,8 +46,8 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
width: 64
},
{
key: 'businessName',
title: $t('page.notifyConfig.businessName'),
key: 'notifyName',
title: $t('page.notifyConfig.notifyName'),
align: 'left',
width: 120,
render: row => {
@ -58,7 +58,7 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
return (
<n-button text tag="a" type="primary" onClick={showDetailDrawer} class="ws-normal">
{row.businessName}
{row.notifyName}
</n-button>
);
}

View File

@ -22,8 +22,8 @@ const visible = defineModel<boolean>('visible', {
<template>
<OperateDrawer v-model="visible" :title="$t('page.groupConfig.detail')">
<NDescriptions label-placement="top" bordered :column="2">
<NDescriptionsItem :label="$t('page.notifyConfig.businessName')" :span="2">
{{ rowData?.businessName }}
<NDescriptionsItem :label="$t('page.notifyConfig.notifyName')" :span="2">
{{ rowData?.notifyName }}
</NDescriptionsItem>
<NDescriptionsItem :label="$t('page.groupConfig.groupName')" :span="2">
{{ rowData?.groupName }}

View File

@ -61,7 +61,7 @@ const retrySceneDisable = defineModel<boolean>('retrySceneDisable', {
default: true
});
const notifySceneOptions = ref<CommonType.Option<string | number>[]>(translateOptions(retryNotifySceneOptions));
const notifySceneOptions = ref<CommonType.Option<string | number>[]>([]);
const { formRef, validate, restoreValidation } = useNaiveForm();
const { defaultRequiredRule } = useFormRules();
@ -145,6 +145,7 @@ function handleUpdateModelWhenEdit() {
Object.assign(model, createDefaultModel());
retrySceneDisable.value = true;
retryNotifyStatusDisable.value = true;
notifySceneOptions.value = [];
return;
}
@ -292,6 +293,13 @@ watch(visible, () => {
<template>
<OperateDrawer v-model="visible" :title="title" :min-size="480" @handle-submit="handleSubmit">
<NForm ref="formRef" :model="model" :rules="rules">
<NFormItem :label="$t('page.notifyConfig.notifyName')" path="notifyName">
<NInput
v-model:value="model.notifyName"
:placeholder="$t('page.notifyConfig.form.notifyName')"
:maxlength="32"
/>
</NFormItem>
<NFormItem :label="$t('page.notifyConfig.groupName')" path="groupName">
<SelectGroup v-model:value="model.groupName" @update:model-value="groupNameUpdate" />
</NFormItem>
@ -303,9 +311,6 @@ watch(visible, () => {
@update:value="systemTaskTypeChange"
/>
</NFormItem>
<NFormItem :label="$t('page.notifyConfig.notifyName')" path="notifyName">
<NInput v-model:value="model.notifyName" :placeholder="$t('page.notifyConfig.form.notifyName')" />
</NFormItem>
<NFormItem :label="$t('page.notifyConfig.notifyScene')" path="notifyScene">
<NSelect
v-model:value="model.notifyScene"