修改问题

master
夜笙歌 1 month ago
parent b531a4f47c
commit 8ddd4e5cfc

@ -396,13 +396,18 @@ export default {
},
async mounted() {
await this.getData()
setInterval(async ()=>{
await this.setAlarmInfos()
await this.getAubDevice()
await this.getTable2Data()
})
},
methods: {
async getData() {
if (this.$store.getters.sceneId === null) return
await this.createMap()
await this.getAlarmStats()
await this.getAubDevice()
await this.setAlarmInfos()
await this.setElectronicNumVo()
await this.getTable2Data()

@ -34,8 +34,8 @@
<span style="color: #d9dee3">{{ MonitorInfo.monitorUnitTypeName }}</span>
</p>
<p v-for="i in propList">
<span>{{ i.attributeName }}</span>
<span style="color: #d9dee3">{{ i.attributeValue }}</span>
<span>{{ (i||{}).attributeName || '' }}</span>
<span style="color: #d9dee3">{{ (i || {}).attributeValue }}</span>
</p>
</div>
<div v-if="show"
@ -112,7 +112,7 @@
</div>
</div>
<el-dialog title="历史记录" :visible.sync="historyDialog">
<el-dialog title="历史记录" :visible.sync="historyDialog" width="50%">
<el-form :inline="true" :model="form" class="demo-form-inline">
<el-form-item label="查询时间">
<el-date-picker
@ -339,7 +339,7 @@ export default {
}
},
async treeClick(e) {
if (!e.children?.length > 0) {
// if (!e.children?.length > 0) {
this.monitorUnitId = e.id
await this.getDevice(e.id)
await this.setMonitorById(e)
@ -351,7 +351,7 @@ export default {
getDeviceInterval = setInterval(() => {
this.getDevice(e.id)
}, 30 * 1000)
}
// }
},
async getDevice(e) {
if (this.$store.getters.sceneId) {
@ -379,7 +379,7 @@ export default {
time: [new Date(new Date().getTime() - 1000 * 60 * 60 * 24), new Date()],
type: "2",
}
this.getHistoryData()
// this.getHistoryData()
},
async getHistoryData() {
this.loading1 = true

@ -580,8 +580,10 @@ export default {
this.setChart1()
this.setChart2()
this.setAllNums()
this.setTable3()
this.setDeviceOperations()
setInterval(()=>{
this.setTable3()
},5000)
// let data = await axios.get(`https://geo.datav.aliyun.com/areas_v3/bound/${this.code}_full.json`)
// let data = await axios.get(`http://124.223.15.102:3333/componentLib/getMap?id=${this.code}`)
@ -1190,6 +1192,14 @@ export default {
clearInterval(time2)
}
time2 = null
if(name.length === 0){
const data = await getDeviceByAreaId(this.$store.getters.tenantId)
this.markerData = data.data.map(e => e.devicesList).flat(1)
data.data.map(e => e.devicesList).flat(1).forEach(e => {
this.setMarker(e)
})
}else{
time2 = setInterval(async () => {
const {data} = await selectDeviceByName({name: name})
this.markerData = data
@ -1213,6 +1223,7 @@ export default {
}
})
this.options = option
}
},
exTable() {
let query = {}

Loading…
Cancel
Save