소스 검색

绘制导入接口修改

maxiaoxiao 10 달 전
부모
커밋
c1e750d6a4

+ 1 - 1
src/api/ghss/hgxfx.js

@@ -7,7 +7,7 @@ const hgxfxApi = {
     GetScx: '/apply/hgxfx/GetScxList',
     UpdateScx: '/apply/hgxfx/UpdateScx',
     // ShapeUpload:'/file/uploadShpZip',
-    ShapeUpload: '/onemap-file/saveGeom',
+    ShapeUpload: '/file/upload/geom',
     GetLog: '/apply/hgxfx/GetLog',
     AddHgxfxV1:'/apply/hgxfx/AddHgxfxV1'
 }

+ 3 - 2
src/components/TerrainAnalysis/TerrainCutFillAnalysis/TerrainCutFillAnalysisNew.vue

@@ -140,13 +140,14 @@ export default {
 
         this.loading = false;
         let pitch = Cesium.Math.toRadians(-45.0);
-        loadGeoJSON(res.data.bottomGeom, "#1E90A8", { sw: 0 }, (data) => {
+        let params = { sw: 0, fill_a: 0.8 };
+        loadGeoJSON(res.data.bottomGeom, "#1E90A8", params, (data) => {
           viewer.dataSources.add(data);
           viewer.flyTo(data, {
             offset: new Cesium.HeadingPitchRange(0, -45, 100),
           });
         });
-        loadGeoJSON(res.data.midGeom, "#ff0000", { sw: 0 }, (data) => {
+        loadGeoJSON(res.data.midGeom, "#ff0000", params, (data) => {
           viewer.dataSources.add(data);
           viewer.flyTo(data, {
             offset: new Cesium.HeadingPitchRange(0, -45, 100),

+ 1 - 1
src/components/mapView/range.vue

@@ -111,7 +111,7 @@ export default {
       formdata.append("fromRoute", this.$route.path);
       ShapeUpload(formdata).then((res) => {
         if (res.success) {
-          this.model.xzmj = res.data.muArea.toFixed(2);
+          this.model.xzmj = (res.data.area * 0.0015).toFixed(2);
           // viewer.entities.removeAll();
           this.resetDataSources();
           this.fileDataID = res.data.id;

+ 1 - 1
src/utils/MapHelper/help.js

@@ -35,7 +35,7 @@ export function loadGeoJSON(geom, yanse, adata, fun) {
     .load(geojson, {
       clampToGround: true,
       stroke: Cesium.Color.fromCssColorString(yanse),
-      fill: Cesium.Color.fromCssColorString(yanse).withAlpha(0.8), //Cesium.Color.fromCssColorString("rgba(10, 95, 152, 0.4)"), //注意:颜色必须大写,即不能为blue
+      fill: Cesium.Color.fromCssColorString(yanse).withAlpha(adata.fill_a || 0.4), //Cesium.Color.fromCssColorString("rgba(10, 95, 152, 0.4)"), //注意:颜色必须大写,即不能为blue
       strokeWidth: adata ? adata.sw : 2,
     })
     .then((data) => {