123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213 |
- <script lang="ts" setup>
- import {init, loadedStatus, loadMap} from "@/utils/mapConfig";
- import {onMounted, watch} from "vue";
- import {useMapStore} from "@/stores/map";
- const store = useMapStore()
- const stationPointBlueImage = new URL('@/assets/images/map/station-point-blue.png', import.meta.url).href
- const stationPointGreenImage = new URL('@/assets/images/map/station-point-green.png', import.meta.url).href
- const stationPointYellowImage = new URL('@/assets/images/map/station-point-yellow.png', import.meta.url).href
- const stationPointGrayImage = new URL('@/assets/images/map/station-point-gray.png', import.meta.url).href
- onMounted(() => {
- init({
- images: [
- {name: 'stationPointBlue', src: stationPointBlueImage},
- {name: 'stationPointGreen', src: stationPointGreenImage},
- {name: 'stationPointYellow', src: stationPointYellowImage},
- {name: 'stationPointGray', src: stationPointGrayImage},
- ]
- })
- })
- watch(() => store.mapOption, async (option) => {
- while (!loadedStatus) {
- await new Promise(resolve => setTimeout(resolve, 500));
- }
- loadMap(option)
- })
- </script>
- <template>
- <div class="gw-map">
- <!-- 2D地图 -->
- <div id="mapDiv"></div>
- <!-- <div v-if="legendList && legendList.length > 0" ref="mapLegend" :style="legendStyle" class="map-legend">-->
- <!-- <ul>-->
- <!-- <li v-for="(item, index) in legendList" :key="index">-->
- <!-- <span :title="item.label">{{ item.label }}</span>-->
- <!-- <template v-if="item.imgType === 'svg'">-->
- <!-- <svg-icon :icon-class="item.src" :style="item.imgStyle" class="image"></svg-icon>-->
- <!-- </template>-->
- <!-- <template v-if="item.imgType === 'img'">-->
- <!-- <el-image :src="item.src" :style="item.imgStyle" class="image"></el-image>-->
- <!-- </template>-->
- <!-- </li>-->
- <!-- </ul>-->
- <!-- </div>-->
- </div>
- </template>
- <style lang="scss" scoped>
- .gw-map {
- width: 100%;
- height: 100%;
- position: relative;
- pointer-events: auto;
- background-image: url('@/assets/images/xk.jpg');
- //background-repeat: no-repeat;
- background-size: cover;
- }
- #mapDiv {
- width: 100%;
- height: 100%;
- z-index: 1;
- opacity: 1;
- overflow: hidden;
- filter: saturate(1) contrast(1) hue-rotate(0deg) brightness(1);
- transform: rotateZ(0deg) rotateX(0deg) rotateY(0deg) skewX(0deg) skewY(0deg);
- }
- .map-legend {
- position: absolute;
- bottom: 0;
- right: 0;
- z-index: 100;
- background-color: #f2f2f2;
- border-radius: 8px;
- padding: 5px 10px;
- ul {
- margin: 0;
- padding: 0;
- li {
- margin: 5px 0;
- list-style: none;
- display: flex;
- justify-content: flex-end;
- align-items: center;
- span {
- text-align: right;
- width: 7vw;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .image {
- margin-left: 5px;
- width: 1rem;
- height: 1rem;
- }
- }
- }
- }
- :deep(.l7-control-logo) {
- display: none;
- }
- :deep(.esri-view-surface) {
- &:after {
- display: none;
- }
- }
- </style>
- <style lang="scss">
- .entry-card-component {
- .entry-base-info {
- .base-info {
- display: flex;
- margin-bottom: 14px;
- .entry-avatar {
- width: 90px;
- margin-right: 8px;
- height: 108px;
- img {
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
- }
- .entry-text-info {
- flex: 1;
- .entry-name {
- font-size: 16px;
- line-height: 22px;
- font-weight: 600;
- margin-bottom: 10px;
- margin-right: 24px;
- }
- .entry-desc {
- line-height: 20px;
- font-size: 12px;
- word-break: break-word;
- display: -webkit-box;
- height: 80px;
- overflow: hidden;
- text-overflow: ellipsis;
- -webkit-line-clamp: 4;
- }
- }
- }
- }
- .entry-nodes {
- .nodes-list {
- border-top: 1px solid #ebebeb;
- padding-top: 7px;
- .node-item {
- cursor: pointer;
- .title {
- word-break: break-word;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- overflow: hidden;
- text-overflow: ellipsis;
- -webkit-line-clamp: 2;
- }
- .sub-title {
- display: flex;
- margin-bottom: 8px;
- color: #999;
- line-height: 14px;
- .time {
- margin-right: 4px;
- }
- .address {
- overflow: hidden;
- }
- }
- .desc {
- font-size: 12px;
- color: #666;
- line-height: 20px;
- max-height: 40px;
- }
- }
- }
- }
- }
- </style>
|