2026-04-08 15:34:49 +08:00
|
|
|
|
<template>
|
|
|
|
|
|
<teleport to="body">
|
|
|
|
|
|
<div
|
|
|
|
|
|
v-if="visible"
|
|
|
|
|
|
class="center-card-dialog-overlay"
|
|
|
|
|
|
:style="{ zIndex: zIndex }"
|
|
|
|
|
|
@click.self="handleClose"
|
|
|
|
|
|
>
|
|
|
|
|
|
<div class="center-card-dialog" :style="dialogStyle">
|
|
|
|
|
|
<!-- 头部区域 -->
|
|
|
|
|
|
<div class="dialog-header" @click="handleDetail">
|
|
|
|
|
|
<div class="header-left">
|
|
|
|
|
|
<el-icon class="location-icon"><Location /></el-icon>
|
|
|
|
|
|
<span class="dialog-title">潼南</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<el-icon class="arrow-icon"><ArrowRight /></el-icon>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 内容区域 -->
|
|
|
|
|
|
<div class="dialog-content">
|
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
|
<span class="info-label">人数:</span>
|
|
|
|
|
|
<span class="info-value">{{ value }}</span>
|
|
|
|
|
|
<span class="info-unit">人</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<div class="info-item">
|
|
|
|
|
|
<span class="info-label">路段:</span>
|
|
|
|
|
|
<span class="info-value">{{ roadCount }}</span>
|
|
|
|
|
|
<span class="info-unit">条</span>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
</teleport>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script setup>
|
2026-04-21 15:34:43 +08:00
|
|
|
|
import { computed } from 'vue';
|
|
|
|
|
|
import { ArrowRight, Location } from '@element-plus/icons-vue';
|
2026-04-08 15:34:49 +08:00
|
|
|
|
|
|
|
|
|
|
const props = defineProps({
|
|
|
|
|
|
visible: {
|
|
|
|
|
|
type: Boolean,
|
|
|
|
|
|
default: false,
|
|
|
|
|
|
},
|
|
|
|
|
|
value: {
|
|
|
|
|
|
type: [String, Number],
|
2026-04-21 15:34:43 +08:00
|
|
|
|
default: '',
|
2026-04-08 15:34:49 +08:00
|
|
|
|
},
|
|
|
|
|
|
roadCount: {
|
|
|
|
|
|
type: [String, Number],
|
2026-04-21 15:34:43 +08:00
|
|
|
|
default: '128',
|
2026-04-08 15:34:49 +08:00
|
|
|
|
},
|
|
|
|
|
|
zIndex: {
|
|
|
|
|
|
type: Number,
|
|
|
|
|
|
default: 1000,
|
|
|
|
|
|
},
|
|
|
|
|
|
width: {
|
|
|
|
|
|
type: String,
|
2026-04-21 15:34:43 +08:00
|
|
|
|
default: '200px',
|
2026-04-08 15:34:49 +08:00
|
|
|
|
},
|
|
|
|
|
|
});
|
|
|
|
|
|
|
2026-04-21 15:34:43 +08:00
|
|
|
|
const emit = defineEmits(['update:visible', 'close', 'detail']);
|
2026-04-08 15:34:49 +08:00
|
|
|
|
|
|
|
|
|
|
const dialogStyle = computed(() => ({
|
|
|
|
|
|
width: props.width,
|
|
|
|
|
|
}));
|
|
|
|
|
|
|
|
|
|
|
|
// 关闭对话框
|
|
|
|
|
|
const handleClose = () => {
|
2026-04-21 15:34:43 +08:00
|
|
|
|
emit('update:visible', false);
|
|
|
|
|
|
emit('close');
|
2026-04-08 15:34:49 +08:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 点击详情
|
|
|
|
|
|
const handleDetail = () => {
|
2026-04-21 15:34:43 +08:00
|
|
|
|
emit('detail');
|
2026-04-08 15:34:49 +08:00
|
|
|
|
};
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
|
// 视频屏幕自适应 - 基于视口宽度动态调整
|
|
|
|
|
|
@function vw($px) {
|
|
|
|
|
|
@return calc($px / 1920 * 100vw);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.center-card-dialog-overlay {
|
|
|
|
|
|
position: fixed;
|
|
|
|
|
|
top: 0;
|
|
|
|
|
|
left: 0;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: center;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.center-card-dialog {
|
|
|
|
|
|
position: relative;
|
2026-04-21 15:34:43 +08:00
|
|
|
|
background-image: url('../../../assets/MaMap_img/区县弹窗背景@2x.png');
|
2026-04-08 15:34:49 +08:00
|
|
|
|
background-size: 100% 100%;
|
|
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
|
|
min-width: vw(200);
|
|
|
|
|
|
padding: vw(12) vw(16);
|
|
|
|
|
|
|
|
|
|
|
|
// 头部区域
|
|
|
|
|
|
.dialog-header {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
cursor: pointer;
|
|
|
|
|
|
margin-bottom: vw(8);
|
|
|
|
|
|
|
|
|
|
|
|
.header-left {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: vw(6);
|
|
|
|
|
|
|
|
|
|
|
|
.location-icon {
|
|
|
|
|
|
font-size: vw(16);
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.dialog-title {
|
|
|
|
|
|
font-size: vw(16);
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
color: #fff;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.arrow-icon {
|
|
|
|
|
|
font-size: vw(14);
|
|
|
|
|
|
color: rgba(255, 255, 255, 0.8);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 内容区域
|
|
|
|
|
|
.dialog-content {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: vw(20);
|
|
|
|
|
|
|
|
|
|
|
|
.info-item {
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
gap: vw(4);
|
|
|
|
|
|
|
|
|
|
|
|
.info-label {
|
|
|
|
|
|
font-size: vw(13);
|
|
|
|
|
|
color: rgba(255, 255, 255, 0.8);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.info-value {
|
|
|
|
|
|
font-size: vw(14);
|
|
|
|
|
|
font-weight: 600;
|
|
|
|
|
|
color: #40a9ff;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.info-unit {
|
|
|
|
|
|
font-size: vw(12);
|
|
|
|
|
|
color: rgba(255, 255, 255, 0.7);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 进入动画
|
|
|
|
|
|
.center-card-dialog-overlay {
|
|
|
|
|
|
.center-card-dialog {
|
|
|
|
|
|
animation: dialogIn 0.3s ease-out;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@keyframes dialogIn {
|
|
|
|
|
|
from {
|
|
|
|
|
|
opacity: 0;
|
|
|
|
|
|
transform: scale(0.9) translateY(-20px);
|
|
|
|
|
|
}
|
|
|
|
|
|
to {
|
|
|
|
|
|
opacity: 1;
|
|
|
|
|
|
transform: scale(1) translateY(0);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 退出动画
|
|
|
|
|
|
.center-card-dialog-overlay.v-leave-active {
|
|
|
|
|
|
.center-card-dialog {
|
|
|
|
|
|
animation: dialogOut 0.2s ease-in;
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@keyframes dialogOut {
|
|
|
|
|
|
from {
|
|
|
|
|
|
opacity: 1;
|
|
|
|
|
|
transform: scale(1) translateY(0);
|
|
|
|
|
|
}
|
|
|
|
|
|
to {
|
|
|
|
|
|
opacity: 0;
|
|
|
|
|
|
transform: scale(0.9) translateY(-20px);
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
</style>
|