index.vue 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213
  1. <script lang="ts" setup>
  2. import {init, loadedStatus, loadMap} from "@/utils/mapConfig";
  3. import {onMounted, watch} from "vue";
  4. import {useMapStore} from "@/stores/map";
  5. const store = useMapStore()
  6. const stationPointBlueImage = new URL('@/assets/images/map/station-point-blue.png', import.meta.url).href
  7. const stationPointGreenImage = new URL('@/assets/images/map/station-point-green.png', import.meta.url).href
  8. const stationPointYellowImage = new URL('@/assets/images/map/station-point-yellow.png', import.meta.url).href
  9. const stationPointGrayImage = new URL('@/assets/images/map/station-point-gray.png', import.meta.url).href
  10. onMounted(() => {
  11. init({
  12. images: [
  13. {name: 'stationPointBlue', src: stationPointBlueImage},
  14. {name: 'stationPointGreen', src: stationPointGreenImage},
  15. {name: 'stationPointYellow', src: stationPointYellowImage},
  16. {name: 'stationPointGray', src: stationPointGrayImage},
  17. ]
  18. })
  19. })
  20. watch(() => store.mapOption, async (option) => {
  21. while (!loadedStatus) {
  22. await new Promise(resolve => setTimeout(resolve, 500));
  23. }
  24. loadMap(option)
  25. })
  26. </script>
  27. <template>
  28. <div class="gw-map">
  29. <!-- 2D地图 -->
  30. <div id="mapDiv"></div>
  31. <!-- <div v-if="legendList && legendList.length > 0" ref="mapLegend" :style="legendStyle" class="map-legend">-->
  32. <!-- <ul>-->
  33. <!-- <li v-for="(item, index) in legendList" :key="index">-->
  34. <!-- <span :title="item.label">{{ item.label }}</span>-->
  35. <!-- <template v-if="item.imgType === 'svg'">-->
  36. <!-- <svg-icon :icon-class="item.src" :style="item.imgStyle" class="image"></svg-icon>-->
  37. <!-- </template>-->
  38. <!-- <template v-if="item.imgType === 'img'">-->
  39. <!-- <el-image :src="item.src" :style="item.imgStyle" class="image"></el-image>-->
  40. <!-- </template>-->
  41. <!-- </li>-->
  42. <!-- </ul>-->
  43. <!-- </div>-->
  44. </div>
  45. </template>
  46. <style lang="scss" scoped>
  47. .gw-map {
  48. width: 100%;
  49. height: 100%;
  50. position: relative;
  51. pointer-events: auto;
  52. background-image: url('@/assets/images/xk.jpg');
  53. //background-repeat: no-repeat;
  54. background-size: cover;
  55. }
  56. #mapDiv {
  57. width: 100%;
  58. height: 100%;
  59. z-index: 1;
  60. opacity: 1;
  61. overflow: hidden;
  62. filter: saturate(1) contrast(1) hue-rotate(0deg) brightness(1);
  63. transform: rotateZ(0deg) rotateX(0deg) rotateY(0deg) skewX(0deg) skewY(0deg);
  64. }
  65. .map-legend {
  66. position: absolute;
  67. bottom: 0;
  68. right: 0;
  69. z-index: 100;
  70. background-color: #f2f2f2;
  71. border-radius: 8px;
  72. padding: 5px 10px;
  73. ul {
  74. margin: 0;
  75. padding: 0;
  76. li {
  77. margin: 5px 0;
  78. list-style: none;
  79. display: flex;
  80. justify-content: flex-end;
  81. align-items: center;
  82. span {
  83. text-align: right;
  84. width: 7vw;
  85. white-space: nowrap;
  86. overflow: hidden;
  87. text-overflow: ellipsis;
  88. }
  89. .image {
  90. margin-left: 5px;
  91. width: 1rem;
  92. height: 1rem;
  93. }
  94. }
  95. }
  96. }
  97. :deep(.l7-control-logo) {
  98. display: none;
  99. }
  100. :deep(.esri-view-surface) {
  101. &:after {
  102. display: none;
  103. }
  104. }
  105. </style>
  106. <style lang="scss">
  107. .entry-card-component {
  108. .entry-base-info {
  109. .base-info {
  110. display: flex;
  111. margin-bottom: 14px;
  112. .entry-avatar {
  113. width: 90px;
  114. margin-right: 8px;
  115. height: 108px;
  116. img {
  117. width: 100%;
  118. height: 100%;
  119. object-fit: cover;
  120. }
  121. }
  122. .entry-text-info {
  123. flex: 1;
  124. .entry-name {
  125. font-size: 16px;
  126. line-height: 22px;
  127. font-weight: 600;
  128. margin-bottom: 10px;
  129. margin-right: 24px;
  130. }
  131. .entry-desc {
  132. line-height: 20px;
  133. font-size: 12px;
  134. word-break: break-word;
  135. display: -webkit-box;
  136. height: 80px;
  137. overflow: hidden;
  138. text-overflow: ellipsis;
  139. -webkit-line-clamp: 4;
  140. }
  141. }
  142. }
  143. }
  144. .entry-nodes {
  145. .nodes-list {
  146. border-top: 1px solid #ebebeb;
  147. padding-top: 7px;
  148. .node-item {
  149. cursor: pointer;
  150. .title {
  151. word-break: break-word;
  152. display: -webkit-box;
  153. -webkit-box-orient: vertical;
  154. overflow: hidden;
  155. text-overflow: ellipsis;
  156. -webkit-line-clamp: 2;
  157. }
  158. .sub-title {
  159. display: flex;
  160. margin-bottom: 8px;
  161. color: #999;
  162. line-height: 14px;
  163. .time {
  164. margin-right: 4px;
  165. }
  166. .address {
  167. overflow: hidden;
  168. }
  169. }
  170. .desc {
  171. font-size: 12px;
  172. color: #666;
  173. line-height: 20px;
  174. max-height: 40px;
  175. }
  176. }
  177. }
  178. }
  179. }
  180. </style>