Commit 6e87c823 by huaying

fix: 分组列表修改

parent 22ec4549
......@@ -164,8 +164,8 @@ export default {
})
.then(() => {
// 删除操作
// const listItemIndex = this.groupList.findIndex(item => item.groupId === listItem.groupId);
// if (listItemIndex < 0) return;
const listItemIndex = this.groupList.findIndex(item => item.groupId === listItem.groupId);
if (listItemIndex < 0) return;
let params = {
groupId: listItem.groupId
};
......@@ -175,10 +175,12 @@ export default {
type: 'success',
message: '删除成功!'
});
// this.groupList.splice(listItemIndex, 1);
this.pageP.pageNum = 1;
this.currentListItemUuid = -1;
this.$emit('updateList', this.currentListItemUuid);
this.groupList.splice(listItemIndex, 1);
if (this.currentListItemUuid == listItem.groupId) {
this.pageP.pageNum = 1;
this.currentListItemUuid = -1;
this.$emit('updateList', this.currentListItemUuid);
}
this.searchGroup();
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment