diff --git a/src/components/AMap/src/components/MapTaskModal.vue b/src/components/AMap/src/components/MapTaskModal.vue index 0ec406b..6db9db2 100644 --- a/src/components/AMap/src/components/MapTaskModal.vue +++ b/src/components/AMap/src/components/MapTaskModal.vue @@ -224,7 +224,7 @@ function handleTaskOrdinaryDelete(record) { const index = getTaskOrdinaryDataSource().findIndex(item => item.key == record.key); if (index != -1) { - getTaskOrdinaryDataSource().splice(record.index, 1); + getTaskOrdinaryDataSource().splice(index, 1); } else notification.error({ message: `找不到key:${record.key}的数据,请刷新页面重试!`, duration: 2 @@ -247,7 +247,7 @@ function handleTaskPresetDelete(record) { const index = getTaskPresetDataSource().findIndex(item => item.key == record.key); if (index != -1) { - getTaskPresetDataSource().splice(record.index, 1); + getTaskPresetDataSource().splice(index, 1); } else notification.error({ message: `找不到key:${record.key}的数据,请刷新页面重试!`, duration: 2 diff --git a/src/components/AMap/src/components/MapTaskPresetModal.vue b/src/components/AMap/src/components/MapTaskPresetModal.vue index bcb7901..0155594 100644 --- a/src/components/AMap/src/components/MapTaskPresetModal.vue +++ b/src/components/AMap/src/components/MapTaskPresetModal.vue @@ -167,7 +167,7 @@ function handleTaskTurnToDoDelete(record) { const index = getDataSource().findIndex(item => item.key == record.key); if (index != -1) { - getDataSource().splice(record.index, 1); + getDataSource().splice(index, 1); } else notification.error({ message: `找不到key:${record.key}的数据,请刷新页面重试!`, duration: 2