feat(sj_1.3.0-beta1): 优化通知场景搜索条件
This commit is contained in:
parent
771b1d7ee9
commit
eb1424e832
32
src/components/common/system-task-type.vue
Normal file
32
src/components/common/system-task-type.vue
Normal file
@ -0,0 +1,32 @@
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { $t } from '@/locales';
|
||||
import { translateOptions } from '@/utils/common';
|
||||
import { systemTaskTypeOptions } from '@/constants/business';
|
||||
|
||||
defineOptions({
|
||||
name: 'SystemTaskType'
|
||||
});
|
||||
|
||||
interface Emits {
|
||||
(e: 'update:value', value: Api.NotifyConfig.SystemTaskType): void;
|
||||
}
|
||||
const emit = defineEmits<Emits>();
|
||||
|
||||
const valueRef = ref<Api.NotifyConfig.SystemTaskType>();
|
||||
|
||||
const handleUpdate = (value: Api.NotifyConfig.SystemTaskType) => {
|
||||
emit('update:value', value);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<NSelect
|
||||
v-model:value="valueRef"
|
||||
:placeholder="$t('page.notifyConfig.systemTaskType')"
|
||||
:options="translateOptions(systemTaskTypeOptions)"
|
||||
@update:value="handleUpdate"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
@ -541,7 +541,7 @@ const local: App.I18n.Schema = {
|
||||
title: '告警通知列表',
|
||||
groupName: '组名称',
|
||||
businessName: '业务ID',
|
||||
notifyName: '告警通知名称',
|
||||
notifyName: '通知名称',
|
||||
notifyStatus: '通知状态',
|
||||
notifyType: '通知类型',
|
||||
notifyScene: '通知场景',
|
||||
@ -552,7 +552,7 @@ const local: App.I18n.Schema = {
|
||||
job: '定时任务',
|
||||
workflow: '工作流',
|
||||
form: {
|
||||
notifyName: '请选择告警通知名称',
|
||||
notifyName: '请输入通知名称',
|
||||
description: '请输入描述',
|
||||
notifyType: '请选择通知类型',
|
||||
notifyAttribute: '请求输入通知属性',
|
||||
|
5
src/typings/api.d.ts
vendored
5
src/typings/api.d.ts
vendored
@ -600,7 +600,10 @@ declare namespace Api {
|
||||
|
||||
/** notify-config search params */
|
||||
type NotifySearchParams = CommonType.RecordNullable<
|
||||
Pick<Api.NotifyConfig.NotifyConfig, 'groupName' | 'systemTaskType' | 'notifyStatus' | 'notifyScene'> &
|
||||
Pick<
|
||||
Api.NotifyConfig.NotifyConfig,
|
||||
'groupName' | 'systemTaskType' | 'notifyStatus' | 'notifyScene' | 'notifyName'
|
||||
> &
|
||||
CommonSearchParams
|
||||
>;
|
||||
|
||||
|
@ -31,7 +31,9 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
// the value can not be undefined, otherwise the property in Form will not be reactive
|
||||
groupName: null,
|
||||
notifyStatus: null,
|
||||
notifyScene: null
|
||||
notifyScene: null,
|
||||
notifyName: null,
|
||||
systemTaskType: null
|
||||
},
|
||||
columns: () => [
|
||||
{
|
||||
@ -102,6 +104,12 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
|
||||
return <StatusSwitch v-model:value={row.notifyStatus} onSubmitted={fetchFn} />;
|
||||
}
|
||||
},
|
||||
{
|
||||
key: 'notifyName',
|
||||
title: $t('page.notifyConfig.notifyName'),
|
||||
align: 'left',
|
||||
width: 120
|
||||
},
|
||||
{
|
||||
key: 'notifyScene',
|
||||
title: $t('page.notifyConfig.notifyScene'),
|
||||
|
@ -9,6 +9,7 @@ defineOptions({
|
||||
|
||||
interface Emits {
|
||||
(e: 'reset'): void;
|
||||
|
||||
(e: 'search'): void;
|
||||
}
|
||||
|
||||
@ -30,9 +31,19 @@ function search() {
|
||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.notifyConfig.groupName')" path="groupName" class="pr-24px">
|
||||
<SelectGroup v-model:value="model.groupName" clearable />
|
||||
</NFormItemGi>
|
||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.notifyConfig.notifyScene')" path="notifyScene" class="pr-24px">
|
||||
<SelectScene v-model:value="model.notifyScene" :group-name="model.groupName as string" clearable />
|
||||
<NFormItemGi
|
||||
span="24 s:12 m:6"
|
||||
:label="$t('page.notifyConfig.systemTaskType')"
|
||||
path="systemTaskType"
|
||||
class="pr-24px"
|
||||
>
|
||||
<SystemTaskType v-model:value="model.systemTaskType" clearable />
|
||||
</NFormItemGi>
|
||||
<!--
|
||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.notifyConfig.notifyScene')" path="notifyScene" class="pr-24px">
|
||||
<SelectScene v-model:value="model.notifyScene" :group-name="model.groupName as string" clearable/>
|
||||
</NFormItemGi>
|
||||
-->
|
||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.notifyConfig.notifyStatus')" path="notifyStatus" class="pr-24px">
|
||||
<NSelect
|
||||
v-model:value="model.notifyStatus"
|
||||
@ -41,6 +52,9 @@ function search() {
|
||||
clearable
|
||||
/>
|
||||
</NFormItemGi>
|
||||
<NFormItemGi span="24 s:12 m:6" :label="$t('page.notifyConfig.notifyName')" path="notifyName" class="pr-24px">
|
||||
<NInput v-model:value="model.notifyName" :placeholder="$t('page.notifyConfig.form.notifyName')" clearable />
|
||||
</NFormItemGi>
|
||||
</SearchForm>
|
||||
</template>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user