|
@@ -115,13 +115,15 @@ async function onClick(node) {
|
|
|
selected.isFolder = node.isFolder;
|
|
|
if (node.pid != 'root') {
|
|
|
if (node.isFolder) {
|
|
|
- let types
|
|
|
+ let types, devicetype
|
|
|
if (node.itemValue.indexOf('&') != -1) {
|
|
|
types = node.itemValue.substring(node.itemValue.indexOf('&') + 1)
|
|
|
+ devicetype = node.itemValue.substring(0, node.itemValue.indexOf('&'))
|
|
|
} else {
|
|
|
types = ''
|
|
|
+ devicetype = ''
|
|
|
}
|
|
|
- let res = await getDevice({ devicetype: types })
|
|
|
+ let res = await getDevice({ ids: types, devicetype: devicetype })
|
|
|
if (res.msgTxt.length != 0) {
|
|
|
res.msgTxt[0].datalist.forEach(el => {
|
|
|
el.pid = node.id
|
|
@@ -138,21 +140,25 @@ async function onClick(node) {
|
|
|
searchParam.devKind = node.itemValue
|
|
|
searchParam.strType = ''
|
|
|
await getVideoAddrs()
|
|
|
+ getVideo()
|
|
|
} else {
|
|
|
- getVideoAddrsSon(node.deviceID)
|
|
|
+ await getVideoAddrsSon(node.deviceID)
|
|
|
+ getVideo()
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
searchParam.devKind = ''
|
|
|
searchParam.strType = ''
|
|
|
await getVideoAddrs()
|
|
|
+ getVideo()
|
|
|
}
|
|
|
- getVideo()
|
|
|
+
|
|
|
};
|
|
|
|
|
|
//点击详情跳转
|
|
|
function onDetail(node) {
|
|
|
- let type = listArr[0].children.filter(v => v.id == node.pid)[0].itemValue
|
|
|
+ let str = listArr[0].children.filter(v => v.id == node.pid)[0].itemValue
|
|
|
+ let type = str.indexOf('&') != -1 ? str.substring(0, str.indexOf('&')) : ''
|
|
|
console.log(type, 'type--------')
|
|
|
switch (type) {
|
|
|
case 'pulping'://注浆
|
|
@@ -162,7 +168,7 @@ function onDetail(node) {
|
|
|
router.push('/monitorChannel/monitor-window?id=' + node.deviceID)
|
|
|
break;
|
|
|
case 'gate'://自动风门
|
|
|
- router.push('/monitorChannel/monitor-gate?id=' + node.deviceID)
|
|
|
+ router.push('/monitorChannel/monitor-gate?id=' + node.deviceID + '&deviceType=' + node.deviceType)
|
|
|
break;
|
|
|
case 'fanlocal'://局部风机
|
|
|
router.push('/monitorChannel/monitor-fanlocal?id=' + node.deviceID + '&deviceType=fanlocal')
|
|
@@ -186,7 +192,8 @@ function onDetail(node) {
|
|
|
async function getVideoAddrs() {
|
|
|
clearCamera();
|
|
|
playerList.value = []
|
|
|
- let res = await list({ ...searchParam, pageSize: pageSize.value, pageNo: current.value })
|
|
|
+ let paramKind = searchParam.devKind.substring(0, searchParam.devKind.indexOf('&'))
|
|
|
+ let res = await list({ devKind: paramKind, strType: searchParam.strType, pageSize: pageSize.value, pageNo: current.value })
|
|
|
total.value = res['total'] || 0
|
|
|
if (res.records.length != 0) {
|
|
|
const cameraList = <{ name: string, addr: string }[]>[]
|