|
@ -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> |
|
|