From 1ce1b525e7470ebaaeb0d5cd1e59bd905c1a7114 Mon Sep 17 00:00:00 2001
From: surprise <15810472099@163.com>
Date: 星期二, 05 三月 2024 18:07:32 +0800
Subject: [PATCH] 代码更新

---
 src/views/Synthesis/LeftMenu.vue |  919 +++++++++++++++++++++++++++------------------------------
 1 files changed, 435 insertions(+), 484 deletions(-)

diff --git a/src/views/Synthesis/LeftMenu.vue b/src/views/Synthesis/LeftMenu.vue
index 19d7fa7..b70017b 100644
--- a/src/views/Synthesis/LeftMenu.vue
+++ b/src/views/Synthesis/LeftMenu.vue
@@ -1,15 +1,8 @@
 <template>
   <div class="menu_Box box_div">
-    <div
-      class="leftMen_div"
-      @click="setChangeTwoMenu(item)"
-      v-for="(item, index) in setListTwoMenu"
-      :class="{ lefMenuDivActive: showTwoMenuFlag == item.id }"
-    >
-      <div
-        class="menuTwoImage"
-        :class="item.css"
-      ></div>
+    <div class="leftMen_div" @click="setChangeTwoMenu(item)" v-for="(item, index) in setListTwoMenu"
+      :class="{ lefMenuDivActive: showTwoMenuFlag == item.id }">
+      <div class="menuTwoImage" :class="item.css"></div>
       <div>{{ $t(item.label) }}</div>
     </div>
     <mapinfo ref="mapinfo" />
@@ -19,84 +12,33 @@
     <modelAttach ref="modelAttach" />
     <undergroundModel ref="undergroundModel" />
     <setPellucidity ref="setPellucidity" />
-    <input
-      type="file"
-      accept=".kml"
-      class="file"
-      style="display: none"
-    />
-    <input
-      :accept="'.shp, .shx, .dbf, .prj'"
-      style="display: none"
-      ref="pathClear"
-      type="file"
-      name="file"
-      id="shpFile"
-      multiple="multiple"
-      @change="handleOpenShp()"
-    />
+    <input type="file" accept=".kml" class="file" style="display: none" />
+    <input :accept="'.shp, .shx, .dbf, .prj'" style="display: none" ref="pathClear" type="file" name="file" id="shpFile"
+      multiple="multiple" @change="handleOpenShp()" />
 
-    <el-dialog
-      :title="formInline.title"
-      :visible.sync="dialogVisible"
-      :modal="false"
-      :modal-append-to-body="false"
-      :close-on-click-modal="false"
-      :before-close="handleClose"
-      width="30%"
-    >
-      <el-dialog
-        title="棰勮"
-        :append-to-body="false"
-        :visible.sync="dialog.dialogVisible"
-        width="70%"
-        :modal="false"
-        :close-on-click-modal="false"
-      >
-        <div
-          v-if="dialog.isPdf"
-          class="pdfClass"
-        >
-          <iframe
-            :src="dialog.src"
-            type="application/x-google-chrome-pdf"
-            width="100%"
-            height="100%"
-          >
+    <el-dialog :title="formInline.title" :visible.sync="dialogVisible" :modal="false" :modal-append-to-body="false"
+      :close-on-click-modal="false" :before-close="handleClose" width="30%">
+      <el-dialog title="棰勮" :append-to-body="false" :visible.sync="dialog.dialogVisible" width="70%" :modal="false"
+        :close-on-click-modal="false">
+        <div v-if="dialog.isPdf" class="pdfClass">
+          <iframe :src="dialog.src" type="application/x-google-chrome-pdf" width="100%" height="100%">
           </iframe>
         </div>
-        <div
-          v-if="dialog.isJpg"
-          class="pdfClass"
-        >
+        <div v-if="dialog.isJpg" class="pdfClass">
 
-          <el-image
-            style="width:100%; height:100%"
-            :src="dialog.src"
-            :preview-src-list="[dialog.src]"
-          >
+          <el-image style="width:100%; height:100%" :src="dialog.src" :preview-src-list="[dialog.src]">
           </el-image>
 
         </div>
       </el-dialog>
       <div style="height:63vh">
-        <el-tabs
-          v-model="activeName"
-          @tab-click="handleClick"
-        >
-          <el-tab-pane
-            label="灞炴��"
-            name="first"
-          >
-            <el-form
-              ref="form"
-              :model="formInline"
-              label-width="80px"
-            >
+        <el-tabs v-model="activeName" @tab-click="handleClick">
+          <el-tab-pane label="灞炴��" name="first">
+            <el-form ref="form" :model="formInline" label-width="80px">
 
               <el-form-item :label="$t('common.name')">
                 <!-- <el-input v-model="formInline.name"></el-input> -->
-                {{formInline.name}}
+                {{ formInline.name }}
               </el-form-item>
               <el-form-item :label="$t('common.type')">
                 <!-- <el-select
