diff --git a/.env.dev b/.env.dev
index 43f4b7d..afcf62b 100644
--- a/.env.dev
+++ b/.env.dev
@@ -1,8 +1,11 @@
NODE_ENV = development
# 正式服务器
-VUE_APP_BASE_API =http://221.2.83.254:9001/api
-VUE_APP_BASE_IMG_URL =http://221.2.83.254:9001
+#VUE_APP_BASE_API =http://221.2.83.254:9001/api
+#VUE_APP_BASE_IMG_URL =http://221.2.83.254:9001
+
+VUE_APP_BASE_API =http://60.217.22.180:9001/api
+VUE_APP_BASE_IMG_URL =http://60.217.22.180:9001
# 测试服务区
#VUE_APP_BASE_API = http://123.132.248.154:9224/api
#VUE_APP_BASE_IMG_URL = http://123.132.248.154:9224
diff --git a/public/config/app.json b/public/config/app.json
index 60f81cf..2dd7cca 100644
--- a/public/config/app.json
+++ b/public/config/app.json
@@ -1,5 +1,5 @@
{
- "method":"pingyixian",
+ "method":"yishuixian",
"gaodeApi": "4f992c089f9496201f6e4ea39ff3ab60",
"pingyixian":{
@@ -48,6 +48,29 @@
"griderbox":true
}
},
+ "yishuixian":{
+ "appname":"沂水县智慧林业防灭火平台",
+ "area":"沂水县",
+ "baseUrl":"http://60.217.22.180:9001",
+ "layerurl":"http://60.217.22.180:9006/applicationMars/getApplicationInfo/yishuixian",
+ "uavWebSocketUrl":"ws://123.132.248.154:9211/",
+ "map":{
+ "center":[],
+ "zoom":null
+ },
+ "waterUrl":"http://223.99.16.253:9007/geoserver/ksp/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=ksp%3Ashp_1686208018&maxFeatures=50000&outputFormat=application%2Fjson",
+ "goodsUrl":"",
+ "tools":{
+ "routebox":true,
+ "toolsbox":true,
+ "monitorbox":false,
+ "uavbox":true,
+ "waterbox":true,
+ "reportbox":true,
+ "goodsbox":true,
+ "griderbox":true
+ }
+ },
"gaoxinqu":{
"appname":"高新区森林防火电子沙盘",
"area":"高新区",
diff --git a/public/config/yishuixianConfig.json b/public/config/yishuixianConfig.json
new file mode 100644
index 0000000..2f480c0
--- /dev/null
+++ b/public/config/yishuixianConfig.json
@@ -0,0 +1,187 @@
+{
+ "map3d": {
+ "scene": {
+ "center": {
+ "lat": 35.795011,
+ "lng": 118.628869,
+ "alt": 2779,
+ "heading": 1.3,
+ "pitch": -20.5
+ },
+ "scene3DOnly": false,
+ "shadows": false,
+ "removeDblClick": true,
+ "sceneMode": 3,
+ "showSun": true,
+ "showMoon": true,
+ "showSkyBox": true,
+ "showSkyAtmosphere": true,
+ "fog": true,
+ "fxaa": true,
+ "globe": {
+ "depthTestAgainstTerrain": true,
+ "baseColor": "#546a53",
+ "showGroundAtmosphere": true,
+ "enableLighting": false
+ },
+ "cameraController": {
+ "zoomFactor": 3,
+ "minimumZoomDistance": 1,
+ "maximumZoomDistance": 50000000,
+ "enableRotate": true,
+ "enableTranslate": true,
+ "enableTilt": true,
+ "enableZoom": true,
+ "enableCollisionDetection": true
+ }
+ },
+ "control": {
+ "homeButton": true,
+ "baseLayerPicker": false,
+ "sceneModePicker": true,
+ "vrButton": true,
+ "fullscreenButton": true,
+ "navigationHelpButton": true,
+ "animation": false,
+ "timeline": false,
+ "infoBox": false,
+ "geocoder": false,
+ "selectionIndicator": false,
+ "contextmenu": {
+ "hasDefault": false
+ },
+ "mouseDownView": false,
+ "zoom": {
+ "insertIndex": 1
+ },
+ "compass": {
+ "top": "150px",
+ "left": "500px"
+ },
+ "distanceLegend": {
+ "left": "100px",
+ "bottom": "2px"
+ },
+ "locationBar": {
+ "fps": true,
+ "crs": "CGCS2000_GK_Zone_3",
+ "crsDecimal": 0,
+ "template": "
经度:{lng}
纬度:{lat}
横{crsx} 纵{crsy}
海拔:{alt}米
层级:{level}
方向:{heading}°
俯仰角:{pitch}°
视高:{cameraHeight}米
"
+ }
+ },
+ "terrain": {
+ "url": "http://data.mars3d.cn/terrain",
+ "show": true
+ },
+ "basemaps": [{
+ "id": 10,
+ "name": "地图底图",
+ "type": "group"
+ },
+ {
+ "pid": 10,
+ "name": "卫星地图",
+ "icon": "img/basemaps/tdt_img.png",
+ "type": "tdt",
+ "layer": "img_d",
+ "key": [
+ "b6585bc41ee16251dbe6b1af64f375d9"
+ ],
+ "show": true
+ },
+ {
+ "pid": 10,
+ "name": "电子地图",
+ "icon": "img/basemaps/tdt_vec.png",
+ "type": "group",
+ "layers": [{
+ "name": "底图",
+ "type": "tdt",
+ "layer": "vec_d",
+ "key": [
+ "b6585bc41ee16251dbe6b1af64f375d9"
+ ]
+ },
+ {
+ "name": "注记",
+ "type": "tdt",
+ "layer": "vec_z",
+ "key": [
+ "b6585bc41ee16251dbe6b1af64f375d9"
+ ]
+ }
+ ]
+ },
+ {
+ "pid": 10,
+ "name": "最新高清影像",
+ "type": "wms",
+ "url": "http://175.27.168.120:8080/geoserver/feixianfanghuo/wms",
+ "layers": "feixianfanghuo:feixianfanghuo",
+ "crs": "EPSG:4326",
+ "parameters": {
+ "transparent": "true",
+ "format": "image/png"
+ },
+ "showClickFeature": true,
+ "pickFeatureStyle": {
+ "clampToGround": true
+ },
+ "mapSplit": false,
+ "noCenter": true,
+ "show": false
+ }
+ ],
+ "layers": [
+ {
+ "pid": 10,
+ "name": "天地图注记",
+ "type": "tdt",
+ "layer": "img_z",
+ "key": [
+ "b6585bc41ee16251dbe6b1af64f375d9"
+ ],
+ "show": false
+ },
+ {
+ "pid": 10,
+ "name": "高清影像2022年",
+ "type": "wms",
+ "url": "http://175.27.168.120:8080/geoserver/feixian/wms",
+ "layers": "feixian:yingxiang",
+ "crs": "EPSG:4326",
+ "parameters": {
+ "transparent": "true",
+ "format": "image/png"
+ },
+ "showClickFeature": true,
+ "pickFeatureStyle": {
+ "clampToGround": true
+ },
+ "mapSplit": false,
+ "noCenter": true,
+ "show": false
+ },
+ {
+ "pid": 10,
+ "name": "高清影像2023年",
+ "type": "wms",
+ "url": "http://175.27.168.120:8080/geoserver/feixian/wms",
+ "layers": "feixian:yingxiang2023",
+ "crs": "EPSG:4326",
+ "parameters": {
+ "transparent": "true",
+ "format": "image/png"
+ },
+ "showClickFeature": true,
+ "pickFeatureStyle": {
+ "clampToGround": true
+ },
+ "mapSplit": false,
+ "noCenter": true,
+ "show": false
+ }
+
+ ]
+ }
+}
\ No newline at end of file
diff --git a/src/App.vue b/src/App.vue
index 0024610..2924d7a 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -25,7 +25,7 @@ export default {
};
},
mounted() {
- this.initWebSocket();
+ // this.initWebSocket();
},
methods: {
initWebSocket() {
diff --git a/src/components/mars3d/Map.vue b/src/components/mars3d/Map.vue
index 56c6f9b..850a36b 100644
--- a/src/components/mars3d/Map.vue
+++ b/src/components/mars3d/Map.vue
@@ -64,31 +64,36 @@ export default {
} else {
mars3d.Resource.fetchJson({ url: this.url }).then((data) => {
// 根据沂水县平邑登录获取对应的图层
- axios({
- method: "get",
- url: AppInfo[localStorage.getItem("areaName")].layerurl,
- }).then((res) => {
- let configLayers = [];
- res.data.data.forEach((item, index) => {
- let group = null;
- group = {
- id: parseInt(Math.random() * 10000000),
- name: item.serverName,
- type: "group",
- };
- configLayers.push(group);
- if (item.children && item.children.length > 0) {
- item.children.forEach((it, idx) => {
- let attribute = JSON.parse(it.attribute);
- attribute.pid = group.id;
- configLayers.push(attribute);
- });
- }
+ try{
+ axios({
+ method: "get",
+ url: AppInfo[localStorage.getItem("areaName")].layerurl,
+ }).then((res) => {
+ let configLayers = [];
+ res.data.data.forEach((item, index) => {
+ let group = null;
+ group = {
+ id: parseInt(Math.random() * 10000000),
+ name: item.serverName,
+ type: "group",
+ };
+ configLayers.push(group);
+ if (item.children && item.children.length > 0) {
+ item.children.forEach((it, idx) => {
+ let attribute = JSON.parse(it.attribute);
+ attribute.pid = group.id;
+ configLayers.push(attribute);
+ });
+ }
+ });
+ data.map3d.layers = configLayers
});
-
- data.map3d.layers = configLayers
+ }catch(e){
+ data.map3d.layers = [];
+ }finally{
this.initMars3d(data.map3d);
- });
+ }
+
// this.initMars3d(data.map3d)// 构建地图
});
}
diff --git a/src/views/navigation/index.vue b/src/views/navigation/index.vue
index 21b9675..c7b7232 100644
--- a/src/views/navigation/index.vue
+++ b/src/views/navigation/index.vue
@@ -61,7 +61,7 @@
},{
lable:"数据中心",
icon:"4",
- url:"http://223.99.16.253:9003/#/dashboard?id="+ localStorage.getItem("X-Token"),
+ url:"http://60.217.22.180:9003/#/dashboard?id="+ localStorage.getItem("X-Token"),
bgColor:"linear-gradient(180deg, #E0FF13 0%, #086D3C 100%)"
},{
lable:"管理中心",
@@ -75,7 +75,7 @@
methods: {
goDetail(item) {
if (item.lable == '数据中心') {
- window.open('http://223.99.16.253:9003/#/dashboard?id=' + localStorage.getItem("X-Token"), '_blank')
+ window.open('http://60.217.22.180:9003/#/dashboard?id=' + localStorage.getItem("X-Token"), '_blank')
}else if (item.lable == '监测中心') {
window.open('http://60.213.14.14:6088/forestry/', '_blank')
} else {