mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-26 06:57:50 +08:00
行政区划或者业务分组添加通道后更新右边数据
This commit is contained in:
parent
eddf20e62a
commit
51cd14e02e
@ -5,7 +5,7 @@
|
|||||||
:show-header="true"
|
:show-header="true"
|
||||||
:edit="true"
|
:edit="true"
|
||||||
@clickEvent="treeNodeClickEvent"
|
@clickEvent="treeNodeClickEvent"
|
||||||
:on-channel-change="onChannelChange"
|
@onChannelChange="onChannelChange"
|
||||||
:enable-add-channel="true"
|
:enable-add-channel="true"
|
||||||
:add-channel-to-group="addChannelToGroup"
|
:add-channel-to-group="addChannelToGroup"
|
||||||
/>
|
/>
|
||||||
@ -306,7 +306,10 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
onChannelChange: function(deviceId) {
|
onChannelChange: function(deviceId) {
|
||||||
//
|
|
||||||
|
if (this.groupDeviceId === deviceId) {
|
||||||
|
this.getChannelList()
|
||||||
|
}
|
||||||
},
|
},
|
||||||
showUnusualChanel: function() {
|
showUnusualChanel: function() {
|
||||||
this.$refs.unusualGroupChannelSelect.openDialog()
|
this.$refs.unusualGroupChannelSelect.openDialog()
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
:show-header="true"
|
:show-header="true"
|
||||||
:edit="true"
|
:edit="true"
|
||||||
@clickEvent="treeNodeClickEvent"
|
@clickEvent="treeNodeClickEvent"
|
||||||
:on-channel-change="onChannelChange"
|
@onChannelChange="onChannelChange"
|
||||||
:enable-add-channel="true"
|
:enable-add-channel="true"
|
||||||
:add-channel-to-civil-code="addChannelToCivilCode"
|
:add-channel-to-civil-code="addChannelToCivilCode"
|
||||||
/>
|
/>
|
||||||
@ -296,7 +296,9 @@ export default {
|
|||||||
console.log(selectedData)
|
console.log(selectedData)
|
||||||
},
|
},
|
||||||
onChannelChange: function(deviceId) {
|
onChannelChange: function(deviceId) {
|
||||||
//
|
if (this.regionDeviceId === deviceId) {
|
||||||
|
this.getChannelList()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -130,7 +130,7 @@ export default {
|
|||||||
GbChannelSelect,
|
GbChannelSelect,
|
||||||
VueEasyTree, groupEdit, gbDeviceSelect
|
VueEasyTree, groupEdit, gbDeviceSelect
|
||||||
},
|
},
|
||||||
props: ['edit', 'enableAddChannel', 'onChannelChange', 'showHeader', 'hasChannel', 'addChannelToGroup', 'treeHeight'],
|
props: ['edit', 'enableAddChannel', 'showHeader', 'hasChannel', 'addChannelToGroup', 'treeHeight'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
@ -328,9 +328,7 @@ export default {
|
|||||||
.then(data => {
|
.then(data => {
|
||||||
node.parent.loaded = false
|
node.parent.loaded = false
|
||||||
node.parent.expand()
|
node.parent.expand()
|
||||||
if (this.onChannelChange) {
|
this.$emit('onChannelChange', node.data.deviceId)
|
||||||
this.onChannelChange(node.data.deviceId)
|
|
||||||
}
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
addChannelFormDevice: function(id, node) {
|
addChannelFormDevice: function(id, node) {
|
||||||
@ -349,10 +347,7 @@ export default {
|
|||||||
showClose: true,
|
showClose: true,
|
||||||
message: '保存成功'
|
message: '保存成功'
|
||||||
})
|
})
|
||||||
if (this.onChannelChange) {
|
this.$emit('onChannelChange', node.data.deviceId)
|
||||||
this.onChannelChange()
|
|
||||||
}
|
|
||||||
console.log(node)
|
|
||||||
node.loaded = false
|
node.loaded = false
|
||||||
node.expand()
|
node.expand()
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
@ -372,9 +367,7 @@ export default {
|
|||||||
showClose: true,
|
showClose: true,
|
||||||
message: '保存成功'
|
message: '保存成功'
|
||||||
})
|
})
|
||||||
if (this.onChannelChange) {
|
this.$emit('onChannelChange', node.data.deviceId)
|
||||||
this.onChannelChange()
|
|
||||||
}
|
|
||||||
node.loaded = false
|
node.loaded = false
|
||||||
node.expand()
|
node.expand()
|
||||||
}).finally(() => {
|
}).finally(() => {
|
||||||
|
|||||||
@ -131,7 +131,7 @@ export default {
|
|||||||
GbChannelSelect,
|
GbChannelSelect,
|
||||||
VueEasyTree, regionEdit, gbDeviceSelect
|
VueEasyTree, regionEdit, gbDeviceSelect
|
||||||
},
|
},
|
||||||
props: ['edit', 'enableAddChannel', 'onChannelChange', 'showHeader', 'hasChannel', 'addChannelToCivilCode', 'treeHeight'],
|
props: ['edit', 'enableAddChannel', 'showHeader', 'hasChannel', 'addChannelToCivilCode', 'treeHeight'],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
props: {
|
props: {
|
||||||
@ -331,6 +331,7 @@ export default {
|
|||||||
this.$store.dispatch('region/deleteRegion', node.data.id)
|
this.$store.dispatch('region/deleteRegion', node.data.id)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
console.log('移除成功')
|
console.log('移除成功')
|
||||||
|
this.$emit('onChannelChange', node.data.deviceId)
|
||||||
node.parent.loaded = false
|
node.parent.loaded = false
|
||||||
node.parent.expand()
|
node.parent.expand()
|
||||||
}).catch(function(error) {
|
}).catch(function(error) {
|
||||||
@ -351,9 +352,7 @@ export default {
|
|||||||
showClose: true,
|
showClose: true,
|
||||||
message: '保存成功'
|
message: '保存成功'
|
||||||
})
|
})
|
||||||
if (this.onChannelChange) {
|
this.$emit('onChannelChange', node.data.deviceId)
|
||||||
this.onChannelChange()
|
|
||||||
}
|
|
||||||
node.loaded = false
|
node.loaded = false
|
||||||
node.expand()
|
node.expand()
|
||||||
}).catch(function(error) {
|
}).catch(function(error) {
|
||||||
@ -375,9 +374,7 @@ export default {
|
|||||||
showClose: true,
|
showClose: true,
|
||||||
message: '保存成功'
|
message: '保存成功'
|
||||||
})
|
})
|
||||||
if (this.onChannelChange) {
|
this.$emit('onChannelChange', node.data.deviceId)
|
||||||
this.onChannelChange(node.data.deviceId)
|
|
||||||
}
|
|
||||||
node.loaded = false
|
node.loaded = false
|
||||||
node.expand()
|
node.expand()
|
||||||
}).catch(function(error) {
|
}).catch(function(error) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user