@@ -111,12 +53,12 @@
                   >
                   </el-option>
                 </el-select> -->
-                {{formInline.type}}
+                {{ formInline.type }}
               </el-form-item>
 
               <el-form-item :label="$t('common.bak')">
                 <!-- <el-input v-model="formInline.bak"></el-input> -->
-                {{formInline.bak}}
+                {{ formInline.bak }}
               </el-form-item>
               <!-- <el-form-item>
                 <el-button
@@ -138,49 +80,19 @@
             </el-form>
 
           </el-tab-pane>
-          <el-tab-pane
-            label="闄勪欢"
-            name="second"
-          >
+          <el-tab-pane label="闄勪欢" name="second">
 
-            <el-table
-              :data="tableData"
-              ref="filterTable"
-              height="calc(100% - 130px)"
-              border
-              style="width: 100%"
-              @selection-change="handleAttatchChange"
-            >
-              <el-table-column
-                type="selection"
-                width="70"
-              />
-              <el-table-column
-                width="60"
-                type="index"
-                :label="$t('common.index')"
-              />
-              <el-table-column
-                prop="name"
-                :label="$t('common.name')"
-              />
+            <el-table :data="tableData" ref="filterTable" height="calc(100% - 130px)" border style="width: 100%"
+              @selection-change="handleAttatchChange">
+              <el-table-column type="selection" width="70" />
+              <el-table-column width="60" type="index" :label="$t('common.index')" />
+              <el-table-column prop="name" :label="$t('common.name')" />
 
-              <el-table-column
-                prop="sizes"
-                :label="$t('common.size')"
-                :formatter="statSizeChange"
-              />
-              <el-table-column
-                align="center"
-                :label="$t('common.operate')"
-                min-width="100"
-              >
+              <el-table-column prop="sizes" :label="$t('common.size')" :formatter="statSizeChange" />
+              <el-table-column align="center" :label="$t('common.operate')" min-width="100">
                 <template slot-scope="scope">
-                  <el-link
-                    v-if="matchState(scope, /[]/)"
-                    @click="setAttatchDetail(scope.$index, scope.row)"
-                    class="elLink"
-                  >{{ $t('common.see') }}</el-link>
+                  <el-link v-if="matchState(scope, /[]/)" @click="setAttatchDetail(scope.$index, scope.row)"
+                    class="elLink">{{ $t('common.see') }}</el-link>
 
                 </template>
               </el-table-column>
@@ -192,20 +104,10 @@
 
       </div>
     </el-dialog>
-    <el-dialog
-      title="鏁版嵁鐢宠"
-      :visible.sync="dialogInsertVisible"
-      width="30%"
-      top="35vh"
-      :modal="false"
-      :before-close="handleInsertClose"
-    >
+    <el-dialog title="鏁版嵁鐢宠" :visible.sync="dialogInsertVisible" width="30%" top="35vh" :modal="false"
+      :before-close="handleInsertClose">
       <div style="width: 100%; max-height: 450px; overflow-y: auto">
-        <el-form
-          ref="form"
-          :model="ruleForm"
-          label-width="100px"
-        >
+        <el-form ref="form" :model="ruleForm" label-width="100px">
           <el-form-item label="瀹℃牳鍗曚綅">
             <div>
               <ul>
@@ -225,101 +127,42 @@
             </div>
           </el-form-item>
           <el-form-item label="鏉′欢">
-            <el-input
-              :title="ruleForm.wkt"
-              v-model="ruleForm.wkt"
-              disabled
-            ></el-input>
+            <el-input :title="ruleForm.wkt" v-model="ruleForm.wkt" disabled></el-input>
           </el-form-item>
           <el-form-item label="鎻忚堪">
-            <el-input
-              type="textarea"
-              placeholder="璇疯緭鍏ュ唴瀹�"
-              v-model="ruleForm.descr"
-              maxlength="50"
-              show-word-limit
-            >
+            <el-input type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" v-model="ruleForm.descr" maxlength="50" show-word-limit>
             </el-input>
           </el-form-item>
           <el-form-item>
-            <el-button
-              class="primary"
-              size="small"
-              @click="getInsertDownz()"
-            >{{
-              $t("common.confirm")
-            }}</el-button>
-            <el-button
-              type="info"
-              size="small"
-              @click="closeInsertDown"
-            >{{
-              $t("common.cancel")
-            }}</el-button>
+            <el-button class="primary" size="small" @click="getInsertDownz()">{{
+      $t("common.confirm")
+    }}</el-button>
+            <el-button type="info" size="small" @click="closeInsertDown">{{
+      $t("common.cancel")
+    }}</el-button>
           </el-form-item>
         </el-form>
       </div>
     </el-dialog>
