Jelajahi Sumber

refactor:静态资源添加/sddnWeihe前缀

yangqishu 3 bulan lalu
induk
melakukan
67aa0486ca

+ 19 - 19
src/views/components/layerList/index.vue

@@ -46,14 +46,14 @@ export default {
               id: '1-1',
               label: '生态区',
               children: [
-                { id: '1-1-1', label: '提防背河坡脚线', meta: { type: 'polyline', url: '/geojson/提防背河坡脚线.geojson' } },
-                { id: '1-1-2', label: '河道管理范围线', meta: { type: 'polyline', url: '/geojson/河道管理范围线.geojson' } },
-                { id: '1-1-3', label: '一级管控区界限', meta: { type: 'polyline', url: '/geojson/一二级管控区界限.geojson' } },
-                { id: '1-1-4', label: '生态区界限', meta: { type: 'polyline', url: '/geojson/生态区界限.geojson' } },
-                { id: '1-1-5', label: '城市核心区', meta: { type: 'polyline', url: '/geojson/城市核心区.geojson' } },
-                { id: '1-1-6', label: '农村区段', meta: { type: 'polyline', url: '/geojson/农村区段.geojson' } },
-                { id: '1-1-8', label: '城市核心区(右岸)', meta: { type: 'polyline', url: '/geojson/城市核心区右岸.geojson' } },
-                { id: '1-1-9', label: '农村区段(右岸)', meta: { type: 'polyline', url: '/geojson/农村区段右岸.geojson' } }
+                { id: '1-1-1', label: '提防背河坡脚线', meta: { type: 'polyline', url: '/sddnWeihe/geojson/提防背河坡脚线.geojson' } },
+                { id: '1-1-2', label: '河道管理范围线', meta: { type: 'polyline', url: '/sddnWeihe/geojson/河道管理范围线.geojson' } },
+                { id: '1-1-3', label: '一级管控区界限', meta: { type: 'polyline', url: '/sddnWeihe/geojson/一二级管控区界限.geojson' } },
+                { id: '1-1-4', label: '生态区界限', meta: { type: 'polyline', url: '/sddnWeihe/geojson/生态区界限.geojson' } },
+                { id: '1-1-5', label: '城市核心区', meta: { type: 'polyline', url: '/sddnWeihe/geojson/城市核心区.geojson' } },
+                { id: '1-1-6', label: '农村区段', meta: { type: 'polyline', url: '/sddnWeihe/geojson/农村区段.geojson' } },
+                { id: '1-1-8', label: '城市核心区(右岸)', meta: { type: 'polyline', url: '/sddnWeihe/geojson/城市核心区右岸.geojson' } },
+                { id: '1-1-9', label: '农村区段(右岸)', meta: { type: 'polyline', url: '/sddnWeihe/geojson/农村区段右岸.geojson' } }
               ]
             },
             { id: '1-2', label: '监测设备', type: 'monitor' },
@@ -61,18 +61,18 @@ export default {
               id: '1-3',
               label: '入河排水(污)口',
               children: [
-                { id: '1-3-1', label: '兴平城市总排口', meta: { type: 'point', url: '/geojson/兴平城市总排口.geojson' } },
-                { id: '1-3-2', label: '兴平城市污水处理厂排口', meta: { type: 'point', url: '/geojson/兴平城市总排口2.geojson' } },
-                { id: '1-3-3', label: '新兴纺织园污水处理厂排口', meta: { type: 'point', url: '/geojson/新兴纺织园污水处理厂排口.geojson' } }
+                { id: '1-3-1', label: '兴平城市总排口', meta: { type: 'point', url: '/sddnWeihe/geojson/兴平城市总排口.geojson' } },
+                { id: '1-3-2', label: '兴平城市污水处理厂排口', meta: { type: 'point', url: '/sddnWeihe/geojson/兴平城市总排口2.geojson' } },
+                { id: '1-3-3', label: '新兴纺织园污水处理厂排口', meta: { type: 'point', url: '/sddnWeihe/geojson/新兴纺织园污水处理厂排口.geojson' } }
               ]
             },
             {
               id: '1-4',
               label: '河道管理站',
               children: [
-                { id: '1-4-1', label: '庄头管理站', meta: { type: 'point', url: '/geojson/庄头管理站.geojson' } },
-                { id: '1-4-2', label: '汤坊管理站', meta: { type: 'point', url: '/geojson/汤坊管理站.geojson' } },
-                { id: '1-4-3', label: '阜寨管理站', meta: { type: 'point', url: '/geojson/阜寨管理站.geojson' } }
+                { id: '1-4-1', label: '庄头管理站', meta: { type: 'point', url: '/sddnWeihe/geojson/庄头管理站.geojson' } },
+                { id: '1-4-2', label: '汤坊管理站', meta: { type: 'point', url: '/sddnWeihe/geojson/汤坊管理站.geojson' } },
+                { id: '1-4-3', label: '阜寨管理站', meta: { type: 'point', url: '/sddnWeihe/geojson/阜寨管理站.geojson' } }
               ]
             }
           ]
