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

Loading…
Cancel
Save