From fb98e10c76d7e6c2d01f3a9f8c1b727f905cbdca Mon Sep 17 00:00:00 2001
From: surprise <15810472099@163.com>
Date: 星期一, 05 二月 2024 15:30:50 +0800
Subject: [PATCH] 代码更新

---
 src/views/Synthesis/LeftMenu.vue | 1745 +++++++++++++++++++++++++++++++++++++++++++++++++++++-----
 1 files changed, 1,595 insertions(+), 150 deletions(-)

diff --git a/src/views/Synthesis/LeftMenu.vue b/src/views/Synthesis/LeftMenu.vue
index e5058a4..a19ffd7 100644
--- a/src/views/Synthesis/LeftMenu.vue
+++ b/src/views/Synthesis/LeftMenu.vue
@@ -15,6 +15,10 @@
     <mapinfo ref="mapinfo" />
     <maplayer ref="maplayer" />
     <queryinfo ref="queryinfo" />
+    <terrainDig ref="terrainDig" />
+    <modelAttach ref="modelAttach" />
+    <undergroundModel ref="undergroundModel" />
+    <setPellucidity ref="setPellucidity" />
     <input
       type="file"
       accept=".kml"
@@ -31,6 +35,313 @@
       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%"
+          >
+          </iframe>
+        </div>
+        <div
+          v-if="dialog.isJpg"
+          class="pdfClass"
+        >
+
+          <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-form-item :label="$t('common.name')">
+                <!-- <el-input v-model="formInline.name"></el-input> -->
+                {{formInline.name}}
+              </el-form-item>
+              <el-form-item :label="$t('common.type')">
+                <!-- <el-select
+                  v-model="formInline.type"
+                  style="width:100%"
+                >
+                  <el-option
+                    v-for="item in options"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select> -->
+                {{formInline.type}}
+              </el-form-item>
+
+              <el-form-item :label="$t('common.bak')">
+                <!-- <el-input v-model="formInline.bak"></el-input> -->
+                {{formInline.bak}}
+              </el-form-item>
+              <!-- <el-form-item>
+                <el-button
+                  v-show="isShowModel"
+                  type="success"
+                  plain
+                  size="small"
+                  @click="InsertData"
+                >{{$t('common.increase')}}</el-button>
+                <el-button
+                  v-show=" isShowModel"
+                  type="info"
+                  plain
+                  size="small"
+                  @click="EditData"
+                >{{$t('common.update')}}</el-button>
+              </el-form-item> -->
+
+            </el-form>
+
+          </el-tab-pane>
+          <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-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>
+
+                </template>
+              </el-table-column>
+            </el-table>
+
+          </el-tab-pane>
+
+        </el-tabs>
+
+      </div>
+    </el-dialog>
+    <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-item label="瀹℃牳鍗曚綅">
+            <div>
+              <ul>
+                <li v-for="item in ruleForm.depid">
+                  {{ item.name }}
+                </li>
+              </ul>
+            </div>
+          </el-form-item>
+          <el-form-item label="琛ㄥ悕">
+            <div>
+              <ul>
+                <li v-for="item in ruleForm.tabs">
+                  {{ item.tabDesc }}
+                </li>
+              </ul>
+            </div>
+          </el-form-item>
+          <el-form-item label="鏉′欢">
+            <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>
+          </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-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-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>
+        <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-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-row :gutter="20">
+        <el-col :span="16">
+          <el-input v-model="setExtent"></el-input>
+        </el-col>
+        <el-col :span="6">
+          <div>
+            鍗曚綅锛氾紙m锛�
+          </div>
+        </el-col>
+      </el-row>
+      <span
+        slot="footer"
+        class="dialog-footer"
+      >
+        <el-button @click="handleExtentClose">鍙� 娑�</el-button>
+        <el-button
+          @click="handleExtentinsert"
+          type="primary"
+        >纭� 瀹�</el-button>
+      </span>
+    </el-dialog>
   </div>
 </template>
 
@@ -39,6 +350,10 @@
 import mapinfo from "../Tools/mapinfo.vue";
 import maplayer from "../Tools/maplayer.vue";
 import queryinfo from "../Tools/queryinfo.vue";
+import terrainDig from "../Tools/terrainDig.vue";
+import modelAttach from "../Tools/ModelAttach.vue";
+import undergroundModel from "../Tools/undergroundModel.vue";
+import setPellucidity from "../Tools/setPellucidity.vue";
 import $ from "jquery";
 import { getToken } from "@/utils/auth";
 import ImageWMS from "ol/source/ImageWMS";
@@ -46,7 +361,19 @@
 import GeoJSON from "ol/format/GeoJSON.js";
 import { Vector as VectorSource } from "ol/source";
 import { Vector as VectorLayer } from "ol/layer";
