优化大数据下的设备树加载
This commit is contained in:
parent
94793cc19d
commit
f725fac744
@ -15,7 +15,7 @@
|
||||
<span style="font-size: 16px">{{item.id}}</span>
|
||||
<el-button v-if="!item.defaultServer" icon="el-icon-edit" style="padding: 0;float: right;" type="text" @click="edit(item)">编辑</el-button>
|
||||
<el-button v-if="item.defaultServer" icon="el-icon-edit" style="padding: 0;float: right;" type="text" @click="edit(item)">查看</el-button>
|
||||
<el-button icon="el-icon-delete" style="margin-right: 10px;padding: 0;float: right;" type="text" @click="del(item)">移除</el-button>
|
||||
<el-button v-if="!item.defaultServer" icon="el-icon-delete" style="margin-right: 10px;padding: 0;float: right;" type="text" @click="del(item)">移除</el-button>
|
||||
<div style="margin-top: 13px; line-height: 12px; ">
|
||||
<span style="font-size: 14px; color: #999; margin-top: 5px; ">{{item.ip}}</span>
|
||||
<span style="font-size: 14px; color: #999; margin-top: 5px; float: right;">{{item.createTime}}</span>
|
||||
|
@ -84,22 +84,34 @@ export default {
|
||||
}else {
|
||||
resolve([])
|
||||
}
|
||||
}, (list)=>{
|
||||
console.log("设备加载完成")
|
||||
}, (error)=>{
|
||||
|
||||
})
|
||||
}
|
||||
if (node.level === 1) {
|
||||
this.deviceService.getAllChannel(true, true, node.data.id, (catalogData) => {
|
||||
this.deviceService.getAllChannel(false, true, node.data.id, (channelData) => {
|
||||
let data = catalogData.concat(channelData)
|
||||
this.channelDataHandler(data, resolve)
|
||||
let channelArray = []
|
||||
this.deviceService.getAllChannel(true, true, node.data.id, catalogData =>{
|
||||
channelArray = channelArray.concat(catalogData)
|
||||
this.channelDataHandler(channelArray, resolve)
|
||||
},(endCatalogData) => {
|
||||
this.deviceService.getAllChannel(false, true, node.data.id, channelData => {
|
||||
channelArray = channelArray.concat(channelData)
|
||||
this.channelDataHandler(channelArray, resolve)
|
||||
}, endChannelList => {
|
||||
|
||||
})
|
||||
})
|
||||
}else if (node.level > 1){
|
||||
let channelArray = []
|
||||
this.deviceService.getAllSubChannel(true, node.data.deviceId, node.data.id, (catalogData)=>{
|
||||
channelArray = channelArray.concat(catalogData)
|
||||
this.channelDataHandler(channelArray, resolve)
|
||||
}, (endCatalogData)=>{
|
||||
this.deviceService.getAllSubChannel(false, node.data.deviceId, node.data.id, (channelData)=>{
|
||||
let data = catalogData.concat(channelData)
|
||||
this.channelDataHandler(data, resolve)
|
||||
channelArray = channelArray.concat(channelData)
|
||||
this.channelDataHandler(channelArray, resolve)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-menu router :default-active="activeIndex" menu-trigger="click" background-color="#545c64" text-color="#fff"
|
||||
active-text-color="#ffd04b" mode="horizontal">
|
||||
<el-menu-item index="/control">控制台</el-menu-item>
|
||||
<el-menu-item index="/live">实时监控</el-menu-item>
|
||||
<el-menu-item index="/live">分屏监控</el-menu-item>
|
||||
<el-menu-item index="/deviceList">国标设备</el-menu-item>
|
||||
<el-menu-item index="/map">电子地图</el-menu-item>
|
||||
<el-menu-item index="/pushVideoList">推流列表</el-menu-item>
|
||||
|
Loading…
Reference in New Issue
Block a user