|
@@ -216,8 +216,8 @@ export default {
|
|
*/
|
|
*/
|
|
initMap: function () {
|
|
initMap: function () {
|
|
// PNG范围
|
|
// PNG范围
|
|
- let leftTop = [11592187.449797414, 3592590.200040145]
|
|
|
|
- let rightBottom = [11594508.118271504, 3587434.465393465]
|
|
|
|
|
|
+ let leftTop = [11592187.538105225, 3592590.111732335]
|
|
|
|
+ let rightBottom = [11594513.693708975, 3587420.877057335]
|
|
// 经纬度
|
|
// 经纬度
|
|
// let leftTop = [104.13439162531515, 30.690273107307597]
|
|
// let leftTop = [104.13439162531515, 30.690273107307597]
|
|
// let rightBottom = [104.15523854491164, 30.650437034690334]
|
|
// let rightBottom = [104.15523854491164, 30.650437034690334]
|
|
@@ -579,12 +579,12 @@ export default {
|
|
* @param {int} zoom: 缩放级别
|
|
* @param {int} zoom: 缩放级别
|
|
* @return {void}
|
|
* @return {void}
|
|
*/
|
|
*/
|
|
- locateAtFeature: function (feature, type, zoom = 17) {
|
|
|
|
|
|
+ locateAtFeature: function (feature, type, zoom = 17.5) {
|
|
let view = map.getView()
|
|
let view = map.getView()
|
|
view.setZoom(zoom)
|
|
view.setZoom(zoom)
|
|
if (this.$store.state.isMobile && type !== 'relate') {
|
|
if (this.$store.state.isMobile && type !== 'relate') {
|
|
let coord = Extent.getCenter(feature.getGeometry().getExtent())
|
|
let coord = Extent.getCenter(feature.getGeometry().getExtent())
|
|
- coord[1] = coord[1] * 1.00008
|
|
|
|
|
|
+ coord[1] = coord[1] * 1.000065
|
|
view.setCenter(coord)
|
|
view.setCenter(coord)
|
|
} else {
|
|
} else {
|
|
view.setCenter(Extent.getCenter(feature.getGeometry().getExtent()))
|
|
view.setCenter(Extent.getCenter(feature.getGeometry().getExtent()))
|
|
@@ -595,40 +595,40 @@ export default {
|
|
},
|
|
},
|
|
|
|
|
|
/**
|
|
/**
|
|
- * @description:获取并渲染最近若干天的报道
|
|
|
|
|
|
+ * @description:获取并渲染最近若干天的通知
|
|
* @param {int} day: 天数
|
|
* @param {int} day: 天数
|
|
* @returns {void}
|
|
* @returns {void}
|
|
*/
|
|
*/
|
|
- loadRecentReports: function (day) {
|
|
|
|
|
|
+ loadRecentNotices: function (day) {
|
|
var that = this
|
|
var that = this
|
|
this.$axios
|
|
this.$axios
|
|
- .post('/report/recent', {
|
|
|
|
|
|
+ .post('/notice/recent', {
|
|
day: day
|
|
day: day
|
|
})
|
|
})
|
|
.then(res => {
|
|
.then(res => {
|
|
res.data.forEach(item => {
|
|
res.data.forEach(item => {
|
|
- that.printFeature('reportLayer', item, 'report')
|
|
|
|
|
|
+ that.printFeature('noticeLayer', item, 'notice')
|
|
})
|
|
})
|
|
- this.addCluster('reportLayer', this.reportStyles.Point)
|
|
|
|
|
|
+ this.addCluster('noticeLayer', this.noticeStyles.Point)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
/**
|
|
/**
|
|
- * @description:获取并渲染最近若干天的通知
|
|
|
|
|
|
+ * @description:获取并渲染最近若干天的报道
|
|
* @param {int} day: 天数
|
|
* @param {int} day: 天数
|
|
* @returns {void}
|
|
* @returns {void}
|
|
*/
|
|
*/
|
|
- loadRecentNotices: function (day) {
|
|
|
|
|
|
+ loadRecentReports: function (day) {
|
|
var that = this
|
|
var that = this
|
|
this.$axios
|
|
this.$axios
|
|
- .post('/notice/recent', {
|
|
|
|
|
|
+ .post('/report/recent', {
|
|
day: day
|
|
day: day
|
|
})
|
|
})
|
|
.then(res => {
|
|
.then(res => {
|
|
res.data.forEach(item => {
|
|
res.data.forEach(item => {
|
|
- that.printFeature('noticeLayer', item, 'notice')
|
|
|
|
|
|
+ that.printFeature('reportLayer', item, 'report')
|
|
})
|
|
})
|
|
- this.addCluster('noticeLayer', this.noticeStyles.Point)
|
|
|
|
|
|
+ this.addCluster('reportLayer', this.reportStyles.Point)
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
|
|
@@ -1013,10 +1013,10 @@ export default {
|
|
map.removeLayer(that.getLayerByTitle('cultureLayer'))
|
|
map.removeLayer(that.getLayerByTitle('cultureLayer'))
|
|
map.removeLayer(that.getLayerByTitle('otherLayer'))
|
|
map.removeLayer(that.getLayerByTitle('otherLayer'))
|
|
map.removeLayer(that.getLayerByTitle('markLayer'))
|
|
map.removeLayer(that.getLayerByTitle('markLayer'))
|
|
- that.loadRecentNotices(7)
|
|
|
|
- that.loadRecentReports(7)
|
|
|
|
- that.loadCulture()
|
|
|
|
that.loadOthers()
|
|
that.loadOthers()
|
|
|
|
+ that.loadCulture()
|
|
|
|
+ that.loadRecentReports(7)
|
|
|
|
+ that.loadRecentNotices(7)
|
|
that.closePopup()
|
|
that.closePopup()
|
|
})
|
|
})
|
|
|
|
|