-import { perms_selectLayers } from '../../api/api.js'
+import {
+  perms_selectLayers,
+  comprehensive_selectModelByGuid,
+  comprehensive_selectFiles,
+  comprehensive_deletes,
+  comprehensive_selectModelByPageAndCount,
+  comprehensive_insertModel,
+  comprehensive_updateModel, selectByBuffer,
+  dataQuery_selectTabByEntity,
+  inquiry_selectDomains,
+  inquiry_selectFields,
+  dataQuery_selectByGid,
+} from '../../api/api.js'
 import {
   OverviewMap,
   defaults as defaultControls,
@@ -58,9 +385,40 @@
 import { geometry } from "@turf/turf";
 
 export default {
-  components: { mapinfo, maplayer, queryinfo },
+  components: { mapinfo, maplayer, queryinfo, terrainDig, modelAttach, undergroundModel, setPellucidity },
   data() {
+    var repasswordValidator = (rule, value, callback) => {
+      if (value === '') {
+        callback(new Error('璇峰啀娆¤緭鍏ュ瘑鐮�'));
+      } else if (value !== this.codeForm.password) {
+        callback(new Error('涓ゆ杈撳叆瀵嗙爜涓嶄竴鑷�!'));
+      } else {
+        callback();
+      }
+    };
+    var passwordValidator = (rule, value, callback) => {
+      var passwordreg =
+        /^(?![a-zA-Z]+$)(?![A-Z0-9]+$)(?![A-Z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![a-z0-9]+$)(?![a-z\W!@#$%^&*`~()\\-_+=,.?;<>]+$)(?![0-9\W!@#$%^&*`~()\\-_+=,.?;<>]+$)[a-zA-Z0-9\W!@#$%^&*`~()\\-_+=,.?;<>]{12,20}$/;
+      if (!passwordreg.test(value)) {
+        callback(
+          new Error('瀵嗙爜蹇呴』鐢辨暟瀛椼�佸瓧姣嶃�佺壒娈婂瓧绗︾粍鍚�,璇疯緭鍏�13-20浣�')
+        );
+      } else {
+        callback();
+      }
+    };
     return {
+      rules: {
+        password: [{ required: true, message: '璇疯緭鍏ュ瘑鐮�', trigger: 'blur' }, { validator: passwordValidator, trigger: 'blur' }],
+        repassword: [
+          { required: true, message: '璇疯緭鍏ョ‘璁ゅ瘑鐮�', trigger: 'blur' },
+          { validator: repasswordValidator, trigger: 'blur' },
+        ],
+      },
+      codeForm: {
+        password: '',
+        repassword: '',
+      },
       showTwoMenuFlag: false,
       setListTwoMenu: [],
       setListTwoMenuAll: [
@@ -83,6 +441,12 @@
             name: "鍦颁笅妯″紡",
             css: "twoMenu_imge29",
           },
+          // {
+          //   id: "b10",
+          //   label: "synthesis.undergroundMode",
+          //   name: "鐡︾墖涓嬭浇",
+          //   css: "twoMenu_imge29",
+          // },
         ],
         [
           {
@@ -265,6 +629,7 @@
             name: "绌洪棿鏌ヨ",
             css: "twoMenu_imge52",
           },
+
         ],
         [
           {
@@ -422,6 +787,59 @@
       isRouter: false, //璺緞鍒嗘瀽
       isPiple: false, //绠¢亾鍒嗘瀽
       DXZPState: null, //鍦板舰鏁村钩
+      dialogVisible: false,
+      formInline: {
+        title: '',
+        file: '',
+        name: '',
+        type: '',
+        info: '',
+        icon: '',
+        bak: ''
+      },
+      tableData: [],
+      dialog: {
+        dialogVisible: false,
+        isPdf: false,
+        isJpg: false,
+        src: ''
+      },
+      activeName: "first",
+      isShowModel: false,
+      options: [
+        {
+          value: '鍊炬枩妯″瀷',
+          label: '鍊炬枩妯″瀷'
+        }, {
+          value: 'BIM妯″瀷',
+          label: 'BIM妯″瀷'
+        }, {
+          value: '鐐逛簯妯″瀷',
+          label: '鐐逛簯妯″瀷'
+        }, {
+          value: '鍦拌川璁捐妯″瀷',
+          label: '鍦拌川璁捐妯″瀷'
+        }, {
+          value: '浜哄伐妯″瀷',
+          label: '浜哄伐妯″瀷'
+        }, {
+          value: '鍏朵粬妯″瀷',
+          label: '鍏朵粬妯″瀷'
+        }],
+      modelClip: false,
+      showPickUp: false,
+      dialogInsertVisible: false,
+      dialogVisible1: false,
+      ruleForm: {
+        depname: [],
+        tabs: [],
+        pwd: null,
+        repwd: null,
+        wkt: null,
+        descr: null,
+      },
+      dialogExtentVisible: false,
+      setExtent: 10,
     };
   },
   methods: {
@@ -429,39 +847,47 @@
     setChangeTwoMenu(res) {
       var val = res.id[0];
       if (window.model != null) {
-        window.model.deleteObject();
-        window.model = null;
+        // window.model.deleteObject();
+        // window.model = null;
       }
       sgworld.Analysis.clearCurtainContrast();
+      this.showPickUp = false;
       if (this.isMenuFlag == "d") {
         this.clearAllAnalsy();
       }
 
+      this.$store.state.propertiesFlag = '';
+
       if (this.isMenuFlag != val) {
-        this.$store.state.mapMenuBoolean = false;
-        this.$store.state.mapMenuBoxFlag = null;
-        this.$store.state.mapPopBoolean = false;
-        this.$store.state.mapPopBoxFlag = null;
-        sgworld.Creator.SimpleGraphic.clear();
-        this.isMenuFlag = val;
-        if (this.entityaLayers.length != 0) {
-          for (var i in this.entityaLayers) {
-            sgworld.Viewer.entities.remove(this.entityaLayers[i]);
+        if (res.id != "b9") {
+          this.$store.state.mapMenuBoolean = false;
+          this.$store.state.mapMenuBoxFlag = null;
+          this.$store.state.mapPopBoolean = false;
+          this.$store.state.mapPopBoxFlag = null;
+
+          this.isMenuFlag = val;
+          if (this.entityaLayers.length != 0) {
+            for (var i in this.entityaLayers) {
+              sgworld.Viewer.entities.remove(this.entityaLayers[i]);
+            }
+            this.entityaLayers = [];
           }
-          this.entityaLayers = [];
-        }
-        for (var i in this.$store.state.queryInfo) {
-          sgworld.Viewer.entities.remove(this.$store.state.queryInfo[i]);
-        }
-        this.$store.state.queryInfo = [];
-        if (this.$store.state.primitLayer != null) {
-          sgworld.Viewer.entities.remove(this.$store.state.primitLayer);
-          sgworld.Creator.DeleteObject(this.$store.state.primitLayer);
-          this.$store.state.primitLayer = null;
+          for (var i in this.$store.state.queryInfo) {
+            sgworld.Viewer.entities.remove(this.$store.state.queryInfo[i]);
+          }
+          this.$store.state.queryInfo = [];
+          if (this.$store.state.primitLayer != null) {
+            sgworld.Viewer.entities.remove(this.$store.state.primitLayer);
+            sgworld.Creator.DeleteObject(this.$store.state.primitLayer);
+            this.$store.state.primitLayer = null;
+          }
         }
       }
       this.showTwoMenuFlag = res.id;
-
+      if (val != 'h' && res.id != "b9") {
+        sgworld.Creator.SimpleGraphic.clear();
+        Viewer.entities.removeAll();
+      }
       switch (val) {
         case "a": //鍥惧眰绠$悊
           this.setCoverage(res.id);
@@ -491,6 +917,7 @@
       }
     },
     setPlot(res) {
+
       switch (res) {
         case "h1":
           sgworld.Creator.createSimpleGraphic(
@@ -800,6 +1227,7 @@
               },
             });
             this.entityaLayers.push(entity);
+            sgworld.Navigate.flyToObj(entity)
             break;
           case "point":
             let point = Viewer.entities.add({
@@ -820,6 +1248,7 @@
             });
 
             this.entityaLayers.push(point);
+            sgworld.Navigate.flyToObj(point)
             break;
           case "polyline":
             var std = [];
@@ -840,6 +1269,7 @@
             });
 
             this.entityaLayers.push(line);
+            sgworld.Navigate.flyToObj(line)
             break;
           case "label":
             const label = Viewer.entities.add({
@@ -858,6 +1288,7 @@
               },
             });
             this.entityaLayers.push(label);
+            sgworld.Navigate.flyToObj(label)
             break;
         }
       }
@@ -893,6 +1324,8 @@
               fileReader.result,
               kmlOptions
             );
+
+            sgworld.Navigate.flyToObj(geocachePromise)
 
             geocachePromise.then(function (dataSource) {
               var geocacheEntities = dataSource.entities.values;
@@ -1129,12 +1562,32 @@
     setIquery(res) {
       switch (res) {
         case "e2":
+          this.showPickUp = false;
           this.$store.state.mapMenuBoolean = !this.$store.state.mapMenuBoolean;
           this.$store.state.mapMenuBoxFlag = "1";
           break;
         case "e1":
           this.$store.state.mapMenuBoolean = !this.$store.state.mapMenuBoolean;
           this.$store.state.mapMenuBoxFlag = "2";
+          this.showPickUp = false;
+          break;
+        //鎷惧彇鍔熻兘
+        case "e3":
+          this.$store.state.mapMenuBoolean = false;
+          this.showPickUp = !this.showPickUp;
+          if (this.showPickUp) {
+            let that = this;
+            Viewer.screenSpaceEventHandler.setInputAction(function (event) {
+              let p = sgworld.Navigate.getMouseDegrees(event);
+              console.log(p);
+              if (that.showPickUp) {
+                that.getPickUpData(p);
+              }
+            }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
+          } else {
+            this.$refs.queryinfo.closeAll();
+            Viewer.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
+          }
           break;
       }
     },
@@ -1161,20 +1614,22 @@
 
     setAnalsy(res) {
       //this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close("queryinfo");
-
+      this.$bus.$emit("closeMenuPop", res);
       var that = this;
       switch (res) {
         case "d1": //绛夐珮绾垮垎鏋�
+          this.closePipelinePop();
           that.isolineFlag = !that.isolineFlag;
           elevationTool.tf = that.isolineFlag;
           elevationTool.render();
           break;
         case "d2": //鍧″害鍒嗘瀽
+          this.closePipelinePop();
           that.isslopeFlag = !that.isslopeFlag;
           var val = {
             name: "Lengend",
             id: res,
-            vshow: that.isslopeFlag
+            vshow: that.isslopeFlag,
           };
           this.$bus.$emit("mapChangeBox", val);
           window.PDelevationTool = new SmartEarth.ElevationTool(sgworld); //鍏ㄥ眬鍙橀噺
@@ -1185,28 +1640,29 @@
             PDelevationTool.type = "none";
           }
           PDelevationTool.render();
-debugger
+
           break;
         case "d3": //璺緞鍒嗘瀽
-
+          this.closePipelinePop();
           this.isRouter = !this.isRouter;
           let value;
           if (this.isRouter) {
             value = {
               name: "Analysis",
               id: 3,
-              show: true
+              show: true,
             };
           } else {
             value = {
               name: "Analysis",
               id: 3,
-              show: false
+              show: false,
             };
           }
           this.$bus.$emit("mapChangeBox", value);
           break;
         case "d4": //鍓栭潰鍒嗘瀽
+          this.closePipelinePop();
           if (window.AnalysisDXPM) {
             window.AnalysisDXPM.end && window.AnalysisDXPM.end("cancel");
             this.clear(res);
@@ -1215,6 +1671,7 @@
           }
           break;
         case "d5": //娲按娣规病鍒嗘瀽
+          this.closePipelinePop();
           if (window.AnalysisFlood) {
             this.clear(res);
           } else {
@@ -1222,6 +1679,7 @@
           }
           break;
         case "d6": //鍦熸柟閲忓垎鏋�
+          this.closePipelinePop();
           if (window.TFvolumetricMeasurementTool) {
             TFvolumetricMeasurementTool.cleanUp();
             if (TFvolumetricMeasurementTool._mouseHandler) {
@@ -1254,23 +1712,54 @@
           }
           break;
         case "d7": //涓夌淮鎴潰鍒嗘瀽
+          this.closePipelinePop();
           // if(window.MXModel) {
           //   Viewer.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
           //   window.MXModel=null;
           // } else {
           var that = this;
-          window.model = sgworld.Creator.create3DTilesets(
-            "",
-            modelUrl + '/tileset/m/SN/tileset.json',
-            {},
-            {},
-            "0",
-            true,
-            (data) => {
-              sgworld.Navigate.flyToObj(data);
-              that.setclippingModel();
+          that.modelClip = !that.modelClip;
+          if (that.modelClip) {
+            // that.$store.state.propertiesFlag = '3';
+            if (window.model) {
+              that.modelClipping();
             }
-          );
+            else {
+              var tileset = Viewer.scene.primitives.add(
+                new Cesium.Cesium3DTileset({
+                  name: res.cnName,
+                  url: modelUrl + "/tileset/m/SN/tileset.json",
+                  maximumScreenSpaceError: modelUrl.indexOf("/pnts/") > -1 ? 16 : 64, // 鏈�澶у睆骞曠┖闂撮敊璇細16
+                  maximumMemoryUsage: 768, // 鏈�澶у唴瀛橈細512
+                  dynamicScreenSpaceError: true, // 鍑忓皯绂荤浉鏈鸿緝杩滅殑灞忓箷绌洪棿閿欒锛歠alse
+                  skipLevelOfDetail: true, // 鍦ㄩ亶鍘嗘椂鍊欒烦杩囪鎯咃細false
+                })
+              );
+              tileset.readyPromise.then((tileset) => {
+                tileset.id = res.cnName;
+                tileset.layerId = res.id;
+                Viewer.flyTo(tileset);
+                that.modelClipping();
+              });
+              window.model = tileset
+            }
+          }
+          else {
+            // that.$store.state.propertiesFlag = '';
+            Viewer.entities.removeAll();
+          }
+          // window.model = sgworld.Creator.create3DTilesets(
+          //   "",
+          //   modelUrl + "/tileset/m/SN/tileset.json",
+          //   {},
+          //   {},
+          //   "0",
+          //   true,
+          //   (data) => {
+          //     sgworld.Navigate.flyToObj(data);
+          //     that.setclippingModel();
+          //   }
+          // );
 
           break;
         case "d9": //绠¢亾鍒嗘瀽
@@ -1283,7 +1772,9 @@
                 close: () => {
                   if (this.$store.state.pipelineEntity.length != 0) {
                     for (var i in this.$store.state.pipelineEntity) {
-                      sgworld.Viewer.entities.remove(this.$store.state.pipelineEntity[i]);
+                      sgworld.Viewer.entities.remove(
+                        this.$store.state.pipelineEntity[i]
+                      );
                     }
                   }
                 },
@@ -1296,15 +1787,41 @@
 
           break;
         case "d8": //褰卞儚瀵规瘮
+          this.closePipelinePop();
           if (this.isContrastFlag == false) {
             this.isContrastFlag = true;
-            sgworld.Analysis.createCurtainContrast(2, 1);
+            var localUrl = 'http://{host}/LFData/2d/tiles/img/{z}/{x}/{y}.png'
+            localUrl = localUrl.replace("{host}", iisHost)
+            window.contRastLayer = Viewer.imageryLayers.addImageryProvider(
+              new Cesium.UrlTemplateImageryProvider({
+                url: localUrl,
+                maximumLevel: 22,
+                enablePickFeatures: false
+              })
+            );
+            Viewer.imageryLayers.lowerToBottom(window.contRastLayer);//灏嗗浘灞傜Щ鍒版渶搴曞眰
+
+            Viewer.imageryLayers.raise(window.contRastLayer);//灏嗗浘灞備笂绉讳竴灞�
+            if (window.BaseMapLayer) {
+              Viewer.imageryLayers.raise(window.contRastLayer);//灏嗗浘灞備笂绉讳竴灞�
+              sgworld.Analysis.createCurtainContrast(1, 2);
+            } else {
+              sgworld.Analysis.createCurtainContrast(0, 1);
+            }
+
           } else {
             this.isContrastFlag = false;
             sgworld.Analysis.clearCurtainContrast();
+            if (window.contRastLayer) {
+              window.Viewer.imageryLayers.remove(
+                window.contRastLayer
+              );
+              window.contRastLayer = null;
+            }
           }
           break;
         case "d10": //鍦伴潰鏁村钩
+          this.closePipelinePop();
           var val = {
             name: "Trrain",
             id: res,
@@ -1342,6 +1859,14 @@
           break;
 
         case "d11": //鍦板舰寮�鎸�
+          this.closePipelinePop();
+          // this.$refs &&
+          //   this.$refs.terrainDig &&
+          //   this.$refs.terrainDig.open("绠¢亾绌洪棿鍒嗘瀽", null, {
+          //     close: () => {
+
+          //     },
+          //   });
           if (window.Excavation) {
             window.Excavation.drawHandler &&
               window.Excavation.drawHandler.destroy();
@@ -1359,6 +1884,7 @@
           break;
 
         case "d12": //閫氳鍒嗘瀽
+          this.closePipelinePop();
           if (window.TSExcavation != null) {
             window.TSExcavation._SimpleGraphic.drawHandler &&
               window.TSExcavation._SimpleGraphic.drawHandler.destroy();
@@ -1375,6 +1901,7 @@
           }
           break;
         case "d13": //瑙嗗煙鍒嗘瀽
+          this.closePipelinePop();
           if (window.SYExcavatio) {
             window.SYExcavatio.end && window.SYExcavatio.end();
             window.SYExcavatio.close();
@@ -1394,6 +1921,7 @@
           }
           break;
         case "d14": //鍦嗗舰鏃跺煙鍒嗘瀽
+          this.closePipelinePop();
           if (window.YXSYExcavation) {
             window.YXSYExcavation.end && window.YXSYExcavation.end();
             window.YXSYExcavation.close();
@@ -1414,6 +1942,268 @@
 
           break;
       }
+    },
+
+    //妯″瀷瑁佸垏
+    modelClipping() {
+      const scene = Viewer.scene;
+      let targetY = 40.0;
+      let planeEntities = [];
+      let selectedPlane;
+      let clippingPlanes = new Cesium.ClippingPlaneCollection({
+        planes: [ // ClippingPlane瀵硅薄鏁扮粍闆嗗悎
+          new Cesium.ClippingPlane( // 瑁佸垏闈�
+            new Cesium.Cartesian3(0.0, 0.0, -1.0), // 娉曠嚎鏂瑰悜
+            0// 鍘熺偣鍒板钩闈㈢殑鏈�鐭窛绂伙紝璁剧疆0灏卞ソ
+          ),
+        ],
+        enabled: true,
+        edgeWidth: 1.0, // 妯″瀷琚鍒囬儴鍒嗙殑鎴潰绾垮
+      });
+      // let clippingPlanes = new Cesium.ClippingPlaneCollection({
+      //   planes: [ // ClippingPlane瀵硅薄鏁扮粍闆嗗悎
+      //     //鍓嶅悗鍒囧壊
+      //     new Cesium.ClippingPlane(new Cesium.Cartesian3(0, 1, 0), 0), //鍚�
+      //     new Cesium.ClippingPlane(new Cesium.Cartesian3(0, -1, 0), 0),  //鍓�
+      //     // 宸﹀彸鍒囧壊
+      //     new Cesium.ClippingPlane(new Cesium.Cartesian3(1.0, 0.0, 0), 0), //宸�
+      //     new Cesium.ClippingPlane(new Cesium.Cartesian3(-1.0, 0.0, 0), 0),  //鍙�
+      //     // 涓婁笅鍒囧壊
+      //     new Cesium.ClippingPlane(new Cesium.Cartesian3(0, 0.0, -1), 0),  //涓娾啋涓�
+      //     // new Cesium.ClippingPlane(new Cesium.Cartesian3(0, 0.0, 1), 0),  //涓嬧啋涓娿��
+      //   ],
+      //   enabled: true,
+      //   edgeWidth: 1.0, // 妯″瀷琚鍒囬儴鍒嗙殑鎴潰绾垮
+      //   unionClippingRegions: true, //true 鎵嶈兘澶氫釜鍒囧壊
+      // });
+      let boundingSphere = window.model.boundingSphere;
+      // 鍒涘缓涓�涓潗鏍囪酱锛屼究浜庢祴璇�
+      // var transform = Cesium.Transforms.eastNorthUpToFixedFrame(boundingSphere.center);
+      // var modelMatrixPrimitive = Viewer.scene.primitives.add(new Cesium.DebugModelMatrixPrimitive({
+      //   // modelMatrix: transform,
+      //   length: 140.0
+      // }));
+
+      // // 鍒涘缓娣诲姞瑁佸壀骞抽潰
+      for (let i = 0; i < clippingPlanes.length; ++i) {
+        const plane = clippingPlanes.get(i);
+        const planeEntity = Viewer.entities.add({
+          position: boundingSphere.center,
+          plane: {
+            dimensions: new Cesium.Cartesian2(
+              boundingSphere.radius * 1.5,
+              boundingSphere.radius * 1.5
+            ),//鍒囬潰鐨勯暱鍜屽
+            material: Cesium.Color.WHITE.withAlpha(0.1),
+            plane: new Cesium.CallbackProperty(
+              // 娣诲姞缁戝畾浜嬩欢锛屼笉鏂皟鐢�
+              createPlaneUpdateFunction(plane),
+              false
+            ),
+            outline: true,
+            outlineColor: Cesium.Color.WHITE,
+          },
+        });
+        planeEntities.push(planeEntity);
+      }
+      // 鍒涘缓娣诲姞瑁佸壀骞抽潰
+      // let m_box;
+      // for (let i = 0; i < clippingPlanes.length; ++i) {
+      //   let plane = clippingPlanes.get(i);
+      //   let getPlaneType = getType4Plane(plane);
+      //   let planeEntity = Viewer.entities.add({ //娣诲姞骞抽潰瀹炰綋 鐩磋瑁佸垏闈�
+      //     id: 'ClipPlane' + i,
+      //     position: boundingSphere.center,// 鏍规嵁3dtiles鍚屾璋冩暣瑁佸垏闈㈤珮搴�
+      //     plane: {
+      //       dimensions: new Cesium.Cartesian2(80, 80),//鍒囬潰鐨勯暱鍜屽
+      //       plane: new Cesium.CallbackProperty(createPlaneUpdateFunction_box(plane, getPlaneType, boundingSphere.center), false),
+      //       material: Cesium.Color.WHITE.withAlpha(0.2),
+      //       outline: false,
+      //       outlineColor: Cesium.Color.WHITE,
+      //     }
+      //   });
+      //   if (!m_box) {
+      //     m_box = Viewer.entities.add({
+      //       id: 'ClopBox',
+      //       modelMatrixPrimitive: modelMatrixPrimitive,
+      //       position: boundingSphere.center,
+      //       box: {
+      //         dimensions: new Cesium.Cartesian3(boundingSphere.radius * 1.2, boundingSphere.radius * 1.2, 40),
+      //         material: Cesium.Color.WHITE.withAlpha(0.3),
+      //       }
+      //     })
+      //   }
+      // }
+      window.model.clippingPlanes = clippingPlanes;
+      if (window.modelHeight && window.modelHeight != 0) {
+        // console.log("window.modelHeight---",window.modelHeight)
+        window.model.clippingPlanes.modelMatrix = Cesium.Matrix4.fromTranslation(
+          new Cesium.Cartesian3(0.0, 0.0, window.modelHeight)
+        );
+      }
+      // 缁戝畾涓婄Щ鍔ㄤ簨浠�
+      const downHandler = new Cesium.ScreenSpaceEventHandler(
+        Viewer.scene.canvas
+      );
+      downHandler.setInputAction(function (movement) {
+        const pickedObject = scene.pick(movement.position);
+        if (
+          Cesium.defined(pickedObject) &&
+          Cesium.defined(pickedObject.id.plane)
+        ) {
+          selectedPlane = pickedObject.id.plane;
+          selectedPlane.material = Cesium.Color.WHITE.withAlpha(0.05);
+          selectedPlane.outlineColor = Cesium.Color.WHITE;
+          scene.screenSpaceCameraController.enableInputs = false;
+        }
+      }, Cesium.ScreenSpaceEventType.LEFT_DOWN);
+
+      // 缁戝畾涓嬬Щ鍔ㄤ簨浠�
+      const upHandler = new Cesium.ScreenSpaceEventHandler(
+        Viewer.scene.canvas
+      );
+      upHandler.setInputAction(function () {
+        if (Cesium.defined(selectedPlane)) {
+          selectedPlane.material = Cesium.Color.WHITE.withAlpha(0.1);
+          selectedPlane.outlineColor = Cesium.Color.WHITE;
+          selectedPlane = undefined;
+        }
+        scene.screenSpaceCameraController.enableInputs = true;
+      }, Cesium.ScreenSpaceEventType.LEFT_UP);
+      // Update plane on mouse move
+      const moveHandler = new Cesium.ScreenSpaceEventHandler(
+        Viewer.scene.canvas
+      );
+      moveHandler.setInputAction(function (movement) {
+        if (Cesium.defined(selectedPlane)) {
+          const deltaY = movement.startPosition.y - movement.endPosition.y;
+          targetY += deltaY;
+          // console.log("targetY----",targetY)
+        }
+      }, Cesium.ScreenSpaceEventType.MOUSE_MOVE);
+      function createPlaneUpdateFunction(plane) {
+        return function () {
+          plane.distance = targetY;
+          // console.log("targetY----",targetY)
+          return plane;
+        };
+      }
+      //鑾峰彇鍒囬潰鐨則ype // 涓娿�佷笅銆佸乏銆佸彸銆佸墠銆佸悗
+      function getType4Plane(plane) {
+        var m_type;
+        var normal = plane._normal;
+        var x = normal.x;
+        var y = normal.y;
+        var z = normal.z;
+        if (x == 1 && y == 0 && z == 0) {
+          m_type = 'left';
+        }
+        else if (x == -1 && y == 0 && z == 0) {
+          m_type = 'right';
+        }
+        else if (x == 0 && y == 1 && z == 0) {
+          m_type = 'behind';
+        }
+        else if (x == 0 && y == -1 && z == 0) {
+          m_type = 'front';
+        }
+        else if (x == 0 && y == 0 && z == -1) {
+          m_type = 'top';
+        }
+        return m_type;
+      }
+      function createPlaneUpdateFunction_box(plane, type, origin) {
+        return function () {
+          var num_x = window.localStorage.getItem('slider_x') / 100000;
+          var num_y = window.localStorage.getItem('slider_y') / 100000;
+          var num_z = window.localStorage.getItem('slider_z') / 1.5;//璇诲彇婊戝姩鏉″��
+          var origin_degree = cartesian3ToDegrees(origin);
+          var target_degree_x = [origin_degree[0] + num_x, origin_degree[1], +origin_degree[2]];
+          var target_degree_y = [origin_degree[0], origin_degree[1] + num_y, +origin_degree[2]];
+          var target_degree_z = [origin_degree[0], origin_degree[1], +origin_degree[2] + num_z];
+          var m_dis_x = Cesium.Cartesian3.distance(origin, Cesium.Cartesian3.fromDegrees(target_degree_x[0], target_degree_x[1], target_degree_x[2]));
+          var m_dis_y = Cesium.Cartesian3.distance(origin, Cesium.Cartesian3.fromDegrees(target_degree_y[0], target_degree_y[1], target_degree_y[2]));
+          var m_dis_z = Cesium.Cartesian3.distance(origin, Cesium.Cartesian3.fromDegrees(target_degree_z[0], target_degree_z[1], target_degree_z[2]));
+          createPlanePos(origin_degree, num_x, num_y, num_z);
+          let distance = 140;
+          if (type == 'left') {
+            if (num_x < 0) {
+              plane.distance = distance - (-m_dis_x);
+              return plane;
+            } else {
+              plane.distance = distance - m_dis_x
+              return plane;
+            }
+          }
+          else if (type == 'behind') {
+            if (num_y < 0) {
+              plane.distance = distance - (-m_dis_y);
+              return plane;
+            } else {
+              plane.distance = distance - m_dis_y;
+              return plane;
+            }
+          }
+          else if (type == 'right') {
+            if (num_x < 0) {
+              plane.distance = distance - m_dis_x;
+              return plane;
+            } else {
+              plane.distance = distance - (-m_dis_x);
+              return plane;
+            }
+          }
+          else if (type == 'front') {
+            if (num_y < 0) {
+              plane.distance = distance - m_dis_y;
+              return plane;
+            } else {
+              plane.distance = distance - (-m_dis_y);
+              return plane;
+            }
+          }
+          else if (type == 'top') {
+            if (num_z < 0) {
+              plane.distance = m_dis_z;
+              // console.log('num_z=========',num_z)
+              // console.log('m_dis_z=========',m_dis_z)
+              // plane.distance = distance - m_dis_z;
+              return plane;
+            } else {
+              // plane.distance = 100;
+              plane.distance = distance - (-m_dis_z);
+              return plane;
+            }
+          }
+          return plane;
+        };
+      }
+
+      function createPlanePos(origin, x, y, z) {
+        var clipbox = Viewer.entities.getById('ClopBox');
+        if (clipbox) {
+          clipbox.position = new Cesium.CallbackProperty(function () {
+            return Cesium.Cartesian3.fromDegrees(origin[0] + x, origin[1] + y, +origin[2] + z);//瀹炴椂杩斿洖褰撳墠鐩掑瓙鐨勪綅缃�
+          }, false);
+        }
+      }
+      function cartesian3ToDegrees(cartesian3) {
+        var ellipsoid = Viewer.scene.globe.ellipsoid;
+        var cartographic = ellipsoid.cartesianToCartographic(cartesian3);
+        var lat = Cesium.Math.toDegrees(cartographic.latitude);
+        var lng = Cesium.Math.toDegrees(cartographic.longitude);
+        var alt = cartographic.height;
+        var pos = [lng, lat, alt];
+        return pos;
+      }
+
+    },
+
+    //鍏抽棴绠¢亾淇℃伅寮圭獥
+    closePipelinePop() {
+      this.$refs &&
+        this.$refs.queryinfo &&
+        this.$refs.queryinfo.close("queryinfo");
     },
     setclippingModel() {
       if (window.model) {
@@ -1446,11 +2236,16 @@
       }
     },
     addAnalysisFlood() {
+      var url = window.location.href;
+      var testurl = "";
+      if (url.indexOf("web") != -1) {
+        testurl = "/web";
+      }
       var method = {
         pointSelect: true,
         spood: 20,
         GroupID: 0,
-        url: "/SmartEarthSDK/Workers/image/waterNormals.jpg",
+        url: testurl + "/SmartEarthSDK/Workers/image/33.gif",
       };
       window.AnalysisFlood = sgworld.Command.execute(
         2,
@@ -1493,9 +2288,7 @@
       );
     },
     setWander(res) {
-      ;
       switch (res) {
-
         case "c1":
           if (window.PointMY != null) {
             window.PointMY.drawHandler && window.PointMY.drawHandler.destroy();
@@ -1609,8 +2402,18 @@
           this.$store.state.isNaviget = this.isNaviget;
           break;
         case "b9": //鍦颁笅妯″紡
-          this.UndergroundMode = !this.UndergroundMode;
-          window.sgworld.Analysis.UndergroundMode(this.UndergroundMode, 0.3);
+          // this.UndergroundMode = !this.UndergroundMode;
+          // window.sgworld.Analysis.UndergroundMode(this.UndergroundMode, 0.3);
+          if (window.UndergroundMode) {
+            this.$refs &&
+              this.$refs.undergroundModel &&
+              this.$refs.undergroundModel.close();
+          } else {
+            this.$refs &&
+              this.$refs.undergroundModel &&
+              this.$refs.undergroundModel.open("鍦颁笅妯″紡", null,);
+          }
+
           break;
       }
     },
@@ -1638,9 +2441,13 @@
       if (data.code != 200) {
         return this.$message.error("鍥惧眰鍒楄〃鏌ヨ澶辫触");
       }
+
       var std = data.result;
       var that = this;
       var checkKey = [];
+      let checkedLayers = [];
+      this.$store.state.isProjectLayer = [];
+
       var val = std.filter((str) => {
         if (str.type == 1) {
           return str;
@@ -1648,30 +2455,51 @@
         if (str.url != null && str.type == 2) {
           if (str.isShow == 1) {
             checkKey.push(str.id);
-            that.setAddLayers(str);
           }
           return str;
         }
       });
+      var value = std.filter((str) => {
+        if (str.url != null && str.type == 2 && str.isShow == 1) {
+          return str;
+        }
 
+      })
+      var layer = std.filter((str) => {
+        if (str.isProject == 1 && str.type == 2) {
+          this.$store.state.isProjectLayer.push(str);
+        }
+      })
+
+      this.setAddLayers(value);
       var res = this.setTreeData(val);
+      this.$store.state.pigCode = null;
+      //瀛樺偍閫変腑鍥惧眰
+      // sessionStorage.setItem("checkedLayers", JSON.stringify(checkedLayers));
 
-      for (var i in res) {
-        res[i].children = res[i].children.filter((val) => {
-          if (val.children != null) {
-            return val;
-          }
-        });
-      }
+      // for (var i in res) {
+      //   res[i].children = res[i].children.filter((val) => {
+      //     if (val.children != null) {
+      //       return val;
+      //     }
+      //   });
+      // }
+      this.$store.state.oldTree = val;
       this.$store.state.treeData = res;
-      // this.$refs.tree.setCheckedKeys(checkKey);
-      this.$store.state.checkedKeys = checkKey
+
+      this.$store.state.checkedKeys = checkKey;
     },
     setTreeData(source) {
       let cloneData = JSON.parse(JSON.stringify(source)); // 瀵规簮鏁版嵁娣卞害鍏嬮殕
       return cloneData.filter((father) => {
         // 寰幆鎵�鏈夐」
         let branchArr = cloneData.filter((child) => father.id == child.pid); // 瀵规瘮ID锛屽垎鍒笂涓嬬骇鑿滃崟锛屽苟杩斿洖鏁版嵁
+        if (branchArr.length > 0) {
+          branchArr.sort(function (a, b) {
+
+            return a.orderNum - b.orderNum
+          })
+        }
         branchArr.length > 0 ? (father.children = branchArr) : ""; // 缁欑埗绾ф坊鍔犱竴涓猚hildren灞炴�э紝骞惰祴鍊�
         // 灞炰簬鍚屼竴瀵硅薄闂锛屼緥濡傦細浠� a=b銆乧=1 锛岀劧鍚庡啀浠� b.c=c 锛� 閭d箞 a.c=b.c=c=1 锛涘悓鐞嗭紝鍚庣画浠� c.d=2 ,閭d箞 a.c.d 涔熸槸=2锛�
         // 鐢辨寰幆澶氭鍚庯紝灏辫兘褰㈡垚鐩稿簲鐨勬爲褰㈡暟鎹粨鏋�
@@ -1679,110 +2507,670 @@
       });
     },
     setAddLayers(res) {
-      if (res.serveType == "WMS") {
-        var resource = geoServerURl;
-        if (res.resource != null && res.resource != undefined) {
-          resource = res.resource;
+      this.setClearWmsLayer()
+      var std = [[]];
+      for (var i in res) {
+        switch (res[i].serveType) {
+          case "WMS":
+            std[0].push(res[i])
+            break;
         }
-        var imageryLayers = window.Viewer.scene.imageryLayers;
-        let layerWMS = new Cesium.WebMapServiceImageryProvider({
-          url: resource,
-          layers: res.url,
-          parameters: {
-            transparent: true,
-            format: "image/png",
-            srs: "EPSG:4490",
-            styles: "",
-          },
-          tileWidth: 512,
-          tileHeight: 512,
-        });
-        layerWMS.name = res.cnName;
-        //閫忔槑搴�
-        var tdtAnnoLayer = imageryLayers.addImageryProvider(layerWMS);
-        if (res.opacity) {
-          tdtAnnoLayer.alpha = parseInt(res.opacity) / 100;
+      }
+      if (std[0].length != 0) {
+        if (this.$store.state.pigCode) {
+
+          this.setPrjidWmsLayer(std[0])
+        } else {
+
+          this.setAddWmsLayer(std[0])
         }
-        var layer2 = new Image({
-          name: res.cnName,
-          source: new ImageWMS({
-            crossOrigin: "anonymous",
-            url: resource,
-            params: {
-              FORMAT: "image/png",
-              VERSION: "1.1.1",
-              LAYERS: res.url,
-            },
-          }),
-        });
-        if (res.opacity) {
-          layer2.setOpacity(parseInt(res.opacity) / 100);
-        }
-        window.map.addLayer(layer2);
-      } else if (res.serveType == "WFS") {
-        var url =
-          res.resource +
-          "?service=WFS&version=1.0.0&request=GetFeature&typeName=" +
-          res.url +
-          "&outputFormat=application%2Fjson";
-        $.ajax({
-          url: url,
-          cache: false,
-          async: true,
-          success: function (data) {
-            var datasource = Cesium.GeoJsonDataSource.load(data, {
-              stroke: Cesium.Color.YELLOW,
-              fill: Cesium.Color.YELLOW.withAlpha(0.1),
-              alpha: 0.1,
-              strokeWidth: 8,
-              clampToGround: true, //鏄惁璐村湴
-            });
-            datasource.then((data) => {
-              data.name = res.cnName;
-              window.Viewer.dataSources.add(data);
-            });
-          },
-          error: function (data) {
-            console.log("error");
-          },
-        });
 
-        var vectorLayer = new VectorLayer({
-          name: res.cnName,
-          source: new VectorSource({
-            url: url,
-            format: new GeoJSON(),
-          }),
-        });
-        window.map.addLayer(vectorLayer);
-      } else if (res.serveType == "Tileset") {
-
-        var tileset = Viewer.scene.primitives.add(
-          new Cesium.Cesium3DTileset({
-            name: res.cnName,
-            url: modelUrl + "/" + res.url, //192.168.20.106,to4
-            maximumScreenSpaceError: 64, // 鏈�澶у睆骞曠┖闂撮敊璇細16
-            maximumMemoryUsage: 768, // 鏈�澶у唴瀛橈細512
-            dynamicScreenSpaceError: true, // 鍑忓皯绂荤浉鏈鸿緝杩滅殑灞忓箷绌洪棿閿欒锛歠alse
-            skipLevelOfDetail: true, // 鍦ㄩ亶鍘嗘椂鍊欒烦杩囪鎯咃細false
-          })
-        );
-
-        tileset.readyPromise.then(function (tileset) {
-          tileset.id = res.cnName;
-          Viewer.flyTo(tileset);
-        });
       }
     },
+    setPrjidWmsLayer(res) {
+      var layer = [];
+      var sql = [];
+      var dirid = this.$store.state.pigCode
+      var that = this;
+      for (var i in res) {
+        layer.push(res[i].url)
+
+        if (res[i].isProject == 1) {
+          var val = "dirid like '" + dirid + "%'"
+          sql.push(val)
+        } else {
+          sql.push("1 = 1")
+        }
+      }
+      layer = layer.reverse();
+      sql = sql.reverse().join(";")
+      var getFeatureInfoFormat = new Cesium.GetFeatureInfoFormat("html", null, function (html) {
+
+        that.getFeatureInfo(html)
+      });
+      window.layerWMS = new Cesium.WebMapServiceImageryProvider({
+        url: geoServerURl,
+        layers: layer.toString(),
+        getFeatureInfoParameters: { info_format: 'text/html' },
+        enablePickFeatures: true,
+        getFeatureInfoFormats: [getFeatureInfoFormat],
+        parameters: {
+          transparent: true,
+          format: "image/png",
+          srs: "EPSG:4490",
+          styles: "",
+          cql_filter: sql
+        },
+        tileWidth: 512,
+        tileHeight: 512,
+      });
+      layerWMS.name = "Wms_Layer";
+
+      window.Viewer.imageryLayers.addImageryProvider(window.layerWMS);
+      var layer2 = new Image({
+        name: "Wms_Layer",
+        source: new ImageWMS({
+          crossOrigin: "anonymous",
+          url: geoServerURl,
+          params: {
+            FORMAT: "image/png",
+            VERSION: "1.1.1",
+            LAYERS: layer.toString(),
+            cql_filter: sql
+          },
+        }),
+      });
+      if (res.opacity) {
+        layer2.setOpacity(parseInt(res.opacity) / 100);
+      }
+      window.map.addLayer(layer2);
+    },
+
+
+
+    setClearWmsLayer() {
+      for (var i = 0; i < window.Viewer.imageryLayers._layers.length; i++) {
+        var val_id = window.Viewer.imageryLayers._layers[i].imageryProvider.name;
+        if (val_id == "Wms_Layer") {
+          window.Viewer.imageryLayers.remove(
+            window.Viewer.imageryLayers._layers[i]
+          );
+        }
+      }
+      var layers_ol = window.map.getAllLayers();
+      for (var i in layers_ol) {
+        var layerOl = layers_ol[i];
+        if (layerOl.values_.name == "Wms_Layer") {
+          window.map.removeLayer(layers_ol[i]); //鏄剧ず鍥惧眰
+        }
+      }
+    },
+    setAddWmsLayer(res) {
+
+      var url = [];
+      for (var i in res) {
+        if (res[i].url) {
+          url.push(res[i].url)
+        }
+      }
+
+      url = url.reverse();
+      var that = this;
+      var getFeatureInfoFormat = new Cesium.GetFeatureInfoFormat("html", null, function (html) {
+        that.getFeatureInfo(html)
+      });
+      window.layerWMS = new Cesium.WebMapServiceImageryProvider({
+        url: geoServerURl,
+        layers: url.toString(),
+        getFeatureInfoParameters: { info_format: 'text/html' },
+        enablePickFeatures: true,
+        getFeatureInfoFormats: [getFeatureInfoFormat],
+        parameters: {
+          transparent: true,
+          format: "image/png",
+          srs: "EPSG:4490",
+          styles: "",
+        },
+        tileWidth: 512,
+        tileHeight: 512,
+      });
+      layerWMS.name = "Wms_Layer";
+      window.Viewer.imageryLayers.addImageryProvider(window.layerWMS);
+      var layer2 = new Image({
+        name: "Wms_Layer",
+        source: new ImageWMS({
+          crossOrigin: "anonymous",
+          url: geoServerURl,
+          params: {
+            FORMAT: "image/png",
+            VERSION: "1.1.1",
+            LAYERS: url.toString(),
+          },
+        }),
+      });
+      if (res.opacity) {
+        layer2.setOpacity(parseInt(res.opacity) / 100);
+      }
+      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("_", "")
+        }
+        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) {
+      //shijianchuo鏄暣鏁帮紝鍚﹀垯瑕乸arseInt杞崲
+      var time = new Date(shijianchuo);
+      var y = time.getFullYear();
+      var m = time.getMonth() + 1;
+      var d = time.getDate();
+      var h = time.getHours();
+      var mm = time.getMinutes();
+      var s = time.getSeconds();
+      return (
+        y +
+        '-' +
+        this.add0(m) +
+        '-' +
+        this.add0(d) +
+        ' ' +
+        h +
+        ':' +
+        mm +
+        ':' +
+        s
+      );
+    },
+    //鏍煎紡鍖栨椂闂�
+    add0(m) {
+      return m < 10 ? '0' + m : m;
+    },
+    async getTableData() {
+      this.tableData = []
+      const data = await dataQuery_selectByGid(this.$store.state.pickoption)
+      if (data.code != 200) {
+        return
+      }
+
+      var valste = data.result
+      valste.dirid = valste.dirName;
+      valste.depid = valste.depName;
+      valste.verid = valste.verName;
+      valste.createuser = valste.createName;
+      valste.updateuser = valste.updateName;
+      if (valste.createtime) {
+        valste.createtime = this.format(valste.createtime)
+      }
+      if (valste.updatetime) {
+        valste.updatetime = this.format(valste.updatetime)
+      }
+
+      for (var j in this.optionx) {
+        if (
+          this.optionx[j].domainNa != null &&
+          this.optionx[j].domainNa != undefined
+        ) {
+
+          valste[this.optionx[j].field] = this.optionx[j].domainNa
+        }
+      }
+      var arr = {}
+      for (var i = (this.attributeData.length - 1); i >= 0; i--) {
+        var vla = this.attributeData[i]
+
+
+        if (vla.domainNa) {
+
+          var val = this.optionx.filter(res => {
+            if (res.domName == vla.domainNa && res.domCode == valste[vla.field]) {
+              return res;
+            }
+          })
+          var vlue = null
+          if (val.length > 0) {
+            vlue = val[0].codeDesc
+          } else {
+            vlue = ''
+          }
+          arr[vla.alias] = vlue
+        } else {
+          arr[vla.alias] = valste[vla.field]
+        }
+      }
+
+      arr['eventid'] = valste.eventid
+
+
+      this.$store.state.propertiesInfo = arr;
+
+      this.$store.state.propertiesFlag = '1'
+
+    },
+
+    showModelAttach() {
+      if (this.$store.state.attachModel) {
+        var name = this.$store.state.attachinfo.cnName;
+        this.$refs &&
+          this.$refs.modelAttach &&
+          this.$refs.modelAttach.open(name, null, {
+            close: () => { },
+          });
+      } else {
+      }
+    },
+    async showModelCatch() {
+      if (this.$store.state.catModel) {
+        this.formInline = {
+          title: '',
+          file: '',
+          name: '',
+          type: '',
+          info: '',
+          icon: '',
+          bak: ''
+        }
+        this.formInline.title = this.$store.state.catModelInfo.name;
+        this.formInline.Id = this.$store.state.catModelInfo.id;
+        this.formInline.LayerName = this.$store.state.catModelInfo.layerName;
+        this.startModelData();
+        this.activeName = "first"
+        this.getAttacthFlieList();
+        this.dialogVisible = true;
+      } else {
+        this.dialogVisible = false;
+        window.pickedFeature.color = window.pickedColor;
+      }
+    },
+    async startModelData() {
+      var obj = {
+        layerid: this.$store.state.catModelInfo.layerId,
+        modelid: this.$store.state.catModelInfo.id
+      }
+      const data = await comprehensive_selectModelByGuid(obj);
+      if (data.code != 200) {
+        return;
+      }
+
+      if (data.result == null) {
+        this.isShowModel = true;
+        this.formInline.name = this.formInline.title;
+      } else {
+        this.isShowModel = false;
+        this.formInline = data.result;
+
+        this.formInline.title = this.formInline.name;
+
+      }
+    },
+    async EditData() {
+      const data = await comprehensive_updateModel(this.formInline)
+      if (data.code != 200) {
+        this.$message.error('淇敼澶辫触');
+      } else {
+        this.$message({
+          message: '淇敼鎴愬姛',
+          type: 'success'
+        });
+      }
+      this.startModelData();
+    },
+    async InsertData() {
+      var std = {
+        "bak": this.formInline.bak,
+        "guid": this.$store.state.catModelInfo.id,
+        "layerid": this.$store.state.catModelInfo.layerId,
+        "modelid": this.$store.state.catModelInfo.id,
+        "name": this.formInline.name,
+        "type": this.formInline.type
+      }
+      const data = await comprehensive_insertModel(std)
+      if (data.code != 200) {
+        this.$message.error('娣诲姞澶辫触');
+      } else {
+        this.$message({
+          message: '娣诲姞鎴愬姛',
+          type: 'success'
+        });
+      }
+      this.startModelData();
+
+    },
+    handleClose() {
+      this.$store.state.catModel = false;
+    },
+
+    //闄勪欢鍒楄〃鏂板
+    setAttachInsert() {
+      var token = getToken();
+      var fs = document.getElementById("insertFile");
+      if (fs.files.length == 0) {
+
+        this.$message({
+          message: '璇烽�夋嫨瑕佷笂浼犵殑鏂囦欢锛�',
+          type: 'warning'
+        });
+        return;
+      }
+      const formData = new FormData()
+      for (var i = 0, c = fs.files.length; i < c; i++) {
+
+        formData.append('file', fs.files[i]); // fs.files[i].name,file
+      }
+
+      $.ajax(BASE_URL + "/comprehensive/uploadFiles?token=" + token + "&tabName=lf.sys_style&eventid=" + this.$store.state.catModelInfo.id, {
+        type: "post",
+        data: formData,
+        async: true,
+        cache: false,
+        processData: false,
+        contentType: false,
+        success: (rs) => {
+          this.$message({
+            message: '闄勪欢娣诲姞鎴愬姛',
+            type: 'success'
+          });
+          document.getElementById("insertFile").value = "";
+          this.formInline.file = "";
+          this.getAttacthFlieList();
+        },
+        error: (e) => {
+          document.getElementById("insertFile").value = "";
+          this.formInline.file = "";
+          this.$message.error('闄勪欢娣诲姞澶辫触');
+        }
+      });
+    },
+    //闄勪欢鍒楄〃鏌ヨ
+    async getAttacthFlieList() {
+      var obj = {
+        eventid: this.$store.state.catModelInfo.id,
+        tabName: "lf.sys_style"
+      };
+      const res = await comprehensive_selectFiles(obj);
+      if (res.code != 200) {
+        this.$message.error('鍒楄〃璋冪敤澶辫触');
+        return
+      }
+      this.tableData = res.result;
+    },
+
+
+    //闄勪欢=>鏂囦欢閫夋嫨
+    getInsertFile() {
+      $('#insertFile').click();
+    },
+    insertFile() {
+      var val = document.getElementById('insertFile').files;
+      if (!val || !val.length) return;
+      this.formInline.file = val[0].name;
+    },
+    statSizeChange(row, column) {
+      return this.stateFormatSizes(row.sizes)
+    },
+    stateFormatSizes(res) {
+      if (res >= 1024) {
+        const val = parseFloat(res / 1024).toFixed(3);
+        return val + ' GB';
+      } else {
+        return res + ' MB';
+      }
+    },
+    matchState(state = "", reg) {
+      var row = state.row;
+      var name = row.name;
+      if (name.indexOf('.pdf') != -1
+        || name.indexOf('.jpg') != -1
+        || name.indexOf('.gif') != -1
+        || name.indexOf('.png') != -1
+        || name.indexOf('.jpeg') != -1
+        || name.indexOf('.PDF') != -1
+        || name.indexOf('.JPG') != -1
+        || name.indexOf('.GIF') != -1
+        || name.indexOf('.PNG') != -1
+        || name.indexOf('.JPEG') != -1
+        || name.indexOf('.BMP') != -1
+        || name.indexOf('.bmp') != -1) {
+        return true;
+      }
+
+      return false;
+    },
+    refreshAttatchDetail() {
+      this.dialog.src = "";
+      this.dialog.dialogVisible = false;
+      this.dialog.isPdf = false;
+      this.dialog.isJpg = false;
+    },
+    //闄勪欢鏌ョ湅
+    setAttatchDetail(index, row) {
+      this.refreshAttatchDetail()
+      var name = row.name;
+      if (name.indexOf('.pdf') != -1 || name.indexOf('.PDF') != -1) {
+        this.dialog.dialogVisible = true;
+        this.dialog.isPdf = true;
+        var url = BASE_URL + "/comprehensive/downloadForView?guid=" + row.guid + "&token=" + getToken();
+        this.dialog.src = url
+      } else if (
+        name.indexOf('.jpg') != -1
+        || name.indexOf('.gif') != -1
+        || name.indexOf('.png') != -1
+        || name.indexOf('.jpeg') != -1
+        || name.indexOf('.JPG') != -1
+        || name.indexOf('.GIF') != -1
+        || name.indexOf('.PNG') != -1
+        || name.indexOf('.JPEG') != -1
+        || name.indexOf('.BMP') != -1
+        || name.indexOf('.bmp') != -1
+      ) {
+        this.dialog.dialogVisible = true;
+        this.dialog.isJpg = true;
+        var url = BASE_URL + "/comprehensive/downloadForView?guid=" + row.guid + "&token=" + getToken();
+        this.dialog.src = url
+      }
+    },
+    handleClick(tab, event) {
+      if (tab.name == "second") {
+        this.getAttacthFlieList();
+      }
+    },
+    //闄勪欢鍒櫎
+    async setAttachDel() {
+      var std = [];
+      for (var i in this.attacgSelection) {
+        std.push(this.attacgSelection[i].id);
+      }
+
+      const res = await comprehensive_deletes({ ids: std.toString() });
+      if (res.code != 200) {
+        this.$message.error('鏂囦欢鍒犻櫎澶辫触');
+      }
+      this.getAttacthFlieList();
+    },
+    // 闄勪欢=>琛ㄦ牸閫夋嫨
+    handleAttatchChange(val) {
+      this.attacgSelection = val;
+    },
+    //鎷惧彇鏁版嵁鑾峰彇
+    async getPickUpData(info) {
+      let checkedLayers = JSON.parse(sessionStorage.getItem("checkedLayers"));
+      let showPop = false;
+      for (const item of checkedLayers) {
+        let name = item.url.replaceAll("LF:", "");
+        name = name.replaceAll("_", "");
+        let params = {
+          buffer: 10,
+          limit: 20,
+          name: name,
+          wkt: `POINT (${info.lon} ${info.lat})`,
+        }
+        const res = await selectByBuffer(params);
+        if (res.result && res.result.length > 0) {
+          this.$store.state.mapPopBoxFlag = "4";
+          this.$store.state.pickUpPointInfo = info;
+          this.$refs &&
+            this.$refs.queryinfo &&
+            this.$refs.queryinfo.open("鎷惧彇鍒嗘瀽", null,);
+          showPop = true;
+          break;
+        }
+      }
+      if (!showPop) {
+        this.$message.warning("鏆傛棤鏁版嵁!");
+      }
+    },
+    showPopBox() {
+
+      if (this.$store.state.showPopBoxFlag == true) {
+        this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close();
+        this.$refs &&
+          this.$refs.queryinfo &&
+          this.$refs.queryinfo.open("灞炴��", null, {
+            close: () => {
+              this.$store.state.showPopBoxFlag == false
+              if (this.$store.state.primitLayer != null) {
+                sgworld.Creator.DeleteObject(this.$store.state.primitLayer);
+                this.$store.state.primitLayer = null;
+              }
+
+              if (window.Viewer.scene.primitives.length != 0) {
+                window.Viewer.scene.primitives.removeAll();
+              }
+            },
+          });
+      }
+    },
+    setPellucidity() {
+      this.$refs && this.$refs.setPellucidity && this.$refs.setPellucidity.open();
+    },
+    setDialogInsertVisible(res) {
+      this.ruleForm = res;
+      this.dialogInsertVisible = true;
+    },
+    downloadx() {
+      this.$bus.$emit("setInsertDown1", this.codeForm)
+      this.closeDownx();
+    },
+    handleCloseDown1() {
+      this.$confirm("纭鍏抽棴锛�")
+        .then(_ => {
+          this.closeDownx();
+        })
+        .catch(_ => { })
+    },
+    closeDownx() {
+      this.dialogVisible1 = false;
+      this.codeForm = {
+        password: '',
+        repassword: '',
+      }
+    },
+    closeInsertDown() {
+      this.ruleForm = {
+        depname: [],
+        tabs: [],
+        pwd: null,
+        repwd: null,
+        wkt: null,
+        descr: null,
+      }
+      this.dialogInsertVisible = false
+    },
+    handleInsertClose() {
+      this.$confirm("纭鍏抽棴锛�")
+        .then(_ => {
+          this.closeInsertDown()
+        })
+        .catch(_ => { })
+    },
+    getInsertDownz() {
+      this.dialogInsertVisible = false;
+      // this.dialogVisible1 = true;
+      // 
+
+      this.$bus.$emit("setInsertApply1", this.ruleForm)
+    },
+    handleExtentClose() {
+      this.dialogExtentVisible = false
+      this.setExtent = 10;
+    },
+    handleExtentinsert() {
+      this.$bus.$emit("setExtentBUff", this.setExtent)
+      this.handleExtentClose();
+
+    }
   },
   mounted() {
+    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),
     };
-
+    this.$store.state.setAlphaList = []
     this.$bus.$on("setChangeTwoMenu", (res) => {
       if (res == 8) {
         this.setLayerScene();
@@ -1790,14 +3178,67 @@
         this.menuChange(res);
       }
     });
+    this.$bus.$on("showMenuLayer", ((res) => {
 
+      this.setAddLayers(res);
+    }));
+    this.$bus.$on("showPellucidity", res => {
+      this.setPellucidity();
+    });
+
+
+    this.$store.state.isProjectLayer = [];
+    this.$store.state.pigCode = null;
     this.$store.state.showAllLayers = true;
     this.$store.state.layerMnage = false;
     this.$store.state.treeData = null;
     this.$store.state.checkedKeys = [];
     // this.setCoverage("a1");
-    this.layersStart()
+    // this.layersStart();
 
+    this.$bus.$on('addImageLayer',  (res)=>{
+      if(res){
+        this.layersStart();
+      }
+    });
+
+    this.$bus.$on("setDialogInsertVisible", (res) => {
+      if (res == true) {
+        this.dialogVisible1 = true;
+      } else {
+        this.setDialogInsertVisible(res);
+      }
+    })
+    this.$bus.$on('showExtentLayer', res => {
+      this.dialogExtentVisible = res;
+    });
+
+
+
+
+
+  },
+  watch: {
+    Obj(newVal, oldVal) {
+      this.showModelAttach();
+    },
+    catch(newVal, oldVal) {
+      this.showModelCatch();
+    },
+    popObj(newVal, oldVal) {
+      this.showPopBox();
+    }
+  },
+  computed: {
+    Obj() {
+      return this.$store.state.attachModel;
+    },
+    catch() {
+      return this.$store.state.catModel;
+    },
+    popObj() {
+      return this.$store.state.showPopBoxFlag;
+    }
   },
 };
 </script>
@@ -1845,5 +3286,9 @@
     height: 30px;
     display: inline-block;
   }
+  .pdfClass {
+    height: 63vh;
+    width: 100%;
+  }
 }
 </style>

--
Gitblit v1.9.3