From 1496203eb8194c26ff9350e4673927565df41705 Mon Sep 17 00:00:00 2001
From: Surpriseplus <845948745@qq.com>
Date: 星期四, 23 二月 2023 17:56:56 +0800
Subject: [PATCH] 综合展示图层管理添加3dTilset,资料馆下下调整,综合展示分析功能优化

---
 src/views/Synthesis/LeftMenu.vue | 1237 +++++++++++++++++++++++++++++++---------------------------
 1 files changed, 670 insertions(+), 567 deletions(-)

diff --git a/src/views/Synthesis/LeftMenu.vue b/src/views/Synthesis/LeftMenu.vue
index ebffc74..d720cc1 100644
--- a/src/views/Synthesis/LeftMenu.vue
+++ b/src/views/Synthesis/LeftMenu.vue
@@ -6,21 +6,13 @@
       v-for="(item, index) in setListTwoMenu"
       :class="{ lefMenuDivActive: showTwoMenuFlag == item.id }"
     >
-      <div
-        class="menuTwoImage"
-        :class="item.css"
-      ></div>
+      <div class="menuTwoImage" :class="item.css"></div>
       <div>{{ $t(item.label) }}</div>
     </div>
     <mapinfo ref="mapinfo" />
     <maplayer ref="maplayer" />
     <queryinfo ref="queryinfo" />
-    <input
-      type="file"
-      accept=".kml"
-      class="file"
-      style="display: none"
-    />
+    <input type="file" accept=".kml" class="file" style="display: none" />
     <input
       :accept="'.shp, .shx, .dbf, .prj'"
       style="display: none"
@@ -35,23 +27,21 @@
 </template>
 
 <script>