-    <el-dialog
-      :title="$t('common.passworld')"
-      :visible.sync="dialogVisible1"
-      width="30%"
-      top="35vh"
-      :modal="false"
-      :before-close="handleCloseDown1"
-    >
-      <el-form
-        :model="codeForm"
-        :rules="rules"
-        ref="codeForm"
-        label-width="100px"
-        class="codeForm"
-      >
-        <el-form-item
-          :label="$t('common.passworld')"
-          prop="password"
-        >
-          <el-input
-            type="password"
-            v-model="codeForm.password"
-            show-password
-          ></el-input>
+    <el-dialog :title="$t('common.passworld')" :visible.sync="dialogVisible1" width="30%" top="35vh" :modal="false"
+      :before-close="handleCloseDown1">
+      <el-form :model="codeForm" :rules="rules" ref="codeForm" label-width="100px" class="codeForm">
+        <el-form-item :label="$t('common.passworld')" prop="password">
+          <el-input type="password" v-model="codeForm.password" show-password></el-input>
         </el-form-item>
-        <el-form-item
-          :label="$t('common.SPassword')"
-          prop="repassword"
-        >
-          <el-input
-            type="password"
-            v-model="codeForm.repassword"
-            show-password
-          ></el-input>
+        <el-form-item :label="$t('common.SPassword')" prop="repassword">
+          <el-input type="password" v-model="codeForm.repassword" show-password></el-input>
         </el-form-item>
         <el-form-item>
-          <el-button
-            class="primary"
-            size="small"
-            @click="downloadx('codeForm')"
-          >{{ $t("common.confirm") }}</el-button>
-          <el-button
-            type="info"
-            size="small"
-            @click="closeDownx('codeForm')"
-          >{{
-            $t("common.cancel")
-          }}</el-button>
+          <el-button class="primary" size="small" @click="downloadx('codeForm')">{{ $t("common.confirm") }}</el-button>
+          <el-button type="info" size="small" @click="closeDownx('codeForm')">{{
+      $t("common.cancel")
+    }}</el-button>
         </el-form-item>
       </el-form>
     </el-dialog>
-    <el-dialog
-      title="鑼冨洿"
-      :visible.sync="dialogExtentVisible"
-      width="30%"
-      :before-close="handleExtentClose"
-      :modal="false"
-      :lock-scroll="false"
-      :close-on-click-modal="false"
-    >
+    <el-dialog title="鑼冨洿" :visible.sync="dialogExtentVisible" width="30%" :before-close="handleExtentClose"
+      :modal="false" :lock-scroll="false" :close-on-click-modal="false">
 
       <el-row :gutter="20">
         <el-col :span="16">
@@ -331,15 +174,9 @@
           </div>
         </el-col>
       </el-row>
-      <span
-        slot="footer"
-        class="dialog-footer"
-      >
+      <span slot="footer" class="dialog-footer">
         <el-button @click="handleExtentClose">鍙� 娑�</el-button>
-        <el-button
-          @click="handleExtentinsert"
-          type="primary"
-        >纭� 瀹�</el-button>
+        <el-button @click="handleExtentinsert" type="primary">纭� 瀹�</el-button>
       </span>
     </el-dialog>
   </div>
@@ -383,6 +220,7 @@
 } from "ol/control.js";
 import * as turf from "@turf/turf";
 import { geometry } from "@turf/turf";
+import layerManager from "./layer";
 
 export default {
   components: { mapinfo, maplayer, queryinfo, terrainDig, modelAttach, undergroundModel, setPellucidity },
@@ -429,12 +267,12 @@
             name: "鍥惧眰绠$悊",
             css: "twoMenu_imge11",
           },
