From aeacbe624ace95156abdf1abbcd3e38e4d31cb66 Mon Sep 17 00:00:00 2001 From: deartibers <947466799@qq.com> Date: Thu, 3 Nov 2022 15:18:58 +0800 Subject: [PATCH] =?UTF-8?q?=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sections/service/components/pushModal.jsx | 42 ++++++++++++++----- .../sections/service/containers/emPush.jsx | 22 +++++----- 2 files changed, 43 insertions(+), 21 deletions(-) diff --git a/web/client/src/sections/service/components/pushModal.jsx b/web/client/src/sections/service/components/pushModal.jsx index d271001..823a436 100644 --- a/web/client/src/sections/service/components/pushModal.jsx +++ b/web/client/src/sections/service/components/pushModal.jsx @@ -123,6 +123,11 @@ function pushModal (props) { delete obj.interval2 delete obj.interval3 delete obj.deviceProportion + dispatch(service.postPush({ pushId: editObj.id, ...obj, msg: '编辑推送配置' })).then((res) => {//获取项企(PEP)全部部门及其下用户 + if (res.success) { + close(); + } + }) } else { Notification.error({ content: '即时推送时间不能大于1440分钟', @@ -153,6 +158,11 @@ function pushModal (props) { delete obj.interval2 delete obj.interval3 delete obj.deviceProportion + dispatch(service.postPush({ pushId: editObj.id, ...obj, msg: '编辑推送配置' })).then((res) => {//获取项企(PEP)全部部门及其下用户 + if (res.success) { + close(); + } + }) } else { Notification.error({ content: '持续时长推送时间不能大于1440分钟', @@ -183,6 +193,11 @@ function pushModal (props) { delete obj.interval2 delete obj.interval3 delete obj.deviceProportion + dispatch(service.postPush({ pushId: editObj.id, ...obj, msg: '编辑推送配置' })).then((res) => {//获取项企(PEP)全部部门及其下用户 + if (res.success) { + close(); + } + }) } else if (obj.interval3 <= 720 && obj.deviceProportion > 100) { Notification.error({ content: '异常率推送异常率不能超过100%', @@ -224,11 +239,6 @@ function pushModal (props) { }) } } - dispatch(service.postPush({ pushId: editObj.id, ...obj, msg: '编辑推送配置' })).then((res) => {//获取项企(PEP)全部部门及其下用户 - if (res.success) { - close(); - } - }) } else { let obj = JSON.parse(JSON.stringify(values)) @@ -247,6 +257,11 @@ function pushModal (props) { delete obj.interval2 delete obj.interval3 delete obj.deviceProportion + dispatch(service.postPush({ ...obj, msg: '新增推送配置' })).then((res) => {//获取项企(PEP)全部部门及其下用户 + if (res.success) { + close(); + } + }) } else { Notification.error({ content: '即时推送时间不能大于1440分钟', @@ -277,6 +292,11 @@ function pushModal (props) { delete obj.interval2 delete obj.interval3 delete obj.deviceProportion + dispatch(service.postPush({ ...obj, msg: '新增推送配置' })).then((res) => {//获取项企(PEP)全部部门及其下用户 + if (res.success) { + close(); + } + }) } else { Notification.error({ content: '持续时长推送时间不能大于1440分钟', @@ -307,6 +327,11 @@ function pushModal (props) { delete obj.interval2 delete obj.interval3 delete obj.deviceProportion + dispatch(service.postPush({ ...obj, msg: '新增推送配置' })).then((res) => {//获取项企(PEP)全部部门及其下用户 + if (res.success) { + close(); + } + }) } else if (obj.interval3 <= 720 && obj.deviceProportion > 100) { Notification.error({ content: '异常率推送异常率不能超过100%', @@ -348,11 +373,6 @@ function pushModal (props) { }) } } - dispatch(service.postPush({ ...obj, msg: '新增推送配置' })).then((res) => {//获取项企(PEP)全部部门及其下用户 - if (res.success) { - close(); - } - }) } }) } @@ -414,6 +434,8 @@ function pushModal (props) {