|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
<div class="centerImg"></div>
|
|
|
|
|
<div class="collapse">
|
|
|
|
|
<div style="margin-bottom: 24px">
|
|
|
|
|
<el-collapse accordion>
|
|
|
|
|
<el-collapse v-model="collapseNo" accordion>
|
|
|
|
|
<el-collapse-item name="1">
|
|
|
|
|
<template slot="title">
|
|
|
|
|
<div class="itemBg">
|
|
|
|
@ -12,16 +12,16 @@
|
|
|
|
|
<div :style="'background-image: url('+(topData&&topData.devicePic)+')'" class="icon2"></div>
|
|
|
|
|
<div class="title"> {{ topData.monitorUnitName }}</div>
|
|
|
|
|
<div class="info">
|
|
|
|
|
<div class="info1">所属区域</div>
|
|
|
|
|
<div class="info2"> {{ topData.deviceName }}</div>
|
|
|
|
|
<div class="info1">设备编号:</div>
|
|
|
|
|
<div class="info2"> {{ topData.deviceCode }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info" style="left: 70vh;">
|
|
|
|
|
<div class="info1">位置:</div>
|
|
|
|
|
<div class="info2">深圳</div>
|
|
|
|
|
<div class="info1">设备名称:</div>
|
|
|
|
|
<div class="info2">{{ topData.deviceName }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="info" style="left: 80vh;">
|
|
|
|
|
<div class="info1">日期:</div>
|
|
|
|
|
<div class="info2">2023-01-01 00:00:00</div>
|
|
|
|
|
<div class="info1">设备位置:</div>
|
|
|
|
|
<div class="info2">{{ topData.deviceLocation }}</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
@ -47,24 +47,24 @@
|
|
|
|
|
<!-- </el-col>-->
|
|
|
|
|
<!-- </el-row>-->
|
|
|
|
|
<el-table :cell-style="setStyle" :data="tableData"
|
|
|
|
|
:header-cell-style="{ textAlign: 'center',backgroundColor:'#0a457d' }"
|
|
|
|
|
:header-cell-style="{ textAlign: 'center',backgroundColor:'#0a457d' }" v-if="show"
|
|
|
|
|
style="width: 100%;margin-top: 12px;">
|
|
|
|
|
<el-table-column label="设备ID" prop="columnName">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="传感器编号" prop="columnKey">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="alias" prop="alias">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="rssi" prop="rssi">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="ts" prop="ts">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="value1" prop="value1">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<el-table-column label="voltage" prop="voltage">
|
|
|
|
|
<el-table-column v-for="i in deviceDataColumns" :label="i.columnName" :prop="i.columnKey">
|
|
|
|
|
</el-table-column>
|
|
|
|
|
<!-- <el-table-column label="传感器编号" prop="columnKey">-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<!-- <el-table-column label="alias" prop="alias">-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<!-- <el-table-column label="rssi" prop="rssi">-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<!-- <el-table-column label="ts" prop="ts">-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<!-- <el-table-column label="value1" prop="value1">-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
<!-- <el-table-column label="voltage" prop="voltage">-->
|
|
|
|
|
<!-- </el-table-column>-->
|
|
|
|
|
</el-table>
|
|
|
|
|
<el-pagination :total="1000" background layout="prev, pager, next">
|
|
|
|
|
<el-pagination :currentPage="currentPage" :pageSize="5" :total="total" background layout="prev, pager, next" @current-change="currentChange">
|
|
|
|
|
</el-pagination>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
@ -114,15 +114,30 @@ export default {
|
|
|
|
|
return {
|
|
|
|
|
topData: {},
|
|
|
|
|
bottomData: [],
|
|
|
|
|
collapseNo:'1',
|
|
|
|
|
radio: '日统计报表',
|
|
|
|
|
tableData: [],
|
|
|
|
|
sceneId:0
|
|
|
|
|
sceneId:0,
|
|
|
|
|
deviceId:0,
|
|
|
|
|
deviceModeId:0,
|
|
|
|
|
total:0,
|
|
|
|
|
currentPage:1,
|
|
|
|
|
deviceDataColumns:[],
|
|
|
|
|
show:false
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async mounted() {
|
|
|
|
|
if(this.$route.query.id){
|
|
|
|
|
this.deviceId = this.$route.query.id
|
|
|
|
|
this.deviceModeId = this.$route.query.deviceModeId
|
|
|
|
|
}
|
|
|
|
|
await this.getData()
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
async currentChange(e){
|
|
|
|
|
this.currentPage = e
|
|
|
|
|
await this.setHistoryData()
|
|
|
|
|
},
|
|
|
|
|
async getData() {
|
|
|
|
|
await this.setDeviceInfo()
|
|
|
|
|
await this.setLinkDevices()
|
|
|
|
@ -136,26 +151,28 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async setDeviceInfo() {
|
|
|
|
|
const {data} = await getDeviceInfo(this.$store.getters.sceneId)
|
|
|
|
|
const {data} = await getDeviceInfo(this.deviceId)
|
|
|
|
|
this.topData = data || {}
|
|
|
|
|
},
|
|
|
|
|
async setHistoryData() {
|
|
|
|
|
this.show = false
|
|
|
|
|
const {data} = await getHistoryData({
|
|
|
|
|
"sceneId":this.$store.getters.sceneId,
|
|
|
|
|
"deviceId": 2,
|
|
|
|
|
"offset": 0,
|
|
|
|
|
"limit": 5,
|
|
|
|
|
"startTime": 1266666666666
|
|
|
|
|
"deviceId": this.deviceId,
|
|
|
|
|
deviceModeId:this.deviceModeId,
|
|
|
|
|
"offset": this.currentPage -1,
|
|
|
|
|
"limit": 1,
|
|
|
|
|
"startTime": 0
|
|
|
|
|
})
|
|
|
|
|
this.tableData = (data?.historyData?.rows || []).map((e, i) => {
|
|
|
|
|
return {
|
|
|
|
|
...e,
|
|
|
|
|
...data.deviceDataColumns[i]
|
|
|
|
|
}
|
|
|
|
|
this.tableData = data.historyData.dataList
|
|
|
|
|
this.total = data.historyData.count
|
|
|
|
|
this.deviceDataColumns = data.deviceDataColumns
|
|
|
|
|
this.$nextTick(()=>{
|
|
|
|
|
this.show = true
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
async setLinkDevices() {
|
|
|
|
|
const {data} = await getLinkDevices(this.$store.getters.sceneId)
|
|
|
|
|
const {data} = await getLinkDevices(this.deviceId)
|
|
|
|
|
this.bottomData = data
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -261,9 +278,9 @@ export default {
|
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 50%;
|
|
|
|
|
left: 10vh;
|
|
|
|
|
width: 2.6vh;
|
|
|
|
|
height: 3.3vh;
|
|
|
|
|
left: 6.2vh;
|
|
|
|
|
width: 10.6vh;
|
|
|
|
|
height: 10.3vh;
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|