|
|
@ -1,7 +1,7 @@
|
|
|
|
<template>
|
|
|
|
<template>
|
|
|
|
<div class="container">
|
|
|
|
<div class="container">
|
|
|
|
<div class="centerImg"></div>
|
|
|
|
<div class="centerImg"></div>
|
|
|
|
<BoardTopNav nowMenu="3" @sceneIdChange="sceneIdChange"></BoardTopNav>
|
|
|
|
<BoardTopNav ref="boardTopNav" nowMenu="3" @sceneIdChange="sceneIdChange"></BoardTopNav>
|
|
|
|
<div class="title">物联网平台</div>
|
|
|
|
<div class="title">物联网平台</div>
|
|
|
|
<div class="tree">
|
|
|
|
<div class="tree">
|
|
|
|
|
|
|
|
|
|
|
@ -33,7 +33,7 @@
|
|
|
|
<span style="color: #d9dee3">{{ MonitorInfo.monitorUnitTypeId }}</span>
|
|
|
|
<span style="color: #d9dee3">{{ MonitorInfo.monitorUnitTypeId }}</span>
|
|
|
|
</p>
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="img" v-if="show"></div>
|
|
|
|
<div v-if="show" class="img"></div>
|
|
|
|
<div class="terminal">
|
|
|
|
<div class="terminal">
|
|
|
|
<el-form :model="form" class="demo-form-inline">
|
|
|
|
<el-form :model="form" class="demo-form-inline">
|
|
|
|
<el-form-item label="传感器名称:">
|
|
|
|
<el-form-item label="传感器名称:">
|
|
|
@ -110,7 +110,8 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async mounted() {
|
|
|
|
async mounted() {
|
|
|
|
setInterval(this.getDevice, 30 * 1000)
|
|
|
|
this.sceneId = this.$store.getters.sceneId
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
sceneIdChange(e) {
|
|
|
|
sceneIdChange(e) {
|
|
|
@ -139,33 +140,40 @@ export default {
|
|
|
|
});
|
|
|
|
});
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async getTree() {
|
|
|
|
async getTree() {
|
|
|
|
const {data} = await treeList(this.sceneId)
|
|
|
|
const {data} = await treeList(this.$store.getters.sceneId)
|
|
|
|
this.treeData = data
|
|
|
|
this.treeData = data
|
|
|
|
},
|
|
|
|
},
|
|
|
|
treeClick(e) {
|
|
|
|
treeClick(e) {
|
|
|
|
if (e.child.length === 0) {
|
|
|
|
if (!e.children?.length > 0) {
|
|
|
|
this.monitorUnitId = e.monitorUnitId
|
|
|
|
this.monitorUnitId = e.id
|
|
|
|
this.getDevice(e.monitorUnitId)
|
|
|
|
this.getDevice(e.id)
|
|
|
|
this.getRightDevice(e.monitorUnitId)
|
|
|
|
this.getRightDevice(e.id)
|
|
|
|
this.setMonitorById()
|
|
|
|
this.setMonitorById()
|
|
|
|
this.show = true
|
|
|
|
this.show = true
|
|
|
|
|
|
|
|
if(!getDeviceInterval){
|
|
|
|
|
|
|
|
var getDeviceInterval = setInterval(this.getDevice, 30 * 1000)
|
|
|
|
|
|
|
|
clearInterval(getDeviceInterval)
|
|
|
|
|
|
|
|
getDeviceInterval = setInterval(this.getDevice, 30 * 1000)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async getDevice(e) {
|
|
|
|
async getDevice(e) {
|
|
|
|
const {data} = await selectDeviceByDeviceModeByMonitorUnitId(this.sceneId, e)
|
|
|
|
console.log('getDevice')
|
|
|
|
|
|
|
|
const {data} = await selectDeviceByDeviceModeByMonitorUnitId(this.$store.getters.sceneId, e)
|
|
|
|
this.controlList = data.control
|
|
|
|
this.controlList = data.control
|
|
|
|
this.acquisitionList = data.acquisition
|
|
|
|
this.acquisitionList = data.acquisition
|
|
|
|
|
|
|
|
console.log(data)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async getRightDevice(e) {
|
|
|
|
async getRightDevice(e) {
|
|
|
|
const data = await selectDeviceModeFunctionByFunctionType({
|
|
|
|
const data = await selectDeviceModeFunctionByFunctionType({
|
|
|
|
"sceneId": this.sceneId,
|
|
|
|
"sceneId": this.$store.getters.sceneId,
|
|
|
|
"deviceModeId": 1,
|
|
|
|
"deviceModeId": 1,
|
|
|
|
"offset": 0,
|
|
|
|
"offset": 0,
|
|
|
|
"limit": 1
|
|
|
|
"limit": 1
|
|
|
|
})
|
|
|
|
})
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async setMonitorById() {
|
|
|
|
async setMonitorById() {
|
|
|
|
const {data} = await getMonitorById(this.sceneId)
|
|
|
|
const {data} = await getMonitorById(this.$store.getters.sceneId)
|
|
|
|
this.MonitorInfo = data
|
|
|
|
this.MonitorInfo = data
|
|
|
|
},
|
|
|
|
},
|
|
|
|
toHistory() {
|
|
|
|
toHistory() {
|
|
|
|