Commit 6ec7caab authored by xiexingan's avatar xiexingan

室内气象数据

parent 25e9a077
...@@ -7,26 +7,29 @@ card-warp(title="室内气象数据", height="45px", showBackground) ...@@ -7,26 +7,29 @@ card-warp(title="室内气象数据", height="45px", showBackground)
el-tabs.myTabs(v-model="activeName", @tab-click="tabClick") el-tabs.myTabs(v-model="activeName", @tab-click="tabClick")
el-tab-pane(label="候车室区域", name="1") el-tab-pane(label="候车室区域", name="1")
el-tab-pane(label="办公区域", name="2") el-tab-pane(label="办公区域", name="2")
el-form(:inline="true" :mode="formData") el-form(:inline="true", :mode="formData")
el-form-item(label="设备编号:" prop="code") el-form-item(label="设备编号:", prop="code")
el-input(size="mini" v-model="formData.code" clearable) el-input(size="mini", v-model="formData.code", clearable)
el-form-item() el-form-item
el-button(type="primary", size="mini" @click="getDataList()") 查询 el-button(type="primary", size="mini", @click="getDataList()") 查询
.data-warp .data-warp
.data-item .data-item
.type 温度 .type 温度
.color-blue .color-blue
span.num 37 span.num(v-if="activeName == 1") {{ hcdtSnqx.temperature }}
span.num(v-else) {{ bgqySnqx.temperature }}
span.unit ℃ span.unit ℃
.data-item .data-item
.type 湿度 .type 湿度
.color-cyan .color-cyan
span.num 25 span.num(v-if="activeName == 1") {{ hcdtSnqx.humidity }}
span.num(v-else) {{ bgqySnqx.humidity }}
span.unit %RH span.unit %RH
.data-item .data-item
.type CO2 .type CO2
.color-green .color-green
span.num 17 span.num(v-if="activeName == 1") {{ hcdtSnqx.carbonDioxide }}
span.num(v-else) {{ bgqySnqx.carbonDioxide }}
span.unit PPM span.unit PPM
el-table( el-table(
size="mini", size="mini",
...@@ -62,7 +65,7 @@ card-warp(title="室内气象数据", height="45px", showBackground) ...@@ -62,7 +65,7 @@ card-warp(title="室内气象数据", height="45px", showBackground)
) )
el-table-column( el-table-column(
:resizable="false", :resizable="false",
prop="visitorId", prop="temperature",
header-align="center", header-align="center",
align="center", align="center",
width="240", width="240",
...@@ -70,14 +73,14 @@ card-warp(title="室内气象数据", height="45px", showBackground) ...@@ -70,14 +73,14 @@ card-warp(title="室内气象数据", height="45px", showBackground)
) )
el-table-column( el-table-column(
:resizable="false", :resizable="false",
prop="visitorId", prop="humidity",
header-align="center", header-align="center",
align="center", align="center",
label="湿度(%RH)" label="湿度(%RH)"
) )
el-table-column( el-table-column(
:resizable="false", :resizable="false",
prop="visitorId", prop="carbonDioxide",
header-align="center", header-align="center",
align="center" align="center"
) )
...@@ -143,8 +146,21 @@ export default { ...@@ -143,8 +146,21 @@ export default {
totalPage: 0 totalPage: 0
} }
}, },
computed: {
hcdtSnqx() {
return this.$store.state.d2admin.paramsList.list.hcdtSnqx
},
bgqySnqx() {
return this.$store.state.d2admin.paramsList.list.bgqySnqx
},
snqxzList() {
return this.$store.state.d2admin.paramsList.list.snqxzList
}
},
watch: {},
mounted() { mounted() {
this.getDataList() this.getDataList()
// this.hcdtSnqx.temperature = this.$store.state.d2admin.paramsList.list.hcdtSnqx.temperature
}, },
methods: { methods: {
tabClick(tab, event) { tabClick(tab, event) {
...@@ -166,7 +182,10 @@ export default { ...@@ -166,7 +182,10 @@ export default {
}).then((data) => { }).then((data) => {
if (data && data.code === 0) { if (data && data.code === 0) {
console.log('数据', data) console.log('数据', data)
this.dataList = data.page.rows this.dataList = data.page.rows
this.setDataList()
console.log(this.dataList)
this.totalPage = data.page.total this.totalPage = data.page.total
} else { } else {
this.dataList = [] this.dataList = []
...@@ -174,6 +193,18 @@ export default { ...@@ -174,6 +193,18 @@ export default {
} }
}) })
}, },
//修改列表数据
setDataList() {
for (var i = 0; i < this.snqxzList.length; i++) {
this.dataList.forEach(e => {
if (this.snqxzList[i].resource_id == e.id) {
this.$set(e, 'temperature', this.snqxzList[i].temperature)
this.$set(e, 'humidity', this.snqxzList[i].humidity)
this.$set(e, 'carbonDioxide', this.snqxzList[i].carbon_dioxide)
}
})
}
},
showParams(data, type) { showParams(data, type) {
console.log(111) console.log(111)
this.historyVisible = true this.historyVisible = true
......
...@@ -310,6 +310,7 @@ export default { ...@@ -310,6 +310,7 @@ export default {
//清空Cookie //清空Cookie
this.clearCookie() this.clearCookie()
} }
this.$parent.getDateList();
} else { } else {
sessionStorage.removeItem('uuid') sessionStorage.removeItem('uuid')
sessionStorage.removeItem('token') sessionStorage.removeItem('token')
......
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