-          {
-            id: "b1",
-            label: "synthesis.split",
-            name: "鍒嗗睆",
-            css: "twoMenu_imge21",
-          },
+          // {
+          //   id: "b1",
+          //   label: "synthesis.split",
+          //   name: "鍒嗗睆",
+          //   css: "twoMenu_imge21",
+          // },
           {
             id: "b9",
             label: "synthesis.undergroundMode",
@@ -543,24 +381,25 @@
           //   name: "鍧″害鍒嗘瀽",
           //   css: "twoMenu_imge42",
           // },
-          {
-            id: "d3",
-            label: "synthesis.pathanalysis",
-            name: "璺緞鍒嗘瀽",
-            css: "twoMenu_imge43",
-          },
+          // {
+          //   id: "d3",
+          //   label: "synthesis.pathanalysis",
+          //   name: "璺緞鍒嗘瀽",
+          //   css: "twoMenu_imge43",
+          // },
           // {
           //   id: "d4",
           //   label: "synthesis.cuttinganalysis",
           //   name: "鍦板舰鍓栧垏",
           //   css: "twoMenu_imge44",
           // },
-          {
-            id: "d5",
-            label: "synthesis.floodanalysis",
-            name: "娣规病鍒嗘瀽",
-            css: "twoMenu_imge45",
-          },
+          // {
+          //   id: "d5",
+          //   label: "synthesis.floodanalysis",
+          //   name: "娣规病鍒嗘瀽",
+          //   css: "twoMenu_imge45",
+          // },
+
           // {
           //   id: "d6",
           //   label: "synthesis.earthworkcalculation",
@@ -579,56 +418,62 @@
           //   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",
-            label: "synthesis.visibilityAnalysis",
-            name: "閫氳鍒嗘瀽",
-            css: "twoMenu_imge412",
-          },
-          {
-            id: "d13",
-            label: "synthesis.viewAnalysis",
-            name: "瑙嗗煙鍒嗘瀽",
-            css: "twoMenu_imge413",
-          },
-          {
-            id: "d14",
-            label: "synthesis.circularViewAnalysis",
-            name: "鍦嗗舰瑙嗗煙鍒嗘瀽",
-            css: "twoMenu_imge414",
-          },
+          // {
+          //   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",
+          //   label: "synthesis.visibilityAnalysis",
+          //   name: "閫氳鍒嗘瀽",
+          //   css: "twoMenu_imge412",
+          // },
+          // {
+          //   id: "d13",
+          //   label: "synthesis.viewAnalysis",
+          //   name: "瑙嗗煙鍒嗘瀽",
+          //   css: "twoMenu_imge413",
+          // },
+          // {
+          //   id: "d14",
+          //   label: "synthesis.circularViewAnalysis",
+          //   name: "鍦嗗舰瑙嗗煙鍒嗘瀽",
+          //   css: "twoMenu_imge414",
+          // },
+          // {
+          //   id: "d15",
+          //   label: "synthesis.fireAnalysis",
+          //   name: "鐏伨鍒嗘瀽",
+          //   css: "twoMenu_imge414",
+          // },
         ],
         [
-          {
-            id: "e1",
-            label: "synthesis.attributequery",
-            name: "灞炴�ф煡璇�",
-            css: "twoMenu_imge51",
-          },
-          {
-            id: "e2",
-            label: "synthesis.rangequery",
-            name: "绌洪棿鏌ヨ",
-            css: "twoMenu_imge52",
-          },
+          // {
+          //   id: "e1",
+          //   label: "synthesis.attributequery",
+          //   name: "灞炴�ф煡璇�",
+          //   css: "twoMenu_imge51",
+          // },
+          // {
+          //   id: "e2",
+          //   label: "synthesis.rangequery",
+          //   name: "绌洪棿鏌ヨ",
+          //   css: "twoMenu_imge52",
+          // },
 
         ],
         [
@@ -638,12 +483,12 @@
             name: "鍧愭爣瀹氫綅",
             css: "twoMenu_imge61",
           },
-          {
-            id: "f2",
-            label: "synthesis.placenamelocation",
-            name: "鍦板悕瀹氫綅",
-            css: "twoMenu_imge62",
-          },
+          // {
+          //   id: "f2",
+          //   label: "synthesis.placenamelocation",
+          //   name: "鍦板悕瀹氫綅",
+          //   css: "twoMenu_imge62",
+          // },
         ],
         [
           {
@@ -664,12 +509,12 @@
             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",
@@ -687,6 +532,12 @@
             label: "synthesis.synthobj.m9",
             name: "楂樼▼閲忔祴",
             css: "twoMenu_imge77",
+          },
+          {
+            id: "j8",
+            label: "synthesis.removeMeasure",
+            name: "娓呴櫎",
+            css: "twoMenu_imge87",
           },
         ],
         [
@@ -720,12 +571,12 @@
             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",
@@ -733,18 +584,18 @@
             css: "twoMenu_imge86",
           },
 
-          {
-            id: "h9",
-            label: "synthesis.import1",
-            name: "瀵煎叆SHP",
-            css: "twoMenu_imge85",
-          },
-          {
-            id: "h10",
-            label: "synthesis.export1",
-            name: "瀵煎嚭SHP",
-            css: "twoMenu_imge86",
-          },
+          // {
+          //   id: "h9",
+          //   label: "synthesis.import1",
+          //   name: "瀵煎叆SHP",
+          //   css: "twoMenu_imge85",
+          // },
+          // {
+          //   id: "h10",
+          //   label: "synthesis.export1",
+          //   name: "瀵煎嚭SHP",
+          //   css: "twoMenu_imge86",
+          // },
 
           {
             id: "h7",
@@ -772,7 +623,38 @@
             name: "涓夌淮婕旂ず",
             css: "twoMenu_imge35",
           },
-        ],
+        ], [
+          {
+            id: "g1",
+            name: "鐭ヨ瘑鍥捐氨",
+            label: "synthesis.knowledgeGraph",
+            css: "twoMenu_imge12",
+          },
+        ], [
+          {
+            id: "k1",
+            name: "鏁版嵁缁熻",
+            label: "dataManage.dataStatistics",
+            css: "twoMenu_imge12",
+          }, {
+            id: "k2",
+            name: "灞炴�т俊鎭�",
+            label: "synthesis.attributeInformation",
+            css: "twoMenu_imge12",
+          },
+        ], [], [
+          {
+            id: "m1",
+            label: "synthesis.fireAnalysis",
+            name: "鐏伨鍒嗘瀽",
+            css: "twoMenu_imge414",
+          }, {
+            id: "m2",
+            label: "synthesis.floodanalysis",
+            name: "娣规病鍒嗘瀽",
+            css: "twoMenu_imge45",
+          },
+        ]
       ],
       isRuler: false,
       isNaviget: false,