-
-import { transform } from 'ol/proj';
-import mapinfo from '../Tools/mapinfo.vue';
-import maplayer from '../Tools/maplayer.vue';
-import queryinfo from '../Tools/queryinfo.vue';
-import $ from 'jquery'
-import { getToken } from '@/utils/auth';
+import { transform } from "ol/proj";
+import mapinfo from "../Tools/mapinfo.vue";
+import maplayer from "../Tools/maplayer.vue";
+import queryinfo from "../Tools/queryinfo.vue";
+import $ from "jquery";
+import { getToken } from "@/utils/auth";
 import {
   OverviewMap,
   defaults as defaultControls,
   FullScreen,
   ScaleLine,
   Rotate,
-
-} from "ol/control.js"
-import * as turf from '@turf/turf';
-import { geometry } from '@turf/turf';
+} from "ol/control.js";
+import * as turf from "@turf/turf";
+import { geometry } from "@turf/turf";
 
 export default {
   components: { mapinfo, maplayer, queryinfo },
@@ -62,162 +52,160 @@
       setListTwoMenuAll: [
         [
           {
-            id: 'a1',
-            label: 'synthesis.layer',
-            name: '鍥惧眰绠$悊',
-            css: 'twoMenu_imge11',
-          },
-
-        ],
-        [
-          {
-            id: 'b1',
-            label: 'synthesis.split',
-            name: '鍒嗗睆',
-            css: 'twoMenu_imge21',
-          },
-          {
-            id: 'b2',
-            label: 'synthesis.twod',
-            name: '浜岀淮',
-            css: 'twoMenu_imge22',
-          },
-          {
-            id: 'b3',
-            label: 'synthesis.threed',
-            name: '涓夌淮',
-            css: 'twoMenu_imge23',
-          },
-          {
-            id: 'b4',
-            label: 'synthesis.full',
-            name: '鍏ㄥ浘',
-            css: 'twoMenu_imge24',
-          },
-          {
-            id: 'b5',
-            label: 'synthesis.zommin',
-            name: '鏀惧ぇ',
-            css: 'twoMenu_imge25',
-          },
-          {
-            id: 'b6',
-            label: 'synthesis.zoomout',
-            name: '缂╁皬',
-            css: 'twoMenu_imge26',
-          },
-          {
-            id: 'b7',
-            label: 'synthesis.rule',
-            name: '姣斾緥灏�',
-            css: 'twoMenu_imge27',
-          },
-          {
-            id: 'b8',
-            label: 'synthesis.compass',
-            name: '鎸囧寳閽�',
-            css: 'twoMenu_imge28',
-          },
-          {
-            id: 'b9',
-            label: 'synthesis.undergroundMode',
-            name: '鍦颁笅妯″紡',
-            css: 'twoMenu_imge29',
+            id: "a1",
+            label: "synthesis.layer",
+            name: "鍥惧眰绠$悊",
+            css: "twoMenu_imge11",
           },
         ],
         [
           {
-            id: 'c1',
-            label: 'synthesis.someroaming',
-            name: '鐐规极娓�',
-            css: 'twoMenu_imge31',
+            id: "b1",
+            label: "synthesis.split",
+            name: "鍒嗗睆",
+            css: "twoMenu_imge21",
           },
           {
-            id: 'c2',
-            label: 'synthesis.lineroaming',
-            name: '绾胯矾婕父',
-            css: 'twoMenu_imge32',
+            id: "b2",
+            label: "synthesis.twod",
+            name: "浜岀淮",
+            css: "twoMenu_imge22",
           },
           {
-            id: 'c3',
-            label: 'synthesis.mouseroaming',
-            name: '榧犳爣婕父',
-            css: 'twoMenu_imge33',
+            id: "b3",
+            label: "synthesis.threed",
+            name: "涓夌淮",
+            css: "twoMenu_imge23",
           },
           {
-            id: 'c4',
-            label: 'synthesis.snapshot',
-            name: '鍦板浘蹇収',
-            css: 'twoMenu_imge34',
+            id: "b4",
+            label: "synthesis.full",
+            name: "鍏ㄥ浘",
+            css: "twoMenu_imge24",
           },
-
+          {
+            id: "b5",
+            label: "synthesis.zommin",
+            name: "鏀惧ぇ",
+            css: "twoMenu_imge25",
+          },
+          {
+            id: "b6",
+            label: "synthesis.zoomout",
+            name: "缂╁皬",
+            css: "twoMenu_imge26",
+          },
+          {
+            id: "b7",
+            label: "synthesis.rule",
+            name: "姣斾緥灏�",
+            css: "twoMenu_imge27",
+          },
+          {
+            id: "b8",
+            label: "synthesis.compass",
+            name: "鎸囧寳閽�",
+            css: "twoMenu_imge28",
+          },
+          {
+            id: "b9",
+            label: "synthesis.undergroundMode",
+            name: "鍦颁笅妯″紡",
+            css: "twoMenu_imge29",
+          },
         ],
         [
           {
-            id: 'd1',
-            label: 'synthesis.contouranalysis',
-            name: '绛夐珮绾�',
-            css: 'twoMenu_imge41',
+            id: "c1",
+            label: "synthesis.someroaming",
+            name: "鐐规极娓�",
+            css: "twoMenu_imge31",
           },
           {
-            id: 'd2',
-            label: 'synthesis.slopeanalysis',
-            name: '鍧″害鍒嗘瀽',
-            css: 'twoMenu_imge42',
+            id: "c2",
+            label: "synthesis.lineroaming",
+            name: "绾胯矾婕父",
+            css: "twoMenu_imge32",
           },
           {
-            id: 'd3',
-            label: 'synthesis.pathanalysis',
-            name: '璺緞鍒嗘瀽',
-            css: 'twoMenu_imge43',
+            id: "c3",
+            label: "synthesis.mouseroaming",
+            name: "榧犳爣婕父",
+            css: "twoMenu_imge33",
           },
           {
-            id: 'd4',
-            label: 'synthesis.cuttinganalysis',
-            name: '鍦板舰鍓栧垏',
-            css: 'twoMenu_imge44',
+            id: "c4",
+            label: "synthesis.snapshot",
+            name: "鍦板浘蹇収",
+            css: "twoMenu_imge34",
+          },
+        ],
+        [
+          {
+            id: "d1",
+            label: "synthesis.contouranalysis",
+            name: "绛夐珮绾�",
+            css: "twoMenu_imge41",
           },
           {
-            id: 'd5',
-            label: 'synthesis.floodanalysis',
-            name: '娣规病鍒嗘瀽',
-            css: 'twoMenu_imge45',
+            id: "d2",
+            label: "synthesis.slopeanalysis",
+            name: "鍧″害鍒嗘瀽",
+            css: "twoMenu_imge42",
           },
           {
-            id: 'd6',
-            label: 'synthesis.earthworkcalculation',
-            name: '鍦熸柟閲忚绠�',
-            css: 'twoMenu_imge46',
+            id: "d3",
+            label: "synthesis.pathanalysis",
+            name: "璺緞鍒嗘瀽",
+            css: "twoMenu_imge43",
           },
           {
-            id: 'd7',
-            label: 'synthesis.crosssectionanalysis',
-            name: '涓夌淮鎴潰',
-            css: 'twoMenu_imge47',
+            id: "d4",
+            label: "synthesis.cuttinganalysis",
+            name: "鍦板舰鍓栧垏",
+            css: "twoMenu_imge44",
           },
           {
-            id: 'd8',
-            label: 'synthesis.imagecontrast',
-            name: '褰卞儚瀵规瘮',
-            css: 'twoMenu_imge48',
+            id: "d5",
+            label: "synthesis.floodanalysis",
+            name: "娣规病鍒嗘瀽",
+            css: "twoMenu_imge45",
           },
           {
-            id: 'd9',
-            label: 'synthesis.pipelineAnalysis',
-            name: '绠¢亾鍒嗘瀽',
-            css: 'twoMenu_imge49',
+            id: "d6",
+            label: "synthesis.earthworkcalculation",
+            name: "鍦熸柟閲忚绠�",
+            css: "twoMenu_imge46",
           },
           {
-            id: 'd10',
-            label: 'synthesis.flatterrain',
-            name: '鍦板舰骞虫暣',
-            css: 'twoMenu_imge410',
+            id: "d7",
+            label: "synthesis.crosssectionanalysis",
+            name: "涓夌淮鎴潰",
+            css: "twoMenu_imge47",
           },
           {
-            id: 'd11',
-            label: 'synthesis.terrainexcavation',
-            name: '鍦板舰寮�鎸�',
-            css: 'twoMenu_imge411',
+            id: "d8",
+            label: "synthesis.imagecontrast",
+            name: "褰卞儚瀵规瘮",
+            css: "twoMenu_imge48",
+          },
+          {
+            id: "d9",
+            label: "synthesis.pipelineAnalysis",
+            name: "绠¢亾鍒嗘瀽",
+            css: "twoMenu_imge49",
+          },
+          {
+            id: "d10",
+            label: "synthesis.flatterrain",
+            name: "鍦板舰骞虫暣",
+            css: "twoMenu_imge410",
+          },
+          {
+            id: "d11",
+            label: "synthesis.terrainexcavation",
+            name: "鍦板舰寮�鎸�",
+            css: "twoMenu_imge411",
           },
           {
             id: "d12",
@@ -237,73 +225,71 @@
             name: "鍦嗗舰瑙嗗煙鍒嗘瀽",
             css: "twoMenu_imge414",
           },
-
-
         ],
         [
           {
-            id: 'e1',
-            label: 'synthesis.attributequery',
-            name: '灞炴�ф煡璇�',
-            css: 'twoMenu_imge51',
+            id: "e1",
+            label: "synthesis.attributequery",
+            name: "灞炴�ф煡璇�",
+            css: "twoMenu_imge51",
           },
           {
-            id: 'e2',
-            label: 'synthesis.rangequery',
-            name: '绌洪棿鏌ヨ',
-            css: 'twoMenu_imge52',
+            id: "e2",
+            label: "synthesis.rangequery",
+            name: "绌洪棿鏌ヨ",
+            css: "twoMenu_imge52",
           },
         ],
         [
           {
-            id: 'f1',
-            label: 'synthesis.gpsrtk',
-            name: '鍧愭爣瀹氫綅',
-            css: 'twoMenu_imge61',
+            id: "f1",
+            label: "synthesis.gpsrtk",
+            name: "鍧愭爣瀹氫綅",
+            css: "twoMenu_imge61",
           },
           {
-            id: 'f2',
-            label: 'synthesis.placenamelocation',
-            name: '鍦板悕瀹氫綅',
-            css: 'twoMenu_imge62',
+            id: "f2",
+            label: "synthesis.placenamelocation",
+            name: "鍦板悕瀹氫綅",
+            css: "twoMenu_imge62",
           },
         ],
         [
           {
-            id: 'j1',
-            label: 'synthesis.synthobj.m1',
-            name: '琛ㄩ潰璺濈',
-            css: 'twoMenu_imge71',
+            id: "j1",
+            label: "synthesis.synthobj.m1",
+            name: "琛ㄩ潰璺濈",
+            css: "twoMenu_imge71",
           },
           {
-            id: 'j2',
-            label: 'synthesis.synthobj.m4',
-            name: '鍨傜洿楂樺害',
-            css: 'twoMenu_imge72',
+            id: "j2",
+            label: "synthesis.synthobj.m4",
+            name: "鍨傜洿楂樺害",
+            css: "twoMenu_imge72",
           },
           {
-            id: 'j3',
-            label: 'synthesis.synthobj.m6',
-            name: '骞抽潰闈㈢Н',
-            css: 'twoMenu_imge73',
+            id: "j3",
+            label: "synthesis.synthobj.m6",
+            name: "骞抽潰闈㈢Н",
+            css: "twoMenu_imge73",
           },
           {
-            id: 'j4',
-            label: 'synthesis.synthobj.m7',
-            name: '浣撶Н',
-            css: 'twoMenu_imge74',
+            id: "j4",
+            label: "synthesis.synthobj.m7",
+            name: "浣撶Н",
+            css: "twoMenu_imge74",
           },
           {
-            id: 'j5',
-            label: 'synthesis.synthobj.m5',
-            name: '琛ㄩ潰闈㈢Н',
-            css: 'twoMenu_imge75',
+            id: "j5",
+            label: "synthesis.synthobj.m5",
+            name: "琛ㄩ潰闈㈢Н",
+            css: "twoMenu_imge75",
           },
           {
-            id: 'j6',
-            label: 'synthesis.synthobj.m2',
-            name: '绌洪棿璺濈',
-            css: 'twoMenu_imge76',
+            id: "j6",
+            label: "synthesis.synthobj.m2",
+            name: "绌洪棿璺濈",
+            css: "twoMenu_imge76",
           },
           {
             id: "j7",
@@ -314,87 +300,88 @@
         ],
         [
           {
-            id: 'h1',
-            label: 'synthesis.point',
-            name: '鐐�',
-            css: 'twoMenu_imge81',
+            id: "h1",
+            label: "synthesis.point",
+            name: "鐐�",
+            css: "twoMenu_imge81",
           },
           {
-            id: 'h8',
-            label: 'synthesis.addlabel',
-            name: '鏂囧瓧',
-            css: 'twoMenu_imge88',
+            id: "h8",
+            label: "synthesis.addlabel",
+            name: "鏂囧瓧",
+            css: "twoMenu_imge88",
           },
           {
-            id: 'h2',
-            label: 'synthesis.line',
-            name: '绾�',
-            css: 'twoMenu_imge82',
+            id: "h2",
+            label: "synthesis.line",
+            name: "绾�",
+            css: "twoMenu_imge82",
           },
           {
-            id: 'h3',
-            label: 'synthesis.rectangle',
-            name: '鐭╁舰',
-            css: 'twoMenu_imge83',
+            id: "h3",
+            label: "synthesis.rectangle",
+            name: "鐭╁舰",
+            css: "twoMenu_imge83",
           },
           {
-            id: 'h4',
-            label: 'synthesis.polygon',
-            name: '澶氳竟褰�',
-            css: 'twoMenu_imge84',
+            id: "h4",
+            label: "synthesis.polygon",
+            name: "澶氳竟褰�",
+            css: "twoMenu_imge84",
           },
           {
-            id: 'h5',
-            label: 'synthesis.import',
-            name: '瀵煎叆KML',
-            css: 'twoMenu_imge85',
+            id: "h5",
+            label: "synthesis.import",
+            name: "瀵煎叆KML",
+            css: "twoMenu_imge85",
           },
           {
-            id: 'h6',
-            label: 'synthesis.export',
-            name: '瀵煎嚭KML',
-            css: 'twoMenu_imge86',
+            id: "h6",
+            label: "synthesis.export",
+            name: "瀵煎嚭KML",
+            css: "twoMenu_imge86",
           },
 
           {
-            id: 'h9',
-            label: 'synthesis.import1',
-            name: '瀵煎叆SHP',
-            css: 'twoMenu_imge85',
+            id: "h9",
+            label: "synthesis.import1",
+            name: "瀵煎叆SHP",
+            css: "twoMenu_imge85",
           },
           {
-            id: 'h10',
-            label: 'synthesis.export1',
-            name: '瀵煎嚭SHP',
-            css: 'twoMenu_imge86',
+            id: "h10",
+            label: "synthesis.export1",
+            name: "瀵煎嚭SHP",
+            css: "twoMenu_imge86",
           },
 
-
           {
-            id: 'h7',
-            label: 'synthesis.removepaint',
-            name: '娓呴櫎',
-            css: 'twoMenu_imge87',
+            id: "h7",
+            label: "synthesis.removepaint",
+            name: "娓呴櫎",
+            css: "twoMenu_imge87",
           },
-        ], [
+        ],
+        [
           {
-            id: 'i1',
-            name: '鍦烘櫙鎻愬彇',
-            label: 'synthesis.sceneExtraction',
-            css: 'twoMenu_imge12',
+            id: "i1",
+            name: "鍦烘櫙鎻愬彇",
+            label: "synthesis.sceneExtraction",
+            css: "twoMenu_imge12",
           },
           {
-            id: 'i2',
-            label: 'synthesis.release',
-            name: '鍦烘櫙鍙戝竷',
-            css: 'twoMenu_imge13',
-          }, {
-            id: 'i3',
-            label: 'synthesis.tdisplay',
-            name: '涓夌淮婕旂ず',
-            css: 'twoMenu_imge35',
+            id: "i2",
+            label: "synthesis.release",
+            name: "鍦烘櫙鍙戝竷",
+            css: "twoMenu_imge13",
           },
-        ]
+          {
+            id: "i3",
+            label: "synthesis.tdisplay",
+            name: "涓夌淮婕旂ず",
+            css: "twoMenu_imge35",
+          },
+        ],
       ],
       isRuler: false,
       isNaviget: false,
@@ -406,6 +393,9 @@
       Excavation: false,
       entityaLayers: [],
       isMenuFlag: null,
+      isRouter: false, //璺緞鍒嗘瀽
+      isPiple: false, //绠¢亾鍒嗘瀽
+      DXZPState: null, //鍦板舰鏁村钩
     };
   },
   methods: {
@@ -424,7 +414,7 @@
       if (this.isMenuFlag == "d") {
         this.clearAllAnalsy();
       }
-      if (this.isMenuFlag !=val) {
+      if (this.isMenuFlag != val) {
         sgworld.Creator.SimpleGraphic.clear();
         this.isMenuFlag = val;
         if (this.entityaLayers.length != 0) {
@@ -446,100 +436,97 @@
       this.showTwoMenuFlag = res.id;
 
       switch (val) {
-
-        
-
-        case 'a': //鍥惧眰绠$悊
-
+        case "a": //鍥惧眰绠$悊
           this.setCoverage(res.id);
           break;
-        case 'b':
+        case "b":
           this.setViewport(res.id);
           break;
-        case 'c':
+        case "c":
           this.setWander(res.id);
           break;
-        case 'd':
+        case "d":
           this.setAnalsy(res.id);
           break;
-        case 'e':
+        case "e":
           this.setIquery(res.id);
           break;
-        case 'f':
+        case "f":
           this.setOrientation(res.id);
           break;
-        case 'j':
+        case "j":
           this.setMeasurement(res.id);
           break;
-        case 'h':
+        case "h":
           sgworld.Creator.SimpleGraphic.edit(true, { editProp: true });
           this.setPlot(res.id);
           break;
-
       }
     },
     setPlot(res) {
       switch (res) {
-        case 'h1':
+        case "h1":
           sgworld.Creator.createSimpleGraphic(
-            'point',
+            "point",
             {},
-            function (entity) { }
+            function (entity) {}
           );
           break;
-        case 'h2':
+        case "h2":
           sgworld.Creator.createSimpleGraphic(
-            'polyline',
+            "polyline",
             {},
-            function (entity) { }
+            function (entity) {}
           );
           break;
-        case 'h3':
+        case "h3":
           sgworld.Creator.createSimpleGraphic(
-            'rectangle',
+            "rectangle",
             {},
-            function (entity) { }
+            function (entity) {}
           );
           break;
-        case 'h4':
+        case "h4":
           sgworld.Creator.createSimpleGraphic(
-            'polygon',
+            "polygon",
             {},
-            function (entity) { }
+            function (entity) {}
           );
           break;
-        case 'h5':
+        case "h5":
           this.handleOpenClick();
           break;
-        case 'h6':
+        case "h6":
           this.handleSaveClick();
           break;
-        case 'h9':
+        case "h9":
           // this.handleOpenShp();
           $("#shpFile").click();
           break;
-        case 'h10':
+        case "h10":
           this.handleSaveShp();
           break;
-        case 'h7':
+        case "h7":
           sgworld.Creator.SimpleGraphic.clear();
           for (var i in this.entityaLayers) {
             sgworld.Viewer.entities.remove(this.entityaLayers[i]);
           }
           this.entityaLayers = [];
           break;
-        case 'h8':
-          sgworld.Creator.createSimpleGraphic('label', {}, function (entity) {
-
-          });
+        case "h8":
+          sgworld.Creator.createSimpleGraphic(
+            "label",
+            {},
+            function (entity) {}
+          );
           break;
       }
     },
     handleSaveClick() {
       let funDownload = function (content, filename) {
-        let eleLink = document.createElement('a');
+        let eleLink = document.createElement("a");
         eleLink.download = filename;
-        eleLink.style.display = 'none';
+        eleLink.style.display = "none";
         // 瀛楃鍐呭杞彉鎴恇lob鍦板潃
         let blob = new Blob([content]);
         eleLink.href = URL.createObjectURL(blob);
@@ -567,14 +554,13 @@
         console.log(entities);
         // let promise = Cesium.exportKml({ entities: entities });
         promise.then(function (e) {
-          funDownload(e.kml, new Date().getTime() + '.kml');
+          funDownload(e.kml, new Date().getTime() + ".kml");
         });
       } else {
-        alert('褰撳墠鍦烘櫙娌℃湁entities瀹炰綋');
+        alert("褰撳墠鍦烘櫙娌℃湁entities瀹炰綋");
       }
     },
     handleSaveShp() {
-
       var entities = sgworld.Viewer.entities.values;
       if (entities.length == 0) {
         return;
@@ -582,87 +568,105 @@
       var std = [];
       for (var i in entities) {
         var type, fillColor, alpha, wkt, name;
-        var bak = {}
+        var bak = {};
 
         if (entities[i].name) {
-
-          name = entities[i].name
+          name = entities[i].name;
         }
         if (entities[i].properties) {
-
           var properties = entities[i].properties.propertyNames;
           for (var j in properties) {
             bak[properties[j]] = entities[i].properties[properties[j]]._value;
           }
         } else {
           bak = {
-            "name": entities[i].name
-          }
+            name: entities[i].name,
+          };
         }
-        if (entities[i].rectangle) {//鐭╁舰
-          type = 'rectangle'
-          var east = Cesium.Math.toDegrees(entities[i].rectangle.coordinates.getValue().east);
-          var north = Cesium.Math.toDegrees(entities[i].rectangle.coordinates.getValue().north);
-          var west = Cesium.Math.toDegrees(entities[i].rectangle.coordinates.getValue().west);
-          var south = Cesium.Math.toDegrees(entities[i].rectangle.coordinates.getValue().south);
-          var line = turf.polygon([[[east, north], [west, north], [west, south], [east, south], [east, north]]])
-          wkt = this.$wkt.convert(line.geometry)
+        if (entities[i].rectangle) {
+          //鐭╁舰
+          type = "rectangle";
+          var east = Cesium.Math.toDegrees(
+            entities[i].rectangle.coordinates.getValue().east
+          );
+          var north = Cesium.Math.toDegrees(
+            entities[i].rectangle.coordinates.getValue().north
+          );
+          var west = Cesium.Math.toDegrees(
+            entities[i].rectangle.coordinates.getValue().west
+          );
+          var south = Cesium.Math.toDegrees(
+            entities[i].rectangle.coordinates.getValue().south
+          );
+          var line = turf.polygon([
+            [
+              [east, north],
+              [west, north],
+              [west, south],
+              [east, south],
+              [east, north],
+            ],
+          ]);
+          wkt = this.$wkt.convert(line.geometry);
           var fill = entities[i].rectangle._material._color._value;
-          fillColor = fill.red + ',' + fill.green + ',' + fill.blue;
+          fillColor = fill.red + "," + fill.green + "," + fill.blue;
           alpha = fill.alpha;
-        } else if (entities[i].point) {//鐐�
-          type = 'point'
+        } else if (entities[i].point) {
+          //鐐�
+          type = "point";
           let ellipsoid = Viewer.scene.globe.ellipsoid;
-          let cartographic = ellipsoid.cartesianToCartographic(entities[i].position.getValue());
+          let cartographic = ellipsoid.cartesianToCartographic(
+            entities[i].position.getValue()
+          );
           let lat = Cesium.Math.toDegrees(cartographic.latitude);
           let lng = Cesium.Math.toDegrees(cartographic.longitude);
           let alt = cartographic.height;
-          let point = turf.point([lng, lat, alt])
-          wkt = this.$wkt.convert(point.geometry)
+          let point = turf.point([lng, lat, alt]);
+          wkt = this.$wkt.convert(point.geometry);
           var fill = entities[i].point._color._value;
-          fillColor = fill.red + ',' + fill.green + ',' + fill.blue;
+          fillColor = fill.red + "," + fill.green + "," + fill.blue;
           alpha = fill.alpha;
-
-
         } else if (entities[i].polygon) {
-          type = 'polygon';
+          type = "polygon";
           var fill = entities[i].polygon._material._color._value;
-          fillColor = fill.red + ',' + fill.green + ',' + fill.blue;
+          fillColor = fill.red + "," + fill.green + "," + fill.blue;
           alpha = fill.alpha;
           var geometry = entities[i].polygon.hierarchy.getValue().positions;
           var coordinates = [];
           for (var k in geometry) {
-            coordinates.push(this.setCartesianToEightFour(geometry[k]))
+            coordinates.push(this.setCartesianToEightFour(geometry[k]));
           }
           if (coordinates[0] != coordinates[1]) {
-            coordinates.push(coordinates[0])
+            coordinates.push(coordinates[0]);
           }
-          var polygon = turf.polygon([coordinates])
-          wkt = this.$wkt.convert(polygon.geometry)
+          var polygon = turf.polygon([coordinates]);
+          wkt = this.$wkt.convert(polygon.geometry);
         } else if (entities[i].polyline) {
           type = "polyline";
           var coordinates = [];
           var geometry = entities[i].polyline.positions.getValue();
           for (var k in geometry) {
-            coordinates.push(this.setCartesianToEightFour(geometry[k]))
+            coordinates.push(this.setCartesianToEightFour(geometry[k]));
           }
-          var polyline = turf.lineString(coordinates)
-          wkt = this.$wkt.convert(polyline.geometry)
+          var polyline = turf.lineString(coordinates);
+          wkt = this.$wkt.convert(polyline.geometry);
 
           var fill = entities[i].polyline._material._color._value;
-          fillColor = fill.red + ',' + fill.green + ',' + fill.blue;
+          fillColor = fill.red + "," + fill.green + "," + fill.blue;
           alpha = fill.alpha;
         } else if (entities[i].label) {
           type = "label";
           let ellipsoid = Viewer.scene.globe.ellipsoid;
-          let cartographic = ellipsoid.cartesianToCartographic(entities[i].position.getValue());
+          let cartographic = ellipsoid.cartesianToCartographic(
+            entities[i].position.getValue()
+          );
           let lat = Cesium.Math.toDegrees(cartographic.latitude);
           let lng = Cesium.Math.toDegrees(cartographic.longitude);
           let alt = cartographic.height;
-          let point = turf.point([lng, lat, alt])
-          wkt = this.$wkt.convert(point.geometry)
+          let point = turf.point([lng, lat, alt]);
+          wkt = this.$wkt.convert(point.geometry);
           var fill = entities[i].label.backgroundColor._value;
-          fillColor = fill.red + ',' + fill.green + ',' + fill.blue;
+          fillColor = fill.red + "," + fill.green + "," + fill.blue;
           alpha = fill.alpha;
         }
         std.push({
@@ -672,31 +676,34 @@
           opacity: alpha,
           name: name,
           bak: JSON.stringify(bak),
-          wkt: wkt
-        })
+          wkt: wkt,
+        });
       }
       $.ajax({
         url: BASE_URL + "/comprehensive/downloadShp?token=" + getToken(),
         type: "POST",
         data: JSON.stringify(std),
-        dataType: 'json', // html銆乯son銆乯sonp銆乻cript銆乼ext
+        dataType: "json", // html銆乯son銆乯sonp銆乻cript銆乼ext
         contentType: "application/json", // "application/x-www-form-urlencoded"
         success: (rs) => {
           if (rs && rs.code == 200) {
-            var a = document.createElement('a'); // 鍒涘缓涓�涓猘鏍囩鍏冪礌
-            a.style.display = 'none'; // 璁剧疆鍏冪礌涓嶅彲瑙�
+            var a = document.createElement("a"); // 鍒涘缓涓�涓猘鏍囩鍏冪礌
+            a.style.display = "none"; // 璁剧疆鍏冪礌涓嶅彲瑙�
 
-            a.href = BASE_URL + "/comprehensive/downloadFile?token=" + getToken() + "&guid=" + rs.result;
+            a.href =
+              BASE_URL +
+              "/comprehensive/downloadFile?token=" +
+              getToken() +
+              "&guid=" +
+              rs.result;
 
             document.body.appendChild(a); // 鍔犲叆
             a.click(); // 瑙﹀彂鐐瑰嚮,涓嬭浇
             document.body.removeChild(a); // 閲婃斁
           }
         },
-        error: function (e) {
-        }
+        error: function (e) {},
       });
-
     },
     handleOpenShp() {
       var formData = new FormData();
@@ -724,35 +731,36 @@
         processData: false,
         contentType: false,
         success: function (rs) {
-
           if (rs.code == 200) {
             that.showShpEntity(rs.result);
           }
         },
         error: function (e) {
           console.error(e);
-        }
+        },
       });
 
