Commit 5b6188d4 by niuxiaolin

latest ui 08/11/2019 15:12:07

parent ddbea814
......@@ -21,112 +21,7 @@ export class VideoComponent implements OnInit {
initCount = 0;
isVisible=false;
nodeItems = [{
id: '0',
name: '高速公路(67/92)',
children: [
{
id: '1',
name: '东二环高速(8/8)',
item: {
phrase: 'I am the batman'
},
children: [
{
id: '5',
name: '第一分部(16/17)',
item: {
phrase: 'I am the villain of this story'
},
children: [
{
id: "6",
name: "第一分部_001_一分部拌合站入口"
},
{
id: "6",
name: "第一分部_002_一分部拌合站"
}, {
id: "6",
name: "第一分部_003_一分部钢筋棚1"
}
]
}
]
},
{
id: '2',
name: '第二分部(16/17)',
item: {
phrase: 'Man of steel'
}
},
{
id: '2',
name: '第三分部(16/17)',
item: {
phrase: 'Man of steel'
}
}
]
},
{
id: '2',
name: '普通干线(16/17)',
children: [
{
id: '4',
name: 'G207(8/8)',
item: {
phrase: 'Why so serius'
},
children: [
{
id: '5',
name: '第一分部(16/17)',
item: {
phrase: 'I am the villain of this story'
},
children: [
{
id: "6",
name: "第一分部_001_一分部拌合站入口"
},
{
id: "6",
name: "第一分部_002_一分部拌合站"
}, {
id: "6",
name: "第一分部_003_一分部钢筋棚1"
},
{
id: "6",
name: "第一分部_004_一分部钢筋棚2"
},
{
id: "6",
name: "第一分部_005_一分部化验室院"
},
{
id: "6",
name: "第一分部_006_一分部项目部3"
}
]
}
]
},
]
},
{
id: "6",
name: "演示demo"
}];
cams = Array(16);
ngOnInit() {
(window as any).xiaolin_this = this;
this.dynamicScriptLoader.load('jquery', 'jsencrypt', 'jswebcontrol').then(() => {
......@@ -154,6 +49,7 @@ export class VideoComponent implements OnInit {
break;
case 2://录像机
request = "/vcr/findListById/";
break;
default:
break;
......@@ -161,6 +57,11 @@ export class VideoComponent implements OnInit {
if (node && node.getChildren().length === 0 && node.isExpanded) {
this.http.get( this.d.basePath+ request+node.key).subscribe(res=>{
console.log(res);
if(node.level==2){
(res as any).data.forEach((element,index) => {
this.preview2(element.cameraIndexCode,index+1)
});
}
node.addChildren((res as any).data.map((d,index)=>({title:d.name || d.cameraName,key:d.id ||d.cameraIndexCode,index:index,isLeaf:node.level==2 })));
});
}
......
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