From 3ae3da16da1569cd01e4511bdcba18bdf4f91af7 Mon Sep 17 00:00:00 2001 From: guguji5 <604821528@qq.com> Date: Sat, 29 Jan 2022 09:57:56 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=91=8A=E8=AD=A6=E7=AD=96=E7=95=A5?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E7=95=99=E8=A7=82=E6=97=B6=E9=95=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../warning/strategy/components/editModal.tsx | 32 +++++++++++++++++++ .../strategy/components/operateForm.tsx | 13 +++++++- 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/src/pages/warning/strategy/components/editModal.tsx b/src/pages/warning/strategy/components/editModal.tsx index 6dd0fb52..c0105404 100644 --- a/src/pages/warning/strategy/components/editModal.tsx +++ b/src/pages/warning/strategy/components/editModal.tsx @@ -85,6 +85,11 @@ const fields = [ field: 'notify_repeat_step', name: '重复发送频率', }, + { + id: 15, + field: 'recover_duration', + name: '留观时长', + }, { id: 11, field: 'callbacks', @@ -476,6 +481,33 @@ const editModal: React.FC = ({ isModalVisible, editModalFinish }) => { ); + case 'recover_duration': + return ( + <> + + + + + + 分钟 + + + + + + + ); case 'notify_repeat_step': return ( <> diff --git a/src/pages/warning/strategy/components/operateForm.tsx b/src/pages/warning/strategy/components/operateForm.tsx index 091097cb..ad286e3b 100644 --- a/src/pages/warning/strategy/components/operateForm.tsx +++ b/src/pages/warning/strategy/components/operateForm.tsx @@ -210,6 +210,7 @@ const operateForm: React.FC = ({ type, detail = {} }) => { enable_time: detail?.enable_stime ? [moment(detail.enable_stime, 'HH:mm'), moment(detail.enable_etime, 'HH:mm')] : [moment('00:00', 'HH:mm'), moment('23:59', 'HH:mm')], enable_status: detail?.disabled === undefined ? true : !detail?.disabled, notify_recovered: detail?.notify_recovered === 1 || detail?.notify_recovered === undefined ? true : false, // 1:启用 0:禁用 + recover_duration: detail?.recover_duration || 0, callbacks: !!detail?.callbacks ? detail.callbacks.map((item) => ({ url: item, @@ -424,7 +425,17 @@ const operateForm: React.FC = ({ type, detail = {} }) => { - + + + + + + 分钟 + + + + +