diff --git a/src/components/fMap/components/fMap.vue b/src/components/fMap/components/fMap.vue
index 8f80f93..3cba47b 100644
--- a/src/components/fMap/components/fMap.vue
+++ b/src/components/fMap/components/fMap.vue
@@ -50,8 +50,8 @@
default: () => {
return {
default: { name: 'default', desc: '默认图层', symbol: '' },
- case: { name: 'case', desc: '案件地图选点', symbol: 'case-handle', bubbleable: false, selectable: false, editable: false },
- poi: { name: 'poi', title: '兴趣点', symbol: 'point-of-interest', editable: false, bubble: 'bubbleId' }
+ case: { name: 'case', desc: '事件地图选点', symbol: 'case-handle', bubbleable: false, selectable: false, editable: false },
+ poi: { name: 'poi', title: '兴趣点', symbol: 'point-of-interest', editable: false, bubble: 'bubbleId' }
}
}
},
@@ -107,7 +107,7 @@
},
methods: {
// 初始化底图
- initMap() {
+ initMap(detail, data) {
// 注册所有图标
FUtil.registSymbolDefaultSetting({
sourcePath: 'static/fMap/img/symbol',
@@ -136,22 +136,30 @@
this.fmap.setBgLayer(bgLayer)
}
- const that = this
- this.fmap.on('fmap.map.singleclick', function(event) {
- that.fmap.clearLayer('case')
+ // 非查看事件位置点详情
+ if (detail === null || detail === false) {
+ const that = this
+ this.fmap.on('fmap.map.singleclick', function(event) {
+ that.fmap.clearLayer('case')
- const marker = {
- lon: event.coordinate[0],
- lat: event.coordinate[1],
- layer: 'case'
- }
+ const marker = {
+ lon: event.coordinate[0],
+ lat: event.coordinate[1],
+ layer: 'case'
+ }
- that.longitude = marker.lon + ''
- that.latitude = marker.lat + ''
+ that.longitude = marker.lon + ''
+ that.latitude = marker.lat + ''
- that.fmap.addFeatures([marker], { xField: 'lon', yField: 'lat', layer: 'case' })
- // that.fmap.navigate2Center([marker.lon, marker.lat])
- })
+ that.fmap.addFeatures([marker], { xField: 'lon', yField: 'lat', layer: 'case' })
+ // that.fmap.navigate2Center([marker.lon, marker.lat])
+ })
+ } else {
+ // 查看位置点详情
+ this.fmap.addFeatures([data], { xField: 'lng', yField: 'lat', layer: 'case' })
+ this.fmap.navigate2Center([data.lng, data.lat])
+ }
+
},
queryPoi(keyword) {
// 清除之前的查询结果
diff --git a/src/components/fMap/components/fMap.vue b/src/components/fMap/components/fMap.vue
index 8f80f93..3cba47b 100644
--- a/src/components/fMap/components/fMap.vue
+++ b/src/components/fMap/components/fMap.vue
@@ -50,8 +50,8 @@
default: () => {
return {
default: { name: 'default', desc: '默认图层', symbol: '' },
- case: { name: 'case', desc: '案件地图选点', symbol: 'case-handle', bubbleable: false, selectable: false, editable: false },
- poi: { name: 'poi', title: '兴趣点', symbol: 'point-of-interest', editable: false, bubble: 'bubbleId' }
+ case: { name: 'case', desc: '事件地图选点', symbol: 'case-handle', bubbleable: false, selectable: false, editable: false },
+ poi: { name: 'poi', title: '兴趣点', symbol: 'point-of-interest', editable: false, bubble: 'bubbleId' }
}
}
},
@@ -107,7 +107,7 @@
},
methods: {
// 初始化底图
- initMap() {
+ initMap(detail, data) {
// 注册所有图标
FUtil.registSymbolDefaultSetting({
sourcePath: 'static/fMap/img/symbol',
@@ -136,22 +136,30 @@
this.fmap.setBgLayer(bgLayer)
}
- const that = this
- this.fmap.on('fmap.map.singleclick', function(event) {
- that.fmap.clearLayer('case')
+ // 非查看事件位置点详情
+ if (detail === null || detail === false) {
+ const that = this
+ this.fmap.on('fmap.map.singleclick', function(event) {
+ that.fmap.clearLayer('case')
- const marker = {
- lon: event.coordinate[0],
- lat: event.coordinate[1],
- layer: 'case'
- }
+ const marker = {
+ lon: event.coordinate[0],
+ lat: event.coordinate[1],
+ layer: 'case'
+ }
- that.longitude = marker.lon + ''
- that.latitude = marker.lat + ''
+ that.longitude = marker.lon + ''
+ that.latitude = marker.lat + ''
- that.fmap.addFeatures([marker], { xField: 'lon', yField: 'lat', layer: 'case' })
- // that.fmap.navigate2Center([marker.lon, marker.lat])
- })
+ that.fmap.addFeatures([marker], { xField: 'lon', yField: 'lat', layer: 'case' })
+ // that.fmap.navigate2Center([marker.lon, marker.lat])
+ })
+ } else {
+ // 查看位置点详情
+ this.fmap.addFeatures([data], { xField: 'lng', yField: 'lat', layer: 'case' })
+ this.fmap.navigate2Center([data.lng, data.lat])
+ }
+
},
queryPoi(keyword) {
// 清除之前的查询结果
diff --git a/src/views/caseManage/caseDetail.vue b/src/views/caseManage/caseDetail.vue
index 1303700..0fc16f1 100644
--- a/src/views/caseManage/caseDetail.vue
+++ b/src/views/caseManage/caseDetail.vue
@@ -9,6 +9,19 @@