修改标题

dev
夜笙歌 1 year ago
parent ec355bf39a
commit 4c049995a1

@ -7,8 +7,8 @@
</div>
</div>
<div ref="right" class="right">
<div ref="search" class="search">
<el-form :inline="true" :model="form" class="demo-form-inline">
<div ref="search" class="search" style="min-height: 60px">
<el-form :inline="true" :model="form" class="demo-form-inline" v-show="tableShow">
<el-form-item label="传感器编号">
<el-input v-model="form.data1" placeholder="传感器编号"></el-input>
</el-form-item>
@ -18,13 +18,15 @@
<el-form-item label="采集时间">
<el-date-picker
v-model="form.data3"
placeholder="选择日期时间"
type="datetime">
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="()=>{}"></el-button>
<el-button @click="()=>{}"></el-button>
<el-button type="primary" @click="query"></el-button>
<el-button @click="reset"></el-button>
</el-form-item>
</el-form>
</div>
@ -71,14 +73,14 @@
<template slot-scope="scope">
<el-button
type="primary"
@click="toHistory"
@click="toHistory(scope.row.deviceid,scope.row.devicemodeid)"
>查看历史</el-button>
</template>
</el-table-column>
</el-table>
</div>
<div ref="pagination" style="margin-top: 12px;height: 36px;">
<el-pagination :current-page="offset" :total="total" background layout="prev, pager, next" style="display: inline-block;float:right;" :pageSize="10" @current-change="currentChange">
<el-pagination :current-page="offset" :total="total" background layout="prev, pager, next" style="display: inline-block;float:right;" :pageSize="limit" @current-change="currentChange">
</el-pagination>
</div>
</div>
@ -103,6 +105,7 @@ export default {
data2: '',
data3: null
},
deviceModeId:'',
maxHeight: 0,
tableData: [],
deviceList:[],
@ -111,6 +114,7 @@ export default {
limit:10,
total:0,
deviceDataColumns:[],
tableDataRow:[]
}
},
async mounted() {
@ -118,17 +122,32 @@ export default {
await this.getData()
},
methods: {
async currentChange(){
await this.getRightData()
query(){
this.getRightData({deviceModeId:this.deviceModeId})
},
reset(){
this.form = {
data1: '',
data2: '',
data3: null
}
this.getRightData({deviceModeId:this.deviceModeId})
},
async currentChange(e){
this.tableData =this.tableDataRow.slice(this.limit*(e-1),this.limit*e)
},
async getRightData(e){
this.deviceModeId = e.deviceModeId
this.loading = true
await this.setSelectLatestDataByDeviceMode({
"sceneId": this.$store.getters.sceneId,
"deviceModeId": e.deviceModeId,
"startTime": 0,
"offset": this.offset-1,
"limit": 10
deviceCode:this.form.data1,
deviceName:this.form.data2,
startTime:this.form?.data3?.length>1? new Date(this.form.data3[0]).getTime():'',
endTime:this.form?.data3?.length>1? new Date(this.form.data3[1]).getTime():'',
// "offset": this.offset-1,
// "limit": 10
})
this.loading = false
this.tableShow = false
@ -147,8 +166,10 @@ export default {
async setSelectLatestDataByDeviceMode(e){
const {data} = await selectLatestDataByDeviceMode(e)
this.deviceDataColumns = data.deviceDataColumns
this.tableData = data.latestData || []
this.total=data.total
this.tableDataRow =data.latestData || []
this.tableData =( data.latestData || []).slice(0,this.limit)
this.total=data.latestData.length || 0
this.offset = 1
},
async setDeviceModesBySceneId(){
const {data} = await getDeviceModesBySceneId( {
@ -156,8 +177,10 @@ export default {
})
this.deviceList = data
},
toHistory(){
this.$router.push({path: "/board/senso"});
toHistory(e,i){
console.log(e)
console.log(i)
this.$router.push({path: "/board/senso",query:{id:e,deviceModeId:i}});
}
}
};
@ -230,6 +253,9 @@ export default {
color: #25bffc;
border-color: #25bffc;
}
/deep/.el-range-input{
background-color: #0000;
}
}
.table {

@ -72,30 +72,30 @@
</el-collapse>
</div>
<el-collapse accordion>
<el-collapse-item v-for="i in bottomData">
<template slot="title">
<!-- <el-collapse accordion>-->
<div v-for="i in bottomData" >
<!-- <template slot="title">-->
<div class="itemBg">
<div class="icon"></div>
<div class="icon1"></div>
<div class="icon2"></div>
<div :style="'background-image: url('+(i&&i.devicePic)+')'" class="icon2"></div>
<div class="title"> {{ i.deviceName }}</div>
<div class="info">
<div class="info1">所属区域</div>
<div class="info2">大厅</div>
<div class="info1">设备编号:</div>
<div class="info2"> {{ i.deviceCode }}</div>
</div>
<div class="info" style="left: 70vh;">
<div class="info1">位置:</div>
<div class="info2">深圳</div>
<div class="info1">设备名称:</div>
<div class="info2">{{ i.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">{{ i.deviceLocation }}</div>
</div>
</div>
</template>
</el-collapse-item>
</el-collapse>
<!-- </template>-->
</div>
<!-- </el-collapse>-->
</div>
</div>
</template>
@ -166,6 +166,7 @@ export default {
})
this.tableData = data.historyData.dataList
this.total = data.historyData.count
this.currentPage = 1
this.deviceDataColumns = data.deviceDataColumns
this.$nextTick(()=>{
this.show = true

Loading…
Cancel
Save