Browse Source

Merge branch '王立生' of sckj/mz-cloud into master

sckj 1 year ago
parent
commit
767e6ed60d
1 changed files with 12 additions and 10 deletions
  1. 12 10
      ruoyi-ui/src/views/bigScreen/resources/index.vue

+ 12 - 10
ruoyi-ui/src/views/bigScreen/resources/index.vue

@@ -76,7 +76,7 @@
     </div>
     <el-radio-group class="bottom-group" :class="{hide:!hideTopNav}" v-model="pattern" @input="patternChange">
       <el-radio :label="0">资源分布</el-radio>
-      <el-radio :label="1">资源密度</el-radio>
+      <el-radio :label="1" disabled="true">资源密度</el-radio>
       <el-radio :label="2">生活圈模式</el-radio>
       <el-radio :label="3">区划钻取</el-radio>
     </el-radio-group>
@@ -193,6 +193,7 @@ export default {
       deptlevel:0,
       deptcurrxzqh:'',
       deptcurrlevel:0,
+      deptmaxlevel:4,
       locationCode:'',
       xfxzqhid:'',
       currsqData:[],
@@ -316,7 +317,7 @@ export default {
           xhr.onreadystatechange = function() {
             if (xhr.readyState === XMLHttpRequest.DONE && xhr.status === 200) {
               this.querydata=JSON.parse(xhr.responseText).data;
-              if (this.deptcurrlevel<3)
+              if (this.deptcurrlevel<this.deptmaxlevel)
                 this.setClusterMarker(this.querydata,fl);
               else
                 this.map.add(this.setMarker(this.querydata,fl));
@@ -344,7 +345,7 @@ export default {
           getServiceMarkers(this.PTParams).then(({ code, data }) => {
             if (code !== 200) return
             this.querydata=data;
-            if (this.deptcurrlevel<3)
+            if (this.deptcurrlevel<this.deptmaxlevel)
               this.setClusterMarker(this.querydata,fl);
             else
               this.map.add(this.setMarker(this.querydata,fl));
@@ -367,7 +368,7 @@ export default {
           getMonitorMarkers(this.PTParams).then(({ code, data }) => {
             if (code !== 200) return
             this.querydata=data;
-            if (this.deptcurrlevel<3)
+            if (this.deptcurrlevel<this.deptmaxlevel)
               this.setClusterMarker(this.querydata,fl);
             else
               this.map.add(this.setMarker(this.querydata,fl));
@@ -390,7 +391,7 @@ export default {
           getSmartMarkers(this.PTParams).then(({ code, data }) => {
             if (code !== 200) return
             this.querydata=data;
-            if (this.deptcurrlevel<3)
+            if (this.deptcurrlevel<this.deptmaxlevel)
               this.setClusterMarker(this.querydata,fl);
             else
               this.map.add(this.setMarker(this.querydata,fl));
@@ -413,7 +414,7 @@ export default {
           getOrgMarkers(this.PTParams).then(({ code, data }) => {
             if (code !== 200) return
             this.querydata=data;
-            if (this.deptcurrlevel<3)
+            if (this.deptcurrlevel<this.deptmaxlevel)
               this.setClusterMarker(this.querydata,fl);
             else
               this.map.add(this.setMarker(this.querydata,fl));
@@ -552,6 +553,7 @@ export default {
       });
       context.marker.setLabel({
         content: context.data[0].name,
+        direction: 'bottom',
       });
       context.marker.on('click', this.markerClick);
 
@@ -713,7 +715,7 @@ export default {
         });*/
         this.setIcon();
 
-        if (this.deptcurrlevel<3)
+        if (this.deptcurrlevel<this.deptmaxlevel)
           this.setClusterMarker(markers,1);
         else
           this.map.add(this.setMarker(markers,1));
@@ -837,7 +839,7 @@ export default {
       this.latdata=[];
       //this.heatmapData=[];
       data.forEach((item) => {
-        if (item.lat && item.lng) {
+        if ((item.lat && item.lng) || item.photoAndLocation) {
           let coluts= Math.floor(Math.random() * 101)+1;
          // this.heatmapData.push({"lng": item.lng,"lat": item.lat,"count":coluts});
           if (fl == 0) { //老人
@@ -916,7 +918,7 @@ export default {
       if (value=='0')//资源分布
       {
         this.clearMap();
-        if (this.deptcurrlevel<3)
+        if (this.deptcurrlevel<this.deptmaxlevel)
           this.setClusterMarker(this.querydata,this.sideActive);
         else
           this.map.add(this.setMarker(this.querydata,this.sideActive));
@@ -931,7 +933,7 @@ export default {
       {
         this.currentlXY=this.map.getCenter();
         this.clearMap();
-        if (this.deptcurrlevel<3)
+        if (this.deptcurrlevel<this.deptmaxlevel)
           this.setClusterMarker(this.querydata,this.sideActive);
         else
           this.map.add(this.setMarker(this.querydata,this.sideActive));