点击设备名称后,默认查询第一个监测点数据
This commit is contained in:
@@ -576,10 +576,11 @@ const nodeClick = async (e: anyObj) => {
|
|||||||
loading.value = false
|
loading.value = false
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (e.level == 3) {
|
//选中设备名称后,点击标签页也能查询数据,要求点击设备名称后,点击标签页默认查询第一个监测点数据
|
||||||
|
if (e.level == 3 || e.level == 2) {
|
||||||
loading.value = true
|
loading.value = true
|
||||||
formInline.lineId = e.id
|
formInline.lineId = e.level == 3 ? e.id : e.children[0].id
|
||||||
await getDeviceData(e.pid, 'history', e.id)
|
await getDeviceData(e.level == 3 ? e.pid : e.id, 'history', e.level == 3 ? e.id : e.children[0].id)
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
deviceData.value = res.data
|
deviceData.value = res.data
|
||||||
formInline.dataLevel = res.data.dataLevel
|
formInline.dataLevel = res.data.dataLevel
|
||||||
|
|||||||
Reference in New Issue
Block a user