Browse Source

bug fixed

xicheng79 3 years ago
parent
commit
2139aada3f
2 changed files with 18 additions and 18 deletions
  1. 17 17
      src/components/map.vue
  2. 1 1
      src/components/pcBar.vue

+ 17 - 17
src/components/map.vue

@@ -216,8 +216,8 @@ export default {
      */
     initMap: function () {
       // 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 rightBottom = [104.15523854491164, 30.650437034690334]
@@ -579,12 +579,12 @@ export default {
      * @param {int} zoom: 缩放级别
      * @return {void}
      */
-    locateAtFeature: function (feature, type, zoom = 17) {
+    locateAtFeature: function (feature, type, zoom = 17.5) {
       let view = map.getView()
       view.setZoom(zoom)
       if (this.$store.state.isMobile && type !== 'relate') {
         let coord = Extent.getCenter(feature.getGeometry().getExtent())
-        coord[1] = coord[1] * 1.00008
+        coord[1] = coord[1] * 1.000065
         view.setCenter(coord)
       } else {
         view.setCenter(Extent.getCenter(feature.getGeometry().getExtent()))
@@ -595,40 +595,40 @@ export default {
     },
 
     /**
-     * @description:获取并渲染最近若干天的报道
+     * @description:获取并渲染最近若干天的通知
      * @param {int} day: 天数
      * @returns {void}
      */
-    loadRecentReports: function (day) {
+    loadRecentNotices: function (day) {
       var that = this
       this.$axios
-        .post('/report/recent', {
+        .post('/notice/recent', {
           day: day
         })
         .then(res => {
           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: 天数
      * @returns {void}
      */
-    loadRecentNotices: function (day) {
+    loadRecentReports: function (day) {
       var that = this
       this.$axios
-        .post('/notice/recent', {
+        .post('/report/recent', {
           day: day
         })
         .then(res => {
           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('otherLayer'))
         map.removeLayer(that.getLayerByTitle('markLayer'))
-        that.loadRecentNotices(7)
-        that.loadRecentReports(7)
-        that.loadCulture()
         that.loadOthers()
+        that.loadCulture()
+        that.loadRecentReports(7)
+        that.loadRecentNotices(7)
         that.closePopup()
       })
 

+ 1 - 1
src/components/pcBar.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <!-- 侧边栏 -->
-    <b-list-group id="list" v-show="isShow" app>
+    <b-list-group id="list" v-show="isShow">
       <!-- header -->
       <b-list-group-item id="header">
           <i class="fa fa-list" aria-hidden="true"></i>&nbsp; 列表