DroneCaseInfoSingle/QueryVectorTileByTable接口部分字段值base64编码

main
刘妍 2026-03-10 15:36:40 +08:00
parent e0444b9073
commit 705a292b86
5 changed files with 1393 additions and 1390 deletions

View File

@ -1043,35 +1043,6 @@
// }
// })
// map.addLayer(
// {
// 'id': 'geoserver371302Layer',
// 'type': 'fill',
// 'source': {
// type: 'vector',
// tiles: [VITE_GLOB_API_URL_VAR.value+'api/DroneCaseInfoSingle/QueryVectorTileByTable?z={z}&x={x}&y={y}&table=geoserver371302'],
// minzoom: 1,
// maxzoom: 20,
// 'cluster': true, //
// 'clusterMaxZoom': 0, //
// 'clusterRadius': 0 //
// },
// "source-layer": "geoserver371302",
// 'layout': {
// 'line-join': 'round',
// 'line-cap': 'round',
// },
// 'paint': {
// 'line-color': "#408eff",
// 'line-width': 2
// }
// }
// )
});
});

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,6 @@
<template>
<div :id="mapContainerName" class="map-container">
<!-- 专题首页地图 -->
<div class="search-container-box">
<div style="width: 480px" v-if="props.subject == '违法用地'">
<a-range-picker v-model:value="dateVal" @change="changeDate" format="YYYY-MM-DD" />
@ -109,6 +110,7 @@
import proj4 from 'proj4';
import { waiData } from '../LargeScreenMap/linyishi';
import dayjs from 'dayjs';
import { Base64 } from 'js-base64';
const {
VITE_GLOB_API_URL,
@ -409,7 +411,7 @@
let field_filter = '&field="gid","tubantype","Id","is_today",';
let color_filter: any = [];
if (code) {
sql_filter = '&filter="countyid"=\'' + code + "'";
sql_filter = '"countyid"=\'' + code + "'";
} else {
sql_filter = '';
}
@ -459,7 +461,7 @@
if (level) {
} else {
sql_filter =
'&filter=streetid in ( select CAST("OrgId" AS VARCHAR) from sys_userorg where "UserId" = ' +
'streetid in ( select CAST("OrgId" AS VARCHAR) from sys_userorg where "UserId" = ' +
localStorage.getItem('userid') +
') or countyid in ( select CAST("OrgId" AS VARCHAR) from sys_userorg where "UserId" = ' +
localStorage.getItem('userid') +
@ -473,7 +475,7 @@
if (sql_filter.includes('&filter')) {
sql_filter = `${sql_filter} AND "synchronoustime" > '${timeInterval[0]}' AND "synchronoustime" < '${timeInterval[1]}'`;
} else {
sql_filter = `&filter="synchronoustime" > '${timeInterval[0]}' AND "synchronoustime" < '${timeInterval[1]}'`;
sql_filter = `"synchronoustime" > '${timeInterval[0]}' AND "synchronoustime" < '${timeInterval[1]}'`;
}
}
map.addLayer({
@ -485,7 +487,8 @@
VITE_GLOB_API_URL_VAR.value +
'/api/DroneCaseInfoSingle/QueryVectorTileByTable?z={z}&x={x}&y={y}&table=' +
table_filter +
sql_filter +
'&filter=' +
Base64.encode(sql_filter) +
field_filter,
],
minzoom: 1,
@ -515,7 +518,8 @@
VITE_GLOB_API_URL_VAR.value +
'/api/DroneCaseInfoSingle/QueryVectorTileByTable?z={z}&x={x}&y={y}&table=' +
table_filter +
sql_filter +
'&filter=' +
Base64.encode(sql_filter) +
field_filter,
],
minzoom: 1,

File diff suppressed because it is too large Load Diff

View File

@ -10,10 +10,8 @@
<GlobalOutlined style="font-size: 20px; position: relative; top: 1px; left: -6px" />
<span>&nbsp;三维地图</span>
</div>
</div>
</div>
</div>
</template>
<script lang="ts" setup>
import MonitoringData from './MonitoringData.json';
@ -34,6 +32,7 @@
import U from 'mapbox-gl-utils';
import { MP } from './src/MP';
import { GeojsonToWkt } from './src/WktGeojsonTransform';
import { Base64 } from 'js-base64';
const {
VITE_GLOB_API_URL,
@ -167,7 +166,7 @@
function handlerLoadPolygon(code = '', filter = '', type = '') {
let sql_filter;
if (code) {
sql_filter = '&filter="countyid"=\'' + code + "'";
sql_filter = '"countyid"=\'' + code + "'";
} else {
sql_filter = '';
}
@ -248,7 +247,8 @@
tiles: [
VITE_GLOB_API_URL_VAR.value +
'/api/DroneCaseInfoSingle/QueryVectorTileByTable?z={z}&x={x}&y={y}&table=view_drone_shp_data&' +
sql_filter +
'&filter=' +
Base64.encode(sql_filter) +
'&field="gid","handle_status_id","is_illegal","measure_name","typename","Id",',
],
minzoom: 1,
@ -289,7 +289,8 @@
tiles: [
VITE_GLOB_API_URL_VAR.value +
'/api/DroneCaseInfoSingle/QueryVectorTileByTable?z={z}&x={x}&y={y}&table=view_drone_shp_data' +
sql_filter +
'&filter=' +
Base64.encode(sql_filter) +
'&field="gid","handle_status_id","is_illegal","measure_name","typename","Id",',
],
//
@ -717,7 +718,6 @@
U.init(map);
mp = new MP(map);
// handlerDealCountry();
// handlerDealPoint();
// handlerLoadPolygon();
@ -910,7 +910,7 @@
// 线
function loadFuFeiLayer() {
let sql_filter = '&filter="measure_name"=\'0\'';
let sql_filter = '"measure_name"=\'0\'';
if (map.getSource('fufeiSource')) {
map.removeLayer('fufeiLayerLine');
@ -924,7 +924,8 @@
tiles: [
VITE_GLOB_API_URL_VAR.value +
'/api/DroneCaseInfoSingle/QueryVectorTileByTable?z={z}&x={x}&y={y}&table=view_drone_shp_data&' +
sql_filter +
'&filter=' +
Base64.encode(sql_filter) +
'&field="gid","handle_status_id","is_illegal","measure_name","typename","Id",',
],
minzoom: 1,
@ -964,7 +965,8 @@
tiles: [
VITE_GLOB_API_URL_VAR.value +
'/api/DroneCaseInfoSingle/QueryVectorTileByTable?z={z}&x={x}&y={y}&table=view_drone_shp_data' +
sql_filter +
'&filter=' +
Base64.encode(sql_filter) +
'&field="gid","handle_status_id","is_illegal","measure_name","typename","Id",',
],
//
@ -1028,38 +1030,36 @@
},
});
map.addLayer({
id: 'hangfeiareaFill',
type: 'fill',
source: 'hangfeiAreaSource',
paint: {
'fill-color': '#e37575',
'fill-opacity': 0.3
},
layout:{
"visibility":"none"
}
});
map.addLayer({
'id': 'hangfeiareaLable',
'type': 'symbol',
'source': 'hangfeiAreaSource',
'layout': {
'text-field': ['get', 'Name'],
'text-font': ['Open Sans Bold', 'Arial Unicode MS Bold'],
'text-size': 12,
'text-anchor': 'center',
"visibility":"none"
},
'paint': {
// 'text-color': '#000000'
'text-color': '#041B36',
'text-halo-color': '#fff',
'text-halo-width': 2,
}
});
map.addLayer({
id: 'hangfeiareaFill',
type: 'fill',
source: 'hangfeiAreaSource',
paint: {
'fill-color': '#e37575',
'fill-opacity': 0.3,
},
layout: {
visibility: 'none',
},
});
map.addLayer({
id: 'hangfeiareaLable',
type: 'symbol',
source: 'hangfeiAreaSource',
layout: {
'text-field': ['get', 'Name'],
'text-font': ['Open Sans Bold', 'Arial Unicode MS Bold'],
'text-size': 12,
'text-anchor': 'center',
visibility: 'none',
},
paint: {
// 'text-color': '#000000'
'text-color': '#041B36',
'text-halo-color': '#fff',
'text-halo-width': 2,
},
});
}
//