@@ -81,17 +81,17 @@ export default {
           id: '2',
           label: '水文监测',
           children: [
-            { id: '2-1', label: '水文监测点1', meta: { type: 'point', url: '/geojson/sw1.geojson' } },
-            { id: '2-2', label: '水文监测点2', meta: { type: 'point', url: '/geojson/sw2.geojson' } }
+            { id: '2-1', label: '水文监测点1', meta: { type: 'point', url: '/sddnWeihe/geojson/sw1.geojson' } },
+            { id: '2-2', label: '水文监测点2', meta: { type: 'point', url: '/sddnWeihe/geojson/sw2.geojson' } }
           ]
         },
         {
           id: '3',
           label: '采砂区',
           children: [
-            { id: '3-1', label: '兴平市宜空采砂区', type: 'csq', meta: { type: 'polygon', url: '/geojson/宜空采砂区.geojson' } },
-            { id: '3-2', label: '兴平市团结采砂区', type: 'csq', meta: { type: 'polygon', url: '/geojson/团结采砂区.geojson' } },
-            { id: '3-3', label: '兴平市汤坊龙兴1区采砂区', type: 'csq', meta: { type: 'polygon', url: '/geojson/坊龙兴1区采砂区.geojson' } }
+            { id: '3-1', label: '兴平市宜空采砂区', type: 'csq', meta: { type: 'polygon', url: '/sddnWeihe/geojson/宜空采砂区.geojson' } },
+            { id: '3-2', label: '兴平市团结采砂区', type: 'csq', meta: { type: 'polygon', url: '/sddnWeihe/geojson/团结采砂区.geojson' } },
+            { id: '3-3', label: '兴平市汤坊龙兴1区采砂区', type: 'csq', meta: { type: 'polygon', url: '/sddnWeihe/geojson/坊龙兴1区采砂区.geojson' } }
           ]
         },
         {

+ 1 - 1
src/views/components/map/index.vue

@@ -4,7 +4,7 @@
 
 <script>
 import Vue from 'vue'
-import "mars3d/dist/mars3d.css"
+import "mars3d/mars3d.css"
 import * as mars3d from 'mars3d'
 import { warning } from '@/utils'
 // 为了方便使用,绑定到原型链,在其他vue文件,直接this.mars3d 来使用

+ 3 - 3
src/views/index.vue

@@ -112,12 +112,12 @@ export default {
     addWaterSurface(map) {
       const geoJsonLayer = new this.mars3d.layer.GeoJsonLayer({
         name: '渭河',
-        url: '/geojson/渭河.geojson',
+        url: '/sddnWeihe/geojson/渭河.geojson',
         crs: 'EPSG:4326',
         symbol: {
           type: 'water',
           styleOptions: {
-            normalMap: '/img/waterNormals.jpg',
+            normalMap: '/sddnWeihe/img/waterNormals.jpg',
             addHeight: 120,
             frequency: 8000.0, // 控制波数的数字。
             animationSpeed: 0.04, // 控制水的动画速度的数字。
@@ -136,7 +136,7 @@ export default {
     addBoundary(map) {
       const graphicLayer = new this.mars3d.layer.GraphicLayer()
       map.addLayer(graphicLayer)
-      this.mars3d.Util.fetchJson({ url: '/geojson/兴平市面.geojson' }).then((geojson) => {
+      this.mars3d.Util.fetchJson({ url: '/sddnWeihe/geojson/兴平市面.geojson' }).then((geojson) => {
         const coords = geojson.features[0].geometry.coordinates
         const positions = coords[0].length > 1 && Array.isArray(coords[0][0]) ? coords[0][0] : coords[0]
         const graphic = new this.mars3d.graphic.Mask({