修复行政区划树以及业务分组树的自动展开

This commit is contained in:
648540858
2024-09-27 11:17:45 +08:00
parent c3267403ba
commit 726380cec4
5 changed files with 33 additions and 20 deletions

View File

@@ -113,6 +113,7 @@ export default {
total: 0,
loading: false,
loadSnap: {},
groupDeviceId: "",
groupId: "",
businessGroup: "",
multipleSelection: []
@@ -175,12 +176,10 @@ export default {
}
},
rowDblclick: function (row, rowIndex) {
if (row.gbParentId) {
this.$refs.groupTree.refresh(row.gbParentId)
}
},
add: function (row) {
if (!this.groupId) {
if (!this.groupDeviceId) {
this.$message.info({
showClose: true,
message: "请选择左侧行政区划节点"
@@ -204,7 +203,7 @@ export default {
method: 'post',
url: `/api/common/channel/group/add`,
data: {
parentId: this.groupId,
parentId: this.groupDeviceId,
businessGroup: this.businessGroup,
channelIds: channels
}
@@ -261,7 +260,7 @@ export default {
})
this.getChannelList()
// 刷新树节点
this.$refs.groupTree.refresh(this.groupId)
this.$refs.groupTree.refresh(this.groupDeviceId)
}else {
this.$message.error({
showClose: true,
@@ -292,8 +291,9 @@ export default {
treeNodeClickEvent: function (device, data, isCatalog) {
},
chooseIdChange: function (id, businessGroup) {
chooseIdChange: function (id, deviceId, businessGroup) {
this.groupId = id;
this.groupDeviceId = deviceId;
this.businessGroup = businessGroup;
},
}