diff --git a/src/components/common/status-switch.vue b/src/components/common/status-switch.vue
index 60bab0c..ff28724 100644
--- a/src/components/common/status-switch.vue
+++ b/src/components/common/status-switch.vue
@@ -1,36 +1,54 @@
{
- const fetchFn = async (groupStatus: Api.Common.EnableStatusNumber, callback: () => void) => {
+ const fetchFn = async (groupStatus: Api.Common.EnableStatusNumber, callback: (flag: boolean) => void) => {
const status = row.groupStatus === 1 ? 0 : 1;
const { error } = await fetchUpdateGroupStatus({ groupName: row.groupName, groupStatus: status });
if (!error) {
row.groupStatus = groupStatus;
window.$message?.success($t('common.updateSuccess'));
}
- callback();
+ callback(!error);
};
return (
-
+
);
}
},
diff --git a/src/views/job/task/index.vue b/src/views/job/task/index.vue
index d67a532..9a7349e 100644
--- a/src/views/job/task/index.vue
+++ b/src/views/job/task/index.vue
@@ -83,16 +83,16 @@ const { columnChecks, columns, data, getData, loading, mobilePagination, searchP
align: 'center',
width: 60,
render: row => {
- const fetchFn = async (jobStatus: Api.Common.EnableStatusNumber, callback: () => void) => {
+ const fetchFn = async (jobStatus: Api.Common.EnableStatusNumber, callback: (flag: boolean) => void) => {
const { error } = await fetchUpdateJobStatus({ id: row.id!, jobStatus });
if (!error) {
row.jobStatus = jobStatus;
window.$message?.success($t('common.updateSuccess'));
}
- callback();
+ callback(!error);
};
- return ;
+ return ;
}
},
{
diff --git a/src/views/notify/config/index.vue b/src/views/notify/config/index.vue
index f94115f..d3e3630 100644
--- a/src/views/notify/config/index.vue
+++ b/src/views/notify/config/index.vue
@@ -90,16 +90,16 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
align: 'left',
width: 120,
render: row => {
- const fetchFn = async (notifyStatus: Api.Common.EnableStatusNumber, callback: () => void) => {
+ const fetchFn = async (notifyStatus: Api.Common.EnableStatusNumber, callback: (flag: boolean) => void) => {
const { error } = await fetchUpdateNotifyStatus(row.id!, notifyStatus);
if (!error) {
row.notifyStatus = notifyStatus;
window.$message?.success($t('common.updateSuccess'));
}
- callback();
+ callback(!error);
};
- return ;
+ return ;
}
},
{
diff --git a/src/views/retry/scene/index.vue b/src/views/retry/scene/index.vue
index e17ce4a..d86e89c 100644
--- a/src/views/retry/scene/index.vue
+++ b/src/views/retry/scene/index.vue
@@ -81,16 +81,16 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
align: 'left',
width: 50,
render: row => {
- const fetchFn = async (sceneStatus: Api.Common.EnableStatusNumber, callback: () => void) => {
+ const fetchFn = async (sceneStatus: Api.Common.EnableStatusNumber, callback: (flag: boolean) => void) => {
const { error } = await fetchUpdateSceneStatus(row.id!, sceneStatus);
if (!error) {
row.sceneStatus = sceneStatus;
window.$message?.success($t('common.updateSuccess'));
}
- callback();
+ callback(!error);
};
- return ;
+ return ;
}
},
{
diff --git a/src/views/workflow/task/index.vue b/src/views/workflow/task/index.vue
index 20992d8..96d8c64 100644
--- a/src/views/workflow/task/index.vue
+++ b/src/views/workflow/task/index.vue
@@ -81,16 +81,16 @@ const { columns, columnChecks, data, getData, loading, mobilePagination, searchP
align: 'left',
minWidth: 120,
render: row => {
- const fetchFn = async (workflowStatus: Api.Common.EnableStatusNumber, callback: () => void) => {
+ const fetchFn = async (workflowStatus: Api.Common.EnableStatusNumber, callback: (flag: boolean) => void) => {
const { error } = await fetchUpdateWorkflowStatus(row.id!);
if (!error) {
row.workflowStatus = workflowStatus;
window.$message?.success($t('common.updateSuccess'));
}
- callback();
+ callback(!error);
};
- return ;
+ return ;
}
},
{