-      document.getElementById("shpFile").value = ""
-
+      document.getElementById("shpFile").value = "";
     },
     showShpEntity(res) {
-
       for (var i in res) {
         var wkt = this.$wkt.parse(res[i].wkt);
         var fillColor = res[i].fillColor.split(",");
-        var color = new Cesium.Color(parseFloat(fillColor[0]), parseFloat(fillColor[1]), parseFloat(fillColor[2]), res[i].opacity);
-        var name = res[i].name
+        var color = new Cesium.Color(
+          parseFloat(fillColor[0]),
+          parseFloat(fillColor[1]),
+          parseFloat(fillColor[2]),
+          res[i].opacity
+        );
+        var name = res[i].name;
         switch (res[i].type) {
-          case 'rectangle':
-          case 'polygon':
-
+          case "rectangle":
+          case "polygon":
             var std = [];
             var geo = wkt.coordinates[0];
             for (var i in geo) {
-              std.push(geo[i][0])
-              std.push(geo[i][1])
+              std.push(geo[i][0]);
+              std.push(geo[i][1]);
             }
             var entity = Viewer.entities.add({
               name: name,
@@ -762,14 +770,17 @@
                 material: color,
                 outline: true,
                 outlineColor: color,
-              }
-            })
-            this.entityaLayers.push(entity)
+              },
+            });
+            this.entityaLayers.push(entity);
             break;
