fix: 通知场景通知人没有带出,部分输入要求不可编辑
This commit is contained in:
parent
71f73789c6
commit
40fb767609
2
src/typings/api.d.ts
vendored
2
src/typings/api.d.ts
vendored
@ -545,7 +545,7 @@ declare namespace Api {
|
|||||||
/** 业务ID */
|
/** 业务ID */
|
||||||
businessId: string;
|
businessId: string;
|
||||||
/** 通知人id */
|
/** 通知人id */
|
||||||
notifyRecipientIds: number;
|
recipientIds: number[];
|
||||||
/** 任务类型 1、重试任务 2、回调任务、3、JOB任务 4、WORKFLOW任务 */
|
/** 任务类型 1、重试任务 2、回调任务、3、JOB任务 4、WORKFLOW任务 */
|
||||||
systemTaskType: SystemTaskType;
|
systemTaskType: SystemTaskType;
|
||||||
/** 业务名称 */
|
/** 业务名称 */
|
||||||
|
@ -67,7 +67,7 @@ type Model = Pick<
|
|||||||
| 'id'
|
| 'id'
|
||||||
| 'groupName'
|
| 'groupName'
|
||||||
| 'businessId'
|
| 'businessId'
|
||||||
| 'notifyRecipientIds'
|
| 'recipientIds'
|
||||||
| 'systemTaskType'
|
| 'systemTaskType'
|
||||||
| 'notifyStatus'
|
| 'notifyStatus'
|
||||||
| 'notifyScene'
|
| 'notifyScene'
|
||||||
@ -94,26 +94,20 @@ function createDefaultModel(): Model {
|
|||||||
return {
|
return {
|
||||||
groupName: '',
|
groupName: '',
|
||||||
businessId: '',
|
businessId: '',
|
||||||
notifyRecipientIds: 0,
|
recipientIds: [],
|
||||||
systemTaskType: 1,
|
systemTaskType: 1,
|
||||||
notifyStatus: 1,
|
notifyStatus: 1,
|
||||||
notifyScene: 1,
|
notifyScene: 1,
|
||||||
notifyThreshold: 16,
|
notifyThreshold: 16,
|
||||||
rateLimiterStatus: 0,
|
rateLimiterStatus: 1,
|
||||||
rateLimiterThreshold: 0,
|
rateLimiterThreshold: 1,
|
||||||
description: ''
|
description: ''
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
type RuleKey = Extract<
|
type RuleKey = Extract<
|
||||||
keyof Model,
|
keyof Model,
|
||||||
| 'groupName'
|
'groupName' | 'businessId' | 'recipientIds' | 'notifyStatus' | 'notifyScene' | 'rateLimiterStatus' | 'notifyThreshold'
|
||||||
| 'businessId'
|
|
||||||
| 'notifyRecipientIds'
|
|
||||||
| 'notifyStatus'
|
|
||||||
| 'notifyScene'
|
|
||||||
| 'rateLimiterStatus'
|
|
||||||
| 'notifyThreshold'
|
|
||||||
>;
|
>;
|
||||||
|
|
||||||
const rules: Record<RuleKey, App.Global.FormRule> = {
|
const rules: Record<RuleKey, App.Global.FormRule> = {
|
||||||
@ -121,7 +115,7 @@ const rules: Record<RuleKey, App.Global.FormRule> = {
|
|||||||
businessId: defaultRequiredRule,
|
businessId: defaultRequiredRule,
|
||||||
notifyStatus: defaultRequiredRule,
|
notifyStatus: defaultRequiredRule,
|
||||||
notifyScene: defaultRequiredRule,
|
notifyScene: defaultRequiredRule,
|
||||||
notifyRecipientIds: defaultRequiredRule,
|
recipientIds: defaultRequiredRule,
|
||||||
rateLimiterStatus: defaultRequiredRule,
|
rateLimiterStatus: defaultRequiredRule,
|
||||||
notifyThreshold: defaultRequiredRule
|
notifyThreshold: defaultRequiredRule
|
||||||
};
|
};
|
||||||
@ -148,7 +142,7 @@ async function handleSubmit() {
|
|||||||
const {
|
const {
|
||||||
groupName,
|
groupName,
|
||||||
businessId,
|
businessId,
|
||||||
notifyRecipientIds,
|
recipientIds,
|
||||||
systemTaskType,
|
systemTaskType,
|
||||||
notifyStatus,
|
notifyStatus,
|
||||||
notifyScene,
|
notifyScene,
|
||||||
@ -160,7 +154,7 @@ async function handleSubmit() {
|
|||||||
const { error } = await fetchAddNotify({
|
const { error } = await fetchAddNotify({
|
||||||
groupName,
|
groupName,
|
||||||
businessId,
|
businessId,
|
||||||
notifyRecipientIds,
|
recipientIds,
|
||||||
systemTaskType,
|
systemTaskType,
|
||||||
notifyStatus,
|
notifyStatus,
|
||||||
notifyScene,
|
notifyScene,
|
||||||
@ -177,7 +171,7 @@ async function handleSubmit() {
|
|||||||
id,
|
id,
|
||||||
groupName,
|
groupName,
|
||||||
businessId,
|
businessId,
|
||||||
notifyRecipientIds,
|
recipientIds,
|
||||||
notifyStatus,
|
notifyStatus,
|
||||||
systemTaskType,
|
systemTaskType,
|
||||||
notifyScene,
|
notifyScene,
|
||||||
@ -190,7 +184,7 @@ async function handleSubmit() {
|
|||||||
id,
|
id,
|
||||||
groupName,
|
groupName,
|
||||||
businessId,
|
businessId,
|
||||||
notifyRecipientIds,
|
recipientIds,
|
||||||
systemTaskType,
|
systemTaskType,
|
||||||
notifyStatus,
|
notifyStatus,
|
||||||
notifyScene,
|
notifyScene,
|
||||||
@ -304,9 +298,9 @@ watch(visible, () => {
|
|||||||
clearable
|
clearable
|
||||||
/>
|
/>
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
<NFormItem :label="$t('page.notifyConfig.notifyRecipient')" path="notifyRecipientIds">
|
<NFormItem :label="$t('page.notifyConfig.notifyRecipient')" path="recipientIds">
|
||||||
<NSelect
|
<NSelect
|
||||||
v-model:value="model.notifyRecipientIds"
|
v-model:value="model.recipientIds"
|
||||||
:placeholder="$t('page.notifyConfig.form.notifyRecipient')"
|
:placeholder="$t('page.notifyConfig.form.notifyRecipient')"
|
||||||
:options="notifyRecipientList"
|
:options="notifyRecipientList"
|
||||||
clearable
|
clearable
|
||||||
@ -314,7 +308,11 @@ watch(visible, () => {
|
|||||||
/>
|
/>
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
<NFormItem :label="$t('page.notifyConfig.rateLimiterStatus')" path="rateLimiterStatus">
|
<NFormItem :label="$t('page.notifyConfig.rateLimiterStatus')" path="rateLimiterStatus">
|
||||||
<NRadioGroup v-model:value="model.rateLimiterStatus" name="rateLimiterStatus">
|
<NRadioGroup
|
||||||
|
v-model:value="model.rateLimiterStatus"
|
||||||
|
name="rateLimiterStatus"
|
||||||
|
:disabled="props.operateType === 'edit'"
|
||||||
|
>
|
||||||
<NSpace>
|
<NSpace>
|
||||||
<NRadio
|
<NRadio
|
||||||
v-for="item in enableStatusNumberOptions"
|
v-for="item in enableStatusNumberOptions"
|
||||||
@ -330,6 +328,7 @@ watch(visible, () => {
|
|||||||
v-model:value="model.rateLimiterThreshold"
|
v-model:value="model.rateLimiterThreshold"
|
||||||
:min="1"
|
:min="1"
|
||||||
:placeholder="$t('page.notifyConfig.form.rateLimiterThreshold')"
|
:placeholder="$t('page.notifyConfig.form.rateLimiterThreshold')"
|
||||||
|
:disabled="props.operateType === 'edit'"
|
||||||
/>
|
/>
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
<NFormItem :label="$t('page.notifyConfig.notifyThreshold')" path="notifyThreshold">
|
<NFormItem :label="$t('page.notifyConfig.notifyThreshold')" path="notifyThreshold">
|
||||||
@ -337,6 +336,7 @@ watch(visible, () => {
|
|||||||
v-model:value="model.notifyThreshold"
|
v-model:value="model.notifyThreshold"
|
||||||
:min="1"
|
:min="1"
|
||||||
:placeholder="$t('page.notifyConfig.form.notifyThreshold')"
|
:placeholder="$t('page.notifyConfig.form.notifyThreshold')"
|
||||||
|
:disabled="props.operateType === 'edit'"
|
||||||
/>
|
/>
|
||||||
</NFormItem>
|
</NFormItem>
|
||||||
<NFormItem :label="$t('page.notifyConfig.description')" path="description">
|
<NFormItem :label="$t('page.notifyConfig.description')" path="description">
|
||||||
|
Loading…
Reference in New Issue
Block a user