|
@@ -33,9 +33,10 @@
|
|
|
<MapCharts
|
|
|
:formatter="showLabel"
|
|
|
:mapHeatData="heatMap"
|
|
|
+ :legend="legendData"
|
|
|
:qx="qx"
|
|
|
- @selectArea="(area) => (qx = area)"
|
|
|
:right="80"
|
|
|
+ @selectArea="(area) => (qx = area)"
|
|
|
/>
|
|
|
<div style="position: absolute; width: 500px; left: 90px; top: 10px">
|
|
|
<SearchBox :area.sync="qx" />
|
|
@@ -75,19 +76,16 @@ import TotalityInfo from "./components/TotalityInfo.vue";
|
|
|
import IotVideo from "./components/IotVideo.vue";
|
|
|
import AlarmHandling from "./components/AlarmHandling.vue";
|
|
|
import RegionalDistribution from "./components/RegionalDistribution.vue";
|
|
|
-import MapCharts from "../Home/components/MapCharts.vue";
|
|
|
+import MapCharts from "../Home/components/NewMapChartsCategory.vue";
|
|
|
import SearchBox from "../../components/SearchBox.vue";
|
|
|
import xfwlw from "./components/xfwlw.vue";
|
|
|
import fxfbCont from "./components/fxfbCont.vue";
|
|
|
+import { loadMapData } from '@/shared'
|
|
|
import {
|
|
|
getZtqk,
|
|
|
- getZtqkDwtj,
|
|
|
- getGqcz,
|
|
|
- getDeviceList,
|
|
|
- getChartMapData,
|
|
|
+ getZtqkDwtj
|
|
|
} from "@/api/iot.js";
|
|
|
-import { formatCityData, createMapChartWindowInfo } from "../../utils";
|
|
|
-import { getCameraUrls } from "@/api/camera";
|
|
|
+import { createMapChartWindowInfo } from "../../utils";
|
|
|
|
|
|
export default {
|
|
|
name: "IotPage",
|
|
@@ -109,6 +107,7 @@ export default {
|
|
|
caremaData: [],
|
|
|
caremaList: [],
|
|
|
heatMap: [],
|
|
|
+ legendData: []
|
|
|
};
|
|
|
},
|
|
|
watch: {
|
|
@@ -135,20 +134,11 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
methods: {
|
|
|
- selectData(val) {
|
|
|
- console.log("---------", val);
|
|
|
- this.heatMap = formatCityData(
|
|
|
- val.map((item) => ({
|
|
|
- name: item[0],
|
|
|
- value: item[2],
|
|
|
- }))
|
|
|
- );
|
|
|
- },
|
|
|
showLabel(params) {
|
|
|
return createMapChartWindowInfo(
|
|
|
{ title: params.name },
|
|
|
() =>
|
|
|
- `接入物联网楼栋数 <br/><span style="font-size: 24px;color:red;font-weight:bold;">${params.value}</span>栋`
|
|
|
+ `接入物联网楼栋数 <br/><span style="font-size: 24px;color:red;font-weight:bold;">${params.data.meta.sl}</span>栋`
|
|
|
);
|
|
|
},
|
|
|
openBasicModal() {
|
|
@@ -306,15 +296,10 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
loadIotMapData() {
|
|
|
- getChartMapData({
|
|
|
- pageNum: 1,
|
|
|
- pageSize: 100,
|
|
|
- }).then((res) => {
|
|
|
- this.heatMap = res.data.rows.map((item) => ({
|
|
|
- name: item.qx,
|
|
|
- value: item.wlwlds || 0,
|
|
|
- }));
|
|
|
- });
|
|
|
+ loadMapData('WLWLDS').then(res => {
|
|
|
+ this.heatMap = res.heatMap
|
|
|
+ this.legendData = res.legendData
|
|
|
+ })
|
|
|
},
|
|
|
},
|
|
|
created() {
|