@@ -868,7 +750,11 @@
           this.isMenuFlag = val;
           if (this.entityaLayers.length != 0) {
             for (var i in this.entityaLayers) {
-              sgworld.Viewer.entities.remove(this.entityaLayers[i]);
+              if (this.entityaLayers[i].name != 'build') {
+                sgworld.Viewer.entities.remove(this.entityaLayers[i]);
+                i--
+              }
+
             }
             this.entityaLayers = [];
           }
@@ -886,7 +772,15 @@
       this.showTwoMenuFlag = res.id;
       if (val != 'h' && res.id != "b9") {
         sgworld.Creator.SimpleGraphic.clear();
-        Viewer.entities.removeAll();
+        // Viewer.entities.removeAll();
+        var entities = Viewer.entities._entities._array;
+        for (var i = 0; i < entities.length; i++) {
+
+          if (entities[i].name != 'build') {
+            Viewer.entities.remove(entities[i])
+            i--
+          }
+        }
       }
       switch (val) {
         case "a": //鍥惧眰绠$悊
@@ -913,6 +807,66 @@
         case "h":
           sgworld.Creator.SimpleGraphic.edit(true, { editProp: true });
           this.setPlot(res.id);
+          break;
+        case "g":
+          this.setknowledgeGraph(res.id)
+          break;
+        case "k":
+          this.setTransportInspection(res.id)
+          break;
+        case "m":
+          this.setDisaster(res.id)
+          break;
+
+      }
+    },
+    setDisaster(res) {
+      switch (res) {
+        case "m1":
+          var that = this;
+          const handler = new Cesium.ScreenSpaceEventHandler(Viewer.scene.canvas)
+          handler.setInputAction((event) => {
+            let cartesian = Viewer.camera.pickEllipsoid(event.position);
+            let cartographic = Cesium.Cartographic.fromCartesian(cartesian);
+
+            if (cartesian) {
+              let lng = parseFloat(
+                Cesium.Math.toDegrees(cartographic.longitude)
+              ).toFixed(6); // 缁忓害
+              let lat = parseFloat(
+                Cesium.Math.toDegrees(cartographic.latitude)
+              ).toFixed(6); // 绾害
+              var alt = Viewer.camera.positionCartographic.height.toFixed(0);
+              that.setCreateFireAnalysis(lng, lat, alt);
+            }
+            handler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
+          }, Cesium.ScreenSpaceEventType.LEFT_CLICK)
+          break;
+        case "m2":
+          this.closePipelinePop();
+          if (window.AnalysisFlood) {
+            this.clear(res);
+          } else {
+            this.addAnalysisFlood();
+          }
+          break;
+      }
+    },
+    setTransportInspection(res) {
+      switch (res) {
+        case 'k1':
+          this.$store.state.showEchartCount = true;
+          break;
+        case 'k2':
+          this.$store.state.showPopBoxFlag = true;
+          this.$store.state.mapPopBoxFlag = "2";
+          break;
+      }
+    },
+    setknowledgeGraph(res) {
+      switch (res) {
+        case 'g1':
+          this.$store.state.knowledgeFlag = true;
           break;
       }
     },
@@ -991,21 +945,21 @@
         document.body.removeChild(eleLink);
       };
       let entities = new Cesium.EntityCollection();
-      let dataSources = sgworld.Viewer.dataSources;
+      let dataSources = Viewer.dataSources;
       for (let i = 0, j = dataSources.length; i < j; i++) {
         for (let v of dataSources.get(i).entities.values) {
           entities.add(v);
         }
       }
