|
|
|
@ -1,9 +1,8 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div class="container">
|
|
|
|
|
<div class="centerImg"></div>
|
|
|
|
|
<BoardTopNav @sceneIdChange="sceneIdChange" nowMenu="4"></BoardTopNav>
|
|
|
|
|
<div class="leftMenu">
|
|
|
|
|
<div v-for="i in deviceList" class="item">
|
|
|
|
|
<div v-for="i in deviceList" class="item" @click="getRightData(i)">
|
|
|
|
|
<span>{{ i.deviceModeName }}</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -76,7 +75,7 @@
|
|
|
|
|
</el-table>
|
|
|
|
|
</div>
|
|
|
|
|
<div ref="pagination" style="margin-top: 12px;height: 36px;">
|
|
|
|
|
<el-pagination :total="1000" background layout="prev, pager, next" style="display: inline-block;float:right;">
|
|
|
|
|
<el-pagination :current-page="offset" :total="total" background layout="prev, pager, next" style="display: inline-block;float:right;">
|
|
|
|
|
</el-pagination>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -88,11 +87,9 @@ import {
|
|
|
|
|
selectLatestDataByDeviceMode,
|
|
|
|
|
getDeviceModesBySceneId,
|
|
|
|
|
} from '@/api/board/equipmentMonitoring'
|
|
|
|
|
import BoardTopNav from '@/components/BoardTopNav'
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
components: {
|
|
|
|
|
BoardTopNav
|
|
|
|
|
},
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
@ -106,20 +103,27 @@ export default {
|
|
|
|
|
tableData: [],
|
|
|
|
|
deviceList:[],
|
|
|
|
|
sceneId: 0,
|
|
|
|
|
offset:0,
|
|
|
|
|
limit:10,
|
|
|
|
|
total:0
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
async mounted() {
|
|
|
|
|
this.maxHeight = this.$refs.right.clientHeight - this.$refs.search.clientHeight - this.$refs.pagination.clientHeight - 12
|
|
|
|
|
this.tableShow = true
|
|
|
|
|
t
|
|
|
|
|
await this.getData()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
sceneIdChange(e){
|
|
|
|
|
this.sceneId = e
|
|
|
|
|
this.getData()
|
|
|
|
|
async getRightData(e){
|
|
|
|
|
await this.setSelectLatestDataByDeviceMode({
|
|
|
|
|
"sceneId": this.$store.getters.sceneId,
|
|
|
|
|
"deviceModeId": e.deviceModeId,
|
|
|
|
|
"startTime": 0,
|
|
|
|
|
"offset": this.offset,
|
|
|
|
|
"limit": 10
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
async getData() {
|
|
|
|
|
await this.setSelectLatestDataByDeviceMode()
|
|
|
|
|
await this.setDeviceModesBySceneId()
|
|
|
|
|
},
|
|
|
|
|
setStyle(e) {
|
|
|
|
@ -129,15 +133,10 @@ export default {
|
|
|
|
|
return {textAlign: 'center', backgroundColor: '#063468', color: '#05aaba'}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async setSelectLatestDataByDeviceMode(){
|
|
|
|
|
const {data} = await selectLatestDataByDeviceMode({
|
|
|
|
|
"sceneId": this.$store.getters.sceneId,
|
|
|
|
|
"deviceModeId": 1,
|
|
|
|
|
"startTime": 1222222222222,
|
|
|
|
|
"offset": 0,
|
|
|
|
|
"limit": 10
|
|
|
|
|
})
|
|
|
|
|
async setSelectLatestDataByDeviceMode(e){
|
|
|
|
|
const {data} = await selectLatestDataByDeviceMode(e)
|
|
|
|
|
this.tableData = data.latestData || []
|
|
|
|
|
this.total=data.total
|
|
|
|
|
},
|
|
|
|
|
async setDeviceModesBySceneId(){
|
|
|
|
|
const {data} = await getDeviceModesBySceneId( {
|
|
|
|
|