修复选择通道时默认节点显示错误的问题

This commit is contained in:
648540858
2022-09-06 16:31:28 +08:00
parent d5e8aa62a1
commit e7bdcc1f8d
5 changed files with 25 additions and 10 deletions

View File

@@ -38,7 +38,7 @@
import catalogEdit from './catalogEdit.vue'
export default {
name: 'chooseChannelForCatalog',
props: ['platformId', 'platformName', 'defaultCatalogId', 'catalogIdChange', 'treeType'],
props: ['platformId', 'platformDeviceId', 'platformName', 'defaultCatalogId', 'catalogIdChange', 'treeType'],
created() {
this.chooseId = this.defaultCatalogId;
this.defaultCatalogIdSign = this.defaultCatalogId;
@@ -171,6 +171,7 @@ export default {
});
},
loadNode: function(node, resolve){
console.log("this.platformDeviceId " + this.platformDeviceId)
if (node.level === 0) {
resolve([
{
@@ -179,7 +180,7 @@ export default {
type: -1
},{
name: this.platformName,
id: this.platformId,
id: this.platformDeviceId,
type: 0
}
]);
@@ -298,6 +299,8 @@ export default {
return false;
},
nodeClickHandler: function (data, node, tree){
console.log(data)
console.log(node)
this.chooseId = data.id;
this.chooseName = data.name;
if (this.catalogIdChange)this.catalogIdChange(this.chooseId, this.chooseName);