-          case 'point':
+          case "point":
             let point = Viewer.entities.add({
               name: name,
-              position: Cesium.Cartesian3.fromDegrees(wkt.coordinates[0], wkt.coordinates[1]), //缁忕含搴﹁浆涓栫晫鍧愭爣
+              position: Cesium.Cartesian3.fromDegrees(
+                wkt.coordinates[0],
+                wkt.coordinates[1]
+              ), //缁忕含搴﹁浆涓栫晫鍧愭爣
               point: {
                 show: true,
                 color: color,
@@ -781,14 +792,14 @@
               },
             });
 
-            this.entityaLayers.push(point)
+            this.entityaLayers.push(point);
             break;
-          case 'polyline':
+          case "polyline":
             var std = [];
             var geo = wkt.coordinates;
             for (var i in geo) {
-              std.push(geo[i][0])
-              std.push(geo[i][1])
+              std.push(geo[i][0]);
+              std.push(geo[i][1]);
             }
             let line = Viewer.entities.add({
               name: name,
@@ -798,25 +809,28 @@
                 width: 10,
                 material: color,
                 clampToGround: true,
-              }
-            })
+              },
+            });
 
-            this.entityaLayers.push(line)
+            this.entityaLayers.push(line);
             break;
-          case 'label':
+          case "label":
             const label = Viewer.entities.add({
-              position: Cesium.Cartesian3.fromDegrees(wkt.coordinates[0], wkt.coordinates[1]),
+              position: Cesium.Cartesian3.fromDegrees(
+                wkt.coordinates[0],
+                wkt.coordinates[1]
+              ),
               label: {
                 text: name,
                 fillColor: color,
-                font: '28px',
+                font: "28px",
                 horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
                 verticalOrigin: Cesium.VerticalOrigin.TOP,
                 heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
                 disableDepthTestDistance: Number.POSITIVE_INFINITY,
               },
-            })
-            this.entityaLayers.push(label)
+            });
+            this.entityaLayers.push(label);
             break;
         }
       }
