|
@@ -2,16 +2,18 @@
|
|
<div class="radarEditor" :class="{ disabled: props.disabled }">
|
|
<div class="radarEditor" :class="{ disabled: props.disabled }">
|
|
<DetectionAreaView :coordinates="coordinates" :direction="angle" mode="edit">
|
|
<DetectionAreaView :coordinates="coordinates" :direction="angle" mode="edit">
|
|
<template #furnitures>
|
|
<template #furnitures>
|
|
- <EditableFurniture
|
|
|
|
- v-for="item in roomStore.localFurnitureItems"
|
|
|
|
- :key="item.nanoid"
|
|
|
|
- :item="item"
|
|
|
|
- :angle="angle"
|
|
|
|
- :coordinates="coordinates"
|
|
|
|
- :canvas-size="500"
|
|
|
|
- :disabled="disabled"
|
|
|
|
- @update="handleFurnitureUpdate"
|
|
|
|
- />
|
|
|
|
|
|
+ <template v-if="showFurniture">
|
|
|
|
+ <EditableFurniture
|
|
|
|
+ v-for="item in roomStore.localFurnitureItems"
|
|
|
|
+ :key="item.nanoid"
|
|
|
|
+ :item="item"
|
|
|
|
+ :angle="angle"
|
|
|
|
+ :coordinates="coordinates"
|
|
|
|
+ :canvas-size="500"
|
|
|
|
+ :disabled="disabled"
|
|
|
|
+ @update="handleFurnitureUpdate"
|
|
|
|
+ />
|
|
|
|
+ </template>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<template #subregion>
|
|
<template #subregion>
|
|
@@ -38,15 +40,15 @@
|
|
size="small"
|
|
size="small"
|
|
@change="modeRadioChange"
|
|
@change="modeRadioChange"
|
|
>
|
|
>
|
|
- <a-radio-button :value="1">配置面板</a-radio-button>
|
|
|
|
- <a-radio-button :value="2">信息面板</a-radio-button>
|
|
|
|
|
|
+ <a-radio-button :value="1">家具配置</a-radio-button>
|
|
|
|
+ <a-radio-button :value="2">子区域配置</a-radio-button>
|
|
</a-radio-group>
|
|
</a-radio-group>
|
|
<!-- <a-button type="link" size="small" @click="syncCoordinates">同步坐标</a-button> -->
|
|
<!-- <a-button type="link" size="small" @click="syncCoordinates">同步坐标</a-button> -->
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<div v-if="modeRadio === 1" class="config">
|
|
<div v-if="modeRadio === 1" class="config">
|
|
<div class="panel">
|
|
<div class="panel">
|
|
- <div class="panel-hd">家具操作</div>
|
|
|
|
|
|
+ <div class="panel-hd">家具</div>
|
|
<div class="panel-ct">
|
|
<div class="panel-ct">
|
|
<div class="furnitureTool">
|
|
<div class="furnitureTool">
|
|
<a-radio-group v-model:value="sideRadio" size="small">
|
|
<a-radio-group v-model:value="sideRadio" size="small">
|
|
@@ -79,46 +81,20 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
- <div class="panel-hd">区域操作</div>
|
|
|
|
- <div class="panel-ct">
|
|
|
|
- <div class="subregionTool">
|
|
|
|
- <div v-if="roomStore.localSubRegions.length === 0">
|
|
|
|
- 暂无区域,<a-button type="link" size="small" @click="createSubregion"
|
|
|
|
- >新建区域</a-button
|
|
|
|
- >
|
|
|
|
- </div>
|
|
|
|
- <template v-else>
|
|
|
|
- <span>已创建 {{ roomStore.localSubRegions.length }} 个区域</span>
|
|
|
|
- <a-button
|
|
|
|
- v-if="roomStore.localSubRegions.length < 6"
|
|
|
|
- type="link"
|
|
|
|
- size="small"
|
|
|
|
- @click="createSubregion"
|
|
|
|
- >继续创建</a-button
|
|
|
|
- >
|
|
|
|
- <a-switch
|
|
|
|
- v-model:checked="showSubregion"
|
|
|
|
- size="small"
|
|
|
|
- style="margin-left: 20px"
|
|
|
|
- checked-children="显示"
|
|
|
|
- un-checked-children="隐藏"
|
|
|
|
- />
|
|
|
|
- </template>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
- </div>
|
|
|
|
-
|
|
|
|
- <div v-if="modeRadio === 2" class="info">
|
|
|
|
- <div class="panel">
|
|
|
|
<div class="panel-hd">
|
|
<div class="panel-hd">
|
|
<div
|
|
<div
|
|
- >家具列表
|
|
|
|
|
|
+ >已添加的家具
|
|
<span v-if="roomStore.localFurnitureItems.length"
|
|
<span v-if="roomStore.localFurnitureItems.length"
|
|
>({{ roomStore.localFurnitureItems.length }})</span
|
|
>({{ roomStore.localFurnitureItems.length }})</span
|
|
></div
|
|
></div
|
|
>
|
|
>
|
|
<a-space>
|
|
<a-space>
|
|
|
|
+ <a-switch
|
|
|
|
+ v-model:checked="showFurniture"
|
|
|
|
+ size="small"
|
|
|
|
+ checked-children="显示"
|
|
|
|
+ un-checked-children="隐藏"
|
|
|
|
+ />
|
|
<a-popconfirm
|
|
<a-popconfirm
|
|
v-if="roomStore.localFurnitureItems.length"
|
|
v-if="roomStore.localFurnitureItems.length"
|
|
title="确定清空家具吗?"
|
|
title="确定清空家具吗?"
|
|
@@ -213,7 +189,7 @@
|
|
</div> -->
|
|
</div> -->
|
|
|
|
|
|
<div class="mapConfig-item">
|
|
<div class="mapConfig-item">
|
|
- <label class="mapConfig-item-label">x/y:</label>
|
|
|
|
|
|
+ <label class="mapConfig-item-label">距离雷达:</label>
|
|
<div class="mapConfig-item-content">
|
|
<div class="mapConfig-item-content">
|
|
<a-space>
|
|
<a-space>
|
|
<a-input-number
|
|
<a-input-number
|
|
@@ -251,16 +227,24 @@
|
|
<div v-else class="list-empty">暂无家具</div>
|
|
<div v-else class="list-empty">暂无家具</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
+ <div v-if="modeRadio === 2" class="info">
|
|
<div class="panel">
|
|
<div class="panel">
|
|
<div class="panel-hd">
|
|
<div class="panel-hd">
|
|
<div
|
|
<div
|
|
- >区域列表
|
|
|
|
|
|
+ >已添加的子区域
|
|
<span v-if="roomStore.localSubRegions.length"
|
|
<span v-if="roomStore.localSubRegions.length"
|
|
>({{ roomStore.localSubRegions.length }})</span
|
|
>({{ roomStore.localSubRegions.length }})</span
|
|
></div
|
|
></div
|
|
>
|
|
>
|
|
<a-space>
|
|
<a-space>
|
|
|
|
+ <a-switch
|
|
|
|
+ v-model:checked="showSubregion"
|
|
|
|
+ size="small"
|
|
|
|
+ checked-children="显示"
|
|
|
|
+ un-checked-children="隐藏"
|
|
|
|
+ />
|
|
<a-popconfirm
|
|
<a-popconfirm
|
|
v-if="roomStore.localSubRegions.length"
|
|
v-if="roomStore.localSubRegions.length"
|
|
title="确定清空子区域吗?"
|
|
title="确定清空子区域吗?"
|
|
@@ -546,6 +530,7 @@ const handleSubregionUpdate = (item: LocalSubRegionItem[]) => {
|
|
|
|
|
|
const showPanel = ref(true)
|
|
const showPanel = ref(true)
|
|
const showSubregion = ref(false)
|
|
const showSubregion = ref(false)
|
|
|
|
+const showFurniture = ref(true)
|
|
|
|
|
|
onUnmounted(() => {
|
|
onUnmounted(() => {
|
|
// 组件销毁时清除缓存
|
|
// 组件销毁时清除缓存
|