WEB VIDEO PLATFORM是一个基于GB28181-2016标准实现的网络视频平台,支持NAT穿透,支持海康、大华、宇视等品牌的IPC、NVR、DVR接入。支持国标级联,支持rtsp/rtmp等视频流转发到国标平台,支持rtsp/rtmp等推流转发到国标平台。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

70 lines
1.5 KiB

<template>
<div>
<el-tree :data="channelList" :props="props" @node-click="sendDevicePush">
<span slot-scope="{ node }">
<span v-if="node.isLeaf">
<i class="el-icon-video-camera" :style="{color:node.disabled==1?'#67C23A':'#F56C6C'}"></i>
</span>
<span v-else>
<i class="el-icon-folder"></i>
</span>
<span>
{{ node.label }}
</span>
</span>
</el-tree>
</div>
</template>
<script>
import ChannelTreeItem from "@/components/channelTreeItem"
import {tree} from '@/api/deviceApi'
export default {
components: {
ChannelTreeItem,
},
props:{
device: {
type: Object,
required: true
}
},
data() {
return {
loading: false,
channelList: [],
props: {
label: 'title',
children: 'children',
isLeaf: 'hasChildren',
disabled: 'status'
},
}
},
computed: {
},
mounted() {
this.leafs = []
this.getTree()
},
methods: {
getTree() {
this.loading = true
var that = this
tree(this.device.deviceId).then(function (res) {
console.log(res.data.data);
that.channelList = res.data.data;
that.loading = false;
}).catch(function (error) {
console.log(error);
that.loading = false;
});
},
sendDevicePush(c) {
if(c.hasChildren) return
this.$emit('sendDevicePush',c)
}
}
}
</script>