From fdab145b1859f13b54acd0113e61a4740e1e6806 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Fri, 08 Dec 2023 14:51:09 +0800
Subject: [PATCH] 注释活动
---
src/components/leftNav/index.vue | 526 +++++++++++++++++++++++++++++-----------------------------
1 files changed, 265 insertions(+), 261 deletions(-)
diff --git a/src/components/leftNav/index.vue b/src/components/leftNav/index.vue
index 62346dc..3ae6e6e 100644
--- a/src/components/leftNav/index.vue
+++ b/src/components/leftNav/index.vue
@@ -86,14 +86,14 @@
// checked: '/changjing/img/leftnav/monitor-checked.png',
// layer: 'leftMonitorLayer'
// },
- {
- flag: false,
- label: '活动',
- img: '/changjing/img/leftnav/activity.png',
- normal: '/changjing/img/leftnav/activity.png',
- checked: '/changjing/img/leftnav/activity-checked.png',
- layer: 'leftNavHD'
- },
+ // {
+ // flag: false,
+ // label: '活动',
+ // img: '/changjing/img/leftnav/activity.png',
+ // normal: '/changjing/img/leftnav/activity.png',
+ // checked: '/changjing/img/leftnav/activity-checked.png',
+ // layer: 'leftNavHD'
+ // },
// {
// flag: false,
// label: 'AED',
@@ -133,14 +133,14 @@
mounted () {
const that = this
// 初始化新增标签图层
- this.map2D.addLayer(this.leftNavBQ)
- this.map2D.addLayer(this.leftNavDL)
- this.map2D.addLayer(this.leftNavSJ)
- this.map2D.addLayer(this.leftNavHD)
- this.map2D.addLayer(this.leftNavTC)
- this.map2D.addLayer(this.leftNavCR)
-
that.$EventBus.$on('closeTagLayer', () => {
+ this.map2D.addLayer(this.leftNavBQ)
+ this.map2D.addLayer(this.leftNavDL)
+ this.map2D.addLayer(this.leftNavSJ)
+ this.map2D.addLayer(this.leftNavHD)
+ this.map2D.addLayer(this.leftNavTC)
+ this.map2D.addLayer(this.leftNavCR)
+
that.leftNavData.forEach(item => {
if (item.layer && item.flag == true) {
item.flag = false
@@ -267,290 +267,294 @@
},
initialize (campus) {
+
var that = this
- this.leftNavData[0].flag = true
- this.leftNavData[0].img = this.leftNavData[0].checked
- this.leftNavData[5].flag = true
- this.leftNavData[5].img = this.leftNavData[5].checked
+ that.$nextTick(() => {
- this.leftNavBQ.setVisible(true)
- this.leftNavCR.setVisible(true)
+ this.leftNavData[0].flag = true
+ this.leftNavData[0].img = this.leftNavData[0].checked
+ this.leftNavData[5].flag = true
+ this.leftNavData[5].img = this.leftNavData[5].checked
- that.leftNavBQ.getSource().clear()
- that.leftNavDL.getSource().clear()
- that.leftNavSJ.getSource().clear()
- that.leftNavHD.getSource().clear()
- that.leftNavTC.getSource().clear()
- that.leftNavCR.getSource().clear()
+ this.leftNavBQ.setVisible(true)
+ this.leftNavCR.setVisible(true)
- getTagList({ campus }).then((res) => {
- res.data.data.forEach((item, index) => {
- let obj = {}
- if (item.x && item.x != '') {
- const position = that.coordinate(item.x)
- obj = {
- lng: position.lng, lat: position.lat
- }
- } else {
- obj = {
- lng: item.jd, lat: item.wd
- }
- }
+ that.leftNavBQ.getSource().clear()
+ that.leftNavDL.getSource().clear()
+ that.leftNavSJ.getSource().clear()
+ that.leftNavHD.getSource().clear()
+ that.leftNavTC.getSource().clear()
+ that.leftNavCR.getSource().clear()
- let siteJd = null
- let siteWd = null
-
- if (this.twoOrThree == '三 维') {
- siteJd = obj.lng
- siteWd = obj.lat
- } else {
- siteJd = item.jd
- siteWd = item.wd
- }
-
- that.leftNavBQ.getSource().addFeature(that.getCurItemFeature({
- lng: siteJd,
- lat: siteWd,
- item,
- text: item.mechanismname,
- url: '/changjing/img/icon/tarrow_xq.png',
- bgFill: '#cc0000',
- anchor: [0, -10],
- event: (e) => {
- if (that.closeMapClick) {
- return
+ getTagList({ campus }).then((res) => {
+ res.data.data.forEach((item, index) => {
+ let obj = {}
+ if (item.x && item.x != '') {
+ const position = that.coordinate(item.x)
+ obj = {
+ lng: position.lng, lat: position.lat
}
-
- that.openPopups({
- lng: Number(siteJd),
- lat: Number(siteWd),
- item: e.target.values_.attributes,
- e
- })
+ } else {
+ obj = {
+ lng: item.jd, lat: item.wd
+ }
}
- }))
+
+ let siteJd = null
+ let siteWd = null
+
+ if (this.twoOrThree == '三 维') {
+ siteJd = obj.lng
+ siteWd = obj.lat
+ } else {
+ siteJd = item.jd
+ siteWd = item.wd
+ }
+
+ that.leftNavBQ.getSource().addFeature(that.getCurItemFeature({
+ lng: siteJd,
+ lat: siteWd,
+ item,
+ text: item.mechanismname,
+ url: '/changjing/img/icon/tarrow_xq.png',
+ bgFill: '#cc0000',
+ anchor: [0, -10],
+ event: (e) => {
+ if (that.closeMapClick) {
+ return
+ }
+
+ that.openPopups({
+ lng: Number(siteJd),
+ lat: Number(siteWd),
+ item: e.target.values_.attributes,
+ e
+ })
+ }
+ }))
+ })
})
- })
- getWayList({ campus }).then((res) => {
- res.data.data.forEach((item) => {
- let obj = {}
- if (item.x && item.x != '') {
- const position = that.coordinate(item.x)
- obj = {
- lng: position.lng, lat: position.lat
+ getWayList({ campus }).then((res) => {
+ res.data.data.forEach((item) => {
+ let obj = {}
+ if (item.x && item.x != '') {
+ const position = that.coordinate(item.x)
+ obj = {
+ lng: position.lng, lat: position.lat
+ }
+ } else {
+ obj = {
+ lng: item.jd, lat: item.wd
+ }
}
- } else {
- obj = {
- lng: item.jd, lat: item.wd
+
+ let siteJd = null
+ let siteWd = null
+
+ if (this.twoOrThree == '三 维') {
+ siteJd = obj.lng
+ siteWd = obj.lat
+ } else {
+ siteJd = item.jd
+ siteWd = item.wd
}
- }
- let siteJd = null
- let siteWd = null
+ that.leftNavDL.getSource().addFeature(that.getCurItemFeature({
+ lng: siteJd,
+ lat: siteWd,
+ item,
+ text: item.roadname,
+ url: '/changjing/img/icon/roadsign3.png',
+ bgFill: '#0066FF',
+ anchor: [8, 34]
+ }))
- if (this.twoOrThree == '三 维') {
- siteJd = obj.lng
- siteWd = obj.lat
- } else {
- siteJd = item.jd
- siteWd = item.wd
- }
-
- that.leftNavDL.getSource().addFeature(that.getCurItemFeature({
- lng: siteJd,
- lat: siteWd,
- item,
- text: item.roadname,
- url: '/changjing/img/icon/roadsign3.png',
- bgFill: '#0066FF',
- anchor: [8, 34]
- }))
-
- that.leftNavDL.setVisible(false)
+ that.leftNavDL.setVisible(false)
+ })
})
- })
- // getMonitorList().then((res) => {
- // res.data.data.records.forEach((item) => {
- // let obj = {}
- // if (item.x && item.x != '') {
- // const position = that.coordinate(item.x)
- // obj = {
- // lng: position.lng, lat: position.lat
- // }
- // } else {
- // obj = {
- // lng: item.jd, lat: item.wd
- // }
- // }
+ // getMonitorList().then((res) => {
+ // res.data.data.records.forEach((item) => {
+ // let obj = {}
+ // if (item.x && item.x != '') {
+ // const position = that.coordinate(item.x)
+ // obj = {
+ // lng: position.lng, lat: position.lat
+ // }
+ // } else {
+ // obj = {
+ // lng: item.jd, lat: item.wd
+ // }
+ // }
- // let siteJd = null
- // let siteWd = null
+ // let siteJd = null
+ // let siteWd = null
- // if (this.twoOrThree == '三 维') {
- // siteJd = obj.lng
- // siteWd = obj.lat
- // } else {
- // siteJd = item.jd
- // siteWd = item.wd
- // }
+ // if (this.twoOrThree == '三 维') {
+ // siteJd = obj.lng
+ // siteWd = obj.lat
+ // } else {
+ // siteJd = item.jd
+ // siteWd = item.wd
+ // }
- // that.leftNavSJ.getSource().addFeature(that.getCurItemFeature({
- // lng: siteJd,
- // lat: siteWd,
- // item,
- // text: item.vrname,
- // url: '/changjing/img/leftnav/map-monitor.png',
- // bgFill: '#0066FF',
- // anchor: [8, 34]
- // }))
+ // that.leftNavSJ.getSource().addFeature(that.getCurItemFeature({
+ // lng: siteJd,
+ // lat: siteWd,
+ // item,
+ // text: item.vrname,
+ // url: '/changjing/img/leftnav/map-monitor.png',
+ // bgFill: '#0066FF',
+ // anchor: [8, 34]
+ // }))
- // that.leftNavSJ.setVisible(false)
- // })
- // })
+ // that.leftNavSJ.setVisible(false)
+ // })
+ // })
- getSceneList({ campus }).then((res) => {
- res.data.data.records.forEach((item) => {
- let obj = {}
- if (item.x && item.x != '') {
- const position = that.coordinate(item.x)
- obj = {
- lng: position.lng, lat: position.lat
+ getSceneList({ campus }).then((res) => {
+ res.data.data.records.forEach((item) => {
+ let obj = {}
+ if (item.x && item.x != '') {
+ const position = that.coordinate(item.x)
+ obj = {
+ lng: position.lng, lat: position.lat
+ }
+ } else {
+ obj = {
+ lng: item.jd, lat: item.wd
+ }
}
- } else {
- obj = {
- lng: item.jd, lat: item.wd
+
+ let siteJd = null
+ let siteWd = null
+
+ if (this.twoOrThree == '三 维') {
+ siteJd = obj.lng
+ siteWd = obj.lat
+ } else {
+ siteJd = item.jd
+ siteWd = item.wd
}
- }
- let siteJd = null
- let siteWd = null
+ that.leftNavSJ.getSource().addFeature(that.getCurItemFeature({
+ scale: 0.6,
+ imgSize: [48, 48],
+ lng: siteJd,
+ lat: siteWd,
+ item,
+ text: item.vrname,
+ url: '/changjing/img/leftnav/map-panorama.png',
+ bgFill: '#0066ff00',
+ anchor: [24, 54],
+ strokeColor: '#0066FF',
+ event: (e) => {
+ that.$store.commit('SET_DETAILSPOPUP', false)
+ that.$store.commit('SET_MONITORPOPUP', false)
- if (this.twoOrThree == '三 维') {
- siteJd = obj.lng
- siteWd = obj.lat
- } else {
- siteJd = item.jd
- siteWd = item.wd
- }
+ that.$store.commit(
+ 'SET_STATENAME',
+ e.target.values_.attributes.vrname
+ )
+ that.$store.commit(
+ 'SET_PANORAMAURL',
+ e.target.values_.attributes.vrurl
+ )
- that.leftNavSJ.getSource().addFeature(that.getCurItemFeature({
- scale: 0.6,
- imgSize: [48, 48],
- lng: siteJd,
- lat: siteWd,
- item,
- text: item.vrname,
- url: '/changjing/img/leftnav/map-panorama.png',
- bgFill: '#0066ff00',
- anchor: [24, 54],
- strokeColor: '#0066FF',
- event: (e) => {
- that.$store.commit('SET_DETAILSPOPUP', false)
- that.$store.commit('SET_MONITORPOPUP', false)
+ that.openPopups({
+ type: 'scene',
+ lng: Number(siteJd),
+ lat: Number(siteWd),
+ item: e.target.values_.attributes,
+ e
+ })
+ }
+ }))
- that.$store.commit(
- 'SET_STATENAME',
- e.target.values_.attributes.vrname
- )
- that.$store.commit(
- 'SET_PANORAMAURL',
- e.target.values_.attributes.vrurl
- )
-
- that.openPopups({
- type: 'scene',
- lng: Number(siteJd),
- lat: Number(siteWd),
- item: e.target.values_.attributes,
- e
- })
- }
- }))
-
- that.leftNavSJ.setVisible(false)
+ that.leftNavSJ.setVisible(false)
+ })
})
- })
- getLifeList({ lifetype: 11, campus }).then((res) => {
- res.data.data.forEach((item) => {
- let obj = {}
- if (item.x && item.x != '') {
- const position = that.coordinate(item.x)
- obj = {
- lng: position.lng, lat: position.lat
+ getLifeList({ lifetype: 11, campus }).then((res) => {
+ res.data.data.forEach((item) => {
+ let obj = {}
+ if (item.x && item.x != '') {
+ const position = that.coordinate(item.x)
+ obj = {
+ lng: position.lng, lat: position.lat
+ }
+ } else {
+ obj = {
+ lng: item.jd, lat: item.wd
+ }
}
- } else {
- obj = {
- lng: item.jd, lat: item.wd
+
+ let siteJd = null
+ let siteWd = null
+
+ if (this.twoOrThree == '三 维') {
+ siteJd = obj.lng
+ siteWd = obj.lat
+ } else {
+ siteJd = item.jd
+ siteWd = item.wd
}
- }
- let siteJd = null
- let siteWd = null
+ that.leftNavTC.getSource().addFeature(that.getCurItemFeature({
+ imgSize: [22, 22],
+ lng: siteJd,
+ lat: siteWd,
+ item,
+ text: item.mechanismname,
+ url: '/changjing/img/icon/p-biao.png',
+ bgFill: '#0066ff00',
+ anchor: [11, 36],
+ strokeColor: '#0066FF'
+ }))
- if (this.twoOrThree == '三 维') {
- siteJd = obj.lng
- siteWd = obj.lat
- } else {
- siteJd = item.jd
- siteWd = item.wd
- }
-
- that.leftNavTC.getSource().addFeature(that.getCurItemFeature({
- imgSize: [22, 22],
- lng: siteJd,
- lat: siteWd,
- item,
- text: item.mechanismname,
- url: '/changjing/img/icon/p-biao.png',
- bgFill: '#0066ff00',
- anchor: [11, 36],
- strokeColor: '#0066FF'
- }))
-
- that.leftNavTC.setVisible(false)
+ that.leftNavTC.setVisible(false)
+ })
})
- })
- getLifeList({ lifetype: 12, campus }).then((res) => {
- res.data.data.forEach((item) => {
- let obj = {}
- if (item.x && item.x != '') {
- const position = that.coordinate(item.x)
- obj = {
- lng: position.lng, lat: position.lat
+ getLifeList({ lifetype: 12, campus }).then((res) => {
+ res.data.data.forEach((item) => {
+ let obj = {}
+ if (item.x && item.x != '') {
+ const position = that.coordinate(item.x)
+ obj = {
+ lng: position.lng, lat: position.lat
+ }
+ } else {
+ obj = {
+ lng: item.jd, lat: item.wd
+ }
}
- } else {
- obj = {
- lng: item.jd, lat: item.wd
+
+ let siteJd = null
+ let siteWd = null
+
+ if (this.twoOrThree == '三 维') {
+ siteJd = obj.lng
+ siteWd = obj.lat
+ } else {
+ siteJd = item.jd
+ siteWd = item.wd
}
- }
- let siteJd = null
- let siteWd = null
-
- if (this.twoOrThree == '三 维') {
- siteJd = obj.lng
- siteWd = obj.lat
- } else {
- siteJd = item.jd
- siteWd = item.wd
- }
-
- that.leftNavCR.getSource().addFeature(that.getCurItemFeature({
- imgSize: [44, 44],
- lng: siteJd,
- lat: siteWd,
- item,
- text: item.mechanismname,
- url: '/changjing/img/leftnav/map-activity.png',
- bgFill: '#0066ff00',
- anchor: [16, 34],
- strokeColor: '#A635A6'
- }))
+ that.leftNavCR.getSource().addFeature(that.getCurItemFeature({
+ imgSize: [44, 44],
+ lng: siteJd,
+ lat: siteWd,
+ item,
+ text: item.mechanismname,
+ url: '/changjing/img/leftnav/map-activity.png',
+ bgFill: '#0066ff00',
+ anchor: [16, 34],
+ strokeColor: '#A635A6'
+ }))
+ })
})
})
},
--
Gitblit v1.9.3