Commit 577d0221 authored by xiexingan's avatar xiexingan

室内气象数据

parent 8fcfeb80
<template lang="pug">
card-warp(title="室内气象数据" height='45px' showBackground )
div(slot='right')
router-link(:to="{name:'analysis-indoor'}")
el-button(size='mini' type='primary') 综合图形
card-warp(title="室内气象数据", height="45px", showBackground)
div(slot="right")
router-link(:to="{ name: 'analysis-indoor' }")
el-button(size="mini", type="primary") 综合图形
div(slot="content", style="height: 90%")
el-tabs.myTabs(v-model="activeName", @tab-click="tabClick")
el-tab-pane(label="候车室区域", name="1")
el-tab-pane(label="办公区域", name="2")
el-form(:inline='true')
el-form-item(label='设备编号:')
el-input(size='mini')
el-form-item(label='')
el-button(type='primary' size='mini') 查询
el-form(:inline="true")
el-form-item(label="设备编号:")
el-input(size="mini")
el-form-item(label="")
el-button(type="primary", size="mini") 查询
.data-warp
div.data-item
div.type 温度
div.color-blue
.data-item
.type 温度
.color-blue
span.num 37
span.unit ℃
div.data-item
div.type 湿度
div.color-cyan
.data-item
.type 湿度
.color-cyan
span.num 25
span.unit %RH
div.data-item()
div.type CO2
div.color-green
.data-item
.type CO2
.color-green
span.num 17
span.unit PPM
el-table(size="mini" :data='dataList' stripe v-loading='dataListLoading' style='width: 100%;' :header-cell-style="{ background: '#EEF8FF', color: '#333333' }")
el-table-column(:resizable="false" type="index" header-align='center' align='center' width="50" label='序号')
el-table-column(:resizable="false" prop='visitorId' header-align='center' align='center' width='240' label='设备编号')
el-table-column(:resizable="false" prop='visitorId' header-align='center' align='center' width='240' label='设备名称')
el-table-column(:resizable="false" prop='visitorId' header-align='center' align='center' width='240' label='温度(℃)')
el-table-column(:resizable="false" prop='visitorId' header-align='center' align='center' label='湿度(%RH)')
el-table-column(:resizable="false" prop='visitorId' header-align='center' align='center' )
span(slot='header')
el-table(
size="mini",
:data="dataList",
stripe,
v-loading="dataListLoading",
style="width: 100%",
:header-cell-style="{ background: '#EEF8FF', color: '#333333' }"
)
el-table-column(
:resizable="false",
type="index",
header-align="center",
align="center",
width="50",
label="序号"
)
el-table-column(
:resizable="false",
prop="visitorId",
header-align="center",
align="center",
width="240",
label="设备编号"
)
el-table-column(
:resizable="false",
prop="visitorId",
header-align="center",
align="center",
width="240",
label="设备名称"
)
el-table-column(
:resizable="false",
prop="visitorId",
header-align="center",
align="center",
width="240",
label="温度(℃)"
)
el-table-column(
:resizable="false",
prop="visitorId",
header-align="center",
align="center",
label="湿度(%RH)"
)
el-table-column(
:resizable="false",
prop="visitorId",
header-align="center",
align="center"
)
span(slot="header")
span CO
sub 2
span ( PPM )
el-table-column(:resizable="false" prop='visitorId' header-align='center' align='center' label='设备状态')
el-table-column( :resizable="false" header-align='center' align='center' width='180' label='操作内容')
template(slot-scope='scope')
el-button(type='text' size='small' @click='showParams(scope.row,1)') 历史数据
el-button(type='text' size='small' @click='showParams(scope.row,2)') 统计图表
tablePagination(:pageSize="pageSize" :totalSize="totalPage" @parentMethod='getDataList')
history(v-if='historyVisible', ref='history', @refreshdatalist='getDataList')
el-table-column(
:resizable="false",
prop="visitorId",
header-align="center",
align="center",
label="设备状态"
)
el-table-column(
:resizable="false",
header-align="center",
align="center",
width="180",
label="操作内容"
)
template(slot-scope="scope")
el-button(
type="text",
size="small",
@click="showParams(scope.row, 1)"
) 历史数据
el-button(
type="text",
size="small",
@click="showParams(scope.row, 2)"
) 统计图表
tablePagination(
:pageSize="pageSize",
:totalSize="totalPage",
@parentMethod="getDataList"
)
history(
v-if="historyVisible",
ref="history",
@refreshdatalist="getDataList"
)
</template>
<script>
......@@ -64,15 +137,42 @@ export default {
activeName: '1',
dataList: [{ id: 1 }],
dataListLoading: false,
pageSize: 50,
pageSize: 10,
totalPage: 0
}
},
mounted() {
this.getDataList()
},
methods: {
tabClick(tab, event) {
console.log(tab, event)
// console.log(tab, event)
this.getDataList()
},
// 获取数据列表
getDataList(page, size) {
this.$http({
url: this.$http.adornUrl('/liResource/list'),
method: 'post',
data: {
type: '507ba9ae22174e4dbbf32dbf34dd7139', //室内气象站
region: Number(this.activeName), //区域类型
page: page || this.pageIndex,
size: size || this.pageSize
}
}).then((data) => {
if (data && data.code === 0) {
console.log('数据', data)
this.dataList = data.page.rows
// this.tableColums = crecords
this.totalSize = data.page.total
} else {
this.dataList = []
this.totalSize = 0
}
})
},
getDataList() {},
showParams(data, type) {
console.log(111)
this.historyVisible = true
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment