From bf5ba56e8a82f0ef699f2eae413d0dc2c4e4f67d Mon Sep 17 00:00:00 2001
From: jxdnsong <592566207@qq.com>
Date: Tue, 25 Oct 2022 16:15:00 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/sd-jg-school-web into master
---
src/components/orgNavBar/index.vue | 210 ----------------------------------------------------
1 files changed, 1 insertions(+), 209 deletions(-)
diff --git a/src/components/orgNavBar/index.vue b/src/components/orgNavBar/index.vue
index da31233..05d276a 100644
--- a/src/components/orgNavBar/index.vue
+++ b/src/components/orgNavBar/index.vue
@@ -9,13 +9,7 @@
</template>
<template slot="public-box-content">
<ul>
- <li
- @mouseover="flickerStart(item, item.navTitle)"
- @mouseout="flickerEnd(item, item.navTitle)"
- v-for="(item, index) in orgNavBarList"
- :key="index"
- @click="mapPopup(item)"
- >
+ <li v-for="(item, index) in orgNavBarList" :key="index" @click="mapPopup(item)">
<img :src="item.icon" alt />
<span>{{ item.navTitle }}</span>
</li>
@@ -26,8 +20,6 @@
<script>
import { mapGetters } from 'vuex'
-
-let currentOrgLayer = null
export default {
name: 'OrgNavBar',
@@ -56,89 +48,6 @@
'twoOrThree'
])
},
- watch: {
- orgNavBarList: {
- handler (newData, oldData) {
- if (newData.length > 0) {
- currentOrgLayer = new global.DC.HtmlLayer('currentOrgLayer')
- global.viewer.addLayer(currentOrgLayer)
-
- newData.forEach((item, index) => {
- let obj = {}
- if (item.x && item.x != '') {
- const position = this.coordinate(item.x)
- obj = {
- lng: position.lng, lat: position.lat
- }
- } else {
- obj = {
- lng: item.longitude, lat: item.latitude
- }
- }
-
- let divIcon = null
- if (this.twoOrThree == '三 维') {
- divIcon = new global.DC.DivIcon(
- new global.DC.Position(Number(obj.lng), Number(obj.lat), 0),
- `
- <div class="tag-entitys-box">
- <div class="tag-content">
- ${item.navTitle}
- </div>
- <div class="tag-angle-content">
- <img src="https://map.hit.edu.cn/images/tarrow_xq.png">
- </div>
- </div>
- `
- )
- } else {
- divIcon = new global.DC.DivIcon(
- new global.DC.Position(Number(item.longitude), Number(item.latitude), 150),
- `
- <div class="tag-entitys-box">
- <div class="tag-content">
- ${item.navTitle}
- </div>
- <div class="tag-angle-content">
- <img src="https://map.hit.edu.cn/images/tarrow_xq.png">
- </div>
- </div>
- `
- )
- }
-
- divIcon.attr.name = item.navTitle
-
- divIcon.attr.params = item
-
- currentOrgLayer.addOverlay(divIcon)
- })
- } else {
- this.removeLayer()
- }
- },
- immediate: true
- },
- twoOrThree: {
- handler (newData, oldData) {
- if (newData == '三 维') {
- if (currentOrgLayer != null) {
- currentOrgLayer.eachOverlay((item) => {
- const position = this.coordinate(item.attr.params.x)
- item.position = new global.DC.Position(Number(position.lng), Number(position.lat), 0)
- })
- }
- } else {
- if (currentOrgLayer != null) {
- currentOrgLayer.eachOverlay((item) => {
- item.position = new global.DC.Position(Number(item.position.jd), Number(item.position.wd), 150)
- })
- }
- }
- },
- immediate: true
- }
- },
methods: {
coordinate (item) {
const arr = item.split(',')
@@ -146,13 +55,6 @@
return {
lng: arr[0],
lat: arr[1]
- }
- },
-
- removeLayer () {
- if (currentOrgLayer != null) {
- global.viewer.removeLayer(currentOrgLayer)
- currentOrgLayer = null
}
},
@@ -285,116 +187,6 @@
this.$store.commit('SET_DETAILSPOPUP', false)
this.$store.commit('SET_PANORAMAPOPUP', false)
this.$store.commit('SET_MONITORPOPUP', false)
- this.removeLayer()
- },
-
- flickerStart (param, name) {
- const layerIcon = currentOrgLayer.getOverlaysByAttr('name', name)
-
- currentOrgLayer.removeOverlay(layerIcon[0])
-
- let divIcon = null
-
- let obj = {}
-
- if (param.x && param.x != '') {
- const position = this.coordinate(param.x)
- obj = {
- lng: position.lng, lat: position.lat
- }
- } else {
- obj = {
- lng: param.longitude, lat: param.latitude
- }
- }
-
- if (this.twoOrThree == '三 维') {
- divIcon = new global.DC.DivIcon(
- new global.DC.Position(Number(obj.lng), Number(obj.lat), 0),
- `
- <div class="tag-entitys-box layer-entity-animation">
- <div class="tag-content">
- ${param.navTitle}
- </div>
- <div class="tag-angle-content">
- <img src="https://map.hit.edu.cn/images/tarrow_xq.png">
- </div>
- </div>
- `
- )
- } else {
- divIcon = new global.DC.DivIcon(
- new global.DC.Position(Number(param.longitude), Number(param.latitude), 150),
- `
- <div class="tag-entitys-box layer-entity-animation">
- <div class="tag-content">
- ${param.navTitle}
- </div>
- <div class="tag-angle-content">
- <img src="https://map.hit.edu.cn/images/tarrow_xq.png">
- </div>
- </div>
- `
- )
- }
-
- divIcon.attr.name = param.navTitle
-
- currentOrgLayer.addOverlay(divIcon)
- },
-
- flickerEnd (param, name) {
- const layerIcon = currentOrgLayer.getOverlaysByAttr('name', name)
-
- currentOrgLayer.removeOverlay(layerIcon[0])
-
- let divIcon = null
-
- let obj = {}
-
- if (param.x && param.x != '') {
- const position = this.coordinate(param.x)
- obj = {
- lng: position.lng, lat: position.lat
- }
- } else {
- obj = {
- lng: param.longitude, lat: param.latitude
- }
- }
- if (this.twoOrThree == '三 维') {
- divIcon = new global.DC.DivIcon(
- new global.DC.Position(Number(obj.lng), Number(obj.lat), 0),
- `
- <div class="tag-entitys-box">
- <div class="tag-content">
- ${param.navTitle}
- </div>
- <div class="tag-angle-content">
- <img src="https://map.hit.edu.cn/images/tarrow_xq.png">
- </div>
- </div>
- `
- )
- } else {
- divIcon = new global.DC.DivIcon(
- new global.DC.Position(Number(param.longitude), Number(param.latitude), 150),
- `
- <div class="tag-entitys-box">
- <div class="tag-content">
- ${param.navTitle}
- </div>
- <div class="tag-angle-content">
- <img src="https://map.hit.edu.cn/images/tarrow_xq.png">
- </div>
- </div>
- `
- )
- }
-
- divIcon.attr.name = param.navTitle
-
- currentOrgLayer.addOverlay(divIcon)
}
}
}
--
Gitblit v1.9.3