From 771b1d7ee925b1506d43cbd4e4d2d5d8d6995514 Mon Sep 17 00:00:00 2001 From: wodeyangzipingpingwuqi Date: Wed, 18 Dec 2024 16:30:08 +0800 Subject: [PATCH] =?UTF-8?q?feat(sj=5F1.3.0-beta1):=20=E9=87=8D=E8=AF=95?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E6=96=B0=E5=A2=9E=E4=BB=BB=E5=8A=A1=E5=A4=B1?= =?UTF-8?q?=E8=B4=A5=E5=91=8A=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/constants/business.ts | 2 +- src/locales/langs/en-us.ts | 2 +- src/locales/langs/zh-cn.ts | 2 +- src/typings/api.d.ts | 2 +- src/typings/app.d.ts | 2 +- .../modules/notify-config-operate-drawer.vue | 29 +++++++++++++++++-- 6 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/constants/business.ts b/src/constants/business.ts index ec3178d..af1426c 100644 --- a/src/constants/business.ts +++ b/src/constants/business.ts @@ -51,7 +51,7 @@ export const retryNotifyScene: Record('visible', { default: false }); +const retryNotifyStatusDisable = defineModel('retryNotifyStatusDisable', { + default: true +}); + const retrySceneDisable = defineModel('retrySceneDisable', { default: true }); @@ -107,7 +111,7 @@ function createDefaultModel(): Model { notifyStatus: 1, notifyScene: null, notifyThreshold: 16, - rateLimiterStatus: 0, + rateLimiterStatus: 1, rateLimiterThreshold: 100, description: '' }; @@ -140,6 +144,7 @@ function handleUpdateModelWhenEdit() { if (props.operateType === 'add') { Object.assign(model, createDefaultModel()); retrySceneDisable.value = true; + retryNotifyStatusDisable.value = true; return; } @@ -239,6 +244,17 @@ async function systemTaskTypeChange(value: number | null) { }) as Api.Workflow.Workflow[]; notifySceneOptions.value = translateOptions(workflowNotifySceneOptions); } + await retrySceneChange(model.notifyScene); + let notifySceneEmpty = false; + notifySceneOptions.value.map(i => { + if (i.value === model.notifyScene) { + notifySceneEmpty = true; + } + return String(i.value); + }); + if (!notifySceneEmpty) { + model.notifyScene = null; + } } async function retrySceneChange( @@ -248,7 +264,14 @@ async function retrySceneChange( | Api.NotifyConfig.WorkflowNotifyScene | null ) { - retrySceneDisable.value = !(value === 5 || value === 6); + retrySceneDisable.value = !(model.systemTaskType === 1 && (value === 1 || value === 2 || value === 5 || value === 6)); + retryNotifyStatusDisable.value = retrySceneDisable.value; + model.notifyStatus = retrySceneDisable.value ? 0 : 1; + if (value === 7) { + model.notifyThreshold = 0; + model.rateLimiterStatus = 1; + retrySceneDisable.value = true; + } } function groupNameUpdate(groupName: string) { @@ -303,7 +326,7 @@ watch(visible, () => { - +