diff --git a/public/static/libs/mapbox/style/wh_dhgx.json b/public/static/libs/mapbox/style/wh_dhgx.json index 3611475..13e9bc2 100644 --- a/public/static/libs/mapbox/style/wh_dhgx.json +++ b/public/static/libs/mapbox/style/wh_dhgx.json @@ -1386,6 +1386,8 @@ "in", "type", "", + "fullness_YS", + "fullness_WS", "分区流向", "排口流向", "waterlog_community", @@ -1393,10 +1395,7 @@ "temporary" ], "paint": { - "line-color": [ - "get", - "color" - ], + "line-color": ["get", "color"], "line-width": [ "coalesce", ["get","width"], @@ -4488,6 +4487,7 @@ ["road_major_label"], ["place_label_other"], ["排水分区_text"], + ["linestring"], ["point"] ], "filter": { @@ -4662,6 +4662,8 @@ ["WS", "HS"] ] }, + "雨水管网充满度": { "layerName": ["linestring","point"], "filter": [["fullness_YS"],["fullness_YS"]] }, + "污水管网充满度": { "layerName": ["linestring","point"], "filter": [["fullness_WS"],["fullness_WS"]] }, "污水系统流向1": { "layerName": ["linestring"], "filter": [["污水系统流向1"]] diff --git a/public/static/libs/mapbox/style/wh_dhgx.json b/public/static/libs/mapbox/style/wh_dhgx.json index 3611475..13e9bc2 100644 --- a/public/static/libs/mapbox/style/wh_dhgx.json +++ b/public/static/libs/mapbox/style/wh_dhgx.json @@ -1386,6 +1386,8 @@ "in", "type", "", + "fullness_YS", + "fullness_WS", "分区流向", "排口流向", "waterlog_community", @@ -1393,10 +1395,7 @@ "temporary" ], "paint": { - "line-color": [ - "get", - "color" - ], + "line-color": ["get", "color"], "line-width": [ "coalesce", ["get","width"], @@ -4488,6 +4487,7 @@ ["road_major_label"], ["place_label_other"], ["排水分区_text"], + ["linestring"], ["point"] ], "filter": { @@ -4662,6 +4662,8 @@ ["WS", "HS"] ] }, + "雨水管网充满度": { "layerName": ["linestring","point"], "filter": [["fullness_YS"],["fullness_YS"]] }, + "污水管网充满度": { "layerName": ["linestring","point"], "filter": [["fullness_WS"],["fullness_WS"]] }, "污水系统流向1": { "layerName": ["linestring"], "filter": [["污水系统流向1"]] diff --git a/src/api/MonitorAssetsOnMap.js b/src/api/MonitorAssetsOnMap.js index 92f29c8..20197f9 100644 --- a/src/api/MonitorAssetsOnMap.js +++ b/src/api/MonitorAssetsOnMap.js @@ -398,6 +398,14 @@ params: query, }); } +// 均值查询 +export function getPipeMonitorRun(query) { + return request({ + url: '/business/dataSiteRelation/getPipeMonitorRun', + method: 'get', + params: query, + }); +} // 分类列表 @@ -439,4 +447,4 @@ method: 'get', params: query }) -} \ No newline at end of file +} diff --git a/public/static/libs/mapbox/style/wh_dhgx.json b/public/static/libs/mapbox/style/wh_dhgx.json index 3611475..13e9bc2 100644 --- a/public/static/libs/mapbox/style/wh_dhgx.json +++ b/public/static/libs/mapbox/style/wh_dhgx.json @@ -1386,6 +1386,8 @@ "in", "type", "", + "fullness_YS", + "fullness_WS", "分区流向", "排口流向", "waterlog_community", @@ -1393,10 +1395,7 @@ "temporary" ], "paint": { - "line-color": [ - "get", - "color" - ], + "line-color": ["get", "color"], "line-width": [ "coalesce", ["get","width"], @@ -4488,6 +4487,7 @@ ["road_major_label"], ["place_label_other"], ["排水分区_text"], + ["linestring"], ["point"] ], "filter": { @@ -4662,6 +4662,8 @@ ["WS", "HS"] ] }, + "雨水管网充满度": { "layerName": ["linestring","point"], "filter": [["fullness_YS"],["fullness_YS"]] }, + "污水管网充满度": { "layerName": ["linestring","point"], "filter": [["fullness_WS"],["fullness_WS"]] }, "污水系统流向1": { "layerName": ["linestring"], "filter": [["污水系统流向1"]] diff --git a/src/api/MonitorAssetsOnMap.js b/src/api/MonitorAssetsOnMap.js index 92f29c8..20197f9 100644 --- a/src/api/MonitorAssetsOnMap.js +++ b/src/api/MonitorAssetsOnMap.js @@ -398,6 +398,14 @@ params: query, }); } +// 均值查询 +export function getPipeMonitorRun(query) { + return request({ + url: '/business/dataSiteRelation/getPipeMonitorRun', + method: 'get', + params: query, + }); +} // 分类列表 @@ -439,4 +447,4 @@ method: 'get', params: query }) -} \ No newline at end of file +} diff --git a/src/components/Map/MapBox.vue b/src/components/Map/MapBox.vue index 8be52e5..0487102 100644 --- a/src/components/Map/MapBox.vue +++ b/src/components/Map/MapBox.vue @@ -20,7 +20,7 @@ import bus from "@/bus"; import request from "@/utils/request"; import MapBox from "@/components/Map/Map"; -import { getBaseListPoint } from "@/api/MonitorAssetsOnMap"; +import { getBaseListPoint,getPipeMonitorRun } from "@/api/MonitorAssetsOnMap"; import { supervisionRealinformationList } from "@/api/internetVehicles"; import useUserStore from "@/store/modules/user"; import { reactive, onMounted, onBeforeUnmount, nextTick, defineProps, watch } from "vue"; @@ -740,7 +740,6 @@ let prevObj = null; const panelDataToMap = (obj) => { - debugger; let isUp = Object.keys(obj).includes("isUp") ? obj.isUp : true; //是否触发地图点击事件 默认触发 const { setLayerVisible, setHighlight } = events_params; // if (prevObj != null) busEmit(setLayerVisible.key, { layername: prevObj.type, isCheck: false }); @@ -792,6 +791,11 @@ const dataToMap = async ({ params, callback }) => { const { setLayerVisible, beansToMap } = events_params; + const fullnessColor = (value) => { + value = Number(value); + const colors = [{value:0,color:"rgba(52,176,0,1)"},{value:60,color:"rgba(254,203,0,1)"},{value:70,color:"rgba(223,1,0,1)"},{value:90,color:"rgba(142,14,11,1)"}]; + return (colors.filter((i,idx) => idx!= colors.length-1 && i.value _.groupBy(data.supervisionRealinformationList.filter((i) => i.longitude && i.latitude).map((item) => ({ ...item, type: item.vehicleCategory + item.status })), (v) => v.type), }, + fullness:{ + method:getPipeMonitorRun, + fields:{geometry:"pipelineGeometry",name:"name"}, + groupMethod:(data)=> _.groupBy(data.filter(k => k.pipelineGeometry).map(o => ({...o,width:4,type:`fullness_${o.pipeSystem}`,name:`管径:${o.pipelineDiameter}\n充满度:${o.fullness}`,color:fullnessColor(o.fullness)})),(v)=>v.type) + } }; const other_data_params = {}; let keys = Object.keys(params || data_default_params); @@ -826,22 +835,21 @@ const data = result.data; const k = keys[idx]; if (!data) return; - if (k == keys[0]) appStore.SET_MapData(filterGeometryNotEmpty(data)); bus.emit("changeData"); const groups = data_default_params[k].groupMethod(data); const g_keys = Object.keys(groups); bus.emit("removeMapDatas", g_keys); - if (k == keys[0]) { +/* if (k == keys[0]) { appStore.SET_MapData(filterGeometryNotEmpty(data)); appStore.SET_MapData_COUNT( _.assign({}, ...g_keys.map((a) => ({ [a]: groups[a].length }))) ); - } + }*/ g_keys.forEach((key) => { busEmit(beansToMap.key, { beans: groups[key].map((i) => ({ ...i, - color: (default_params[key] || {}).color, + color: i.color || (default_params[key] || {}).color, })), fields: data_default_params[k].fields, type: key, diff --git a/public/static/libs/mapbox/style/wh_dhgx.json b/public/static/libs/mapbox/style/wh_dhgx.json index 3611475..13e9bc2 100644 --- a/public/static/libs/mapbox/style/wh_dhgx.json +++ b/public/static/libs/mapbox/style/wh_dhgx.json @@ -1386,6 +1386,8 @@ "in", "type", "", + "fullness_YS", + "fullness_WS", "分区流向", "排口流向", "waterlog_community", @@ -1393,10 +1395,7 @@ "temporary" ], "paint": { - "line-color": [ - "get", - "color" - ], + "line-color": ["get", "color"], "line-width": [ "coalesce", ["get","width"], @@ -4488,6 +4487,7 @@ ["road_major_label"], ["place_label_other"], ["排水分区_text"], + ["linestring"], ["point"] ], "filter": { @@ -4662,6 +4662,8 @@ ["WS", "HS"] ] }, + "雨水管网充满度": { "layerName": ["linestring","point"], "filter": [["fullness_YS"],["fullness_YS"]] }, + "污水管网充满度": { "layerName": ["linestring","point"], "filter": [["fullness_WS"],["fullness_WS"]] }, "污水系统流向1": { "layerName": ["linestring"], "filter": [["污水系统流向1"]] diff --git a/src/api/MonitorAssetsOnMap.js b/src/api/MonitorAssetsOnMap.js index 92f29c8..20197f9 100644 --- a/src/api/MonitorAssetsOnMap.js +++ b/src/api/MonitorAssetsOnMap.js @@ -398,6 +398,14 @@ params: query, }); } +// 均值查询 +export function getPipeMonitorRun(query) { + return request({ + url: '/business/dataSiteRelation/getPipeMonitorRun', + method: 'get', + params: query, + }); +} // 分类列表 @@ -439,4 +447,4 @@ method: 'get', params: query }) -} \ No newline at end of file +} diff --git a/src/components/Map/MapBox.vue b/src/components/Map/MapBox.vue index 8be52e5..0487102 100644 --- a/src/components/Map/MapBox.vue +++ b/src/components/Map/MapBox.vue @@ -20,7 +20,7 @@ import bus from "@/bus"; import request from "@/utils/request"; import MapBox from "@/components/Map/Map"; -import { getBaseListPoint } from "@/api/MonitorAssetsOnMap"; +import { getBaseListPoint,getPipeMonitorRun } from "@/api/MonitorAssetsOnMap"; import { supervisionRealinformationList } from "@/api/internetVehicles"; import useUserStore from "@/store/modules/user"; import { reactive, onMounted, onBeforeUnmount, nextTick, defineProps, watch } from "vue"; @@ -740,7 +740,6 @@ let prevObj = null; const panelDataToMap = (obj) => { - debugger; let isUp = Object.keys(obj).includes("isUp") ? obj.isUp : true; //是否触发地图点击事件 默认触发 const { setLayerVisible, setHighlight } = events_params; // if (prevObj != null) busEmit(setLayerVisible.key, { layername: prevObj.type, isCheck: false }); @@ -792,6 +791,11 @@ const dataToMap = async ({ params, callback }) => { const { setLayerVisible, beansToMap } = events_params; + const fullnessColor = (value) => { + value = Number(value); + const colors = [{value:0,color:"rgba(52,176,0,1)"},{value:60,color:"rgba(254,203,0,1)"},{value:70,color:"rgba(223,1,0,1)"},{value:90,color:"rgba(142,14,11,1)"}]; + return (colors.filter((i,idx) => idx!= colors.length-1 && i.value _.groupBy(data.supervisionRealinformationList.filter((i) => i.longitude && i.latitude).map((item) => ({ ...item, type: item.vehicleCategory + item.status })), (v) => v.type), }, + fullness:{ + method:getPipeMonitorRun, + fields:{geometry:"pipelineGeometry",name:"name"}, + groupMethod:(data)=> _.groupBy(data.filter(k => k.pipelineGeometry).map(o => ({...o,width:4,type:`fullness_${o.pipeSystem}`,name:`管径:${o.pipelineDiameter}\n充满度:${o.fullness}`,color:fullnessColor(o.fullness)})),(v)=>v.type) + } }; const other_data_params = {}; let keys = Object.keys(params || data_default_params); @@ -826,22 +835,21 @@ const data = result.data; const k = keys[idx]; if (!data) return; - if (k == keys[0]) appStore.SET_MapData(filterGeometryNotEmpty(data)); bus.emit("changeData"); const groups = data_default_params[k].groupMethod(data); const g_keys = Object.keys(groups); bus.emit("removeMapDatas", g_keys); - if (k == keys[0]) { +/* if (k == keys[0]) { appStore.SET_MapData(filterGeometryNotEmpty(data)); appStore.SET_MapData_COUNT( _.assign({}, ...g_keys.map((a) => ({ [a]: groups[a].length }))) ); - } + }*/ g_keys.forEach((key) => { busEmit(beansToMap.key, { beans: groups[key].map((i) => ({ ...i, - color: (default_params[key] || {}).color, + color: i.color || (default_params[key] || {}).color, })), fields: data_default_params[k].fields, type: key, diff --git a/src/views/pictureOnMap/LayerControl.vue b/src/views/pictureOnMap/LayerControl.vue index 2173eb1..634846e 100644 --- a/src/views/pictureOnMap/LayerControl.vue +++ b/src/views/pictureOnMap/LayerControl.vue @@ -144,6 +144,18 @@ icon: getImageUrl("lay-wushuiguanwang.png", "images/NewLayercontrol"), VShow: "rain", }, + { + value: "雨水管网充满度", + label: "雨水管网充满度", + icon: getImageUrl("lay-yushuiguanwang.png", "images/NewLayercontrol"), + VShow: "sewage", + }, + { + value: "污水管网充满度", + label: "污水管网充满度", + icon: getImageUrl("lay-wushuiguanwang.png", "images/NewLayercontrol"), + VShow: "rain", + }, ], }, /* { diff --git a/public/static/libs/mapbox/style/wh_dhgx.json b/public/static/libs/mapbox/style/wh_dhgx.json index 3611475..13e9bc2 100644 --- a/public/static/libs/mapbox/style/wh_dhgx.json +++ b/public/static/libs/mapbox/style/wh_dhgx.json @@ -1386,6 +1386,8 @@ "in", "type", "", + "fullness_YS", + "fullness_WS", "分区流向", "排口流向", "waterlog_community", @@ -1393,10 +1395,7 @@ "temporary" ], "paint": { - "line-color": [ - "get", - "color" - ], + "line-color": ["get", "color"], "line-width": [ "coalesce", ["get","width"], @@ -4488,6 +4487,7 @@ ["road_major_label"], ["place_label_other"], ["排水分区_text"], + ["linestring"], ["point"] ], "filter": { @@ -4662,6 +4662,8 @@ ["WS", "HS"] ] }, + "雨水管网充满度": { "layerName": ["linestring","point"], "filter": [["fullness_YS"],["fullness_YS"]] }, + "污水管网充满度": { "layerName": ["linestring","point"], "filter": [["fullness_WS"],["fullness_WS"]] }, "污水系统流向1": { "layerName": ["linestring"], "filter": [["污水系统流向1"]] diff --git a/src/api/MonitorAssetsOnMap.js b/src/api/MonitorAssetsOnMap.js index 92f29c8..20197f9 100644 --- a/src/api/MonitorAssetsOnMap.js +++ b/src/api/MonitorAssetsOnMap.js @@ -398,6 +398,14 @@ params: query, }); } +// 均值查询 +export function getPipeMonitorRun(query) { + return request({ + url: '/business/dataSiteRelation/getPipeMonitorRun', + method: 'get', + params: query, + }); +} // 分类列表 @@ -439,4 +447,4 @@ method: 'get', params: query }) -} \ No newline at end of file +} diff --git a/src/components/Map/MapBox.vue b/src/components/Map/MapBox.vue index 8be52e5..0487102 100644 --- a/src/components/Map/MapBox.vue +++ b/src/components/Map/MapBox.vue @@ -20,7 +20,7 @@ import bus from "@/bus"; import request from "@/utils/request"; import MapBox from "@/components/Map/Map"; -import { getBaseListPoint } from "@/api/MonitorAssetsOnMap"; +import { getBaseListPoint,getPipeMonitorRun } from "@/api/MonitorAssetsOnMap"; import { supervisionRealinformationList } from "@/api/internetVehicles"; import useUserStore from "@/store/modules/user"; import { reactive, onMounted, onBeforeUnmount, nextTick, defineProps, watch } from "vue"; @@ -740,7 +740,6 @@ let prevObj = null; const panelDataToMap = (obj) => { - debugger; let isUp = Object.keys(obj).includes("isUp") ? obj.isUp : true; //是否触发地图点击事件 默认触发 const { setLayerVisible, setHighlight } = events_params; // if (prevObj != null) busEmit(setLayerVisible.key, { layername: prevObj.type, isCheck: false }); @@ -792,6 +791,11 @@ const dataToMap = async ({ params, callback }) => { const { setLayerVisible, beansToMap } = events_params; + const fullnessColor = (value) => { + value = Number(value); + const colors = [{value:0,color:"rgba(52,176,0,1)"},{value:60,color:"rgba(254,203,0,1)"},{value:70,color:"rgba(223,1,0,1)"},{value:90,color:"rgba(142,14,11,1)"}]; + return (colors.filter((i,idx) => idx!= colors.length-1 && i.value _.groupBy(data.supervisionRealinformationList.filter((i) => i.longitude && i.latitude).map((item) => ({ ...item, type: item.vehicleCategory + item.status })), (v) => v.type), }, + fullness:{ + method:getPipeMonitorRun, + fields:{geometry:"pipelineGeometry",name:"name"}, + groupMethod:(data)=> _.groupBy(data.filter(k => k.pipelineGeometry).map(o => ({...o,width:4,type:`fullness_${o.pipeSystem}`,name:`管径:${o.pipelineDiameter}\n充满度:${o.fullness}`,color:fullnessColor(o.fullness)})),(v)=>v.type) + } }; const other_data_params = {}; let keys = Object.keys(params || data_default_params); @@ -826,22 +835,21 @@ const data = result.data; const k = keys[idx]; if (!data) return; - if (k == keys[0]) appStore.SET_MapData(filterGeometryNotEmpty(data)); bus.emit("changeData"); const groups = data_default_params[k].groupMethod(data); const g_keys = Object.keys(groups); bus.emit("removeMapDatas", g_keys); - if (k == keys[0]) { +/* if (k == keys[0]) { appStore.SET_MapData(filterGeometryNotEmpty(data)); appStore.SET_MapData_COUNT( _.assign({}, ...g_keys.map((a) => ({ [a]: groups[a].length }))) ); - } + }*/ g_keys.forEach((key) => { busEmit(beansToMap.key, { beans: groups[key].map((i) => ({ ...i, - color: (default_params[key] || {}).color, + color: i.color || (default_params[key] || {}).color, })), fields: data_default_params[k].fields, type: key, diff --git a/src/views/pictureOnMap/LayerControl.vue b/src/views/pictureOnMap/LayerControl.vue index 2173eb1..634846e 100644 --- a/src/views/pictureOnMap/LayerControl.vue +++ b/src/views/pictureOnMap/LayerControl.vue @@ -144,6 +144,18 @@ icon: getImageUrl("lay-wushuiguanwang.png", "images/NewLayercontrol"), VShow: "rain", }, + { + value: "雨水管网充满度", + label: "雨水管网充满度", + icon: getImageUrl("lay-yushuiguanwang.png", "images/NewLayercontrol"), + VShow: "sewage", + }, + { + value: "污水管网充满度", + label: "污水管网充满度", + icon: getImageUrl("lay-wushuiguanwang.png", "images/NewLayercontrol"), + VShow: "rain", + }, ], }, /* { diff --git a/vite.config.js b/vite.config.js index 2190341..6cf1fa0 100644 --- a/vite.config.js +++ b/vite.config.js @@ -7,9 +7,9 @@ const Timestamp = new Date().getTime(); //随机时间戳 // let ipLink = 'https://server1.wh-nf.cn:8201/prod-api'; // let ipLink = 'http://192.168.16.135:9100'; -let ipLink = 'https://dhgx.wh-nf.cn:8201/prod-api'; +// let ipLink = 'https://dhgx.wh-nf.cn:8201/prod-api'; // let ipLink = 'http://192.168.16.124:9100'; -// let ipLink = 'http://192.168.20.43:9100'; // 刘总 +let ipLink = 'http://192.168.20.43:9100'; // 刘总 // let ipLink = 'http://192.168.16.43:9100'; /* */