|
|
@ -33,11 +33,15 @@ |
|
|
<div class="top-panel__center"> |
|
|
<div class="top-panel__center"> |
|
|
<div class="data_item"> |
|
|
<div class="data_item"> |
|
|
<div class="data_item__title">手持设备</div> |
|
|
<div class="data_item__title">手持设备</div> |
|
|
<div class="data_item__value">2000<span class="data_item__unit">台</span></div> |
|
|
|
|
|
|
|
|
<div class="data_item__value" |
|
|
|
|
|
>{{ handDetectorCount }}<span class="data_item__unit">台</span></div |
|
|
|
|
|
> |
|
|
</div> |
|
|
</div> |
|
|
<div class="data_item"> |
|
|
<div class="data_item"> |
|
|
<div class="data_item__title">在线数量</div> |
|
|
<div class="data_item__title">在线数量</div> |
|
|
<div class="data_item__value">200<span class="data_item__unit">台</span></div> |
|
|
|
|
|
|
|
|
<div class="data_item__value" |
|
|
|
|
|
>{{ onlineCount }}<span class="data_item__unit">台</span></div |
|
|
|
|
|
> |
|
|
</div> |
|
|
</div> |
|
|
<!-- <div class="data_item"> |
|
|
<!-- <div class="data_item"> |
|
|
<div class="data_item__title">用户数量</div> |
|
|
<div class="data_item__title">用户数量</div> |
|
|
@ -123,6 +127,17 @@ const panelVisible = ref(false) |
|
|
const selectedMarker = ref<MarkerData | null>(null) |
|
|
const selectedMarker = ref<MarkerData | null>(null) |
|
|
const search = ref('') |
|
|
const search = ref('') |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* gasStatus 气体报警状态 |
|
|
|
|
|
batteryStatus 电池报警状态 |
|
|
|
|
|
fenceStatus 电子围栏报警状态 |
|
|
|
|
|
onlineStatus 1在线 0离线 |
|
|
|
|
|
enableStatus 1启用 0未启用 |
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
// 手持设备数量 |
|
|
|
|
|
const handDetectorCount = computed(() => props.markers.length) |
|
|
|
|
|
const onlineCount = computed(() => props.markers.filter((item) => item.onlineStatus === 1).length) |
|
|
// 使用组合式函数 |
|
|
// 使用组合式函数 |
|
|
const { |
|
|
const { |
|
|
services, |
|
|
services, |
|
|
@ -290,96 +305,21 @@ onMounted(() => { |
|
|
|
|
|
|
|
|
defineExpose({ refreshFences }) |
|
|
defineExpose({ refreshFences }) |
|
|
</script> |
|
|
</script> |
|
|
|
|
|
|
|
|
<style scoped lang="scss"> |
|
|
<style scoped lang="scss"> |
|
|
.map-container { |
|
|
.map-container { |
|
|
width: 100%; |
|
|
width: 100%; |
|
|
height: 100%; |
|
|
height: 100%; |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.ol-viewport) { |
|
|
|
|
|
width: 100% !important; |
|
|
|
|
|
height: 100% !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
:deep(.ol-map) { |
|
|
|
|
|
width: 100% !important; |
|
|
|
|
|
height: 100% !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.info-panel { |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
top: 100px; |
|
|
|
|
|
right: 20px; |
|
|
|
|
|
background-color: rgba(255, 255, 255, 0.9); |
|
|
|
|
|
border-radius: 8px; |
|
|
|
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); |
|
|
|
|
|
z-index: 1000; |
|
|
|
|
|
width: 300px; |
|
|
|
|
|
max-height: 80vh; |
|
|
|
|
|
overflow-y: auto; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
flex-direction: column; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.info-panel__header { |
|
|
|
|
|
display: flex; |
|
|
|
|
|
justify-content: space-between; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
padding: 10px 15px; |
|
|
|
|
|
border-bottom: 1px solid #eee; |
|
|
|
|
|
background-color: #f5f5f5; |
|
|
|
|
|
border-radius: 8px 8px 0 0; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.info-panel__title { |
|
|
|
|
|
font-size: 16px; |
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
color: #333; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.info-panel__close { |
|
|
|
|
|
background-color: #ff4d4f; |
|
|
|
|
|
color: white; |
|
|
|
|
|
border: none; |
|
|
|
|
|
border-radius: 50%; |
|
|
|
|
|
width: 24px; |
|
|
|
|
|
height: 24px; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
justify-content: center; |
|
|
|
|
|
cursor: pointer; |
|
|
|
|
|
font-size: 18px; |
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
transition: background-color 0.3s ease; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.info-panel__close:hover { |
|
|
|
|
|
background-color: #d9363e; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.info-panel__body { |
|
|
|
|
|
padding: 15px; |
|
|
|
|
|
flex-grow: 1; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
flex-direction: column; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.info-panel__empty { |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
color: #888; |
|
|
|
|
|
padding: 20px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.info-panel__name { |
|
|
|
|
|
font-size: 18px; |
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
margin-bottom: 5px; |
|
|
|
|
|
color: #555; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
:deep(.ol-viewport) { |
|
|
|
|
|
width: 100% !important; |
|
|
|
|
|
height: 100% !important; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.info-panel__coord { |
|
|
|
|
|
font-size: 14px; |
|
|
|
|
|
color: #666; |
|
|
|
|
|
|
|
|
:deep(.ol-map) { |
|
|
|
|
|
width: 100% !important; |
|
|
|
|
|
height: 100% !important; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* 顶部面板样式 */ |
|
|
/* 顶部面板样式 */ |
|
|
@ -397,125 +337,217 @@ defineExpose({ refreshFences }) |
|
|
flex-wrap: wrap; |
|
|
flex-wrap: wrap; |
|
|
height: 100px; |
|
|
height: 100px; |
|
|
box-sizing: border-box; |
|
|
box-sizing: border-box; |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.top-panel__left { |
|
|
|
|
|
flex: 0 0 260px; |
|
|
|
|
|
background: rgba(255, 255, 255, 0.7); |
|
|
|
|
|
border: 1px solid rgba(0, 0, 0, 0.06); |
|
|
|
|
|
border-radius: 10px; |
|
|
|
|
|
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.top-panel__left { |
|
|
|
|
|
flex: 0 0 260px; |
|
|
|
|
|
background: rgba(255, 255, 255, 0.7); |
|
|
|
|
|
border: 1px solid rgba(0, 0, 0, 0.06); |
|
|
|
|
|
border-radius: 10px; |
|
|
|
|
|
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
|
|
|
|
|
|
.search-group { |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
gap: 8px; |
|
|
|
|
|
padding: 8px; |
|
|
|
|
|
|
|
|
|
|
|
.search-type { |
|
|
|
|
|
flex: 0 0 120px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.search-group { |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
gap: 8px; |
|
|
|
|
|
padding: 8px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.search-input { |
|
|
|
|
|
width: 220px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.search-type { |
|
|
|
|
|
flex: 0 0 120px; |
|
|
|
|
|
} |
|
|
|
|
|
.search-input { |
|
|
|
|
|
width: 220px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.top-panel__center { |
|
|
|
|
|
flex: 1 1 auto; |
|
|
|
|
|
display: grid; |
|
|
|
|
|
grid-template-columns: repeat(4, minmax(0, 1fr)); |
|
|
|
|
|
gap: 12px; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
|
|
|
|
|
|
.data_item { |
|
|
|
|
|
background: rgba(255, 255, 255, 0.85); |
|
|
|
|
|
border: 1px solid rgba(0, 0, 0, 0.06); |
|
|
|
|
|
border-radius: 8px; |
|
|
|
|
|
padding: 8px 12px; |
|
|
|
|
|
min-height: 56px; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
flex-direction: column; |
|
|
|
|
|
justify-content: center; |
|
|
|
|
|
|
|
|
|
|
|
.data_item__title { |
|
|
|
|
|
font-size: 12px; |
|
|
|
|
|
color: #909399; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.top-panel__center { |
|
|
|
|
|
flex: 1 1 auto; |
|
|
|
|
|
display: grid; |
|
|
|
|
|
grid-template-columns: repeat(4, minmax(0, 1fr)); |
|
|
|
|
|
gap: 12px; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.data_item__value { |
|
|
|
|
|
font-size: 18px; |
|
|
|
|
|
font-weight: 600; |
|
|
|
|
|
color: #303133; |
|
|
|
|
|
margin-top: 4px; |
|
|
|
|
|
|
|
|
|
|
|
.data_item__unit { |
|
|
|
|
|
font-size: 12px; |
|
|
|
|
|
color: #909399; |
|
|
|
|
|
margin-left: 6px; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.data_item { |
|
|
|
|
|
background: rgba(255, 255, 255, 0.85); |
|
|
|
|
|
border: 1px solid rgba(0, 0, 0, 0.06); |
|
|
|
|
|
border-radius: 8px; |
|
|
|
|
|
padding: 8px 12px; |
|
|
|
|
|
min-height: 56px; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
flex-direction: column; |
|
|
|
|
|
justify-content: center; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.top-panel__right { |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
gap: 8px; |
|
|
|
|
|
flex: 0 0 auto; |
|
|
|
|
|
background: rgba(255, 255, 255, 0.7); |
|
|
|
|
|
border: 1px solid rgba(0, 0, 0, 0.06); |
|
|
|
|
|
padding: 8px 12px; |
|
|
|
|
|
border-radius: 8px; |
|
|
|
|
|
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); |
|
|
|
|
|
white-space: nowrap; |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
|
|
|
|
|
|
.legend-title { |
|
|
|
|
|
color: #606266; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.data_item__title { |
|
|
|
|
|
font-size: 12px; |
|
|
|
|
|
color: #909399; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.normal-legend { |
|
|
|
|
|
padding: 4px 8px; |
|
|
|
|
|
border-radius: 999px; |
|
|
|
|
|
color: #fff; |
|
|
|
|
|
font-size: 12px; |
|
|
|
|
|
line-height: 1; |
|
|
|
|
|
background: #67c23a; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.data_item__value { |
|
|
|
|
|
font-size: 18px; |
|
|
|
|
|
font-weight: 600; |
|
|
|
|
|
color: #303133; |
|
|
|
|
|
margin-top: 4px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.alarm1-legend { |
|
|
|
|
|
padding: 4px 8px; |
|
|
|
|
|
border-radius: 999px; |
|
|
|
|
|
color: #fff; |
|
|
|
|
|
font-size: 12px; |
|
|
|
|
|
line-height: 1; |
|
|
|
|
|
background: #e6a23c; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.data_item__unit { |
|
|
|
|
|
font-size: 12px; |
|
|
|
|
|
color: #909399; |
|
|
|
|
|
margin-left: 6px; |
|
|
|
|
|
|
|
|
.alarm2-legend { |
|
|
|
|
|
padding: 4px 8px; |
|
|
|
|
|
border-radius: 999px; |
|
|
|
|
|
color: #fff; |
|
|
|
|
|
font-size: 12px; |
|
|
|
|
|
line-height: 1; |
|
|
|
|
|
background: #f56c6c; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.top-panel__right { |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
gap: 8px; |
|
|
|
|
|
flex: 0 0 auto; |
|
|
|
|
|
background: rgba(255, 255, 255, 0.7); |
|
|
|
|
|
border: 1px solid rgba(0, 0, 0, 0.06); |
|
|
|
|
|
padding: 8px 12px; |
|
|
|
|
|
border-radius: 8px; |
|
|
|
|
|
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); |
|
|
|
|
|
white-space: nowrap; |
|
|
|
|
|
height: 100%; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
@media (max-width: 992px) { |
|
|
|
|
|
.top-panel { |
|
|
|
|
|
.top-panel__left { |
|
|
|
|
|
flex: 1 1 100%; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.legend-title { |
|
|
|
|
|
color: #606266; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.top-panel__center { |
|
|
|
|
|
flex: 1 1 100%; |
|
|
|
|
|
grid-template-columns: repeat(2, minmax(0, 1fr)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
.normal-legend, |
|
|
|
|
|
.alarm1-legend, |
|
|
|
|
|
.alarm2-legend { |
|
|
|
|
|
padding: 4px 8px; |
|
|
|
|
|
border-radius: 999px; |
|
|
|
|
|
color: #fff; |
|
|
|
|
|
font-size: 12px; |
|
|
|
|
|
line-height: 1; |
|
|
|
|
|
|
|
|
.top-panel__right { |
|
|
|
|
|
flex: 1 1 100%; |
|
|
|
|
|
justify-content: flex-start; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
.normal-legend { |
|
|
|
|
|
background: #67c23a; |
|
|
|
|
|
} |
|
|
|
|
|
.alarm1-legend { |
|
|
|
|
|
background: #e6a23c; |
|
|
|
|
|
} |
|
|
|
|
|
.alarm2-legend { |
|
|
|
|
|
background: #f56c6c; |
|
|
|
|
|
|
|
|
@media (max-width: 600px) { |
|
|
|
|
|
.top-panel { |
|
|
|
|
|
.top-panel__center { |
|
|
|
|
|
grid-template-columns: 1fr; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@media (max-width: 992px) { |
|
|
|
|
|
.top-panel__left { |
|
|
|
|
|
flex: 1 1 100%; |
|
|
|
|
|
} |
|
|
|
|
|
.top-panel__center { |
|
|
|
|
|
flex: 1 1 100%; |
|
|
|
|
|
grid-template-columns: repeat(2, minmax(0, 1fr)); |
|
|
|
|
|
} |
|
|
|
|
|
.top-panel__right { |
|
|
|
|
|
flex: 1 1 100%; |
|
|
|
|
|
justify-content: flex-start; |
|
|
|
|
|
|
|
|
.info-panel { |
|
|
|
|
|
position: absolute; |
|
|
|
|
|
top: 100px; |
|
|
|
|
|
right: 20px; |
|
|
|
|
|
background-color: rgba(255, 255, 255, 0.9); |
|
|
|
|
|
border-radius: 8px; |
|
|
|
|
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); |
|
|
|
|
|
z-index: 1000; |
|
|
|
|
|
width: 300px; |
|
|
|
|
|
max-height: 80vh; |
|
|
|
|
|
overflow-y: auto; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
|
|
|
|
.info-panel__header { |
|
|
|
|
|
display: flex; |
|
|
|
|
|
justify-content: space-between; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
padding: 10px 15px; |
|
|
|
|
|
border-bottom: 1px solid #eee; |
|
|
|
|
|
background-color: #f5f5f5; |
|
|
|
|
|
border-radius: 8px 8px 0 0; |
|
|
|
|
|
|
|
|
|
|
|
.info-panel__title { |
|
|
|
|
|
font-size: 16px; |
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
color: #333; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.info-panel__close { |
|
|
|
|
|
background-color: #ff4d4f; |
|
|
|
|
|
color: white; |
|
|
|
|
|
border: none; |
|
|
|
|
|
border-radius: 50%; |
|
|
|
|
|
width: 24px; |
|
|
|
|
|
height: 24px; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
align-items: center; |
|
|
|
|
|
justify-content: center; |
|
|
|
|
|
cursor: pointer; |
|
|
|
|
|
font-size: 18px; |
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
transition: background-color 0.3s ease; |
|
|
|
|
|
|
|
|
|
|
|
&:hover { |
|
|
|
|
|
background-color: #d9363e; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@media (max-width: 600px) { |
|
|
|
|
|
.top-panel__center { |
|
|
|
|
|
grid-template-columns: 1fr; |
|
|
|
|
|
|
|
|
.info-panel__body { |
|
|
|
|
|
padding: 15px; |
|
|
|
|
|
flex-grow: 1; |
|
|
|
|
|
display: flex; |
|
|
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
|
|
|
|
.info-panel__empty { |
|
|
|
|
|
text-align: center; |
|
|
|
|
|
color: #888; |
|
|
|
|
|
padding: 20px; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.info-panel__name { |
|
|
|
|
|
font-size: 18px; |
|
|
|
|
|
font-weight: bold; |
|
|
|
|
|
margin-bottom: 5px; |
|
|
|
|
|
color: #555; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.info-panel__coord { |
|
|
|
|
|
font-size: 14px; |
|
|
|
|
|
color: #666; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</style> |
|
|
</style> |
|
|
|