|
@@ -410,7 +410,7 @@ export default {
|
|
|
* @param {Boolean} isLoacate:是否缩放到要素
|
|
|
* @returns {void}
|
|
|
*/
|
|
|
- printFeature: function (title, msg, type, isRefresh = false, isLocate = false, isRelate = false) {
|
|
|
+ printFeature: function (title, msg, type, number = null, isRefresh = false, isLocate = false, isRelate = false) {
|
|
|
// 初始化图层
|
|
|
var layer = this.getLayerByTitle(title)
|
|
|
if (layer !== null) {
|
|
@@ -452,6 +452,7 @@ export default {
|
|
|
// 要素属性装载
|
|
|
feature.set('id', msg.id)
|
|
|
feature.set('type', type)
|
|
|
+ feature.set('number', number)
|
|
|
|
|
|
// 要素装载入图层
|
|
|
// 1.起始点
|
|
@@ -713,7 +714,7 @@ export default {
|
|
|
data = await that.loadOthersByID(id)
|
|
|
break
|
|
|
}
|
|
|
- that.printFeature('markLayer', data, type, true, true, true)
|
|
|
+ that.printFeature('markLayer', data, type, number, true, true, true)
|
|
|
that.isShow = true
|
|
|
bus.$emit('closeList')
|
|
|
} else {
|
|
@@ -736,7 +737,9 @@ export default {
|
|
|
if (number === 1) {
|
|
|
bus.$emit('printMapMark', {
|
|
|
type: feature.get('type'),
|
|
|
- id: feature.get('id')
|
|
|
+ id: feature.get('id'),
|
|
|
+ number: feature.get('number')
|
|
|
+
|
|
|
})
|
|
|
} else {
|
|
|
// 当点击的图标个数大于1时设置视角范围为多个图标的矩形范围
|
|
@@ -1006,7 +1009,7 @@ export default {
|
|
|
})
|
|
|
break
|
|
|
}
|
|
|
- that.printFeature('markLayer', data, msg.type, true, true, true)
|
|
|
+ that.printFeature('markLayer', data, msg.type, null, true, true, true)
|
|
|
that.isShow = true
|
|
|
})
|
|
|
|
|
@@ -1014,6 +1017,7 @@ export default {
|
|
|
bus.$on('printMapMark', async msg => {
|
|
|
let data
|
|
|
let id = msg.id
|
|
|
+ let number = msg.number
|
|
|
switch (msg.type) {
|
|
|
case 'notice':
|
|
|
await that.loadNoticeByID(id)
|
|
@@ -1040,7 +1044,7 @@ export default {
|
|
|
})
|
|
|
break
|
|
|
}
|
|
|
- that.printFeature('markLayer', data, msg.type, true, true, true)
|
|
|
+ that.printFeature('markLayer', data, msg.type, number, true, true, true)
|
|
|
|
|
|
// 显示popup
|
|
|
var feature = that.getLayerByTitle('markLayer').getSource().getFeatures()[0]
|