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)} >