From bda730037251025ed52f8ee6f486d2a1188041dc Mon Sep 17 00:00:00 2001 From: duxiaoning <17621883433@163.com> Date: Thu, 14 Dec 2023 16:46:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=9B=BE=E5=B1=82=E7=82=B9?= =?UTF-8?q?=E9=80=89=E3=80=81=E4=BF=AE=E6=94=B9=E6=B7=B1=E5=BA=A6=E5=88=86?= =?UTF-8?q?=E5=B1=82=E6=8A=BD=E6=A0=B7=EF=BC=8C=E4=BF=AE=E6=94=B9=E6=A4=8D?= =?UTF-8?q?=E8=A2=AB=E7=89=A9=E5=80=99=E6=A0=B7=E6=9C=AC=E5=B1=95=E7=A4=BA?= =?UTF-8?q?=E5=90=8D=E7=A7=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/lang/pendingOrder.js | 8 +++++ src/components/ration/otgCorrection/index.vue | 8 +++-- src/components/ration/qualitative/index.vue | 11 ++++-- src/components/ration/sampleSetting/index.vue | 2 +- src/components/ration/soilMoisture/index.vue | 9 +++-- src/lib/cesiumUtils.js | 20 +++++++---- src/lib/otgCesiumUtils.js | 35 +++++++++++++------ src/views/Daichuli/Feedback/index.vue | 1 + 8 files changed, 69 insertions(+), 25 deletions(-) diff --git a/src/api/lang/pendingOrder.js b/src/api/lang/pendingOrder.js index 28fa0ee..578c9e9 100644 --- a/src/api/lang/pendingOrder.js +++ b/src/api/lang/pendingOrder.js @@ -224,4 +224,12 @@ export function getFeatureMap(userId, orderId) { method: "get", withCredentials: true, }); +} +// 获取产品像元值 +export function getProductValue(data) { + return request({ + url: "/product/geo/pixel/value/v2", + method: "post", + data + }); } \ No newline at end of file diff --git a/src/components/ration/otgCorrection/index.vue b/src/components/ration/otgCorrection/index.vue index b818571..8b83dcf 100644 --- a/src/components/ration/otgCorrection/index.vue +++ b/src/components/ration/otgCorrection/index.vue @@ -546,8 +546,12 @@ export default { this.$store.commit("setAltRange", null); this.allSampleData.forEach((k, v) => { k.dataTime = this.formatDatetime(k.dataTime); - min = min > k.alt ? k.alt : min; - max = max < k.alt ? k.alt : max; + if (!k.alt) { + min = 0, max = 0; + } else { + min = min > k.alt ? k.alt : min; + max = max < k.alt ? k.alt : max; + } }); if (this.allSampleData.length > 0) { this.$store.commit("setAltRange", min + "," + (max + 1)); diff --git a/src/components/ration/qualitative/index.vue b/src/components/ration/qualitative/index.vue index bf68e2b..5bdf452 100644 --- a/src/components/ration/qualitative/index.vue +++ b/src/components/ration/qualitative/index.vue @@ -67,7 +67,7 @@ @@ -504,8 +504,13 @@ export default { this.$store.commit("setAltRange", null); this.allSampleData.forEach((k, v) => { k.dataTime = this.formatDatetime(k.dataTime); - min = min > k.alt ? k.alt : min; - max = max < k.alt ? k.alt : max; + const xqsmParam = JSON.parse(k.paramStr); + if (xqsmParam?.alt) { + min = min > xqsmParam.alt ? xqsmParam.alt : min; + max = max < xqsmParam.alt ? xqsmParam.alt : max; + } else { + min = 0, max = 0; + } }); if (this.allSampleData.length > 0) { this.$store.commit("setAltRange", min + "," + (max + 1)); diff --git a/src/components/ration/sampleSetting/index.vue b/src/components/ration/sampleSetting/index.vue index bb84631..17769a3 100644 --- a/src/components/ration/sampleSetting/index.vue +++ b/src/components/ration/sampleSetting/index.vue @@ -155,7 +155,7 @@ export default { ? "" : "分层深度区间不包括结束深度值;实际样本深度范围:[" + this.$store.state.altRange + - ")"; + "]"; }, }, created() {}, diff --git a/src/components/ration/soilMoisture/index.vue b/src/components/ration/soilMoisture/index.vue index 6b88615..87dfedc 100644 --- a/src/components/ration/soilMoisture/index.vue +++ b/src/components/ration/soilMoisture/index.vue @@ -474,8 +474,13 @@ export default { this.$store.commit("setAltRange", null); this.allSampleData.forEach((k, v) => { k.dataTime = this.formatDatetime(k.dataTime); - min = min > k.alt ? k.alt : min; - max = max < k.alt ? k.alt : max; + const xqsmParam = JSON.parse(k.paramStr); + if (xqsmParam.alt) { + min = min > xqsmParam.alt ? xqsmParam.alt : min; + max = max < xqsmParam.alt ? xqsmParam.alt : max; + } else { + min = 0, max = 0; + } }); if (this.allSampleData.length > 0) { this.$store.commit("setAltRange", min + "," + (max + 1)); diff --git a/src/lib/cesiumUtils.js b/src/lib/cesiumUtils.js index 49cd5c6..98759d2 100644 --- a/src/lib/cesiumUtils.js +++ b/src/lib/cesiumUtils.js @@ -1,6 +1,6 @@ import CesiumNavigation from "cesium-navigation-es6"; import configValue from "../config/config.js"; -import { getProductValue } from "@/api/common"; +import { getProductValue } from "@/api/lang/pendingOrder"; const iconClose = require("@/assets/images/close.png"); @@ -198,13 +198,19 @@ class CesiumUtils { } // 取回像元值 let pValue = 0; - const of = new FormData(); - of.append("dataPath", sessionStorage.getItem("tifPath")); - of.append("lon", longitudeString); - of.append("lat", latitudeString); - + // const of = new FormData(); + // of.append("dataPath", sessionStorage.getItem("tifPath")); + // of.append("lon", longitudeString); + // of.append("lat", latitudeString); + const of = { + angleDataIds: [], + geoX: longitudeString, + geoY: latitudeString, + metaDataId: sessionStorage.getItem('metaDataId'), + referImageIds: [] + } getProductValue(of).then(res => { - pValue = res; + if (res.code == 200) pValue = res.data.imagePixel; // 清空容器 const pendPreview = document.getElementById("PendPreview") || diff --git a/src/lib/otgCesiumUtils.js b/src/lib/otgCesiumUtils.js index 74198a2..48e03e7 100644 --- a/src/lib/otgCesiumUtils.js +++ b/src/lib/otgCesiumUtils.js @@ -1,5 +1,5 @@ import configValue from "../config/config.js"; -import { getProductValue } from "@/api/common"; +import { getProductValue } from "@/api/lang/pendingOrder"; class otgCesiumUtils { //初始化地图 static initCesium(divMapId) { @@ -248,12 +248,19 @@ class otgCesiumUtils { let pValue = 0; that.farViewer.dataSources.removeAll(); const dataSource = new Cesium.CustomDataSource("textPoint"); - const of = new FormData(); - of.append("dataPath", sessionStorage.getItem("tifPath")); - of.append("lon", longitudeString); - of.append("lat", latitudeString); + // const of = new FormData(); + // of.append("dataPath", sessionStorage.getItem("tifPath")); + // of.append("lon", longitudeString); + // of.append("lat", latitudeString); + const of = { + angleDataIds: [], + geoX: longitudeString, + geoY: latitudeString, + metaDataId: sessionStorage.getItem('metaDataId'), + referImageIds: [] + } getProductValue(of).then(res => { - pValue = res; + if (res.code == 200) pValue = res.data.imagePixel; dataSource.entities.add({ position: new Cesium.Cartesian3.fromDegrees( Number(longitudeString), @@ -299,11 +306,19 @@ class otgCesiumUtils { let pValue = 0; that.nearViewer.dataSources.removeAll(); const dataSource = new Cesium.CustomDataSource("textPoint"); - const of = new FormData(); - of.append("dataPath", sessionStorage.getItem("tifPath")); - of.append("lon", longitudeString); - of.append("lat", latitudeString); + // const of = new FormData(); + // of.append("dataPath", sessionStorage.getItem("tifPath")); + // of.append("lon", longitudeString); + // of.append("lat", latitudeString); + const of = { + angleDataIds: [], + geoX: longitudeString, + geoY: latitudeString, + metaDataId: sessionStorage.getItem('metaDataId'), + referImageIds: [] + } getProductValue(of).then(res => { + if (res.code == 200) pValue = res.data.imagePixel; dataSource.entities.add({ position: new Cesium.Cartesian3.fromDegrees( Number(longitudeString), diff --git a/src/views/Daichuli/Feedback/index.vue b/src/views/Daichuli/Feedback/index.vue index 40ae6e9..ca24895 100644 --- a/src/views/Daichuli/Feedback/index.vue +++ b/src/views/Daichuli/Feedback/index.vue @@ -324,6 +324,7 @@ export default { minLon: minLon, maxLon: maxLon, }; + sessionStorage.setItem('metaDataId', pm.metaDataId) // 加载geoserver const geoWS = pm.geoWorkspace; const geoLN = pm.geoLayerName;