|
|
@@ -222,7 +222,10 @@ const loadData = (refresh: boolean = false) => {
|
|
|
|
|
|
const handleStatusChange = (row: any) => {
|
|
|
const statusText = row.enabled === 1 ? '启用' : '禁用';
|
|
|
- $put(`/station-whitelist/config/update?stationId=${row.stationId}&enabled=${row.enabled}`).then(() => {
|
|
|
+ $body(`/station-whitelist/config/update`, {
|
|
|
+ stationId: row.stationId,
|
|
|
+ enabled: row.enabled
|
|
|
+ }).then(() => {
|
|
|
Msg.message(`${statusText}成功`, 'success');
|
|
|
}).catch(() => {
|
|
|
Msg.message(`${statusText}失败`, 'error');
|
|
|
@@ -259,7 +262,10 @@ const onSubmit = () => {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- $put(`/station-whitelist/config/update?stationId=${state.dialog.stationId}&enabled=1`).then(() => {
|
|
|
+ $body(`/station-whitelist/config/update`, {
|
|
|
+ stationId: state.dialog.stationId,
|
|
|
+ enabled: 1
|
|
|
+ }).then(() => {
|
|
|
Msg.message('添加成功', 'success');
|
|
|
loadData(true);
|
|
|
onClose();
|