toiletDetailDialog.vue 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <div class="container">
  3. <!-- 遮罩层 -->
  4. <div class="mask" @click="handleClose"></div>
  5. <!-- 内容弹窗区域 -->
  6. <div class="toilet">
  7. <!-- 名称区域 -->
  8. <div class="title" :title="currentToilet">{{ currentToilet }}</div>
  9. <!-- 信息盒子区域 -->
  10. <div class="info">
  11. <div class="info_box" :title="info?.address">
  12. 地址:{{ info?.address }}
  13. </div>
  14. <div class="info_box">建设等级:{{ info?.level }}级</div>
  15. <div class="info_box">无障碍厕所:{{ info?.barrierFree }}</div>
  16. <div class="info_box">男厕所:{{ info?.man }}</div>
  17. <div class="info_box">女厕所:{{ info?.woman }}</div>
  18. <div class="info_box">男女通用侧位:{{ info?.unisex }}</div>
  19. <div class="info_box">厕所面积:{{ info?.area }}㎡</div>
  20. <div class="info_box">第三卫生间:{{ info?.third }}</div>
  21. <div class="info_box">项目编号:{{ info?.number }}</div>
  22. </div>
  23. <!-- 关闭按钮区域 -->
  24. <div class="close" @click="handleClose"></div>
  25. </div>
  26. </div>
  27. </template>
  28. <script setup lang="ts">
  29. import { onMounted, ref } from "vue";
  30. // 引入厕所数据
  31. import { toiletData } from "@/components/map/toiletData";
  32. const $emit = defineEmits(["closeDialog"]);
  33. const props = defineProps(["currentToilet"]);
  34. // 厕所信息
  35. const info = ref();
  36. onMounted(() => {
  37. // 匹配出当前厕所的信息
  38. info.value = toiletData.find((ele: any) => ele.title === props.currentToilet);
  39. // console.log(info.value);
  40. });
  41. // 点击关闭按钮回调
  42. const handleClose = () => {
  43. $emit("closeDialog", false);
  44. };
  45. </script>
  46. <style lang="scss" scoped>
  47. .container {
  48. z-index: 9999;
  49. position: absolute;
  50. top: -151px;
  51. left: 0;
  52. display: flex;
  53. justify-content: center;
  54. align-items: center;
  55. width: 7072px;
  56. height: 1872px;
  57. background-color: rgba($color: #000000, $alpha: 0.4);
  58. .mask {
  59. position: absolute;
  60. top: 0;
  61. left: 0;
  62. width: 7072px;
  63. height: 1872px;
  64. }
  65. .toilet {
  66. position: relative;
  67. width: 668px;
  68. height: 672px;
  69. background-image: url(@/assets/images/88.png);
  70. background-size: 100% 100%;
  71. .title {
  72. margin-top: 3px;
  73. margin-left: 230px;
  74. padding: 0 20px;
  75. width: 224px;
  76. height: 46px;
  77. line-height: 46px;
  78. text-align: center;
  79. color: #ff8e3d;
  80. font-size: 24px;
  81. font-weight: bold;
  82. overflow: hidden;
  83. white-space: nowrap;
  84. text-overflow: ellipsis;
  85. }
  86. .info {
  87. margin-top: 28px;
  88. margin-left: 37px;
  89. width: 604px;
  90. height: 565px;
  91. .info_box {
  92. margin: 0 auto 15px;
  93. padding-left: 22px;
  94. width: 530px;
  95. height: 47px;
  96. line-height: 47px;
  97. font-size: 23px;
  98. border-left: 2px solid #90cffc;
  99. border-top: 0.1px dashed rgba(0, 186, 186, 0.3);
  100. border-bottom: 1px dashed rgba(0, 186, 186, 0.3);
  101. border-right: 1px dashed rgba(0, 186, 186, 0.3);
  102. background-color: rgba(109, 161, 189, 0.21);
  103. white-space: nowrap;
  104. overflow: hidden;
  105. text-overflow: ellipsis;
  106. }
  107. }
  108. .close {
  109. position: absolute;
  110. top: 10px;
  111. right: 6px;
  112. width: 42px;
  113. height: 42px;
  114. cursor: pointer;
  115. background-image: url(@/assets/images/12.png);
  116. background-size: 100% 100%;
  117. }
  118. }
  119. }
  120. </style>