|
@@ -1,18 +1,24 @@
|
|
<template>
|
|
<template>
|
|
<a-spin :spinning="spinning">
|
|
<a-spin :spinning="spinning">
|
|
<div class="deviceDetail">
|
|
<div class="deviceDetail">
|
|
- <div class="radarMap">
|
|
|
|
- <info-card title="点位图">
|
|
|
|
- <template #extra>
|
|
|
|
- <a-button type="primary" size="small" @click="roomConfigHandler('area')">
|
|
|
|
- 区域配置
|
|
|
|
- </a-button>
|
|
|
|
- </template>
|
|
|
|
|
|
+ <info-card title="点位图">
|
|
|
|
+ <template #extra>
|
|
|
|
+ <a-button type="primary" size="small" @click="roomConfigHandler('area')">
|
|
|
|
+ 区域配置
|
|
|
|
+ </a-button>
|
|
|
|
+ </template>
|
|
|
|
+ <a-alert
|
|
|
|
+ v-if="areaAvailable"
|
|
|
|
+ message="检测区域范围未配置或数值较小,建议通过设备配置调整参数!"
|
|
|
|
+ banner
|
|
|
|
+ style="margin-bottom: 10px"
|
|
|
|
+ />
|
|
|
|
+ <div class="radarMap">
|
|
<div
|
|
<div
|
|
class="radarBox"
|
|
class="radarBox"
|
|
:style="{
|
|
:style="{
|
|
- width: `${detailState?.length}px`,
|
|
|
|
- height: `${detailState?.width}px`,
|
|
|
|
|
|
+ width: `${detailState?.length || 400}px`,
|
|
|
|
+ height: `${detailState?.width || 400}px`,
|
|
}"
|
|
}"
|
|
>
|
|
>
|
|
<template v-if="targets && Object.keys(targets).length > 0">
|
|
<template v-if="targets && Object.keys(targets).length > 0">
|
|
@@ -74,8 +80,8 @@
|
|
>
|
|
>
|
|
<BreathLineChart></BreathLineChart>
|
|
<BreathLineChart></BreathLineChart>
|
|
</div>
|
|
</div>
|
|
- </info-card>
|
|
|
|
- </div>
|
|
|
|
|
|
+ </div>
|
|
|
|
+ </info-card>
|
|
|
|
|
|
<info-card title="基本信息">
|
|
<info-card title="基本信息">
|
|
<template #extra>
|
|
<template #extra>
|
|
@@ -157,7 +163,7 @@
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
import infoCard from './components/infoCard/index.vue'
|
|
import infoCard from './components/infoCard/index.vue'
|
|
import infoItem from './components/infoItem/index.vue'
|
|
import infoItem from './components/infoItem/index.vue'
|
|
-import { ref, reactive, onMounted, onUnmounted } from 'vue'
|
|
|
|
|
|
+import { ref, reactive, onMounted, onUnmounted, computed } from 'vue'
|
|
import { useRoute } from 'vue-router'
|
|
import { useRoute } from 'vue-router'
|
|
import { message } from 'ant-design-vue'
|
|
import { message } from 'ant-design-vue'
|
|
import * as roomApi from '@/api/room'
|
|
import * as roomApi from '@/api/room'
|
|
@@ -426,6 +432,11 @@ onMounted(() => {
|
|
})
|
|
})
|
|
})
|
|
})
|
|
|
|
|
|
|
|
+const areaAvailable = computed(() => {
|
|
|
|
+ const { length, width } = detailState.value
|
|
|
|
+ return Number(length) < 50 || Number(width) < 50
|
|
|
|
+})
|
|
|
|
+
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|
|
if (mqttClient) mqttClient.end()
|
|
if (mqttClient) mqttClient.end()
|
|
if (mqttTimeout) clearTimeout(mqttTimeout)
|
|
if (mqttTimeout) clearTimeout(mqttTimeout)
|
|
@@ -440,16 +451,11 @@ onUnmounted(() => {
|
|
|
|
|
|
.radarMap {
|
|
.radarMap {
|
|
flex-shrink: 0;
|
|
flex-shrink: 0;
|
|
- min-width: 430px;
|
|
|
|
|
|
+ min-width: 400px;
|
|
min-height: 400px;
|
|
min-height: 400px;
|
|
- background-color: #f5f5f5;
|
|
|
|
border-radius: 10px;
|
|
border-radius: 10px;
|
|
-
|
|
|
|
- :deep(.info) {
|
|
|
|
- &-content {
|
|
|
|
- flex-direction: row;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ display: flex;
|
|
|
|
+ flex-direction: row;
|
|
|
|
|
|
.radarBox {
|
|
.radarBox {
|
|
position: relative;
|
|
position: relative;
|