Browse Source

🚨 优化请求次数

master
wangxiang 3 years ago
parent
commit
b1e93f28ba
  1. 4
      src/components/AMap/src/components/MapTaskModal.vue
  2. 2
      src/components/AMap/src/components/MapTaskPresetModal.vue

4
src/components/AMap/src/components/MapTaskModal.vue

@ -224,7 +224,7 @@
function handleTaskOrdinaryDelete(record) { function handleTaskOrdinaryDelete(record) {
const index = getTaskOrdinaryDataSource().findIndex(item => item.key == record.key); const index = getTaskOrdinaryDataSource().findIndex(item => item.key == record.key);
if (index != -1) { if (index != -1) {
getTaskOrdinaryDataSource().splice(record.index, 1); getTaskOrdinaryDataSource().splice(index, 1);
} else notification.error({ } else notification.error({
message: `找不到key:${record.key}的数据,请刷新页面重试!`, message: `找不到key:${record.key}的数据,请刷新页面重试!`,
duration: 2 duration: 2
@ -247,7 +247,7 @@
function handleTaskPresetDelete(record) { function handleTaskPresetDelete(record) {
const index = getTaskPresetDataSource().findIndex(item => item.key == record.key); const index = getTaskPresetDataSource().findIndex(item => item.key == record.key);
if (index != -1) { if (index != -1) {
getTaskPresetDataSource().splice(record.index, 1); getTaskPresetDataSource().splice(index, 1);
} else notification.error({ } else notification.error({
message: `找不到key:${record.key}的数据,请刷新页面重试!`, message: `找不到key:${record.key}的数据,请刷新页面重试!`,
duration: 2 duration: 2

2
src/components/AMap/src/components/MapTaskPresetModal.vue

@ -167,7 +167,7 @@
function handleTaskTurnToDoDelete(record) { function handleTaskTurnToDoDelete(record) {
const index = getDataSource().findIndex(item => item.key == record.key); const index = getDataSource().findIndex(item => item.key == record.key);
if (index != -1) { if (index != -1) {
getDataSource().splice(record.index, 1); getDataSource().splice(index, 1);
} else notification.error({ } else notification.error({
message: `找不到key:${record.key}的数据,请刷新页面重试!`, message: `找不到key:${record.key}的数据,请刷新页面重试!`,
duration: 2 duration: 2

Loading…
Cancel
Save