From f0d3a1144db560b81a065d88bc460bff474c5277 Mon Sep 17 00:00:00 2001
From: deartibers <947466799@qq.com>
Date: Fri, 12 Aug 2022 10:49:50 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../offline/containers/carrierpigeon.jsx | 33 ++++---------------
1 file changed, 7 insertions(+), 26 deletions(-)
diff --git a/code/VideoAccess-VCMP/web/client/src/sections/offline/containers/carrierpigeon.jsx b/code/VideoAccess-VCMP/web/client/src/sections/offline/containers/carrierpigeon.jsx
index b885827..fbd509b 100644
--- a/code/VideoAccess-VCMP/web/client/src/sections/offline/containers/carrierpigeon.jsx
+++ b/code/VideoAccess-VCMP/web/client/src/sections/offline/containers/carrierpigeon.jsx
@@ -96,6 +96,11 @@ const Carrierpigeon = (props) => {
limits.current = res.payload.data.length
});
}
+ function banned(row){
+ dispatch(offline.putPushBanned({configId: row.id,forbidden: !row.forbidden})).then(() => {
+ dispatch(offline.getStatusPush(searchData.current))
+ });
+ }
const columns = [
{
title: "序号",
@@ -132,19 +137,7 @@ const Carrierpigeon = (props) => {
{row.forbidden ? (
@@ -154,19 +147,7 @@ const Carrierpigeon = (props) => {
arrowPointAtCenter={false}
showArrow={true}
position="topRight"
- onConfirm={() => {
- dispatch(
- offline.putPushBanned(
- {
- configId: row.id,
- forbidden: !row.forbidden,
- },
- row.forbidden
- )
- ).then(() => {
- equipmentGetStatusPush();
- });
- }}
+ onConfirm={() =>banned(row)}
>