-      for (let v of sgworld.Viewer.entities.values) {
+      for (let v of Viewer.entities.values) {
         entities.add(v);
       }
 
       if (entities.values.length) {
-        console.log(sgworld.Viewer.entities);
+        // console.log(sgworld.Viewer.entities);
 
-        let promise = Cesium.exportKml({ entities: sgworld.Viewer.entities });
-        console.log(entities);
+        let promise = Cesium.exportKml({ entities: Viewer.entities });
+
         // let promise = Cesium.exportKml({ entities: entities });
         promise.then(function (e) {
           funDownload(e.kml, new Date().getTime() + ".kml");
@@ -1015,7 +969,7 @@
       }
     },
     handleSaveShp() {
-      var entities = sgworld.Viewer.entities.values;
+      var entities = Viewer.entities.values;
       if (entities.length == 0) {
         return;
       }
@@ -1306,7 +1260,7 @@
     },
     handleOpenClick() {
       var that = this;
-      sgworld.Creator.SimpleGraphic.edit(true, { editProp: true });
+      earthCtrl.factory.SimpleGraphic.edit(true, { editProp: true });
       let fileInput = document.querySelector(".file");
       fileInput.onchange = function (evt) {
         let files = evt.target.files;
@@ -1316,16 +1270,16 @@
           fileReader.readAsDataURL(file);
           fileReader.onload = () => {
             var kmlOptions = {
-              camera: sgworld.Viewer.scene.camera,
-              canvas: sgworld.Viewer.scene.canvas,
+              camera: Viewer.scene.camera,
+              canvas: Viewer.scene.canvas,
               clampToGround: true,
             };
-            var geocachePromise = Cesium.KmlDataSource.load(
+            var geocachePromise = SmartEarth.Cesium.KmlDataSource.load(
               fileReader.result,
               kmlOptions
             );
 
-            sgworld.Navigate.flyToObj(geocachePromise)
+            earthCtrl.camera.flyTo(geocachePromise)
 
             geocachePromise.then(function (dataSource) {
               var geocacheEntities = dataSource.entities.values;
@@ -1333,7 +1287,7 @@
               for (var i = 0; i < geocacheEntities.length; i++) {
                 var entity = geocacheEntities[i];
 
-                sgworld.Viewer.entities.add(entity);
+                Viewer.entities.add(entity);
               }
             });
             // sgworld.Viewer.dataSources
@@ -1387,28 +1341,14 @@
     setMeasurement(res) {
       switch (res) {
         case "j1":
-          var measure = window.sgworld.Command.execute(
-            0,
-            2,
-            this.colorAll,
-            (data) => {
-              data.id = window.sgworld.Core.getuid();
-              this.measureData.set(data.id, measure);
-              this.openMeasureResultInfo("琛ㄩ潰璺濈", data);
-            }
-          );
+          earthCtrl.measure.clampLineDistance(this.colorAll, (e) => {
+            console.log(e)
+          });
           break;
         case "j6":
-          var measure = window.sgworld.Command.execute(
-            0,
-            10,
-            this.colorAll,
-            (data) => {
-              data.id = window.sgworld.Core.getuid();
-              this.measureData.set(data.id, measure);
-              this.openMeasureResultInfo("绌洪棿璺濈", data);
-            }
-          );
+          earthCtrl.measure.horizontalDistance(this.colorAll, (e) => {
+            console.log(e);
+          });
           break;
         // case 'j3':
 
@@ -1421,44 +1361,34 @@
 
         //   break;
         case "j2":
-          var measure = window.sgworld.Command.execute(
-            0,
-            5,
-            this.colorAll,
-            (data) => {
-              data.id = window.sgworld.Core.getuid();
-              this.measureData.set(data.id, measure);
-              this.openMeasureResultInfo("鍨傜洿楂樺害", data);
-            }
-          );
+          earthCtrl.measure.height(this.colorAll, (e) => {
+            console.log(e)
+          });
           break;
         case "j5":
-          var measure = window.sgworld.Command.execute(
+          var color = this.colorAll;
+          var measure = earthCtrl.measure.surfaceArea(
             0,
             8,
             {
-              ...this.colorAll,
+              ...color,
               tin: true, // 鏄惁鏄剧ずtin涓夎缃�
               onlyTerrain: false, // 鏄惁鍙祴閲忕簿缁嗗湴褰�
             },
             (data) => {
-              data.id = window.sgworld.Core.getuid();
-              this.measureData.set(data.id, measure);
-              this.openMeasureResultInfo("琛ㄩ潰闈㈢Н", data);
+
             }
           );
           break;
         case "j3":
-          var measure = window.sgworld.Command.execute(
-            0,
-            3,
-            this.colorAll,
-            (data) => {
-              data.id = window.sgworld.Core.getuid();
-              this.measureData.set(data.id, measure);
-              this.openMeasureResultInfo("骞抽潰闈㈢Н", data);
-            }
-          );
+          earthCtrl.measure.surfaceArea({
+            ...this.colorAll,
+            tin: true, // 鏄惁鏄剧ずtin涓夎缃�
+            onlyTerrain: false // 鏄惁鍙祴閲忕簿缁嗗湴褰�
+          }, (e) => {
+            console.log(e)
+
+          });
           break;
         case "j4":
           var volumetricMeasurementTool =
@@ -1479,29 +1409,25 @@
             }
           );
           break;
-        case "j8":
-          var measure = window.sgworld.Command.execute(
-            0,
-            12,
-            this.colorAll,
-            (data) => {
-              data.id = window.sgworld.Core.getuid();
-              this.measureData.set(data.id, measure);
-              this.openMeasureResultInfo("瑙掑害", data);
-            }
-          );
-          break;
+        // case "j8":
+        //   var measure = window.sgworld.Command.execute(
+        //     0,
+        //     12,
+        //     this.colorAll,
+        //     (data) => {
+        //       data.id = window.sgworld.Core.getuid();
+        //       this.measureData.set(data.id, measure);
+        //       this.openMeasureResultInfo("瑙掑害", data);
+        //     }
+        //   );
+        //   break;
         case "j7":
-          var measure = window.sgworld.Command.execute(
-            1,
-            11,
-            this.colorAll,
-            (data) => {
-              data.id = window.sgworld.Core.getuid();
-              this.measureData.set(data.id, measure);
-              this.openMeasureResultInfo("娴锋嫈楂樺害", data);
-            }
-          );
+          earthCtrl.measure.altitude(this.colorAll, (e) => {
+            console.log(e)
+          });
+          break;
+        case "j8":
+          earthCtrl.measure.clearResult()
           break;
       }
     },
@@ -1941,9 +1867,20 @@
           }
 
           break;
+
       }
     },
-
+    setCreateFireAnalysis(lon, lat, alt) {
+      console.log(lon, lat, alt)
+      var particle = earthCtrl.factory.createParticleEffect("flame", {
+        x: lon,
+        y: lat,
+        z: 0
+      }, {
+        translation: SmartEarth.Cesium.Cartesian3.fromElements(0, 0, 0), //骞崇Щ
+      }, (data) => { }
+      );
+    },
     //妯″瀷瑁佸垏
     modelClipping() {
       const scene = Viewer.scene;
@@ -2299,32 +2236,7 @@
           }
           break;
         case "c2":
-          var url = window.location.href;
-          var testurl = "";
-          if (url.indexOf("web") != -1) {
-            testurl = "/web";
-          }
-          window.sgworld.Command.execute(2, 3, "", (data) => {
-            data.showPoint = false;
-            data.showLine = true;
-            data.mode = 0;
-            // 寮圭獥鏁版嵁
-            window.PathAnimationData = {
-              flyData: data,
-            };
-            window.PathAnimationData.winIndex = layer.open({
-              type: 2,
-              title: "璺緞鍔ㄧ敾",
-              shade: false,
-              area: ["352px", "690px"],
-              offset: "r",
-              skin: "other-class",
-              content: testurl + "/SmartEarthSDK/Workers/path/Path.html",
-              end: function () {
-                PathAnimationData.fly && PathAnimationData.fly.exit();
-              },
-            });
-          });
+          this.$store.state.lineRoam = true;
           break;
         case "c3":
           sgworld.Analysis.createindoormode({ showHelp: true });
@@ -2470,7 +2382,13 @@
           this.$store.state.isProjectLayer.push(str);
         }
       })
