Commit 1c78c50f by huaying

fix: 分组列表删除修改

parent e49a737e
...@@ -40,7 +40,6 @@ export default { ...@@ -40,7 +40,6 @@ export default {
watch: { watch: {
currentGroupId: { currentGroupId: {
handler: function(val) { handler: function(val) {
console.log(val, 111);
// if (val != null) { // if (val != null) {
this.currentGroupId = val; this.currentGroupId = val;
// } // }
......
...@@ -178,7 +178,6 @@ export default { ...@@ -178,7 +178,6 @@ export default {
const SELECTDOWN_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap'); const SELECTDOWN_DOM = el.querySelector('.el-select-dropdown .el-select-dropdown__wrap');
SELECTDOWN_DOM.addEventListener('scroll', function() { SELECTDOWN_DOM.addEventListener('scroll', function() {
const CONDITION = this.clientHeight + this.scrollTop + 20 >= this.scrollHeight; const CONDITION = this.clientHeight + this.scrollTop + 20 >= this.scrollHeight;
console.log(this.scrollTop);
if (CONDITION) { if (CONDITION) {
binding.value(); binding.value();
} }
......
...@@ -175,12 +175,13 @@ export default { ...@@ -175,12 +175,13 @@ export default {
type: 'success', type: 'success',
message: '删除成功!' message: '删除成功!'
}); });
this.groupList.splice(listItemIndex, 1); // this.groupList.splice(listItemIndex, 1);
if (this.currentListItemUuid == listItem.groupId) { if (this.currentListItemUuid == listItem.groupId) {
this.pageP.pageNum = 1; this.pageP.pageNum = 1;
this.currentListItemUuid = -1; this.currentListItemUuid = -1;
this.$emit('updateList', this.currentListItemUuid); this.$emit('updateList', this.currentListItemUuid);
} }
this.pageP.pageNum = 1;
this.searchGroup(); this.searchGroup();
} }
}); });
...@@ -215,9 +216,6 @@ export default { ...@@ -215,9 +216,6 @@ export default {
if (this.isEditGroup) { if (this.isEditGroup) {
const groupListItem = this.groupList.find(({ groupId }) => groupId == this.groupListForm.groupId); const groupListItem = this.groupList.find(({ groupId }) => groupId == this.groupListForm.groupId);
groupListItem.groupName = this.groupListForm.groupName; groupListItem.groupName = this.groupListForm.groupName;
} else {
// this.pageP.pageNum = 1;
// this.searchGroup();
} }
this.pageP.pageNum = 1; this.pageP.pageNum = 1;
this.searchGroup(); 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