From 7a764235fcb1a840039766e81bf97721aba76980 Mon Sep 17 00:00:00 2001 From: supermap123 Date: Tue, 18 Jun 2024 11:49:13 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BC=BA=E9=99=B7=E4=BF=AE=E6=94=B9=EF=BC=9A?= =?UTF-8?q?=E6=89=AB=E6=8F=8F=E7=BA=BF=E5=B9=B3=E9=9D=A2=E5=9C=BA=E6=99=AF?= =?UTF-8?q?=E4=B8=8B=E5=A5=94=E6=BA=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SuperMap iEarth/public/locale/en.js | 1 + SuperMap iEarth/public/locale/ja.js | 1 + SuperMap iEarth/public/locale/ru.js | 1 + SuperMap iEarth/public/locale/zh.js | 1 + .../components/scan-line.vue | 23 +++++++++++++------ 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/SuperMap iEarth/public/locale/en.js b/SuperMap iEarth/public/locale/en.js index 9b365066..4f04ffb6 100644 --- a/SuperMap iEarth/public/locale/en.js +++ b/SuperMap iEarth/public/locale/en.js @@ -694,6 +694,7 @@ const local_en = { s3mNameRepeatTip:'The layer name is duplicated, please modify the current layer name', sceneNameRepeatTip:'This scene already exists, please do not add it again', refresh:"refresh", + scanNotSupportPlane:'Scanlines currently do not support flat scenes' } window.local_en = local_en; \ No newline at end of file diff --git a/SuperMap iEarth/public/locale/ja.js b/SuperMap iEarth/public/locale/ja.js index 2dd56309..a8d6e354 100644 --- a/SuperMap iEarth/public/locale/ja.js +++ b/SuperMap iEarth/public/locale/ja.js @@ -694,6 +694,7 @@ const local_ja = { s3mNameRepeatTip:'レイヤー名が重複しています。現在のレイヤー名を変更してください', sceneNameRepeatTip:'このシーンはすでに存在します。再度追加しないでください', refresh:'リフレッシュ', + scanNotSupportPlane:'スキャンラインは平面シーンをサポートしていません' } window.local_ja = local_ja; \ No newline at end of file diff --git a/SuperMap iEarth/public/locale/ru.js b/SuperMap iEarth/public/locale/ru.js index 86c29f86..b71641b4 100644 --- a/SuperMap iEarth/public/locale/ru.js +++ b/SuperMap iEarth/public/locale/ru.js @@ -694,6 +694,7 @@ const local_ru = { s3mNameRepeatTip:'Имя слоя дублируется, измените имя текущего слоя.', sceneNameRepeatTip:'Эта сцена уже существует, пожалуйста, не добавляйте ее снова', refresh:'Обновить', + scanNotSupportPlane:'Линия сканирования пока не поддерживает плоские сцены' } window.local_ru = local_ru; \ No newline at end of file diff --git a/SuperMap iEarth/public/locale/zh.js b/SuperMap iEarth/public/locale/zh.js index a918842f..7560671c 100644 --- a/SuperMap iEarth/public/locale/zh.js +++ b/SuperMap iEarth/public/locale/zh.js @@ -694,6 +694,7 @@ const local_zh = { s3mNameRepeatTip:'图层名重复,请修改当前图层名称', sceneNameRepeatTip:'该场景已存在,请勿重复添加', refresh:"刷新", + scanNotSupportPlane:'扫描线暂不支持平面场景' } window.local_zh = local_zh; \ No newline at end of file diff --git a/SuperMap iEarth/src/package/sceneSet/scene-specialEffect/components/scan-line.vue b/SuperMap iEarth/src/package/sceneSet/scene-specialEffect/components/scan-line.vue index 84b0954e..d7b71ee8 100644 --- a/SuperMap iEarth/src/package/sceneSet/scene-specialEffect/components/scan-line.vue +++ b/SuperMap iEarth/src/package/sceneSet/scene-specialEffect/components/scan-line.vue @@ -127,6 +127,7 @@ text-color="#fff" @click="addScans" style="margin-right: 0.1rem" + :disabled="isPlane" >{{ $t("add") }} import { reactive, onMounted, onBeforeUnmount, watch } from "vue"; -import { useNotification } from "naive-ui"; +import { useNotification,useMessage } from "naive-ui"; import initHandler from "@/tools/drawHandler"; const notification = useNotification(); +const message = useMessage(); type stateType = { scanMode: number; // 扫描模式 @@ -227,6 +229,9 @@ function init() { } onMounted(() => { + if(viewer.scene.mode == 1){ + message.warning($t('scanNotSupportPlane')); + } init(); setTexturesByProps(); }); @@ -239,6 +244,8 @@ onBeforeUnmount(() => { } }); +let isPlane = viewer.scene.mode == 1 ? true : false; + // 设置纹理 function setTexturesByProps() { defaultLineTextrues = defaultLineTextrues.slice(0, 1); @@ -279,13 +286,15 @@ function addCircleScans(e) { viewer.enableCursorStyle = true; document.body.classList.remove("measureCur"); let centerPosition = viewer.scene.pickPosition(e.message.position); - if (state.scanShow) { - viewer.scene.scanEffect.add(centerPosition); - return; + if (centerPosition) { + if (state.scanShow) { + viewer.scene.scanEffect.add(centerPosition); + return; + } + viewer.scene.scanEffect.centerPostion = centerPosition; + state.scanShow = true; + viewer.eventManager.removeEventListener("CLICK", addCircleScans); } - viewer.scene.scanEffect.centerPostion = centerPosition; - state.scanShow = true; - viewer.eventManager.removeEventListener("CLICK", addCircleScans); } // 扫描