+      var geoJson = std.filter((str) => {
+        if (str.serveType != 'GEOJSON' && str.type == 2 && str.isShow == 1) {
+          return str;
+        }
 
+      })
+      layerManager.setAddGeoLayer(geoJson)
       this.setAddLayers(value);
       var res = this.setTreeData(val);
       this.$store.state.pigCode = null;
@@ -2654,71 +2572,101 @@
       window.map.addLayer(layer2);
     },
     async getFeatureInfo(html) {
+
       var start = html.indexOf("<caption class=\"featureInfo\">") + "<caption class=\"featureInfo\">".length;
       var end = html.indexOf("</caption>");
       var tab = html.substr(start, end - start);
-      start = html.lastIndexOf(tab) + tab.length + 1;
-      end = html.indexOf("</td>", start);
-      var gid = html.substr(start, end - start);
-
-      if (gid && tab) {
-        this.$store.state.pickoption = {
-          gid: gid,
-          name: tab.replaceAll("_", "")
+      var std = html.substr(html.indexOf('<th>'), html.lastIndexOf('</th>') - html.indexOf('<th>') + 5).replaceAll(' ', '').replaceAll('\n', '').split('</th>')
+      var str = html.substr(html.indexOf('<td>'), html.lastIndexOf('</td>') - html.indexOf('<td>') + 5).replaceAll(' ', '').replaceAll('\n', '').split('</td>')
+      var arr = [];
+      for (var i in std) {
+        var name, val;
+        name = std[i];
+        val = str[i]
+        if (name == "") {
+          continue
         }
-        if (tab == 'm_surface_deformation_data') {
-          this.$store.state.surfaceDeForm.flag = true;
-          this.$store.state.surfaceDeForm.gid = gid;
-        } else {
-          this.$store.state.surfaceDeForm.flag = false;
-          this.$store.state.surfaceDeForm.gid = null;
+        if (name.indexOf('<th>') > -1) {
+          name = name.replaceAll('<th>', '')
         }
-        const res = await dataQuery_selectTabByEntity({
-          name: this.$store.state.pickoption.name
-        })
-
-        if (res.code != 200) {
-          return;
+        if (val.indexOf('<td>') > -1) {
+          val = val.replaceAll('<td>', '')
         }
-        var value = res.result.split('.')
-        this.$store.state.propertiesName = {
-          ns: value[0],
-          enName: value[1],
-          tabDesc: '鎷惧彇淇℃伅'
-        }
-        var name = this.$store.state.pickoption.name;
-        const data = await inquiry_selectFields({ name: name })
-        if (data.code != 200) {
-          this.$message.error("鍒楄〃璋冪敤澶辫触")
-        }
-        const data1 = await inquiry_selectDomains({ name: name })
-        if (data1.code != 200) {
-          this.$message.error("鍒楄〃璋冪敤澶辫触")
-        }
-        this.optionx = []
-        this.attributeData = []
-        var valadata = data.result
-        var laydomain = data1.result
-        this.optionx = data1.result
-        for (var i in valadata) {
-          if (valadata[i].showtype == 1) {
-            if (
-              valadata[i].domainNa != null &&
-              valadata[i].domainNa != undefined
-            ) {
-              for (var j in laydomain) {
-                if (laydomain[j].domName == valadata[i].domainNa) {
-                  // valadata[i].domainNa = laydomain[j].codeDesc
-                }
-              }
-            }
-            // this.optionx.push(valadata[i])
-            this.attributeData.push(valadata[i])
-          }
+        if (name != ">") {
+          arr.push({
+            name: name,
+            val: val
+          })
         }
 
-        this.getTableData()
       }
+
+      if (arr.length > 0) {
+        this.$store.state.propertiesInfo = arr;
+
+        this.$store.state.propertiesFlag = '1'
+      }
+
+
+      // this.getTableData() 
+      // if (gid && tab) {
+      //   this.$store.state.pickoption = {
+      //     gid: gid,
+      //     name: tab.replaceAll("_", "")
+      //   }
+      //   if (tab == 'm_surface_deformation_data') {
+      //     this.$store.state.surfaceDeForm.flag = true;
+      //     this.$store.state.surfaceDeForm.gid = gid;
+      //   } else {
+      //     this.$store.state.surfaceDeForm.flag = false;
+      //     this.$store.state.surfaceDeForm.gid = null;
+      //   }
+      //   const res = await dataQuery_selectTabByEntity({
+      //     name: this.$store.state.pickoption.name
+      //   })
+
+      //   if (res.code != 200) {
+      //     return;
+      //   }
+      //   var value = res.result.split('.')
+      //   this.$store.state.propertiesName = {
+      //     ns: value[0],
+      //     enName: value[1],
+      //     tabDesc: '鎷惧彇淇℃伅'
+      //   }
+      //   var name = this.$store.state.pickoption.name;
+      //   const data = await inquiry_selectFields({ name: name })
+      //   if (data.code != 200) {
+      //     this.$message.error("鍒楄〃璋冪敤澶辫触")
+      //   }
+      //   const data1 = await inquiry_selectDomains({ name: name })
+      //   if (data1.code != 200) {
+      //     this.$message.error("鍒楄〃璋冪敤澶辫触")
+      //   }
+      //   this.optionx = []
+      //   this.attributeData = []
+      //   var valadata = data.result
+      //   var laydomain = data1.result
+      //   this.optionx = data1.result
+      //   for (var i in valadata) {
+      //     if (valadata[i].showtype == 1) {
+      //       if (
+      //         valadata[i].domainNa != null &&
+      //         valadata[i].domainNa != undefined
+      //       ) {
+      //         for (var j in laydomain) {
+      //           if (laydomain[j].domName == valadata[i].domainNa) {
+      //             // valadata[i].domainNa = laydomain[j].codeDesc
+      //           }
+      //         }
+      //       }
+      //       // this.optionx.push(valadata[i])
+      //       this.attributeData.push(valadata[i])
+      //     }
+      //   }
+
+      // this.getTableData()
+      // }
     },
     //鏍煎紡鍖栨椂闂�
     format(shijianchuo) {
@@ -3166,9 +3114,9 @@
     this.$bus.$off();
     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: SmartEarth.Cesium.Color.fromCssColorString("#ff0000"),
+      polyline: SmartEarth.Cesium.Color.fromCssColorString("#ffff00").withAlpha(0.6),
+      polygon: SmartEarth.Cesium.Color.fromCssColorString("#ffff00").withAlpha(0.6),
     };
     this.$store.state.setAlphaList = []
     this.$bus.$on("setChangeTwoMenu", (res) => {
@@ -3194,8 +3142,10 @@
     this.$store.state.treeData = null;
     this.$store.state.checkedKeys = [];
     // this.setCoverage("a1");
-    this.layersStart();
 
+    setTimeout(() => {
+      this.layersStart();
+    }, 1000);
 
     this.$bus.$on("setDialogInsertVisible", (res) => {
       if (res == true) {
@@ -3281,6 +3231,7 @@
     height: 30px;
     display: inline-block;
   }
+
   .pdfClass {
     height: 63vh;
     width: 100%;

--
Gitblit v1.9.3