Compare commits

...

2 Commits

Author SHA1 Message Date
徐景良 fd381b338b 4-12 2025-04-12 10:34:16 +08:00
徐景良 0df1c6f9c2 2025-04-12 2025-04-12 10:21:05 +08:00
13 changed files with 90 additions and 46 deletions

View File

@ -4,7 +4,7 @@ const CONFIG = {
LOGO_URL: "/images/img25.png",
BASE_API: "127.0.0.1",
MAPBOX_OPTIONS: {
ACCESS_TOKEN: "pk.eyJ1Ijoic2hpY2hhbzEyMyIsImEiOiJja3FobnI1aDEwNGF6Mm9vOXVhNnBzZmFhIn0.2fZKiMqCQHxVY74QShMEGQ",
ACCESS_TOKEN: "pk.eyJ1IjoieHVqaW5nbGlhbmciLCJhIjoiY2w3bzFzZnZqMjdieTN1cG92N2I1d2huOSJ9.aQqMz4S-cTziUYizIH_gNg",
CENTER: [118.11036, 35.17734]
},
TDT: {

View File

@ -17,8 +17,8 @@ export const globalApi = {
//费县正式环境
BASE_URL: "http://221.2.83.254:9006", // java
// BASE_URL = "http://192.168.10.109:8909"
// BASE_URL: "http://221.2.83.254:9006", // java
BASE_URL : "http://192.168.10.106:8909",
GEOSERVER_URL:"http://221.2.83.254:9007", // geoserver
// netBASE_URL: "http://221.2.83.254:9001", //.net
netBASE_URL: "http://192.168.10.124:81", //.net

View File

@ -380,7 +380,6 @@ export function getjq(yyyy, mm, dd) {
*/
export function exportJson(data, filename) {
if (!data) {
alert('保存的数据为空')
return
}
if (!filename) {

View File

@ -6,7 +6,7 @@
import mapboxgl from "mapbox-gl";
import { globalApi } from "../../../api/urlPatterns.js";
import { getLayer, getGeomData } from "../../../api/Datadetails";
mapboxgl.accessToken ="pk.eyJ1Ijoic2hpY2hhbzEyMyIsImEiOiJja3FobnI1aDEwNGF6Mm9vOXVhNnBzZmFhIn0.2fZKiMqCQHxVY74QShMEGQ";
// mapboxgl.accessToken ="pk.eyJ1IjoieHVqaW5nbGlhbmciLCJhIjoiY2w3bzFzZnZqMjdieTN1cG92N2I1d2huOSJ9.aQqMz4S-cTziUYizIH_gNg";
export default {
props: {
row: {
@ -44,7 +44,8 @@ export default {
let st = el.data.msg.slice(6, -1);
st = st.split(" ");
// console.log([Number(st[0]), Number(st[1])]);
this.initMap(res.data.data.data[2].url, st);
let _this = this;
_this.initMap(res.data.data.data[2].url, st);
}
});
}
@ -55,7 +56,25 @@ export default {
let _this = this;
this.map = new mapboxgl.Map({
container: this.$refs.datamap,
style: "mapbox://styles/shichao123/clf3b1bxk007801moo0nnl87k",
style: {
"glyphs":"http://221.2.83.254:9010/font/{fontstack}/{range}.pbf",
"version": 8,
"sources": {
"raster-tiles": {
"type": "raster",
"tiles": ['https://t0.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=b6585bc41ee16251dbe6b1af64f375d9'],
"tileSize": 256,
}
},
"layers": [
{
"id": "tdt-img-tiles",
"type": "raster",
"source": "raster-tiles",
"minzoom": 0,
"maxzoom": 22
}]
},
center: [117.977325, 35.265961],
zoom: 14,
language: "zh-cmn",

View File

@ -128,7 +128,7 @@ import Dian from "./dian.vue";
import geoserve from "../../../assets/xianjie.json";
import * as turf from "@turf/turf";
mapboxgl.accessToken =
"pk.eyJ1Ijoic2hpY2hhbzEyMyIsImEiOiJja3FobnI1aDEwNGF6Mm9vOXVhNnBzZmFhIn0.2fZKiMqCQHxVY74QShMEGQ";
"pk.eyJ1IjoieHVqaW5nbGlhbmciLCJhIjoiY2w3bzFzZnZqMjdieTN1cG92N2I1d2huOSJ9.aQqMz4S-cTziUYizIH_gNg";
import { globalApi } from "../../../api/urlPatterns";
export default {
props: {
@ -336,7 +336,7 @@ export default {
let _this = this;
this.map = new mapboxgl.Map({
container: this.$refs.datamaps,
style: "mapbox://styles/shichao123/clf3b1bxk007801moo0nnl87k",
style:"mapbox://styles/mapbox/satellite-v9",
center: [117.922083055, 35.285659054999996],
zoom: 14,
language: "zh-cmn",

View File

@ -20,7 +20,7 @@ import * as MP from './lib/Mp.js';
},
methods:{
initMap(){
this.$mapboxgl.accessToken = "pk.eyJ1Ijoic2hpY2hhbzEyMyIsImEiOiJja3FobnI1aDEwNGF6Mm9vOXVhNnBzZmFhIn0.2fZKiMqCQHxVY74QShMEGQ";
// this.$mapboxgl.accessToken = "pk.eyJ1IjoieHVqaW5nbGlhbmciLCJhIjoiY2w3bzFzZnZqMjdieTN1cG92N2I1d2huOSJ9.aQqMz4S-cTziUYizIH_gNg";
this.map = new this.$mapboxgl.Map({
container:"drawMapContainer",
center:[118.0075,35.42222222],

View File

@ -1026,8 +1026,7 @@
//
initMap() {
//mapbox 2.0accessToken
this.$mapboxgl.accessToken = "pk.eyJ1Ijoic2hpY2hhbzEyMyIsImEiOiJja3FobnI1aDEwNGF6Mm9vOXVhNnBzZmFhIn0.2fZKiMqCQHxVY74QShMEGQ";
// this.$mapboxgl.accessToken = "pk.eyJ1IjoieHVqaW5nbGlhbmciLCJhIjoiY2w3bzFzZnZqMjdieTN1cG92N2I1d2huOSJ9.aQqMz4S-cTziUYizIH_gNg";
this.globalMap = new this.$mapboxgl.Map({
container: "mapContainer",
center: [117.98121, 35.273032801],
@ -1035,8 +1034,27 @@
maxZoom: 20,
minZoom: 5,
pitch: 0,
style: {
"glyphs":"http://221.2.83.254:9010/font/{fontstack}/{range}.pbf",
"version": 8,
"sources": {
"raster-tiles": {
"type": "raster",
"tiles": ['https://t0.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=b6585bc41ee16251dbe6b1af64f375d9'],
"tileSize": 256,
}
},
"layers": [
{
"id": "tdt-img-tiles",
"type": "raster",
"source": "raster-tiles",
"minzoom": 0,
"maxzoom": 22
}]
},
// style:"mapbox://styles/mapbox/satellite-v9"
style: "mapbox://styles/shichao123/clf3b1bxk007801moo0nnl87k",
// style:"mapbox://styles/mapbox/satellite-v9",
// style:"mapbox://styles/mapbox/dark-v10"
});
@ -1049,14 +1067,14 @@
);
this.globalMap.on("load", function () {
_this.globalMap.addSource("mapbox-dem", {
type: "raster-dem",
url: "mapbox://mapbox.mapbox-terrain-dem-v1",
tileSize: 512,
maxzoom: 14,
});
// add the DEM source as a terrain layer with exaggerated height
_this.globalMap.setTerrain({ source: "mapbox-dem", exaggeration: 1.5 });
// _this.globalMap.addSource("mapbox-dem", {
// type: "raster-dem",
// 'tiles':['http://221.2.83.254:9010/terrain/{z}/{x}/{y}.png'],
// tileSize: 512,
// maxzoom: 8,
// });
// _this.globalMap.setTerrain({ source: "mapbox-dem", exaggeration: 1 });
_this.loadGaoQingLayer();
@ -1258,6 +1276,7 @@
"icon-size": 0.8, //
"visibility": "visible",
'text-field': '{name}',
"text-font":["Microsoft YaHei Regular"],
'text-size': 14,
'text-offset':[0,-2],
},
@ -1371,6 +1390,7 @@
"icon-image": "searchIcon",
"icon-size": 0.8,
"text-field": "{name}",
"text-font":["Microsoft YaHei Regular"],
"text-offset": [0, 2],
"text-anchor": "top",
"text-size": 12,

View File

@ -319,7 +319,7 @@
this.$message.warning("只能上传后缀是.zip的文件");
return false;
}
if (size > 100) {
if (size > 200) {
this.$message.warning("文件大小不得超过100M");
return false;
}
@ -344,6 +344,7 @@
formData.append("spaceType", this.form.spaceType);
formData.append("severType", this.form.severType);
formData.append("tableName", this.form.tableName);
formData.append("styleName",this.form.styleName)
let _this = this;
uploadFile(formData)
.then((res) => {

View File

@ -250,7 +250,7 @@ export default {
}
},
initMap(){
this.$mapboxgl.accessToken = "pk.eyJ1Ijoic2hpY2hhbzEyMyIsImEiOiJja3FobnI1aDEwNGF6Mm9vOXVhNnBzZmFhIn0.2fZKiMqCQHxVY74QShMEGQ";
this.$mapboxgl.accessToken = "pk.eyJ1IjoieHVqaW5nbGlhbmciLCJhIjoiY2w3bzFzZnZqMjdieTN1cG92N2I1d2huOSJ9.aQqMz4S-cTziUYizIH_gNg";
this.globalMap = new this.$mapboxgl.Map({
container:"mapEditorContainer",
center:[this.currentViewer.center.lng,this.currentViewer.center.lat],

View File

@ -157,8 +157,7 @@ import {
publishLayer,
getLayerStyle,
} from "../../api/datamange";
mapboxgl.accessToken =
"pk.eyJ1Ijoic2hpY2hhbzEyMyIsImEiOiJja3FobnI1aDEwNGF6Mm9vOXVhNnBzZmFhIn0.2fZKiMqCQHxVY74QShMEGQ";
// mapboxgl.accessToken = "pk.eyJ1IjoieHVqaW5nbGlhbmciLCJhIjoiY2w3bzFzZnZqMjdieTN1cG92N2I1d2huOSJ9.aQqMz4S-cTziUYizIH_gNg";
export default {
name: "DataManage",
@ -393,7 +392,7 @@ export default {
let _this = this;
this.map = new mapboxgl.Map({
container: "mapbox-container",
style: "mapbox://styles/shichao123/clf3b1bxk007801moo0nnl87k",
style:"mapbox://styles/mapbox/satellite-v9",
center: [118, 25],
zoom: 14,
language: "zh-cmn",

View File

@ -143,7 +143,6 @@
},
uploadWindowShow(){
alert(111);
},
getList(){
getLayerStyleAndType().then((res) => {

View File

@ -264,6 +264,15 @@
</el-table>
</el-form-item>
</template>
<el-form-item label="动态效果" v-if="dataType == '线'">
<el-radio-group v-model="form.dynamic" style="margin-top: 12px">
<el-radio style="color: #fff" :label="true">开启</el-radio>
<el-radio style="color: #fff" :label="false">关闭</el-radio>
</el-radio-group>
</el-form-item>
</el-form>
<el-form v-else ref="form" :model="marsform" label-width="80px">
<el-form-item label="经度值">
@ -356,6 +365,7 @@
data() {
return {
dynamic:false,
resource: "样式一",
headers: {
Authorization: localStorage.getItem("X-Token") || "",
@ -373,7 +383,8 @@
roll: "",
},
form: {
styleField: ''
styleField: '',
dynamic:false,
},
tubiaourl: [],
//
@ -764,7 +775,7 @@
this.form.center = this.marsform;
this.form.popupOptions = "";
this.form.popup = this.multipleSelection
console.log(this.form)
console.log(this.form);
update({
id: this.tucengId,
style: JSON.stringify(this.form),

View File

@ -214,19 +214,16 @@ export default {
mounted() {
this.initMap();
},
methods: {
getList() {
getMonitorList(this.listQuery).then((res) => {
if (res.data.code == 200) {
this.tableData = res.data.data;
this.totle = res.data.count;
this.tableData.forEach((e) => {
let coord = WKT.parse(e.geom);
e.coord = coord.coordinates;
});
}
});
},
methods:{
getList(){
getMonitorList(this.listQuery).then(res=>{
if(res.data.code == 200){
this.tableData = res.data.data;
this.totle = res.data.count;
this.handleGeoJson();
}
})
},
initMap() {
this.$mapboxgl.accessToken =
"pk.eyJ1Ijoic2hpY2hhbzEyMyIsImEiOiJja3FobnI1aDEwNGF6Mm9vOXVhNnBzZmFhIn0.2fZKiMqCQHxVY74QShMEGQ";
@ -254,8 +251,7 @@ export default {
_this.addMonitorLayer();
_this.loadXianJieLayer();
_this.getList();
});
})
},
addMonitorLayer() {
let _this = this;
@ -373,8 +369,8 @@ export default {
},
});
},
},
};
}
}
</script>
<style scoped>