Browse Source

修改问题

release_1.2.1
deartibers 3 years ago
parent
commit
f0d3a1144d
  1. 33
      code/VideoAccess-VCMP/web/client/src/sections/offline/containers/carrierpigeon.jsx

33
code/VideoAccess-VCMP/web/client/src/sections/offline/containers/carrierpigeon.jsx

@ -96,6 +96,11 @@ const Carrierpigeon = (props) => {
limits.current = res.payload.data.length 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 = [ const columns = [
{ {
title: "序号", title: "序号",
@ -132,19 +137,7 @@ const Carrierpigeon = (props) => {
{row.forbidden ? ( {row.forbidden ? (
<Button <Button
theme="borderless" theme="borderless"
onClick={() => { onClick={() => banned(row)}
dispatch(
offline.putPushBanned(
{
configId: row.id,
forbidden: !row.forbidden,
},
row.forbidden
)
).then(() => {
equipmentGetStatusPush();
});
}}
> >
启用 启用
</Button> </Button>
@ -154,19 +147,7 @@ const Carrierpigeon = (props) => {
arrowPointAtCenter={false} arrowPointAtCenter={false}
showArrow={true} showArrow={true}
position="topRight" position="topRight"
onConfirm={() => { onConfirm={() =>banned(row)}
dispatch(
offline.putPushBanned(
{
configId: row.id,
forbidden: !row.forbidden,
},
row.forbidden
)
).then(() => {
equipmentGetStatusPush();
});
}}
> >
<Button theme="borderless">禁用</Button> <Button theme="borderless">禁用</Button>
</Popconfirm> </Popconfirm>

Loading…
Cancel
Save