@@ -829,13 +843,13 @@
       let lat = Cesium.Math.toDegrees(cartographic.latitude);
       let lng = Cesium.Math.toDegrees(cartographic.longitude);
       let alt = cartographic.height;
-      std = [lng, lat, alt]
+      std = [lng, lat, alt];
       return std;
     },
     handleOpenClick() {
       var that = this;
       sgworld.Creator.SimpleGraphic.edit(true, { editProp: true });
-      let fileInput = document.querySelector('.file');
+      let fileInput = document.querySelector(".file");
       fileInput.onchange = function (evt) {
         let files = evt.target.files;
         if (files.length > 0) {
@@ -880,26 +894,39 @@
       fileInput.click();
     },
     setLayerScene() {
-
       var URL = window.location.href.split("#");
-      this.openwindow({ url: URL[0] + 'LfSKyline/index.html' });
+      this.openwindow({ url: URL[0] + "LfSKyline/index.html" });
     },
 
     openwindow(data) {
-      var url = data.url;                                          //杞悜缃戦〉鐨勫湴鍧�;  
-      var name = data.title || '閫夋嫨瑕佹坊鍔犵殑椤甸潰';                  //缃戦〉鍚嶇О锛屽彲涓虹┖;  
-      var iWidth = window.screen.width;                           //寮瑰嚭绐楀彛鐨勫搴�;  
-      var iHeight = window.screen.height;      //寮瑰嚭绐楀彛鐨勯珮搴�;
-      var iTop = 0       //鑾峰緱绐楀彛鐨勫瀭鐩翠綅缃�;  
-      var iLeft = 0;        //鑾峰緱绐楀彛鐨勬按骞充綅缃�;  
-      window.open(url, name, 'height=' + iHeight + ',,innerHeight=' + iHeight + ',width=' + iWidth + ',innerWidth=' + iWidth + ',top=' + iTop + ',left=' + iLeft + ',toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no');
+      var url = data.url; //杞悜缃戦〉鐨勫湴鍧�;
+      var name = data.title || "閫夋嫨瑕佹坊鍔犵殑椤甸潰"; //缃戦〉鍚嶇О锛屽彲涓虹┖;
+      var iWidth = window.screen.width; //寮瑰嚭绐楀彛鐨勫搴�;
+      var iHeight = window.screen.height; //寮瑰嚭绐楀彛鐨勯珮搴�;
+      var iTop = 0; //鑾峰緱绐楀彛鐨勫瀭鐩翠綅缃�;
+      var iLeft = 0; //鑾峰緱绐楀彛鐨勬按骞充綅缃�;
+      window.open(
+        url,
+        name,
+        "height=" +
+          iHeight +
+          ",,innerHeight=" +
+          iHeight +
+          ",width=" +
+          iWidth +
+          ",innerWidth=" +
+          iWidth +
+          ",top=" +
+          iTop +
+          ",left=" +
+          iLeft +
+          ",toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no"
+      );
     },
-
-
 
     setMeasurement(res) {
       switch (res) {
-        case 'j1':
+        case "j1":
           var measure = window.sgworld.Command.execute(
             0,
             2,
@@ -907,11 +934,11 @@
             (data) => {
               data.id = window.sgworld.Core.getuid();
               this.measureData.set(data.id, measure);
-              this.openMeasureResultInfo('琛ㄩ潰璺濈', data);
+              this.openMeasureResultInfo("琛ㄩ潰璺濈", data);
             }
           );
           break;
-        case 'j6':
+        case "j6":
           var measure = window.sgworld.Command.execute(
             0,
             10,
@@ -919,7 +946,7 @@
             (data) => {
               data.id = window.sgworld.Core.getuid();
               this.measureData.set(data.id, measure);
-              this.openMeasureResultInfo('绌洪棿璺濈', data);
+              this.openMeasureResultInfo("绌洪棿璺濈", data);
             }
           );
           break;
@@ -930,11 +957,10 @@
         //     this.measureData.set(data.id, measure);
         //     this.openMeasureResultInfo('骞抽潰闈㈢Н', data);
 
-
         //   });
 
         //   break;
-        case 'j2':
+        case "j2":
           var measure = window.sgworld.Command.execute(
             0,
             5,
@@ -942,11 +968,11 @@
             (data) => {
               data.id = window.sgworld.Core.getuid();
               this.measureData.set(data.id, measure);
-              this.openMeasureResultInfo('鍨傜洿楂樺害', data);
+              this.openMeasureResultInfo("鍨傜洿楂樺害", data);
             }
           );
           break;
-        case 'j5':
+        case "j5":
           var measure = window.sgworld.Command.execute(
             0,
             8,
@@ -958,11 +984,11 @@
             (data) => {
               data.id = window.sgworld.Core.getuid();
               this.measureData.set(data.id, measure);
-              this.openMeasureResultInfo('琛ㄩ潰闈㈢Н', data);
+              this.openMeasureResultInfo("琛ㄩ潰闈㈢Н", data);
             }
           );
           break;
-        case 'j3':
+        case "j3":
           var measure = window.sgworld.Command.execute(
             0,
             3,
@@ -970,30 +996,31 @@
             (data) => {
               data.id = window.sgworld.Core.getuid();
               this.measureData.set(data.id, measure);
-              this.openMeasureResultInfo('骞抽潰闈㈢Н', data);
+              this.openMeasureResultInfo("骞抽潰闈㈢Н", data);
             }
           );
           break;
-        case 'j4':
+        case "j4":
           var volumetricMeasurementTool =
             window.sgworld.Creator.createVolumetricMeasureTool();
           volumetricMeasurementTool.startDrawing(
             { ...this.colorAll, onlyTerrain: false },
-            'auto',
+            "auto",
             (data) => {
               if (volumetricMeasurementTool.popupData) {
-                volumetricMeasurementTool.popupData.value = `濉柟锛�${data.volume.fill.toFixed(4) + data.unit.fill
-                  }<br>鎸栨柟锛�${data.volume.dig.toFixed(4) + data.unit.dig}`;
+                volumetricMeasurementTool.popupData.value = `濉柟锛�${
+                  data.volume.fill.toFixed(4) + data.unit.fill
+                }<br>鎸栨柟锛�${data.volume.dig.toFixed(4) + data.unit.dig}`;
               } else {
                 data.id = window.sgworld.Core.getuid();
                 this.measureData.set(data.id, volumetricMeasurementTool);
-                let popupData = this.openMeasureResultInfo('浣撶Н鏂归噺', data);
+                let popupData = this.openMeasureResultInfo("浣撶Н鏂归噺", data);
                 volumetricMeasurementTool.popupData = popupData;
               }
             }
           );
           break;
-        case 'j8':
+        case "j8":
           var measure = window.sgworld.Command.execute(
             0,
             12,
@@ -1001,7 +1028,7 @@
             (data) => {
               data.id = window.sgworld.Core.getuid();
               this.measureData.set(data.id, measure);
-              this.openMeasureResultInfo('瑙掑害', data);
+              this.openMeasureResultInfo("瑙掑害", data);
             }
           );
           break;
@@ -1010,40 +1037,41 @@
             1,
             11,
             this.colorAll,
-            data => {
-              data.id = window.sgworld.Core.getuid()
-              this.measureData.set(data.id, measure)
-              this.openMeasureResultInfo("娴锋嫈楂樺害", data)
+            (data) => {
+              data.id = window.sgworld.Core.getuid();
+              this.measureData.set(data.id, measure);
+              this.openMeasureResultInfo("娴锋嫈楂樺害", data);
             }
-          )
-          break
+          );
+          break;
       }
     },
     openMeasureResultInfo(name, data) {
-      let info = '';
+      let info = "";
       switch (name) {
-        case '琛ㄩ潰璺濈':
-        case '绌洪棿璺濈':
-          info = '鎬婚暱搴︼細' + data.distance[data.distance.length - 1];
+        case "琛ㄩ潰璺濈":
+        case "绌洪棿璺濈":
+          info = "鎬婚暱搴︼細" + data.distance[data.distance.length - 1];
           break;
-        case '娴锋嫈楂樺害':
-          info = '楂樺害锛�' + data.height;
+        case "娴锋嫈楂樺害":
+          info = "楂樺害锛�" + data.height;
           break;
-        case '鍨傜洿楂樺害':
+        case "鍨傜洿楂樺害":
           info = `${data.gddistance}<br>${data.kjdistance}<br>${data.spdistance}`;
           break;
-        case '琛ㄩ潰闈㈢Н':
-        case '骞抽潰闈㈢Н':
+        case "琛ㄩ潰闈㈢Н":
+        case "骞抽潰闈㈢Н":
           info = data.mj;
           break;
-        case '瑙掑害':
+        case "瑙掑害":
           data.labels.forEach((label) => {
-            info += label.label.text.getValue() + '<br>';
+            info += label.label.text.getValue() + "<br>";
           });
           break;
-        case '浣撶Н鏂归噺':
-          info = `濉柟锛�${data.volume.fill.toFixed(4) + data.unit.fill
-            }<br>鎸栨柟锛�${data.volume.dig.toFixed(4) + data.unit.dig}`;
+        case "浣撶Н鏂归噺":
+          info = `濉柟锛�${
+            data.volume.fill.toFixed(4) + data.unit.fill
+          }<br>鎸栨柟锛�${data.volume.dig.toFixed(4) + data.unit.dig}`;
           break;
       }
       return (
@@ -1075,13 +1103,13 @@
     },
     setIquery(res) {
       switch (res) {
-        case 'e2':
+        case "e2":
           this.$store.state.mapMenuBoolean = true;
-          this.$store.state.mapMenuBoxFlag = '1';
+          this.$store.state.mapMenuBoxFlag = "1";
           break;
-        case 'e1':
+        case "e1":
           this.$store.state.mapMenuBoolean = true;
-          this.$store.state.mapMenuBoxFlag = '2';
+          this.$store.state.mapMenuBoxFlag = "2";
           break;
       }
     },
@@ -1099,101 +1127,141 @@
       //     break;
       // }
     },
-
-
+    ClearDraw() {
+      //console.log(sgworld);
+      //   console.log(sgworld.drawObj.drawHandler);
+      //   sgworld.drawObj.drawHandler.destroy();
+      // 聽 sgworld.drawObj.end()
+    },
 
     setAnalsy(res) {
       //this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close("queryinfo");
+
       var that = this;
       switch (res) {
-        case 'd1':
+        case "d1": //绛夐珮绾垮垎鏋�
           that.isolineFlag = !that.isolineFlag;
           elevationTool.tf = that.isolineFlag;
           elevationTool.render();
           break;
-        case 'd2':
+        case "d2": //鍧″害鍒嗘瀽
           that.isslopeFlag = !that.isslopeFlag;
-          window.PDelevationTool= new SmartEarth.ElevationTool(sgworld);//鍏ㄥ眬鍙橀噺
+          window.PDelevationTool = new SmartEarth.ElevationTool(sgworld); //鍏ㄥ眬鍙橀噺
           if (that.isslopeFlag == true) {
-            PDelevationTool.type = 'slope';
+            PDelevationTool.type = "slope";
             PDelevationTool.tf = this.checked;
           } else {
-            PDelevationTool.type = 'none';
+            PDelevationTool.type = "none";
           }
           PDelevationTool.render();
           break;
-        case 'd3':
-          var value = {
-            name: 'Analysis',
-            id: 3,
-          };
-          this.$bus.$emit('mapChangeBox', value);
+        case "d3": //璺緞鍒嗘瀽
+          this.isRouter = !this.isRouter;
+          let value;
+          if (this.isRouter) {
+            value = {
+              name: "Analysis",
+              id: 3,
+            };
+          } else {
+            value = {
+              name: "close",
+            };
+          }
+          this.$bus.$emit("mapChangeBox", value);
           break;
-        case 'd4':
+        case "d4": //鍓栭潰鍒嗘瀽
           if (window.AnalysisDXPM) {
+            window.AnalysisDXPM.end && window.AnalysisDXPM.end();
             this.clear(res);
           } else {
             this.addterrainSectionAnalysis();
           }
           break;
-        case 'd5':
+        case "d5": //娲按娣规病鍒嗘瀽
           if (window.AnalysisFlood) {
             this.clear(res);
           } else {
             this.addAnalysisFlood();
           }
           break;
-        case 'd6':
-          var that = this;
-          var volumetricMeasurementTool =
-            sgworld.Creator.createVolumetricMeasureTool();
-          volumetricMeasurementTool.startDrawing(
-            { ...this.colorAll, onlyTerrain: false },
-            'auto',
-            (data) => {
-              if (volumetricMeasurementTool.popupData) {
-                volumetricMeasurementTool.popupData.value = `濉柟锛�${data.volume.fill.toFixed(4) + data.unit.fill
-                  }<br>鎸栨柟锛�${data.volume.dig.toFixed(4) + data.unit.dig}`;
-              } else {
-                data.id = sgworld.Core.getuid();
-                this.measureData.set(data.id, volumetricMeasurementTool);
-                let popupData = that.openMeasureResultInfo('浣撶Н鏂归噺', data);
-                volumetricMeasurementTool.popupData = popupData;
-              }
+        case "d6": //鍦熸柟閲忓垎鏋�
+          if (window.TFvolumetricMeasurementTool) {
+            TFvolumetricMeasurementTool.cleanUp();
+            if (TFvolumetricMeasurementTool._mouseHandler) {
+              TFvolumetricMeasurementTool._mouseHandler.destroy();
+              TFvolumetricMeasurementTool = null;
+              Viewer._container.style.cursor = "default";
+              return;
             }
-          );
+            TFvolumetricMeasurementTool = null;
+            this.$refs.mapinfo && this.$refs.mapinfo.close();
+          } else {
+            var that = this;
+            window.TFvolumetricMeasurementTool =
+              sgworld.Creator.createVolumetricMeasureTool();
+            TFvolumetricMeasurementTool.startDrawing(
+              { ...this.colorAll, onlyTerrain: false },
+              "auto",
+              (data) => {
+                if (TFvolumetricMeasurementTool.popupData) {
+                  TFvolumetricMeasurementTool.popupData.value = `濉柟锛�${
+                    data.volume.fill.toFixed(4) + data.unit.fill
+                  }<br>鎸栨柟锛�${data.volume.dig.toFixed(4) + data.unit.dig}`;
+                } else {
+                  data.id = sgworld.Core.getuid();
+                  this.measureData.set(data.id, TFvolumetricMeasurementTool);
+                  let popupData = that.openMeasureResultInfo("浣撶Н鏂归噺", data);
+                  TFvolumetricMeasurementTool.popupData = popupData;
+                }
+              }
+            );
+          }
           break;
-        case 'd7':
+        case "d7": //涓夌淮鎴潰鍒嗘瀽
+          // if(window.MXModel) {
+          //   Viewer.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
+          //   window.MXModel=null;
+          // } else {
           var that = this;
           window.model = sgworld.Creator.create3DTilesets(
-            '',
-            modelUrl+'/SN/tileset.json',
+            "",
+            modelUrl,
             {},
             {},
-            '0',
+            "0",
             true,
             (data) => {
               sgworld.Navigate.flyToObj(data);
               that.setclippingModel();
             }
           );
-          break;
-        case 'd9':
-          this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close("queryinfo");
-          this.$store.state.mapPopBoxFlag = '3';
 
-          this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.open("绠¢亾绌洪棿鍒嗘瀽", null, {
-            close: () => {
-              if (this.$store.state.pipelineEntity.length != 0) {
-                for (var i in this.$store.state.pipelineEntity) {
-                  var item = this.$store.state.pipelineEntity[i]
-                  sgworld.Viewer.entities.remove(item);
-                }
-              }
-            }
-          });
           break;
-        case 'd8':
+        case "d9": //绠¢亾鍒嗘瀽
+          this.isPiple = !this.isPiple;
+          if (this.isPiple) {
+            this.$store.state.mapPopBoxFlag = "3";
+            this.$refs &&
+              this.$refs.queryinfo &&
+              this.$refs.queryinfo.open("绠¢亾绌洪棿鍒嗘瀽", null, {
+                close: () => {
+                  if (this.$store.state.pipelineEntity.length != 0) {
+                    for (var i in this.$store.state.pipelineEntity) {
+                      var item = this.$store.state.pipelineEntity[i];
+                      sgworld.Viewer.entities.remove(item);
+                    }
+                  }
+                },
+              });
+          } else {
+            this.$refs &&
+              this.$refs.queryinfo &&
+              this.$refs.queryinfo.close("queryinfo");
+          }
+
+          break;
+        case "d8": //褰卞儚瀵规瘮
           if (this.isContrastFlag == false) {
             this.isContrastFlag = true;
             sgworld.Analysis.createCurtainContrast(2, 1);
@@ -1202,65 +1270,99 @@
             sgworld.Analysis.clearCurtainContrast();
           }
           break;
-        case 'd10':
-        
-          if(window.DXTerrainFlattening!=null){
-            DXTerrainFlattening.remove();
-          }
-          sgworld.Creator.createSimpleGraphic(
-                'polygon',
-                {
-                    clampToGround: true,
-                },
-                function (entity) {
-                    let   positions = entity.polygon.hierarchy.getValue().positions;
-                    sgworld.Creator.SimpleGraphic.remove(entity.id);
-                    window.DXTerrainFlattening = sgworld.Creator.createTerrainModifier("鍦板舰鍘嬪钩", positions, 10, {});
-                }
+        case "d10": //鍦伴潰鏁村钩
+          if (this.DXZPState != null) {
+            this.DXZPState.drawHandler && this.DXZPState.drawHandler.destroy();
+            Viewer._container.style.cursor = "default";
+            this.DXZPState.tooltip && this.DXZPState.tooltip.show(false);
+            if (window.DXTerrainFlattening != null) {
+              DXTerrainFlattening.remove();
+            }
+            window.DXTerrainFlattening = null;
+            this.DXZPState = null;
+          } else {
+            this.DXZPState = sgworld.Creator.createSimpleGraphic(
+              "polygon",
+              {
+                clampToGround: true,
+              },
+              function (entity) {
+                let positions = entity.polygon.hierarchy.getValue().positions;
+                sgworld.Creator.SimpleGraphic.remove(entity.id);
+                window.DXTerrainFlattening =
+                  sgworld.Creator.createTerrainModifier(
+                    "鍦板舰鍘嬪钩",
+                    positions,
+                    10,
+                    {}
+                  );
+              }
             );
+          }
+
           break;
 
-        case 'd11':
+        case "d11": //鍦板舰寮�鎸�
           if (window.Excavation) {
+            window.Excavation.drawHandler &&
+              window.Excavation.drawHandler.destroy();
+            Viewer._container.style.cursor = "default";
+            window.Excavation.tooltip && window.Excavation.tooltip.show(false);
             window.Excavation.clear();
             window.Excavation = null;
           } else {
             window.Excavation = sgworld.Analysis.TerrainExcavation(
               10,
               {},
-              function () { }
+              function () {}
             );
           }
           break;
 
-        case "d12":
-          if (window.TSExcavation!=null) {
-            window.TSExcavation.deleteObject()
-            window.TSExcavation = null
+        case "d12": //閫氳鍒嗘瀽
+          if (window.TSExcavation != null) {
+            window.TSExcavation._SimpleGraphic.drawHandler &&
+              window.TSExcavation._SimpleGraphic.drawHandler.destroy();
+            Viewer._container.style.cursor = "default";
+            window.TSExcavation._SimpleGraphic.tooltip &&
+              window.TSExcavation._SimpleGraphic.tooltip.show(false);
+
+            window.TSExcavation.deleteObject();
+            window.TSExcavation = null;
           } else {
             window.TSExcavation = sgworld.Analysis.createSightLine({
               type: "default",
-            })
+            });
           }
-          break
-        case "d13":
-          if (this.Excavation) {
-            this.Excavation.destroy()
-            this.Excavation = null
-          } else {
-            this.Excavation = sgworld.Analysis.create3DViewshedPoss({
-              height: 1.8,
-            })
-          }
-          break
-        case "d14":
-          if (window.Excavation) {
-            window.Excavation.close()
-            window.Excavation = null
+          break;
+        case "d13": //瑙嗗煙鍒嗘瀽
+          if (window.SYExcavatio) {
+            window.SYExcavatio.end && window.SYExcavatio.end();
+            window.SYExcavatio.close();
+            window.SYExcavatio = null;
           } else {
             var SYFX_visible_color = { r: 0.0, g: 1.0, b: 0.0 },
-              SYFX_notVisible_color = { r: 1.0, g: 0.0, b: 0.0 }
-            window.Excavation = sgworld.Analysis.create3DViewshed({
+              SYFX_notVisible_color = { r: 1.0, g: 0.0, b: 0.0 };
+            window.SYExcavatio = sgworld.Analysis.create3DViewshed({
+              name: "Viewshed On Frederick",
+              height: 1.8,
+              color: {
+                Back: SYFX_notVisible_color,
+                Fore: SYFX_visible_color,
+              },
+              isSpherical: "",
+            });
+          }
+          break;
+        case "d14": //鍦嗗舰鏃跺煙鍒嗘瀽
+          if (window.YXSYExcavation) {
+            window.YXSYExcavation.end && window.YXSYExcavation.end();
+            window.YXSYExcavation.close();
+            window.YXSYExcavation = null;
+          } else {
+            var SYFX_visible_color = { r: 0.0, g: 1.0, b: 0.0 },
+              SYFX_notVisible_color = { r: 1.0, g: 0.0, b: 0.0 };
+            window.YXSYExcavation = sgworld.Analysis.create3DViewshed({
               name: "Viewshed On Frederick",
               height: 1.8,
               color: {
@@ -1268,19 +1370,17 @@
                 Fore: SYFX_visible_color,
               },
               isSpherical: "spherical",
-            })
+            });
           }
 
-          break
-
-
+          break;
       }
     },
     setclippingModel() {
       if (window.model) {
         setTimeout(() => {
           window.model.clippingModel({
-            direction: 'z',
+            direction: "z",
           });
         }, 1000);
         // window.model.clippingModel({
@@ -1290,7 +1390,7 @@
     },
     clear(res) {
       switch (res) {
-        case 'd4':
+        case "d4":
           layer.close(this.dxpmIndex);
           this.dxpmIndex = undefined;
           if (window.AnalysisDXPM) {
@@ -1300,7 +1400,7 @@
             window.AnalysisDXPM = undefined;
           }
           break;
-        case 'd5':
+        case "d5":
           window.AnalysisFlood.endWater();
           window.AnalysisFlood = undefined;
           break;
@@ -1311,13 +1411,13 @@
         pointSelect: true,
         spood: 20,
         GroupID: 0,
-        url: '/SmartEarthSDK/Workers/image/waterNormals.jpg',
+        url: "/SmartEarthSDK/Workers/image/waterNormals.jpg",
       };
       window.AnalysisFlood = sgworld.Command.execute(
         2,
         2,
         method,
-        (value) => { }
+        (value) => {}
       );
     },
     addterrainSectionAnalysis() {
@@ -1328,21 +1428,22 @@
         (Distance) => {
           if (Distance.gcs && Distance.gcs.length) {
             var url = window.location.href;
-            var testurl = '';
-            if (url.indexOf('web') != -1) {
-              testurl = '/web';
+            var testurl = "";
+            if (url.indexOf("web") != -1) {
+              testurl = "/web";
             }
             window.AnalysisDXPM.analyseData = Distance;
             this.dxpmIndex = layer.open({
               type: 2,
-              title: '鍒嗘瀽缁撴灉',
+              title: "鍒嗘瀽缁撴灉",
               shade: false,
-              area: ['80%', '280px'],
-              offset: 'b',
-              skin: 'other-class',
-              content: testurl + '/SmartEarthSDK/Workers/analysis/AnalysisDXPM.html',
+              area: ["80%", "280px"],
+              offset: "b",
+              skin: "other-class",
+              content:
+                testurl + "/SmartEarthSDK/Workers/analysis/AnalysisDXPM.html",
               end: () => {
-                this.dxpmIndex && this.clear('d4');
+                this.dxpmIndex && this.clear("d4");
               },
             });
           } else {
@@ -1354,16 +1455,16 @@
     },
     setWander(res) {
       switch (res) {
-        case 'c1':
+        case "c1":
           window.sgworld.Analysis.setPointFly();
           break;
-        case 'c2':
+        case "c2":
           var url = window.location.href;
-          var testurl = '';
-          if (url.indexOf('web') != -1) {
-            testurl = '/web';
+          var testurl = "";
+          if (url.indexOf("web") != -1) {
+            testurl = "/web";
           }
-          window.sgworld.Command.execute(2, 3, '', (data) => {
+          window.sgworld.Command.execute(2, 3, "", (data) => {
             data.showPoint = false;
             data.showLine = true;
             data.mode = 0;
@@ -1373,22 +1474,22 @@
             };
             window.PathAnimationData.winIndex = layer.open({
               type: 2,
-              title: '璺緞鍔ㄧ敾',
+              title: "璺緞鍔ㄧ敾",
               shade: false,
-              area: ['352px', '690px'],
-              offset: 'r',
-              skin: 'other-class',
-              content: testurl + '/SmartEarthSDK/Workers/path/Path.html',
+              area: ["352px", "690px"],
+              offset: "r",
+              skin: "other-class",
+              content: testurl + "/SmartEarthSDK/Workers/path/Path.html",
               end: function () {
                 PathAnimationData.fly && PathAnimationData.fly.exit();
               },
             });
           });
           break;
-        case 'c3':
+        case "c3":
           sgworld.Analysis.createindoormode({ showHelp: true });
           break;
-        case 'c4':
+        case "c4":
           window.sgworld.Analysis.createScreenshot();
           break;
       }
@@ -1396,89 +1497,87 @@
     setOrientation(res) {
       var resid;
       switch (res) {
-        case 'f1':
+        case "f1":
           resid = 1;
           break;
-        case 'f2':
+        case "f2":
           resid = 2;
           break;
       }
       var val = {
-        name: 'Coord',
+        name: "Coord",
         id: resid,
       };
-      this.$bus.$emit('mapChangeBox', val);
+      this.$bus.$emit("mapChangeBox", val);
     },
     setViewport(res) {
       switch (res) {
-        case 'b1': //鍒嗗睆
-          this.$bus.$emit('changemap', 1);
+        case "b1": //鍒嗗睆
+          this.$bus.$emit("changemap", 1);
           break;
-        case 'b2': //浜岀淮
-          this.$bus.$emit('changemap', 2);
+        case "b2": //浜岀淮
+          this.$bus.$emit("changemap", 2);
           break;
-        case 'b3': //涓夌淮
-          this.$bus.$emit('changemap', 3);
+        case "b3": //涓夌淮
+          this.$bus.$emit("changemap", 3);
           break;
-        case 'b4': //鍏ㄥ浘
+        case "b4": //鍏ㄥ浘
           window.sgworld.Navigate.jumpTo({
             //璺宠浆瑙嗚
             destination: new Cesium.Cartesian3.fromDegrees(110, 32, 8000000),
           });
           window.map
             .getView()
-            .setCenter(transform([110, 32], 'EPSG:4326', 'EPSG:3857'));
+            .setCenter(transform([110, 32], "EPSG:4326", "EPSG:3857"));
           window.map.getView().setZoom(4);
           break;
-        case 'b5': //鏀惧ぇ
+        case "b5": //鏀惧ぇ
           window.sgworld.Navigate.zoomIn();
           // 鑾峰彇褰撳墠瑙嗗浘
           var zoom = window.map.getView().getZoom(); // 鑾峰彇褰撳墠缂╂斁绾у埆
           window.map.getView().setZoom(zoom + 1); // 璁剧疆缂╂斁绾у埆
 
           break;
-        case 'b6': //缂╁皬
+        case "b6": //缂╁皬
           window.sgworld.Navigate.zoomOut();
           var zoom = window.map.getView().getZoom(); // 鑾峰彇褰撳墠缂╂斁绾у埆
           window.map.getView().setZoom(zoom - 1); // 璁剧疆缂╂斁绾у埆
           break;
-        case 'b7': //姣斾緥灏�
+        case "b7": //姣斾緥灏�
           this.isRuler = !this.isRuler;
-          window.sgworld.navControl('scale', this.isRuler);
+          window.sgworld.navControl("scale", this.isRuler);
           if (this.isRuler == true) {
             this.scaleLine = new ScaleLine({
-              units: "metric"
+              units: "metric",
             });
             window.map.addControl(this.scaleLine);
           } else {
-
             window.map.removeControl(this.scaleLine);
             this.scaleLine = false;
           }
           break;
-        case 'b8': //鎸囧寳閽�
+        case "b8": //鎸囧寳閽�
           this.isNaviget = !this.isNaviget;
-          window.sgworld.navControl('nav', this.isNaviget);
-          this.$store.state.isNaviget = this.isNaviget
+          window.sgworld.navControl("nav", this.isNaviget);
+          this.$store.state.isNaviget = this.isNaviget;
           break;
-        case 'b9': //鍦颁笅妯″紡
+        case "b9": //鍦颁笅妯″紡
           this.UndergroundMode = !this.UndergroundMode;
-          window.sgworld.Analysis.UndergroundMode(this.UndergroundMode, 0.3)
+          window.sgworld.Analysis.UndergroundMode(this.UndergroundMode, 0.3);
           break;
       }
     },
     setCoverage(res) {
       switch (res) {
-        case 'a1':
+        case "a1":
           if (this.$store.state.layerMnage == false) {
             this.$refs && this.$refs.maplayer && this.$refs.maplayer.closeAll();
             this.$refs && this.$refs.maplayer && this.$refs.maplayer.open();
             this.$store.state.layerMnage = true;
           } else if (this.$store.state.layerMnage == true) {
-                       this.$bus.$emit("treeDataCopy","true");
+            this.$bus.$emit("treeDataCopy", "true");
             this.$refs && this.$refs.maplayer && this.$refs.maplayer.closeAll();
             this.$store.state.layerMnage = false;
-   
           }
 
           break;
@@ -1491,23 +1590,23 @@
   mounted() {
     this.measureData = new Map();
     this.colorAll = {
-      point: Cesium.Color.fromCssColorString('#ff0000'),
-      polyline: Cesium.Color.fromCssColorString('#ffff00').withAlpha(0.6),
-      polygon: Cesium.Color.fromCssColorString('#ffff00').withAlpha(0.6),
+      point: Cesium.Color.fromCssColorString("#ff0000"),
+      polyline: Cesium.Color.fromCssColorString("#ffff00").withAlpha(0.6),
+      polygon: Cesium.Color.fromCssColorString("#ffff00").withAlpha(0.6),
     };
-    this.$bus.$on('setChangeTwoMenu', (res) => {
-
-      if (res == 8) { this.setLayerScene(); } else {
+    this.$bus.$on("setChangeTwoMenu", (res) => {
+      if (res == 8) {
+        this.setLayerScene();
+      } else {
         this.menuChange(res);
       }
-
     });
 
     this.$store.state.showAllLayers = true;
     this.$store.state.layerMnage = false;
     this.$store.state.treeData = null;
     this.$store.state.checkedKeys = [];
-    this.setCoverage('a1');
+    this.setCoverage("a1");
   },
 };
 </script>
@@ -1523,6 +1622,7 @@
   display: flex;
   flex-wrap: wrap;
   align-content: flex-start;
+
   .leftMen_div {
     font-size: 16px;
     font-family: Microsoft YaHei;
@@ -1535,16 +1635,19 @@
     border-radius: 5px;
     text-align: center;
   }
+
   .leftMen_div:hover {
     background: rgba(64, 158, 255, 0.4);
     border: 1px solid #409eff;
     box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1);
     border-radius: 5px;
   }
+
   .lefMenuDivActive {
     background: rgba(64, 158, 255, 0.4);
     border: 1px solid #409eff;
   }
+
   .menuTwoImage {
     width: 40px;
     height: 40px;

--
Gitblit v1.9.3