Browse Source

问题修改

release_1.2.1
deartibers 3 years ago
parent
commit
72b2a73aef
  1. 34
      code/VideoAccess-VCMP/web/client/src/sections/offline/containers/statuscode.jsx

34
code/VideoAccess-VCMP/web/client/src/sections/offline/containers/statuscode.jsx

@ -63,7 +63,11 @@ const Statuscode = (props) => {
const codegetStatus = () => { const codegetStatus = () => {
searchData.current = { ...query, ...search } searchData.current = { ...query, ...search }
dispatch(offline.getStatus(searchData.current)).then((res) => { dispatch(offline.getStatus(searchData.current)).then((res) => {
});
}
function banned(row){
dispatch(offline.putStatueBanned({statusId: row.id,forbidden: !row.forbidden,})).then(() => {
dispatch(offline.getStatus(searchData.current))
}); });
} }
const columns = [ const columns = [
@ -115,19 +119,7 @@ const Statuscode = (props) => {
{row.forbidden ? ( {row.forbidden ? (
<Button <Button
theme="borderless" theme="borderless"
onClick={() => { onClick={() => banned(row)}
dispatch(
offline.putStatueBanned(
{
statusId: row.id,
forbidden: !row.forbidden,
},
row.forbidden
)
).then(() => {
codegetStatus();
});
}}
> >
启用 启用
</Button> </Button>
@ -137,19 +129,7 @@ const Statuscode = (props) => {
arrowPointAtCenter={false} arrowPointAtCenter={false}
showArrow={true} showArrow={true}
position="topRight" position="topRight"
onConfirm={() => { onConfirm={() => banned(row)}
dispatch(
offline.putStatueBanned(
{
statusId: row.id,
forbidden: !row.forbidden,
},
row.forbidden
)
).then(() => {
codegetStatus();
});
}}
> >
<Button theme="borderless">禁用</Button> <Button theme="borderless">禁用</Button>
</Popconfirm> </Popconfirm>

Loading…
Cancel
Save