Explorar el Código

fix: 地图联调

TwoKe945 hace 1 año
padre
commit
076f70c31b

+ 1 - 1
app/src/views/Basic/components/ChronologicDistributionStatistics.vue

@@ -60,7 +60,7 @@ export default {
           },
           backgroundColor: "rgba(0,224,255,0.46)",
           borderColor: "rgba(0,213,255, .6)",
-          extraCssText: "z-index: 1000;",
+          extraCssText: "z-index: 1000px;",
           confine: true,
         },
         grid: {

+ 1 - 0
app/src/views/Basic/components/HeightDistribution.vue

@@ -62,6 +62,7 @@ export default {
             // 坐标轴指示器,坐标轴触发有效
             type: "shadow", // 默认为直线,可选为:'line' | 'shadow'
           },
+          extraCssText: "z-index: 1000;"
         },
         title: {
           top: "5%",

+ 0 - 1
app/src/views/Home/components/AutonomousManagement.vue

@@ -46,7 +46,6 @@ export default {
             value:item.sl
           }
         })
-        
       })
     },
     // 管理形式

+ 1 - 0
app/src/views/Home/components/FirstHight.vue

@@ -74,6 +74,7 @@ export default {
         },
         tooltip: {
           show: true,
+          extraCssText: "z-index: 1000;"
         },
         series: [
           // 最外层圆

+ 1 - 0
app/src/views/Home/components/HiddenDangerDetection/HiddenDangerType.vue

@@ -67,6 +67,7 @@ export default {
             fontSize: 12,
           },
           formatter: "{c} <br/>{b}",
+          extraCssText: "z-index: 1000;"
         },
         legend: {
           show: true,

+ 1 - 0
app/src/views/Home/components/HiddenDangerDetection/RectificationChart.vue

@@ -60,6 +60,7 @@ export default {
             fontSize: 12,
           },
           formatter: "{c} <br/>{b}",
+          extraCssText: "z-index: 1000;"
         },
         title: {
           formatter: "3276存在隐患数",

+ 41 - 7
app/src/views/Home/components/MapCharts.vue

@@ -293,13 +293,20 @@ export default {
     },
     mapHeatData: {
       handler(val) {
+      // const maxValue = (Math.max(val.map(item => parseFloat(item.value))) / 5)
+      // console.log('11111', val.map(item => item.value), maxValue)
         if (val.length > 0) {
           this.mapChart.setOption({
             series: [
               {
-                data: val.map(item => ({...item, label: {
-        color: item.value > 100 ? '#fff' : '#000'
-      }}))
+                data: val.map(item => ({...item, 
+                  label: {
+                    color: item.value > 100 ? '#fff' : '#000'
+                  },
+                  // itemStyle: {
+                  //   color: this.itemColor(item.value, maxValue)
+                  // }
+              }))
               }
             ]
           })
@@ -346,13 +353,39 @@ export default {
 
       return res;
     },
+    itemColor(val, max) {
+      if (val < max) {
+          return "#e0f3f8";
+        } else if (val < max * 2) {
+          return "#abd9e9";
+        } else if (val < max * 3) {
+          return "#74add1";
+        } else if (val < max * 4) {
+          return "#4575b4";
+        } else {
+          return "#313695";
+        }
+    },
     drawMap() {
       const mapChart = this.$refs.map;
       echarts.registerMap("chongqing", this.activeMap);
 
-      let data = this.heatData.map(item => ({...item, label: {
-        color: item.value > 100 ? '#fff' : '#000'
-      }}));
+      // const maxValue = Math.max(this.heatData.map(item => parseFloat(item.value))) / 5
+
+          //     '#313695',
+          //     '#4575b4',
+          //     '#74add1',
+          //     '#abd9e9',
+          //     '#e0f3f8'
+      
+      let data = this.heatData.map(item => ({...item, 
+        label: {
+          color: item.value > 100 ? '#fff' : '#000'
+        },
+        // itemStyle: {
+        //   color: this.itemColor(item.value, maxValue)
+        // }
+    }));
 
       const { mapName } = this;
 
@@ -485,9 +518,10 @@ export default {
           textStyle: {
             color: "#000",
           },
+          extraCssText: "z-index: 1000;"
         },
         visualMap: {
-          show: false,
+          show: true,
           bottom: 20,
           left: 10,
           inRange: {

+ 7 - 1
app/src/views/Home/index.vue

@@ -12,7 +12,7 @@
       <border-panel height="346px" style="margin-bottom: 6px" title="隐患排查">
         <HiddenDangerDetection :qy="qy" />
       </border-panel>
-      <border-panel height="296px" title="自主管理">
+      <border-panel height="296px" header-cursor="pointer" title="自主管理" @click-header="openAutoManageModal">
         <AutonomousManagement :qy="qy" />
       </border-panel>
     </div>
@@ -54,6 +54,9 @@
     <basic-modal top="120px" ref="feirModal1" name="智慧消防">
       <fxfbCont :qx="qy" />
     </basic-modal>
+    <basic-modal top="120px" ref="autoManageModal"  name="自主管理">
+      <!-- <fxfbCont :qx="qy" /> -->
+    </basic-modal>
   </div>
 </template>
 <script>
@@ -157,6 +160,9 @@ export default {
     openFrieModal1() {
       this.showModal("feirModal1");
     },
+    openAutoManageModal() {
+      this.showModal("autoManageModal");
+    },
     loadMapData() {
       fxfb({
         pageNum: 1,

+ 2 - 3
app/src/views/Iot/index.vue

@@ -132,13 +132,12 @@ export default {
     selectData(val) {
       this.heatMap = formatCityData(val.map(item => ({
         name: item[0],
-        value: item[1]
+        value: item[2]
       })))
-      console.log("---------------------------",val)
     },
     showLabel(params) {
       let res = params.name + "<br/>";
-      res += `接入物联网建筑栋数<br/><span style="font-size: 24px;color:red;font-weight:bold;">${params.value}</span>个`;
+      res += `接入终端数<br/><span style="font-size: 24px;color:red;font-weight:bold;">${params.value}</span>个`;
       return res;
     },
     openBasicModal() {

+ 6 - 1
components/BorderPanel/index.vue

@@ -8,7 +8,9 @@
       class="border-panel_header"
       :style="{
         backgroundImage: `url(${headerImageBgUrl})`,
+        cursor: headerCursor
       }"
+      @click="(e) => $emit('click-header', e)"
     >
       <linear-text
         :text="title"
@@ -56,6 +58,10 @@ export default {
       type: Number,
       default: 0,
     },
+    headerCursor: {
+      type: String,
+      default: 'default'
+    }
   },
   computed: {
     borderPanelStyle: function () {
@@ -100,7 +106,6 @@ export default {
     margin-top: 12px;
   }
 }
-
 .border-panel::after {
   content: "";
   position: absolute;