Compare commits

...

4 Commits

8 changed files with 235 additions and 58 deletions

View File

@ -12,7 +12,7 @@ VITE_BUILD_COMPRESS = 'none'
# Basic interface address SPA
# 天空地项目
VITE_GLOB_API_URL=http://120.222.154.7:6050
VITE_GLOB_API_URL=http://120.222.154.7:6050
VITE_GLOB_INFO_IMAGE_URL=http://120.222.154.48:6050
@ -21,6 +21,7 @@ VITE_GLOB_INFO_IMAGE_URL=http://120.222.154.48:6050
VITE_GLOB_UPLOAD_URL=http://120.222.154.7:6050
# Interface prefix
VITE_GLOB_API_URL_PREFIX=
VITE_GLOB_APP_TITLE = 临沂市自然资源综合监管平台

View File

@ -5,6 +5,7 @@
<div>
<div class="cloud-query-icon">
<Icon icon="gis:globe-poi" :size="20" />
</div>
<div>云查询</div>
</div>
@ -78,27 +79,29 @@
<a-empty v-if="locationArrays.length == 0" />
<div class="location-item" v-for="(item, index) in locationArrays" :key="index">
<a-button type="default" size="small" @click="handlerLocationFlyTo(item)"
><EnvironmentOutlined
/></a-button>
<a-input
v-model:value="item.lng"
@chagne="handlerLocationChange"
addon-before="经度"
size="small"
style="width: 140px; margin: 0px 12px"
/>
<a-input
v-model:value="item.lat"
@chagne="handlerLocationChange"
addon-before="纬度"
size="small"
style="width: 140px; margin-right: 12px"
/>
<a-button type="default" size="small" @click="handlerLocationRemove(index)"
><DeleteOutlined
/></a-button>
<div class="location-item-list-coantienr">
<div class="location-item" v-for="(item, index) in locationArrays" :key="index">
<a-button type="default" size="small" @click="handlerLocationFlyTo(item)"
><EnvironmentOutlined
/></a-button>
<a-input
v-model:value="item.lng"
@chagne="handlerLocationChange"
addon-before="经度"
size="small"
style="width: 140px; margin: 0px 12px"
/>
<a-input
v-model:value="item.lat"
@chagne="handlerLocationChange"
addon-before="纬度"
size="small"
style="width: 140px; margin-right: 12px"
/>
<a-button type="default" size="small" @click="handlerLocationRemove(index)"
><DeleteOutlined
/></a-button>
</div>
</div>
</div>
</div>
@ -174,6 +177,34 @@
import { useCloudQueryStore } from '@/store/modules/cloudquery';
import { AddDroneTask } from '@/api/demo/cloudQuery.ts';
import proj4 from 'proj4'
//
function GkToCGCS2000(lngLat){
try{
// CGCS2000 / 3-degree Gauss-Kruger zone 39
let from_system = "+proj=tmerc +lat_0=0 +lon_0=117 +k=1 +x_0=39500000 +y_0=0 +ellps=GRS80 +units=m +no_defs +type=crs"
// China Geodetic Coordinate System 2000
// let to_system = "+proj=longlat +ellps=GRS80 +no_defs +type=crs";
// WGS 84 -- WGS84 - World Geodetic System 1984,
let to_system = "+proj=longlat +datum=WGS84 +no_defs +type=crs";
// transform
let trasnformLnglat = proj4(from_system,to_system,lngLat);
return trasnformLnglat;
}catch(e){
return null;
}
}
const useCloudQuery = useCloudQueryStore();
const { VITE_GLOB_API_URL } = getAppEnvConfig();
@ -1032,7 +1063,7 @@
coordinates = geojson.features[0].geometry.coordinates;
}
if (coordinates) {
if (
if(
coordinates[0][coordinates[0].length - 1][0] ==
coordinates[0][coordinates[0].length - 2][0]
) {
@ -1090,7 +1121,46 @@
}
const LocationShow = ref<Boolean>(false);
const locationArrays = ref<LocationItem[]>([]);
const locationArrays = ref<LocationItem[]>([
// {"lat":3876411.9272,"lng":39624337.6595},
// {"lat":3876419.7281,"lng":39624444.1571},
// {"lat":3876419.8852,"lng":39624446.3011},
// {"lat":3876425.1275,"lng":39624517.8687},
// {"lat":3876425.2918,"lng":39624520.1122},
// {"lat":3876431.6438,"lng":39624606.8289},
// {"lat":3876412.7832,"lng":39624632.9065},
// {"lat":3876365.7135,"lng":39624644.6931},
// {"lat":3876325.9298,"lng":39624654.7128},
// {"lat":3876316.1075,"lng":39624657.1746},
// {"lat":3876246.0573,"lng":39624674.5737},
// {"lat":3876243.9623,"lng":39624675.0987},
// {"lat":3876243.8703,"lng":39624674.5037},
// {"lat":3876240.4283,"lng":39624652.4797},
// {"lat":3876233.6843,"lng":39624607.2316},
// {"lat":3876232.2352,"lng":39624597.5126},
// {"lat":3876222.6982,"lng":39624540.8865},
// {"lat":3876221.3592,"lng":39624531.5094},
// {"lat":3876215.2311,"lng":39624497.0364},
// {"lat":3876206.5951,"lng":39624498.5794},
// {"lat":3876189.579,"lng":39624390.1352},
// {"lat":3876189.002,"lng":39624386.4602},
// {"lat":3876186.4209,"lng":39624370.0092},
// {"lat":3876195.956,"lng":39624367.6201},
// {"lat":3876198.685,"lng":39624385.0072},
// {"lat":3876199.261,"lng":39624388.6822},
// {"lat":3876207.5961,"lng":39624441.8023},
// {"lat":3876209.7341,"lng":39624441.5433},
// {"lat":3876253.1836,"lng":39624436.2662},
// {"lat":3876258.4453,"lng":39624435.6273},
// {"lat":3876290.5054,"lng":39624431.7412},
// {"lat":3876299.4224,"lng":39624430.675},
// {"lat":3876303.8533,"lng":39624430.1453},
// {"lat":3876297.7186,"lng":39624342.1213},
// {"lat":3876299.3188,"lng":39624341.7203},
// {"lat":3876305.1635,"lng":39624340.2558},
// {"lat":3876387.1195,"lng":39624319.7203},
// {"lat":3876411.9272,"lng":39624337.6595}
]);
const locationGeoJson = reactive({
point: {
type: 'FeatureCollection',
@ -1134,6 +1204,13 @@
//
const handlerLocationFlyTo = (item: LocationItem) => {
if(item.lng > 180){
let coor = GkToCGCS2000([parseFloat(item.lng),parseFloat(item.lat)]);
item.lng = coor[0];
item.lat = coor[1];
}
if (item.lng && item.lat) {
handlerLocation([item.lng, item.lat]);
handlerLocationGeoJson();
@ -1183,7 +1260,7 @@
let feature = {
type: 'Feature',
geometry: {
type: 'MultiLineString',
type: 'Polygon',
coordinates: [[]],
},
};
@ -1205,6 +1282,8 @@
// 线
const handlerLocationLoadLayer = () => {
console.log("locationGeoJson123",locationGeoJson);
//
if (map.getSource('LocationPointSource')) {
map.getSource('LocationPointSource').setData(locationGeoJson.point);
@ -1572,7 +1651,8 @@
.to-location-input {
padding: 16px;
width: 408px;
padding-right:4px;
width: 418px;
min-height: 60px;
background: #fff;
position: absolute;
@ -1586,9 +1666,14 @@
border-bottom: 1px solid #f1f1f1;
margin-bottom: 12px;
}
.location-item {
line-height: 20px;
margin-bottom: 6px;
.location-item-list-coantienr{
width:100%;
max-height:400px;
overflow-y:auto;
.location-item {
line-height: 20px;
margin-bottom: 6px;
}
}
}
</style>

View File

@ -561,7 +561,6 @@
if (match) {
MapboxComponent.value.handlerCurrentImageChange(match[1]);
}
}
const isInitImageLisener = ref<Boolean>(false);
@ -631,7 +630,6 @@
const xchczhaopianList = computed(() => {
return xchczhaopian ? xchczhaopian.split(',') : [];
});
function onMapboxLoad() {
changeTask();
}

View File

@ -6,7 +6,7 @@
<div style="position: absolute; left:60px; bottom: 20px; z-index:1;">
<div :class="`button-item ${buttonSelect == 1? 'button-select': ''}`" style="margin-bottom: 10px" @click="changeLayer(1)"></div>
<div :class="`button-item ${buttonSelect == 2? 'button-select': ''}`" style="margin-bottom: 10px" @click="changeLayer(2)"></div>
<!-- <div :class="`button-item ${buttonSelect == 3? 'button-select': ''}`" @click="changeLayer(3)"></div> -->
<div :class="`button-item ${buttonSelect == 3? 'button-select': ''}`" @click="changeLayer(3)"></div>
</div>
<div class="legend">
@ -114,17 +114,17 @@
case 1:
MapboxComponent.value.handlerChangeLayerVisible('tdt-img-tiles',false)
MapboxComponent.value.handlerChangeLayerVisible('tdt-vec-tiles',true)
MapboxComponent.value.handlerChangeLayerVisible('tdt-wms-tiles',false)
MapboxComponent.value.handlerChangeLayerVisible('countyPanelLayer',false)
break;
case 2:
MapboxComponent.value.handlerChangeLayerVisible('tdt-img-tiles',true)
MapboxComponent.value.handlerChangeLayerVisible('tdt-vec-tiles',false)
MapboxComponent.value.handlerChangeLayerVisible('tdt-wms-tiles',false)
MapboxComponent.value.handlerChangeLayerVisible('countyPanelLayer',false)
break;
case 3:
MapboxComponent.value.handlerChangeLayerVisible('tdt-img-tiles',false)
MapboxComponent.value.handlerChangeLayerVisible('tdt-vec-tiles',false)
MapboxComponent.value.handlerChangeLayerVisible('tdt-wms-tiles',true)
MapboxComponent.value.handlerChangeLayerVisible('countyPanelLayer',true)
break;
}
}

View File

@ -128,7 +128,7 @@ const keyword = ref("");
async function searchArea() {
if(keyword.value.match(/^[0-9A-Z]+$/)){
if(keyword.value.match(/^[0-9A-Z]+(-\d)*$/)){
let res = await loadCaseInfoTuBanList({caseNo:keyword.value,page:1,limit:10});
searchResult.value = [];
res?.items?.forEach((item,index)=>{
@ -222,18 +222,27 @@ defineExpose({
height:36px;
}
.level-0{
max-width:180px;
max-width:160px;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
text-overflow:ellipsis;
white-space: nowrap;
}
.level-1{
margin:0px 6px;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
.level-2{
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
&:hover{
cursor:pointer;
background:#0F3863;
}
}
}

View File

@ -484,8 +484,10 @@ const handlerDealCountry = (countyName:String = "临沂市"):void=>{
axios({
method:"get",
url:`http://175.27.168.120:8080/geoserver/linyishi/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=linyishi%3Axianjie&maxFeatures=50&outputFormat=application%2Fjson&cql_filter=xzqmc%20like%20%27%25${filterName}%25%27`,
// url:`http://175.27.168.120:8080/geoserver/linyishi/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=linyishi%3Axianjie&maxFeatures=50&outputFormat=application%2Fjson&cql_filter=xzqmc%20like%20%27%25${filterName}%25%27`,
url:`http://120.222.154.7:8090/geoserver/linyishi/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=linyishi%3Axianjie&maxFeatures=50&outputFormat=application%2Fjson`
}).then(res=>{
handlerLoadPanelLayer(res.data);
handlerLoadCountyLayer(res.data);
})
@ -495,23 +497,93 @@ const handlerLoadCountyLayer = (geojson)=>{
// 线
if(map.getSource("countySource")){
map.getSource("countySource").setData(geojson);
}else{
}else{
map.addSource("countySource",{
type:"geojson",
data:geojson
type:"geojson",
data:geojson
})
map.addLayer(
{
"id": "countyLayer",
"type": "line",
"source": "countySource",
"paint": {
'line-color': '#6f7ff4', // 线
'line-width': 3 // 线
{
"id": "countyLayer",
"type": "line",
"source": "countySource",
"paint": {
'line-color': '#6f7ff4', // 线
'line-width': 3 // 线
}
}
}
)
}
if(map.getLayer("countyPanelLayer")){
map.moveLayer("countyLayer","countyPanelLayer")
}
}
}
//
const handlerLoadPanelLayer = (geojson)=>{
if(map.getSource("countyPanelLayer")){
map.getSource("countyPanelSource").setData(geojson);
}else{
map.addSource("countyPanelSource",{
type:"geojson",
data:geojson
})
map.addLayer(
{
"id": "countyPanelLayer",
"type": "fill",
"source": "countyPanelSource",
"layout":{
'visibility':'none'
},
"paint": {
'fill-color':[
'case',
['==', ['get', 'xzqdm_1'], "371302"],
"#49B0F9",
['==', ['get', 'xzqdm_1'], "371311"],
"#3EABFA",
['==', ['get', 'xzqdm_1'], "371312"],
"#27A2FB",
['==', ['get', 'xzqdm_1'], "3713122"],
"#34E6B1",
['==', ['get', 'xzqdm_1'], "3713001"],
"#1099FB",
['==', ['get', 'xzqdm_1'], "3713271"],
"#0695FB",
['==', ['get', 'xzqdm_1'], "371321"],
"#058DEE",
['==', ['get', 'xzqdm_1'], "371322"],
"#09C78E",
['==', ['get', 'xzqdm_1'], "371323"],
"#047DD4",
['==', ['get', 'xzqdm_1'], "371324"],
"#94D515",
['==', ['get', 'xzqdm_1'], "371325"],
"#0568B0",
['==', ['get', 'xzqdm_1'], "371326"],
"#3EABFA",
['==', ['get', 'xzqdm_1'], "371327"],
"#49B0F9",
['==', ['get', 'xzqdm_1'], "371328"],
"#27A2FB",
['==', ['get', 'xzqdm_1'], "371329"],
"#94D515",
"#1099FB",
],
'fill-opacity':0.9
}
}
)
if(map.getLayer("countyLayer")){
map.moveLayer("countyLayer","countyPanelLayer");
map.moveLayer("historyLayerLine","countyLayer");
map.moveLayer("historyLayerFill","countyLayer");
map.moveLayer("countyLayer","countyLayer");
}
}
}
function getMaskData(){
@ -670,7 +742,6 @@ const handlerLoadVillageLayer = ()=>{
}
}
//
/**
* 热力图heatLayer
@ -688,17 +759,23 @@ function handlerChangeLayerVisible(layerName,checked){
} else {
map.setLayoutProperty(layerName, 'visibility', 'none');
}
if(layerName == 'countyPanelLayer'){
if(map.getLayer("countyPanelLayer")){
map.moveLayer("historyLayerLine","countyLayer");
map.moveLayer("historyLayerFill","countyLayer");
map.moveLayer("countyLayer","countyLayer");
}
}
}
//
function handlerChangeCounty(county,type=""){
handlerDealCountry(county.name);
handlerLoadPolygon(county.code,type);
handlerDealPoint(county.code);
}
handlerDealCountry(county.name);
//
}
onMounted(()=>{
mapboxgl.accessToken = MAPBOX_TOKEN;
map = initMap();

View File

@ -430,7 +430,14 @@ function handlerLoadHeatLayer(heatdata){
1,
'rgba(178,24,43,1)'
],
'heatmap-radius': 10,
// 'heatmap-radius': 8,
'heatmap-radius': [
'interpolate',['linear'],['zoom'],
9,7,
10,16,
12,24,
14,32,
],
'heatmap-opacity': 0.9
}
}

Binary file not shown.