<template>
|
<b-modal
|
ref="modalRef"
|
hide-footer
|
title="设备信息"
|
:size="deviceInfo&&(deviceInfo.deviceType==='4'||deviceInfo.deviceType==='5')?'lg':''"
|
>
|
<div class="row">
|
<div :class="deviceInfo&&(deviceInfo.deviceType==='4'||deviceInfo.deviceType==='5')?'col-6':'col-12'">
|
<b-form-group
|
horizontal
|
:label-cols="4"
|
label="设备状态:"
|
>
|
<div class="pt-2">
|
正常
|
</div>
|
</b-form-group>
|
<b-form-group
|
horizontal
|
:label-cols="4"
|
label="设备种类:"
|
>
|
<div class="pt-2">
|
{{deviceInfo&&deviceInfo.deviceLable}}
|
</div>
|
</b-form-group>
|
<b-form-group
|
horizontal
|
:label-cols="4"
|
label="IP地址:"
|
>
|
<div class="pt-2">
|
{{deviceInfo&&deviceInfo.ip}}
|
</div>
|
</b-form-group>
|
<b-form-group
|
horizontal
|
:label-cols="4"
|
label="相关描述:"
|
>
|
<div class="pt-2">
|
{{deviceInfo&&deviceInfo.description}}
|
</div>
|
</b-form-group>
|
</div>
|
<div class="col-6">
|
<div v-if="deviceInfo&&deviceInfo.deviceType==='4'">
|
<h4>温度:</h4>
|
<h2 class="text-danger f40">{{deviceInfo&&deviceInfo.temperatureNum}}</h2>
|
</div>
|
<div v-if="deviceInfo&&deviceInfo.deviceType==='5'">
|
<h4>湿度:</h4>
|
<h2 class="text-primary f40">{{deviceInfo&&deviceInfo.humidityNum}}</h2>
|
</div>
|
</div>
|
</div>
|
</b-modal>
|
</template>
|
|
<script>
|
export default {
|
props: {
|
deviceInfo: {
|
default: null,
|
type: Object
|
}
|
},
|
methods: {
|
showModal () {
|
this.$refs.modalRef.show()
|
},
|
hideModal () {
|
this.$refs.modalRef.hide()
|
}
|
}
|
}
|
</script>
|