管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-02-23 1496203eb8194c26ff9350e4673927565df41705
综合展示图层管理添加3dTilset,资料馆下下调整,综合展示分析功能优化
已修改5个文件
1617 ■■■■ 文件已修改
src/api/api.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/MapView/mapMenuPop.vue 156 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Synthesis/LeftMenu.vue 1237 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Tools/LayerTree.vue 216 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/Tools/maplayer.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/api/api.js
@@ -730,7 +730,7 @@
}
//资料馆=>根据单位ID集合查询单位
export function dataLib_selectDepsByIds(params) {
  return request.get('/dataLib/selectDepsByIds?' + params);
  return request.get('/dataLib/selectDepsByCodes?' + params);
}
//资料馆=>请求下载
@@ -845,8 +845,8 @@
export function dataCount_downloadReport(params) {
  return request.get('/dataCount/downloadReport', { params: params });
}
//请求站场点内容
src/components/MapView/mapMenuPop.vue
@@ -1,15 +1,9 @@
<template>
  <div class="menuPop">
    <div class="leftBox">
      <div
        class="leftDown"
        v-if="$store.state.download"
      >
      <div class="leftDown" v-if="$store.state.download">
        <div @click="getDownloadDep">
          <el-link
            style="color:white"
            icon="el-icon-download"
          > </el-link>
          <el-link icon="el-icon-download"> </el-link>
        </div>
      </div>
      <ul>
@@ -36,11 +30,7 @@
            label="序号"
            width="50"
          />
          <el-table-column
            label="定位"
            width="100"
            align="center"
          >
          <el-table-column label="定位" width="100" align="center">
            <template slot-scope="scope">
              <el-button
                icon="el-icon-map-location"
@@ -87,20 +77,14 @@
        label-width="100px"
        class="codeForm"
      >
        <el-form-item
          :label="$t('common.passworld')"
          prop="password"
        >
        <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-form-item :label="$t('common.SPassword')" prop="repassword">
          <el-input
            type="password"
            v-model="codeForm.repassword"
@@ -112,12 +96,9 @@
            class="primary"
            size="small"
            @click="download('codeForm')"
          >{{ $t("common.confirm") }}</el-button>
          <el-button
            type="info"
            size="small"
            @click="closeDown('codeForm')"
          >{{
            >{{ $t("common.confirm") }}</el-button
          >
          <el-button type="info" size="small" @click="closeDown('codeForm')">{{
            $t("common.cancel")
          }}</el-button>
        </el-form-item>
@@ -131,17 +112,13 @@
      :modal="false"
      :before-close="handleInsertClose"
    >
      <div style="width:100%; max-height:450px;overflow-y:auto">
        <el-form
          ref="form"
          :model="ruleForm"
          label-width="100px"
        >
      <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}}
                  {{ item.name }}
                </li>
              </ul>
            </div>
@@ -150,7 +127,7 @@
            <div>
              <ul>
                <li v-for="item in ruleForm.tabs">
                  {{item.tabDesc}}
                  {{ item.tabDesc }}
                </li>
              </ul>
            </div>
@@ -158,7 +135,7 @@
          <el-form-item label="条件">
            <el-input
              :title="ruleForm.wkt"
              v-model=" ruleForm.wkt"
              v-model="ruleForm.wkt"
              disabled
            ></el-input>
          </el-form-item>
@@ -173,18 +150,12 @@
            </el-input>
          </el-form-item>
          <el-form-item>
            <el-button
              class="primary"
              size="small"
              @click="getInsertDown"
            >{{ $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="getInsertDown">{{
              $t("common.confirm")
            }}</el-button>
            <el-button type="info" size="small" @click="closeInsertDown">{{
              $t("common.cancel")
            }}</el-button>
          </el-form-item>
        </el-form>
      </div>
@@ -196,7 +167,7 @@
    ></iframe>
  </div>
</template>
<script>
import {
  dataQuery_selectByPage,
@@ -207,7 +178,8 @@
  dataLib_selectDownloadFile,
  dataQuery_selectDbOverflowDep,
  apply_insertApply,
  decr, encr,
  decr,
  encr,
  dataLib_selectDepsByIds,
} from "../../api/api.js";
import { getToken } from "@/utils/auth";
@@ -266,7 +238,6 @@
        entity: [],
        wkt: null,
        descr: null,
      },
      listPage: {
        pageSize: 10,
@@ -299,11 +270,11 @@
      this.dialogVisible = true;
    },
    handleInsertClose() {
      this.$confirm('确认关闭?')
        .then(_ => {
      this.$confirm("确认关闭?")
        .then((_) => {
          this.closeInsertDown();
        })
        .catch(_ => { });
        .catch((_) => {});
    },
    closeInsertDown() {
      this.ruleForm = {
@@ -313,27 +284,25 @@
        repwd: null,
        wkt: null,
        descr: null,
      }
      this.dialogInsertVisible = false
      };
      this.dialogInsertVisible = false;
    },
    async getDownloadDep() {
      var std = [];
      for (var i in this.option) {
        std.push(this.option[i].entity
        )
        std.push(this.option[i].entity);
      }
      var obj = {
        entities: std,
        wkt: this.listdata.wkt
      }
      const data = await dataQuery_selectDbOverflowDep(JSON.stringify(obj))
        wkt: this.listdata.wkt,
      };
      const data = await dataQuery_selectDbOverflowDep(JSON.stringify(obj));
      if (data.code != 200) {
        this.$message.error("数据请求失败");
        return;
      }
      if (data.result.length == 0 || data.result == null) {
        this.insertFlag = 1;
        this.dialogVisible = true;
      } else {
@@ -343,24 +312,23 @@
        var val = "";
        for (var i in data.result) {
          if (val == "") {
            val += "ids=" + data.result[i]
            val += "codes=" + data.result[i];
          } else {
            val += "&ids=" + data.result[i]
            val += "&codes=" + data.result[i];
          }
          std.push({
            name: data.result[i]
          })
            name: data.result[i],
          });
        }
        const data1 = await dataLib_selectDepsByIds(val);
        this.ruleForm.depid = data1.result;
        this.ruleForm.depname = std;
        this.ruleForm.wkt = decr(this.listdata.wkt)
        this.ruleForm.wkt = decr(this.listdata.wkt);
        this.ruleForm.tabs = this.option;
        this.dialogInsertVisible = true;
      }download
      }
    },
    async signGetPublicKey() {
      const res = await sign_getPublicKey();
@@ -400,31 +368,29 @@
        var std = [];
        var std1 = [];
        for (var i in this.option) {
          std.push(this.option[i].tabDesc)
          std1.push(this.option[i].entity)
          std.push(this.option[i].tabDesc);
          std1.push(this.option[i].entity);
        }
        var obj = {
          ids: this.insertOption.ids,
          depcodes: this.insertOption.ids,
          pwd: encr(this.codeForm.password),
          tabs: std,
          entities: std1,
          wkt: this.listdata.wkt,
          descr: this.ruleForm.descr,
        }
        const data1 = await apply_insertApply(JSON.stringify(obj))
        };
        const data1 = await apply_insertApply(JSON.stringify(obj));
        if (data1.code != 200) {
          this.$message.error("数据申请失败");
          return
          return;
        }
        this.$message({
          message: '数据申请成功',
          type: 'success'
          message: "数据申请成功",
          type: "success",
        });
        this.closeDown();
      }
    },
    async selectDownloadFile(rsid, rspwd) {
      var downObj = {
@@ -453,7 +419,7 @@
        .then((_) => {
          this.closeDown();
        })
        .catch((_) => { });
        .catch((_) => {});
    },
    closeDown() {
      this.dialogVisible = false;
@@ -474,7 +440,7 @@
        }
        this.$store.state.queryInfo = [];
        if (this.$store.state.primitLayer != null) {
            sgworld.Viewer.entities.remove(this.$store.state.primitLayer);
          sgworld.Viewer.entities.remove(this.$store.state.primitLayer);
          sgworld.Creator.DeleteObject(this.$store.state.primitLayer);
          this.$store.state.primitLayer = null;
        }
@@ -642,7 +608,6 @@
      this.showAllImage(data.result);
    },
    async showAllImage(res) {
      for (var i in res) {
        var param = {
          gid: res[i].gid,
@@ -670,13 +635,11 @@
      }
    },
    primitivesAddLayer(res) {
      switch (res.type) {
        case "Point":
          var val = Cesium.Cartesian3.fromDegrees(
            res.coordinates[0],
            res.coordinates[1],
            res.coordinates[1]
          );
          var point = Viewer.entities.add({
            position: val,
@@ -693,11 +656,11 @@
              // 应用于图像的统一比例。比例大于会1.0放大标签,而比例小于会1.0缩小标签。
              scale: 1.0,
              // 是否显示
              show: true
            }
              show: true,
            },
          });
          point.billboard.disableDepthTestDistance = Number.POSITIVE_INFINITY;
          this.$store.state.queryInfo.push(point)
          point.billboard.disableDepthTestDistance = Number.POSITIVE_INFINITY;
          this.$store.state.queryInfo.push(point);
          break;
        case "LineString":
        case "MultiLineString":
@@ -712,9 +675,9 @@
              width: 5,
              material: new Cesium.Color(1.0, 0.0, 0.0, 0.3),
              clampToGround: true,
            }
          })
          this.$store.state.queryInfo.push(polyline)
            },
          });
          this.$store.state.queryInfo.push(polyline);
          break;
        case "MultiPolygon":
          var val = res.coordinates[0][0];
@@ -729,9 +692,9 @@
              material: new Cesium.Color(1.0, 0.0, 0.0, 0.3),
              outline: true,
              outlineColor: new Cesium.Color(1.0, 0.0, 0.0, 0.3),
            }
          })
          this.$store.state.queryInfo.push(entity)
            },
          });
          this.$store.state.queryInfo.push(entity);
          break;
      }
    },
@@ -758,7 +721,7 @@
  },
};
</script>
<style scoped lang="less">
.menuPop {
  width: 100%;
@@ -822,4 +785,3 @@
  padding: 5px;
}
</style>
src/views/Synthesis/LeftMenu.vue
@@ -6,21 +6,13 @@
      v-for="(item, index) in setListTwoMenu"
      :class="{ lefMenuDivActive: showTwoMenuFlag == item.id }"
    >
      <div
        class="menuTwoImage"
        :class="item.css"
      ></div>
      <div class="menuTwoImage" :class="item.css"></div>
      <div>{{ $t(item.label) }}</div>
    </div>
    <mapinfo ref="mapinfo" />
    <maplayer ref="maplayer" />
    <queryinfo ref="queryinfo" />
    <input
      type="file"
      accept=".kml"
      class="file"
      style="display: none"
    />
    <input type="file" accept=".kml" class="file" style="display: none" />
    <input
      :accept="'.shp, .shx, .dbf, .prj'"
      style="display: none"
@@ -35,23 +27,21 @@
</template>
<script>
import { transform } from 'ol/proj';
import mapinfo from '../Tools/mapinfo.vue';
import maplayer from '../Tools/maplayer.vue';
import queryinfo from '../Tools/queryinfo.vue';
import $ from 'jquery'
import { getToken } from '@/utils/auth';
import { transform } from "ol/proj";
import mapinfo from "../Tools/mapinfo.vue";
import maplayer from "../Tools/maplayer.vue";
import queryinfo from "../Tools/queryinfo.vue";
import $ from "jquery";
import { getToken } from "@/utils/auth";
import {
  OverviewMap,
  defaults as defaultControls,
  FullScreen,
  ScaleLine,
  Rotate,
} from "ol/control.js"
import * as turf from '@turf/turf';
import { geometry } from '@turf/turf';
} from "ol/control.js";
import * as turf from "@turf/turf";
import { geometry } from "@turf/turf";
export default {
  components: { mapinfo, maplayer, queryinfo },
@@ -62,162 +52,160 @@
      setListTwoMenuAll: [
        [
          {
            id: 'a1',
            label: 'synthesis.layer',
            name: '图层管理',
            css: 'twoMenu_imge11',
          },
        ],
        [
          {
            id: 'b1',
            label: 'synthesis.split',
            name: '分屏',
            css: 'twoMenu_imge21',
          },
          {
            id: 'b2',
            label: 'synthesis.twod',
            name: '二维',
            css: 'twoMenu_imge22',
          },
          {
            id: 'b3',
            label: 'synthesis.threed',
            name: '三维',
            css: 'twoMenu_imge23',
          },
          {
            id: 'b4',
            label: 'synthesis.full',
            name: '全图',
            css: 'twoMenu_imge24',
          },
          {
            id: 'b5',
            label: 'synthesis.zommin',
            name: '放大',
            css: 'twoMenu_imge25',
          },
          {
            id: 'b6',
            label: 'synthesis.zoomout',
            name: '缩小',
            css: 'twoMenu_imge26',
          },
          {
            id: 'b7',
            label: 'synthesis.rule',
            name: '比例尺',
            css: 'twoMenu_imge27',
          },
          {
            id: 'b8',
            label: 'synthesis.compass',
            name: '指北针',
            css: 'twoMenu_imge28',
          },
          {
            id: 'b9',
            label: 'synthesis.undergroundMode',
            name: '地下模式',
            css: 'twoMenu_imge29',
            id: "a1",
            label: "synthesis.layer",
            name: "图层管理",
            css: "twoMenu_imge11",
          },
        ],
        [
          {
            id: 'c1',
            label: 'synthesis.someroaming',
            name: '点漫游',
            css: 'twoMenu_imge31',
            id: "b1",
            label: "synthesis.split",
            name: "分屏",
            css: "twoMenu_imge21",
          },
          {
            id: 'c2',
            label: 'synthesis.lineroaming',
            name: '线路漫游',
            css: 'twoMenu_imge32',
            id: "b2",
            label: "synthesis.twod",
            name: "二维",
            css: "twoMenu_imge22",
          },
          {
            id: 'c3',
            label: 'synthesis.mouseroaming',
            name: '鼠标漫游',
            css: 'twoMenu_imge33',
            id: "b3",
            label: "synthesis.threed",
            name: "三维",
            css: "twoMenu_imge23",
          },
          {
            id: 'c4',
            label: 'synthesis.snapshot',
            name: '地图快照',
            css: 'twoMenu_imge34',
            id: "b4",
            label: "synthesis.full",
            name: "全图",
            css: "twoMenu_imge24",
          },
          {
            id: "b5",
            label: "synthesis.zommin",
            name: "放大",
            css: "twoMenu_imge25",
          },
          {
            id: "b6",
            label: "synthesis.zoomout",
            name: "缩小",
            css: "twoMenu_imge26",
          },
          {
            id: "b7",
            label: "synthesis.rule",
            name: "比例尺",
            css: "twoMenu_imge27",
          },
          {
            id: "b8",
            label: "synthesis.compass",
            name: "指北针",
            css: "twoMenu_imge28",
          },
          {
            id: "b9",
            label: "synthesis.undergroundMode",
            name: "地下模式",
            css: "twoMenu_imge29",
          },
        ],
        [
          {
            id: 'd1',
            label: 'synthesis.contouranalysis',
            name: '等高线',
            css: 'twoMenu_imge41',
            id: "c1",
            label: "synthesis.someroaming",
            name: "点漫游",
            css: "twoMenu_imge31",
          },
          {
            id: 'd2',
            label: 'synthesis.slopeanalysis',
            name: '坡度分析',
            css: 'twoMenu_imge42',
            id: "c2",
            label: "synthesis.lineroaming",
            name: "线路漫游",
            css: "twoMenu_imge32",
          },
          {
            id: 'd3',
            label: 'synthesis.pathanalysis',
            name: '路径分析',
            css: 'twoMenu_imge43',
            id: "c3",
            label: "synthesis.mouseroaming",
            name: "鼠标漫游",
            css: "twoMenu_imge33",
          },
          {
            id: 'd4',
            label: 'synthesis.cuttinganalysis',
            name: '地形剖切',
            css: 'twoMenu_imge44',
            id: "c4",
            label: "synthesis.snapshot",
            name: "地图快照",
            css: "twoMenu_imge34",
          },
        ],
        [
          {
            id: "d1",
            label: "synthesis.contouranalysis",
            name: "等高线",
            css: "twoMenu_imge41",
          },
          {
            id: 'd5',
            label: 'synthesis.floodanalysis',
            name: '淹没分析',
            css: 'twoMenu_imge45',
            id: "d2",
            label: "synthesis.slopeanalysis",
            name: "坡度分析",
            css: "twoMenu_imge42",
          },
          {
            id: 'd6',
            label: 'synthesis.earthworkcalculation',
            name: '土方量计算',
            css: 'twoMenu_imge46',
            id: "d3",
            label: "synthesis.pathanalysis",
            name: "路径分析",
            css: "twoMenu_imge43",
          },
          {
            id: 'd7',
            label: 'synthesis.crosssectionanalysis',
            name: '三维截面',
            css: 'twoMenu_imge47',
            id: "d4",
            label: "synthesis.cuttinganalysis",
            name: "地形剖切",
            css: "twoMenu_imge44",
          },
          {
            id: 'd8',
            label: 'synthesis.imagecontrast',
            name: '影像对比',
            css: 'twoMenu_imge48',
            id: "d5",
            label: "synthesis.floodanalysis",
            name: "淹没分析",
            css: "twoMenu_imge45",
          },
          {
            id: 'd9',
            label: 'synthesis.pipelineAnalysis',
            name: '管道分析',
            css: 'twoMenu_imge49',
            id: "d6",
            label: "synthesis.earthworkcalculation",
            name: "土方量计算",
            css: "twoMenu_imge46",
          },
          {
            id: 'd10',
            label: 'synthesis.flatterrain',
            name: '地形平整',
            css: 'twoMenu_imge410',
            id: "d7",
            label: "synthesis.crosssectionanalysis",
            name: "三维截面",
            css: "twoMenu_imge47",
          },
          {
            id: 'd11',
            label: 'synthesis.terrainexcavation',
            name: '地形开挖',
            css: 'twoMenu_imge411',
            id: "d8",
            label: "synthesis.imagecontrast",
            name: "影像对比",
            css: "twoMenu_imge48",
          },
          {
            id: "d9",
            label: "synthesis.pipelineAnalysis",
            name: "管道分析",
            css: "twoMenu_imge49",
          },
          {
            id: "d10",
            label: "synthesis.flatterrain",
            name: "地形平整",
            css: "twoMenu_imge410",
          },
          {
            id: "d11",
            label: "synthesis.terrainexcavation",
            name: "地形开挖",
            css: "twoMenu_imge411",
          },
          {
            id: "d12",
@@ -237,73 +225,71 @@
            name: "圆形视域分析",
            css: "twoMenu_imge414",
          },
        ],
        [
          {
            id: 'e1',
            label: 'synthesis.attributequery',
            name: '属性查询',
            css: 'twoMenu_imge51',
            id: "e1",
            label: "synthesis.attributequery",
            name: "属性查询",
            css: "twoMenu_imge51",
          },
          {
            id: 'e2',
            label: 'synthesis.rangequery',
            name: '空间查询',
            css: 'twoMenu_imge52',
            id: "e2",
            label: "synthesis.rangequery",
            name: "空间查询",
            css: "twoMenu_imge52",
          },
        ],
        [
          {
            id: 'f1',
            label: 'synthesis.gpsrtk',
            name: '坐标定位',
            css: 'twoMenu_imge61',
            id: "f1",
            label: "synthesis.gpsrtk",
            name: "坐标定位",
            css: "twoMenu_imge61",
          },
          {
            id: 'f2',
            label: 'synthesis.placenamelocation',
            name: '地名定位',
            css: 'twoMenu_imge62',
            id: "f2",
            label: "synthesis.placenamelocation",
            name: "地名定位",
            css: "twoMenu_imge62",
          },
        ],
        [
          {
            id: 'j1',
            label: 'synthesis.synthobj.m1',
            name: '表面距离',
            css: 'twoMenu_imge71',
            id: "j1",
            label: "synthesis.synthobj.m1",
            name: "表面距离",
            css: "twoMenu_imge71",
          },
          {
            id: 'j2',
            label: 'synthesis.synthobj.m4',
            name: '垂直高度',
            css: 'twoMenu_imge72',
            id: "j2",
            label: "synthesis.synthobj.m4",
            name: "垂直高度",
            css: "twoMenu_imge72",
          },
          {
            id: 'j3',
            label: 'synthesis.synthobj.m6',
            name: '平面面积',
            css: 'twoMenu_imge73',
            id: "j3",
            label: "synthesis.synthobj.m6",
            name: "平面面积",
            css: "twoMenu_imge73",
          },
          {
            id: 'j4',
            label: 'synthesis.synthobj.m7',
            name: '体积',
            css: 'twoMenu_imge74',
            id: "j4",
            label: "synthesis.synthobj.m7",
            name: "体积",
            css: "twoMenu_imge74",
          },
          {
            id: 'j5',
            label: 'synthesis.synthobj.m5',
            name: '表面面积',
            css: 'twoMenu_imge75',
            id: "j5",
            label: "synthesis.synthobj.m5",
            name: "表面面积",
            css: "twoMenu_imge75",
          },
          {
            id: 'j6',
            label: 'synthesis.synthobj.m2',
            name: '空间距离',
            css: 'twoMenu_imge76',
            id: "j6",
            label: "synthesis.synthobj.m2",
            name: "空间距离",
            css: "twoMenu_imge76",
          },
          {
            id: "j7",
@@ -314,87 +300,88 @@
        ],
        [
          {
            id: 'h1',
            label: 'synthesis.point',
            name: '点',
            css: 'twoMenu_imge81',
            id: "h1",
            label: "synthesis.point",
            name: "点",
            css: "twoMenu_imge81",
          },
          {
            id: 'h8',
            label: 'synthesis.addlabel',
            name: '文字',
            css: 'twoMenu_imge88',
            id: "h8",
            label: "synthesis.addlabel",
            name: "文字",
            css: "twoMenu_imge88",
          },
          {
            id: 'h2',
            label: 'synthesis.line',
            name: '线',
            css: 'twoMenu_imge82',
            id: "h2",
            label: "synthesis.line",
            name: "线",
            css: "twoMenu_imge82",
          },
          {
            id: 'h3',
            label: 'synthesis.rectangle',
            name: '矩形',
            css: 'twoMenu_imge83',
            id: "h3",
            label: "synthesis.rectangle",
            name: "矩形",
            css: "twoMenu_imge83",
          },
          {
            id: 'h4',
            label: 'synthesis.polygon',
            name: '多边形',
            css: 'twoMenu_imge84',
            id: "h4",
            label: "synthesis.polygon",
            name: "多边形",
            css: "twoMenu_imge84",
          },
          {
            id: 'h5',
            label: 'synthesis.import',
            name: '导入KML',
            css: 'twoMenu_imge85',
            id: "h5",
            label: "synthesis.import",
            name: "导入KML",
            css: "twoMenu_imge85",
          },
          {
            id: 'h6',
            label: 'synthesis.export',
            name: '导出KML',
            css: 'twoMenu_imge86',
            id: "h6",
            label: "synthesis.export",
            name: "导出KML",
            css: "twoMenu_imge86",
          },
          {
            id: 'h9',
            label: 'synthesis.import1',
            name: '导入SHP',
            css: 'twoMenu_imge85',
            id: "h9",
            label: "synthesis.import1",
            name: "导入SHP",
            css: "twoMenu_imge85",
          },
          {
            id: 'h10',
            label: 'synthesis.export1',
            name: '导出SHP',
            css: 'twoMenu_imge86',
            id: "h10",
            label: "synthesis.export1",
            name: "导出SHP",
            css: "twoMenu_imge86",
          },
          {
            id: 'h7',
            label: 'synthesis.removepaint',
            name: '清除',
            css: 'twoMenu_imge87',
            id: "h7",
            label: "synthesis.removepaint",
            name: "清除",
            css: "twoMenu_imge87",
          },
        ], [
        ],
        [
          {
            id: 'i1',
            name: '场景提取',
            label: 'synthesis.sceneExtraction',
            css: 'twoMenu_imge12',
            id: "i1",
            name: "场景提取",
            label: "synthesis.sceneExtraction",
            css: "twoMenu_imge12",
          },
          {
            id: 'i2',
            label: 'synthesis.release',
            name: '场景发布',
            css: 'twoMenu_imge13',
          }, {
            id: 'i3',
            label: 'synthesis.tdisplay',
            name: '三维演示',
            css: 'twoMenu_imge35',
            id: "i2",
            label: "synthesis.release",
            name: "场景发布",
            css: "twoMenu_imge13",
          },
        ]
          {
            id: "i3",
            label: "synthesis.tdisplay",
            name: "三维演示",
            css: "twoMenu_imge35",
          },
        ],
      ],
      isRuler: false,
      isNaviget: false,
@@ -406,6 +393,9 @@
      Excavation: false,
      entityaLayers: [],
      isMenuFlag: null,
      isRouter: false, //路径分析
      isPiple: false, //管道分析
      DXZPState: null, //地形整平
    };
  },
  methods: {
@@ -424,7 +414,7 @@
      if (this.isMenuFlag == "d") {
        this.clearAllAnalsy();
      }
      if (this.isMenuFlag !=val) {
      if (this.isMenuFlag != val) {
        sgworld.Creator.SimpleGraphic.clear();
        this.isMenuFlag = val;
        if (this.entityaLayers.length != 0) {
@@ -446,100 +436,97 @@
      this.showTwoMenuFlag = res.id;
      switch (val) {
        case 'a': //图层管理
        case "a": //图层管理
          this.setCoverage(res.id);
          break;
        case 'b':
        case "b":
          this.setViewport(res.id);
          break;
        case 'c':
        case "c":
          this.setWander(res.id);
          break;
        case 'd':
        case "d":
          this.setAnalsy(res.id);
          break;
        case 'e':
        case "e":
          this.setIquery(res.id);
          break;
        case 'f':
        case "f":
          this.setOrientation(res.id);
          break;
        case 'j':
        case "j":
          this.setMeasurement(res.id);
          break;
        case 'h':
        case "h":
          sgworld.Creator.SimpleGraphic.edit(true, { editProp: true });
          this.setPlot(res.id);
          break;
      }
    },
    setPlot(res) {
      switch (res) {
        case 'h1':
        case "h1":
          sgworld.Creator.createSimpleGraphic(
            'point',
            "point",
            {},
            function (entity) { }
            function (entity) {}
          );
          break;
        case 'h2':
        case "h2":
          sgworld.Creator.createSimpleGraphic(
            'polyline',
            "polyline",
            {},
            function (entity) { }
            function (entity) {}
          );
          break;
        case 'h3':
        case "h3":
          sgworld.Creator.createSimpleGraphic(
            'rectangle',
            "rectangle",
            {},
            function (entity) { }
            function (entity) {}
          );
          break;
        case 'h4':
        case "h4":
          sgworld.Creator.createSimpleGraphic(
            'polygon',
            "polygon",
            {},
            function (entity) { }
            function (entity) {}
          );
          break;
        case 'h5':
        case "h5":
          this.handleOpenClick();
          break;
        case 'h6':
        case "h6":
          this.handleSaveClick();
          break;
        case 'h9':
        case "h9":
          // this.handleOpenShp();
          $("#shpFile").click();
          break;
        case 'h10':
        case "h10":
          this.handleSaveShp();
          break;
        case 'h7':
        case "h7":
          sgworld.Creator.SimpleGraphic.clear();
          for (var i in this.entityaLayers) {
            sgworld.Viewer.entities.remove(this.entityaLayers[i]);
          }
          this.entityaLayers = [];
          break;
        case 'h8':
          sgworld.Creator.createSimpleGraphic('label', {}, function (entity) {
          });
        case "h8":
          sgworld.Creator.createSimpleGraphic(
            "label",
            {},
            function (entity) {}
          );
          break;
      }
    },
    handleSaveClick() {
      let funDownload = function (content, filename) {
        let eleLink = document.createElement('a');
        let eleLink = document.createElement("a");
        eleLink.download = filename;
        eleLink.style.display = 'none';
        eleLink.style.display = "none";
        // 字符内容转变成blob地址
        let blob = new Blob([content]);
        eleLink.href = URL.createObjectURL(blob);
@@ -567,14 +554,13 @@
        console.log(entities);
        // let promise = Cesium.exportKml({ entities: entities });
        promise.then(function (e) {
          funDownload(e.kml, new Date().getTime() + '.kml');
          funDownload(e.kml, new Date().getTime() + ".kml");
        });
      } else {
        alert('当前场景没有entities实体');
        alert("当前场景没有entities实体");
      }
    },
    handleSaveShp() {
      var entities = sgworld.Viewer.entities.values;
      if (entities.length == 0) {
        return;
@@ -582,87 +568,105 @@
      var std = [];
      for (var i in entities) {
        var type, fillColor, alpha, wkt, name;
        var bak = {}
        var bak = {};
        if (entities[i].name) {
          name = entities[i].name
          name = entities[i].name;
        }
        if (entities[i].properties) {
          var properties = entities[i].properties.propertyNames;
          for (var j in properties) {
            bak[properties[j]] = entities[i].properties[properties[j]]._value;
          }
        } else {
          bak = {
            "name": entities[i].name
          }
            name: entities[i].name,
          };
        }
        if (entities[i].rectangle) {//矩形
          type = 'rectangle'
          var east = Cesium.Math.toDegrees(entities[i].rectangle.coordinates.getValue().east);
          var north = Cesium.Math.toDegrees(entities[i].rectangle.coordinates.getValue().north);
          var west = Cesium.Math.toDegrees(entities[i].rectangle.coordinates.getValue().west);
          var south = Cesium.Math.toDegrees(entities[i].rectangle.coordinates.getValue().south);
          var line = turf.polygon([[[east, north], [west, north], [west, south], [east, south], [east, north]]])
          wkt = this.$wkt.convert(line.geometry)
        if (entities[i].rectangle) {
          //矩形
          type = "rectangle";
          var east = Cesium.Math.toDegrees(
            entities[i].rectangle.coordinates.getValue().east
          );
          var north = Cesium.Math.toDegrees(
            entities[i].rectangle.coordinates.getValue().north
          );
          var west = Cesium.Math.toDegrees(
            entities[i].rectangle.coordinates.getValue().west
          );
          var south = Cesium.Math.toDegrees(
            entities[i].rectangle.coordinates.getValue().south
          );
          var line = turf.polygon([
            [
              [east, north],
              [west, north],
              [west, south],
              [east, south],
              [east, north],
            ],
          ]);
          wkt = this.$wkt.convert(line.geometry);
          var fill = entities[i].rectangle._material._color._value;
          fillColor = fill.red + ',' + fill.green + ',' + fill.blue;
          fillColor = fill.red + "," + fill.green + "," + fill.blue;
          alpha = fill.alpha;
        } else if (entities[i].point) {//点
          type = 'point'
        } else if (entities[i].point) {
          //点
          type = "point";
          let ellipsoid = Viewer.scene.globe.ellipsoid;
          let cartographic = ellipsoid.cartesianToCartographic(entities[i].position.getValue());
          let cartographic = ellipsoid.cartesianToCartographic(
            entities[i].position.getValue()
          );
          let lat = Cesium.Math.toDegrees(cartographic.latitude);
          let lng = Cesium.Math.toDegrees(cartographic.longitude);
          let alt = cartographic.height;
          let point = turf.point([lng, lat, alt])
          wkt = this.$wkt.convert(point.geometry)
          let point = turf.point([lng, lat, alt]);
          wkt = this.$wkt.convert(point.geometry);
          var fill = entities[i].point._color._value;
          fillColor = fill.red + ',' + fill.green + ',' + fill.blue;
          fillColor = fill.red + "," + fill.green + "," + fill.blue;
          alpha = fill.alpha;
        } else if (entities[i].polygon) {
          type = 'polygon';
          type = "polygon";
          var fill = entities[i].polygon._material._color._value;
          fillColor = fill.red + ',' + fill.green + ',' + fill.blue;
          fillColor = fill.red + "," + fill.green + "," + fill.blue;
          alpha = fill.alpha;
          var geometry = entities[i].polygon.hierarchy.getValue().positions;
          var coordinates = [];
          for (var k in geometry) {
            coordinates.push(this.setCartesianToEightFour(geometry[k]))
            coordinates.push(this.setCartesianToEightFour(geometry[k]));
          }
          if (coordinates[0] != coordinates[1]) {
            coordinates.push(coordinates[0])
            coordinates.push(coordinates[0]);
          }
          var polygon = turf.polygon([coordinates])
          wkt = this.$wkt.convert(polygon.geometry)
          var polygon = turf.polygon([coordinates]);
          wkt = this.$wkt.convert(polygon.geometry);
        } else if (entities[i].polyline) {
          type = "polyline";
          var coordinates = [];
          var geometry = entities[i].polyline.positions.getValue();
          for (var k in geometry) {
            coordinates.push(this.setCartesianToEightFour(geometry[k]))
            coordinates.push(this.setCartesianToEightFour(geometry[k]));
          }
          var polyline = turf.lineString(coordinates)
          wkt = this.$wkt.convert(polyline.geometry)
          var polyline = turf.lineString(coordinates);
          wkt = this.$wkt.convert(polyline.geometry);
          var fill = entities[i].polyline._material._color._value;
          fillColor = fill.red + ',' + fill.green + ',' + fill.blue;
          fillColor = fill.red + "," + fill.green + "," + fill.blue;
          alpha = fill.alpha;
        } else if (entities[i].label) {
          type = "label";
          let ellipsoid = Viewer.scene.globe.ellipsoid;
          let cartographic = ellipsoid.cartesianToCartographic(entities[i].position.getValue());
          let cartographic = ellipsoid.cartesianToCartographic(
            entities[i].position.getValue()
          );
          let lat = Cesium.Math.toDegrees(cartographic.latitude);
          let lng = Cesium.Math.toDegrees(cartographic.longitude);
          let alt = cartographic.height;
          let point = turf.point([lng, lat, alt])
          wkt = this.$wkt.convert(point.geometry)
          let point = turf.point([lng, lat, alt]);
          wkt = this.$wkt.convert(point.geometry);
          var fill = entities[i].label.backgroundColor._value;
          fillColor = fill.red + ',' + fill.green + ',' + fill.blue;
          fillColor = fill.red + "," + fill.green + "," + fill.blue;
          alpha = fill.alpha;
        }
        std.push({
@@ -672,31 +676,34 @@
          opacity: alpha,
          name: name,
          bak: JSON.stringify(bak),
          wkt: wkt
        })
          wkt: wkt,
        });
      }
      $.ajax({
        url: BASE_URL + "/comprehensive/downloadShp?token=" + getToken(),
        type: "POST",
        data: JSON.stringify(std),
        dataType: 'json', // html、json、jsonp、script、text
        dataType: "json", // html、json、jsonp、script、text
        contentType: "application/json", // "application/x-www-form-urlencoded"
        success: (rs) => {
          if (rs && rs.code == 200) {
            var a = document.createElement('a'); // 创建一个a标签元素
            a.style.display = 'none'; // 设置元素不可见
            var a = document.createElement("a"); // 创建一个a标签元素
            a.style.display = "none"; // 设置元素不可见
            a.href = BASE_URL + "/comprehensive/downloadFile?token=" + getToken() + "&guid=" + rs.result;
            a.href =
              BASE_URL +
              "/comprehensive/downloadFile?token=" +
              getToken() +
              "&guid=" +
              rs.result;
            document.body.appendChild(a); // 加入
            a.click(); // 触发点击,下载
            document.body.removeChild(a); // 释放
          }
        },
        error: function (e) {
        }
        error: function (e) {},
      });
    },
    handleOpenShp() {
      var formData = new FormData();
@@ -724,35 +731,36 @@
        processData: false,
        contentType: false,
        success: function (rs) {
          if (rs.code == 200) {
            that.showShpEntity(rs.result);
          }
        },
        error: function (e) {
          console.error(e);
        }
        },
      });
      document.getElementById("shpFile").value = ""
      document.getElementById("shpFile").value = "";
    },
    showShpEntity(res) {
      for (var i in res) {
        var wkt = this.$wkt.parse(res[i].wkt);
        var fillColor = res[i].fillColor.split(",");
        var color = new Cesium.Color(parseFloat(fillColor[0]), parseFloat(fillColor[1]), parseFloat(fillColor[2]), res[i].opacity);
        var name = res[i].name
        var color = new Cesium.Color(
          parseFloat(fillColor[0]),
          parseFloat(fillColor[1]),
          parseFloat(fillColor[2]),
          res[i].opacity
        );
        var name = res[i].name;
        switch (res[i].type) {
          case 'rectangle':
          case 'polygon':
          case "rectangle":
          case "polygon":
            var std = [];
            var geo = wkt.coordinates[0];
            for (var i in geo) {
              std.push(geo[i][0])
              std.push(geo[i][1])
              std.push(geo[i][0]);
              std.push(geo[i][1]);
            }
            var entity = Viewer.entities.add({
              name: name,
@@ -762,14 +770,17 @@
                material: color,
                outline: true,
                outlineColor: color,
              }
            })
            this.entityaLayers.push(entity)
              },
            });
            this.entityaLayers.push(entity);
            break;
          case 'point':
          case "point":
            let point = Viewer.entities.add({
              name: name,
              position: Cesium.Cartesian3.fromDegrees(wkt.coordinates[0], wkt.coordinates[1]), //经纬度转世界坐标
              position: Cesium.Cartesian3.fromDegrees(
                wkt.coordinates[0],
                wkt.coordinates[1]
              ), //经纬度转世界坐标
              point: {
                show: true,
                color: color,
@@ -781,14 +792,14 @@
              },
            });
            this.entityaLayers.push(point)
            this.entityaLayers.push(point);
            break;
          case 'polyline':
          case "polyline":
            var std = [];
            var geo = wkt.coordinates;
            for (var i in geo) {
              std.push(geo[i][0])
              std.push(geo[i][1])
              std.push(geo[i][0]);
              std.push(geo[i][1]);
            }
            let line = Viewer.entities.add({
              name: name,
@@ -798,25 +809,28 @@
                width: 10,
                material: color,
                clampToGround: true,
              }
            })
              },
            });
            this.entityaLayers.push(line)
            this.entityaLayers.push(line);
            break;
          case 'label':
          case "label":
            const label = Viewer.entities.add({
              position: Cesium.Cartesian3.fromDegrees(wkt.coordinates[0], wkt.coordinates[1]),
              position: Cesium.Cartesian3.fromDegrees(
                wkt.coordinates[0],
                wkt.coordinates[1]
              ),
              label: {
                text: name,
                fillColor: color,
                font: '28px',
                font: "28px",
                horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
                verticalOrigin: Cesium.VerticalOrigin.TOP,
                heightReference: Cesium.HeightReference.CLAMP_TO_GROUND,
                disableDepthTestDistance: Number.POSITIVE_INFINITY,
              },
            })
            this.entityaLayers.push(label)
            });
            this.entityaLayers.push(label);
            break;
        }
      }
@@ -829,13 +843,13 @@
      let lat = Cesium.Math.toDegrees(cartographic.latitude);
      let lng = Cesium.Math.toDegrees(cartographic.longitude);
      let alt = cartographic.height;
      std = [lng, lat, alt]
      std = [lng, lat, alt];
      return std;
    },
    handleOpenClick() {
      var that = this;
      sgworld.Creator.SimpleGraphic.edit(true, { editProp: true });
      let fileInput = document.querySelector('.file');
      let fileInput = document.querySelector(".file");
      fileInput.onchange = function (evt) {
        let files = evt.target.files;
        if (files.length > 0) {
@@ -880,26 +894,39 @@
      fileInput.click();
    },
    setLayerScene() {
      var URL = window.location.href.split("#");
      this.openwindow({ url: URL[0] + 'LfSKyline/index.html' });
      this.openwindow({ url: URL[0] + "LfSKyline/index.html" });
    },
    openwindow(data) {
      var url = data.url;                                          //转向网页的地址;
      var name = data.title || '选择要添加的页面';                  //网页名称,可为空;
      var iWidth = window.screen.width;                           //弹出窗口的宽度;
      var iHeight = window.screen.height;      //弹出窗口的高度;
      var iTop = 0       //获得窗口的垂直位置;
      var iLeft = 0;        //获得窗口的水平位置;
      window.open(url, name, 'height=' + iHeight + ',,innerHeight=' + iHeight + ',width=' + iWidth + ',innerWidth=' + iWidth + ',top=' + iTop + ',left=' + iLeft + ',toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no');
      var url = data.url; //转向网页的地址;
      var name = data.title || "选择要添加的页面"; //网页名称,可为空;
      var iWidth = window.screen.width; //弹出窗口的宽度;
      var iHeight = window.screen.height; //弹出窗口的高度;
      var iTop = 0; //获得窗口的垂直位置;
      var iLeft = 0; //获得窗口的水平位置;
      window.open(
        url,
        name,
        "height=" +
          iHeight +
          ",,innerHeight=" +
          iHeight +
          ",width=" +
          iWidth +
          ",innerWidth=" +
          iWidth +
          ",top=" +
          iTop +
          ",left=" +
          iLeft +
          ",toolbar=no,menubar=no,scrollbars=auto,resizeable=no,location=no,status=no"
      );
    },
    setMeasurement(res) {
      switch (res) {
        case 'j1':
        case "j1":
          var measure = window.sgworld.Command.execute(
            0,
            2,
@@ -907,11 +934,11 @@
            (data) => {
              data.id = window.sgworld.Core.getuid();
              this.measureData.set(data.id, measure);
              this.openMeasureResultInfo('表面距离', data);
              this.openMeasureResultInfo("表面距离", data);
            }
          );
          break;
        case 'j6':
        case "j6":
          var measure = window.sgworld.Command.execute(
            0,
            10,
@@ -919,7 +946,7 @@
            (data) => {
              data.id = window.sgworld.Core.getuid();
              this.measureData.set(data.id, measure);
              this.openMeasureResultInfo('空间距离', data);
              this.openMeasureResultInfo("空间距离", data);
            }
          );
          break;
@@ -930,11 +957,10 @@
        //     this.measureData.set(data.id, measure);
        //     this.openMeasureResultInfo('平面面积', data);
        //   });
        //   break;
        case 'j2':
        case "j2":
          var measure = window.sgworld.Command.execute(
            0,
            5,
@@ -942,11 +968,11 @@
            (data) => {
              data.id = window.sgworld.Core.getuid();
              this.measureData.set(data.id, measure);
              this.openMeasureResultInfo('垂直高度', data);
              this.openMeasureResultInfo("垂直高度", data);
            }
          );
          break;
        case 'j5':
        case "j5":
          var measure = window.sgworld.Command.execute(
            0,
            8,
@@ -958,11 +984,11 @@
            (data) => {
              data.id = window.sgworld.Core.getuid();
              this.measureData.set(data.id, measure);
              this.openMeasureResultInfo('表面面积', data);
              this.openMeasureResultInfo("表面面积", data);
            }
          );
          break;
        case 'j3':
        case "j3":
          var measure = window.sgworld.Command.execute(
            0,
            3,
@@ -970,30 +996,31 @@
            (data) => {
              data.id = window.sgworld.Core.getuid();
              this.measureData.set(data.id, measure);
              this.openMeasureResultInfo('平面面积', data);
              this.openMeasureResultInfo("平面面积", data);
            }
          );
          break;
        case 'j4':
        case "j4":
          var volumetricMeasurementTool =
            window.sgworld.Creator.createVolumetricMeasureTool();
          volumetricMeasurementTool.startDrawing(
            { ...this.colorAll, onlyTerrain: false },
            'auto',
            "auto",
            (data) => {
              if (volumetricMeasurementTool.popupData) {
                volumetricMeasurementTool.popupData.value = `填方:${data.volume.fill.toFixed(4) + data.unit.fill
                  }<br>挖方:${data.volume.dig.toFixed(4) + data.unit.dig}`;
                volumetricMeasurementTool.popupData.value = `填方:${
                  data.volume.fill.toFixed(4) + data.unit.fill
                }<br>挖方:${data.volume.dig.toFixed(4) + data.unit.dig}`;
              } else {
                data.id = window.sgworld.Core.getuid();
                this.measureData.set(data.id, volumetricMeasurementTool);
                let popupData = this.openMeasureResultInfo('体积方量', data);
                let popupData = this.openMeasureResultInfo("体积方量", data);
                volumetricMeasurementTool.popupData = popupData;
              }
            }
          );
          break;
        case 'j8':
        case "j8":
          var measure = window.sgworld.Command.execute(
            0,
            12,
@@ -1001,7 +1028,7 @@
            (data) => {
              data.id = window.sgworld.Core.getuid();
              this.measureData.set(data.id, measure);
              this.openMeasureResultInfo('角度', data);
              this.openMeasureResultInfo("角度", data);
            }
          );
          break;
@@ -1010,40 +1037,41 @@
            1,
            11,
            this.colorAll,
            data => {
              data.id = window.sgworld.Core.getuid()
              this.measureData.set(data.id, measure)
              this.openMeasureResultInfo("海拔高度", data)
            (data) => {
              data.id = window.sgworld.Core.getuid();
              this.measureData.set(data.id, measure);
              this.openMeasureResultInfo("海拔高度", data);
            }
          )
          break
          );
          break;
      }
    },
    openMeasureResultInfo(name, data) {
      let info = '';
      let info = "";
      switch (name) {
        case '表面距离':
        case '空间距离':
          info = '总长度:' + data.distance[data.distance.length - 1];
        case "表面距离":
        case "空间距离":
          info = "总长度:" + data.distance[data.distance.length - 1];
          break;
        case '海拔高度':
          info = '高度:' + data.height;
        case "海拔高度":
          info = "高度:" + data.height;
          break;
        case '垂直高度':
        case "垂直高度":
          info = `${data.gddistance}<br>${data.kjdistance}<br>${data.spdistance}`;
          break;
        case '表面面积':
        case '平面面积':
        case "表面面积":
        case "平面面积":
          info = data.mj;
          break;
        case '角度':
        case "角度":
          data.labels.forEach((label) => {
            info += label.label.text.getValue() + '<br>';
            info += label.label.text.getValue() + "<br>";
          });
          break;
        case '体积方量':
          info = `填方:${data.volume.fill.toFixed(4) + data.unit.fill
            }<br>挖方:${data.volume.dig.toFixed(4) + data.unit.dig}`;
        case "体积方量":
          info = `填方:${
            data.volume.fill.toFixed(4) + data.unit.fill
          }<br>挖方:${data.volume.dig.toFixed(4) + data.unit.dig}`;
          break;
      }
      return (
@@ -1075,13 +1103,13 @@
    },
    setIquery(res) {
      switch (res) {
        case 'e2':
        case "e2":
          this.$store.state.mapMenuBoolean = true;
          this.$store.state.mapMenuBoxFlag = '1';
          this.$store.state.mapMenuBoxFlag = "1";
          break;
        case 'e1':
        case "e1":
          this.$store.state.mapMenuBoolean = true;
          this.$store.state.mapMenuBoxFlag = '2';
          this.$store.state.mapMenuBoxFlag = "2";
          break;
      }
    },
@@ -1099,101 +1127,141 @@
      //     break;
      // }
    },
    ClearDraw() {
      //console.log(sgworld);
      //   console.log(sgworld.drawObj.drawHandler);
      //   sgworld.drawObj.drawHandler.destroy();
      //   sgworld.drawObj.end()
    },
    setAnalsy(res) {
      //this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close("queryinfo");
      var that = this;
      switch (res) {
        case 'd1':
        case "d1": //等高线分析
          that.isolineFlag = !that.isolineFlag;
          elevationTool.tf = that.isolineFlag;
          elevationTool.render();
          break;
        case 'd2':
        case "d2": //坡度分析
          that.isslopeFlag = !that.isslopeFlag;
          window.PDelevationTool= new SmartEarth.ElevationTool(sgworld);//全局变量
          window.PDelevationTool = new SmartEarth.ElevationTool(sgworld); //全局变量
          if (that.isslopeFlag == true) {
            PDelevationTool.type = 'slope';
            PDelevationTool.type = "slope";
            PDelevationTool.tf = this.checked;
          } else {
            PDelevationTool.type = 'none';
            PDelevationTool.type = "none";
          }
          PDelevationTool.render();
          break;
        case 'd3':
          var value = {
            name: 'Analysis',
            id: 3,
          };
          this.$bus.$emit('mapChangeBox', value);
        case "d3": //路径分析
          this.isRouter = !this.isRouter;
          let value;
          if (this.isRouter) {
            value = {
              name: "Analysis",
              id: 3,
            };
          } else {
            value = {
              name: "close",
            };
          }
          this.$bus.$emit("mapChangeBox", value);
          break;
        case 'd4':
        case "d4": //剖面分析
          if (window.AnalysisDXPM) {
            window.AnalysisDXPM.end && window.AnalysisDXPM.end();
            this.clear(res);
          } else {
            this.addterrainSectionAnalysis();
          }
          break;
        case 'd5':
        case "d5": //洪水淹没分析
          if (window.AnalysisFlood) {
            this.clear(res);
          } else {
            this.addAnalysisFlood();
          }
          break;
        case 'd6':
          var that = this;
          var volumetricMeasurementTool =
            sgworld.Creator.createVolumetricMeasureTool();
          volumetricMeasurementTool.startDrawing(
            { ...this.colorAll, onlyTerrain: false },
            'auto',
            (data) => {
              if (volumetricMeasurementTool.popupData) {
                volumetricMeasurementTool.popupData.value = `填方:${data.volume.fill.toFixed(4) + data.unit.fill
                  }<br>挖方:${data.volume.dig.toFixed(4) + data.unit.dig}`;
              } else {
                data.id = sgworld.Core.getuid();
                this.measureData.set(data.id, volumetricMeasurementTool);
                let popupData = that.openMeasureResultInfo('体积方量', data);
                volumetricMeasurementTool.popupData = popupData;
              }
        case "d6": //土方量分析
          if (window.TFvolumetricMeasurementTool) {
            TFvolumetricMeasurementTool.cleanUp();
            if (TFvolumetricMeasurementTool._mouseHandler) {
              TFvolumetricMeasurementTool._mouseHandler.destroy();
              TFvolumetricMeasurementTool = null;
              Viewer._container.style.cursor = "default";
              return;
            }
          );
            TFvolumetricMeasurementTool = null;
            this.$refs.mapinfo && this.$refs.mapinfo.close();
          } else {
            var that = this;
            window.TFvolumetricMeasurementTool =
              sgworld.Creator.createVolumetricMeasureTool();
            TFvolumetricMeasurementTool.startDrawing(
              { ...this.colorAll, onlyTerrain: false },
              "auto",
              (data) => {
                if (TFvolumetricMeasurementTool.popupData) {
                  TFvolumetricMeasurementTool.popupData.value = `填方:${
                    data.volume.fill.toFixed(4) + data.unit.fill
                  }<br>挖方:${data.volume.dig.toFixed(4) + data.unit.dig}`;
                } else {
                  data.id = sgworld.Core.getuid();
                  this.measureData.set(data.id, TFvolumetricMeasurementTool);
                  let popupData = that.openMeasureResultInfo("体积方量", data);
                  TFvolumetricMeasurementTool.popupData = popupData;
                }
              }
            );
          }
          break;
        case 'd7':
        case "d7": //三维截面分析
          // if(window.MXModel) {
          //   Viewer.screenSpaceEventHandler.removeInputAction(Cesium.ScreenSpaceEventType.LEFT_CLICK);
          //   window.MXModel=null;
          // } else {
          var that = this;
          window.model = sgworld.Creator.create3DTilesets(
            '',
            modelUrl+'/SN/tileset.json',
            "",
            modelUrl,
            {},
            {},
            '0',
            "0",
            true,
            (data) => {
              sgworld.Navigate.flyToObj(data);
              that.setclippingModel();
            }
          );
          break;
        case 'd9':
          this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.close("queryinfo");
          this.$store.state.mapPopBoxFlag = '3';
          this.$refs && this.$refs.queryinfo && this.$refs.queryinfo.open("管道空间分析", null, {
            close: () => {
              if (this.$store.state.pipelineEntity.length != 0) {
                for (var i in this.$store.state.pipelineEntity) {
                  var item = this.$store.state.pipelineEntity[i]
                  sgworld.Viewer.entities.remove(item);
                }
              }
            }
          });
          break;
        case 'd8':
        case "d9": //管道分析
          this.isPiple = !this.isPiple;
          if (this.isPiple) {
            this.$store.state.mapPopBoxFlag = "3";
            this.$refs &&
              this.$refs.queryinfo &&
              this.$refs.queryinfo.open("管道空间分析", null, {
                close: () => {
                  if (this.$store.state.pipelineEntity.length != 0) {
                    for (var i in this.$store.state.pipelineEntity) {
                      var item = this.$store.state.pipelineEntity[i];
                      sgworld.Viewer.entities.remove(item);
                    }
                  }
                },
              });
          } else {
            this.$refs &&
              this.$refs.queryinfo &&
              this.$refs.queryinfo.close("queryinfo");
          }
          break;
        case "d8": //影像对比
          if (this.isContrastFlag == false) {
            this.isContrastFlag = true;
            sgworld.Analysis.createCurtainContrast(2, 1);
@@ -1202,65 +1270,99 @@
            sgworld.Analysis.clearCurtainContrast();
          }
          break;
        case 'd10':
          if(window.DXTerrainFlattening!=null){
            DXTerrainFlattening.remove();
          }
          sgworld.Creator.createSimpleGraphic(
                'polygon',
                {
                    clampToGround: true,
                },
                function (entity) {
                    let   positions = entity.polygon.hierarchy.getValue().positions;
                    sgworld.Creator.SimpleGraphic.remove(entity.id);
                    window.DXTerrainFlattening = sgworld.Creator.createTerrainModifier("地形压平", positions, 10, {});
                }
        case "d10": //地面整平
          if (this.DXZPState != null) {
            this.DXZPState.drawHandler && this.DXZPState.drawHandler.destroy();
            Viewer._container.style.cursor = "default";
            this.DXZPState.tooltip && this.DXZPState.tooltip.show(false);
            if (window.DXTerrainFlattening != null) {
              DXTerrainFlattening.remove();
            }
            window.DXTerrainFlattening = null;
            this.DXZPState = null;
          } else {
            this.DXZPState = sgworld.Creator.createSimpleGraphic(
              "polygon",
              {
                clampToGround: true,
              },
              function (entity) {
                let positions = entity.polygon.hierarchy.getValue().positions;
                sgworld.Creator.SimpleGraphic.remove(entity.id);
                window.DXTerrainFlattening =
                  sgworld.Creator.createTerrainModifier(
                    "地形压平",
                    positions,
                    10,
                    {}
                  );
              }
            );
          }
          break;
        case 'd11':
        case "d11": //地形开挖
          if (window.Excavation) {
            window.Excavation.drawHandler &&
              window.Excavation.drawHandler.destroy();
            Viewer._container.style.cursor = "default";
            window.Excavation.tooltip && window.Excavation.tooltip.show(false);
            window.Excavation.clear();
            window.Excavation = null;
          } else {
            window.Excavation = sgworld.Analysis.TerrainExcavation(
              10,
              {},
              function () { }
              function () {}
            );
          }
          break;
        case "d12":
          if (window.TSExcavation!=null) {
            window.TSExcavation.deleteObject()
            window.TSExcavation = null
        case "d12": //通视分析
          if (window.TSExcavation != null) {
            window.TSExcavation._SimpleGraphic.drawHandler &&
              window.TSExcavation._SimpleGraphic.drawHandler.destroy();
            Viewer._container.style.cursor = "default";
            window.TSExcavation._SimpleGraphic.tooltip &&
              window.TSExcavation._SimpleGraphic.tooltip.show(false);
            window.TSExcavation.deleteObject();
            window.TSExcavation = null;
          } else {
            window.TSExcavation = sgworld.Analysis.createSightLine({
              type: "default",
            })
            });
          }
          break
        case "d13":
          if (this.Excavation) {
            this.Excavation.destroy()
            this.Excavation = null
          } else {
            this.Excavation = sgworld.Analysis.create3DViewshedPoss({
              height: 1.8,
            })
          }
          break
        case "d14":
          if (window.Excavation) {
            window.Excavation.close()
            window.Excavation = null
          break;
        case "d13": //视域分析
          if (window.SYExcavatio) {
            window.SYExcavatio.end && window.SYExcavatio.end();
            window.SYExcavatio.close();
            window.SYExcavatio = null;
          } else {
            var SYFX_visible_color = { r: 0.0, g: 1.0, b: 0.0 },
              SYFX_notVisible_color = { r: 1.0, g: 0.0, b: 0.0 }
            window.Excavation = sgworld.Analysis.create3DViewshed({
              SYFX_notVisible_color = { r: 1.0, g: 0.0, b: 0.0 };
            window.SYExcavatio = sgworld.Analysis.create3DViewshed({
              name: "Viewshed On Frederick",
              height: 1.8,
              color: {
                Back: SYFX_notVisible_color,
                Fore: SYFX_visible_color,
              },
              isSpherical: "",
            });
          }
          break;
        case "d14": //圆形时域分析
          if (window.YXSYExcavation) {
            window.YXSYExcavation.end && window.YXSYExcavation.end();
            window.YXSYExcavation.close();
            window.YXSYExcavation = null;
          } else {
            var SYFX_visible_color = { r: 0.0, g: 1.0, b: 0.0 },
              SYFX_notVisible_color = { r: 1.0, g: 0.0, b: 0.0 };
            window.YXSYExcavation = sgworld.Analysis.create3DViewshed({
              name: "Viewshed On Frederick",
              height: 1.8,
              color: {
@@ -1268,19 +1370,17 @@
                Fore: SYFX_visible_color,
              },
              isSpherical: "spherical",
            })
            });
          }
          break
          break;
      }
    },
    setclippingModel() {
      if (window.model) {
        setTimeout(() => {
          window.model.clippingModel({
            direction: 'z',
            direction: "z",
          });
        }, 1000);
        // window.model.clippingModel({
@@ -1290,7 +1390,7 @@
    },
    clear(res) {
      switch (res) {
        case 'd4':
        case "d4":
          layer.close(this.dxpmIndex);
          this.dxpmIndex = undefined;
          if (window.AnalysisDXPM) {
@@ -1300,7 +1400,7 @@
            window.AnalysisDXPM = undefined;
          }
          break;
        case 'd5':
        case "d5":
          window.AnalysisFlood.endWater();
          window.AnalysisFlood = undefined;
          break;
@@ -1311,13 +1411,13 @@
        pointSelect: true,
        spood: 20,
        GroupID: 0,
        url: '/SmartEarthSDK/Workers/image/waterNormals.jpg',
        url: "/SmartEarthSDK/Workers/image/waterNormals.jpg",
      };
      window.AnalysisFlood = sgworld.Command.execute(
        2,
        2,
        method,
        (value) => { }
        (value) => {}
      );
    },
    addterrainSectionAnalysis() {
@@ -1328,21 +1428,22 @@
        (Distance) => {
          if (Distance.gcs && Distance.gcs.length) {
            var url = window.location.href;
            var testurl = '';
            if (url.indexOf('web') != -1) {
              testurl = '/web';
            var testurl = "";
            if (url.indexOf("web") != -1) {
              testurl = "/web";
            }
            window.AnalysisDXPM.analyseData = Distance;
            this.dxpmIndex = layer.open({
              type: 2,
              title: '分析结果',
              title: "分析结果",
              shade: false,
              area: ['80%', '280px'],
              offset: 'b',
              skin: 'other-class',
              content: testurl + '/SmartEarthSDK/Workers/analysis/AnalysisDXPM.html',
              area: ["80%", "280px"],
              offset: "b",
              skin: "other-class",
              content:
                testurl + "/SmartEarthSDK/Workers/analysis/AnalysisDXPM.html",
              end: () => {
                this.dxpmIndex && this.clear('d4');
                this.dxpmIndex && this.clear("d4");
              },
            });
          } else {
@@ -1354,16 +1455,16 @@
    },
    setWander(res) {
      switch (res) {
        case 'c1':
        case "c1":
          window.sgworld.Analysis.setPointFly();
          break;
        case 'c2':
        case "c2":
          var url = window.location.href;
          var testurl = '';
          if (url.indexOf('web') != -1) {
            testurl = '/web';
          var testurl = "";
          if (url.indexOf("web") != -1) {
            testurl = "/web";
          }
          window.sgworld.Command.execute(2, 3, '', (data) => {
          window.sgworld.Command.execute(2, 3, "", (data) => {
            data.showPoint = false;
            data.showLine = true;
            data.mode = 0;
@@ -1373,22 +1474,22 @@
            };
            window.PathAnimationData.winIndex = layer.open({
              type: 2,
              title: '路径动画',
              title: "路径动画",
              shade: false,
              area: ['352px', '690px'],
              offset: 'r',
              skin: 'other-class',
              content: testurl + '/SmartEarthSDK/Workers/path/Path.html',
              area: ["352px", "690px"],
              offset: "r",
              skin: "other-class",
              content: testurl + "/SmartEarthSDK/Workers/path/Path.html",
              end: function () {
                PathAnimationData.fly && PathAnimationData.fly.exit();
              },
            });
          });
          break;
        case 'c3':
        case "c3":
          sgworld.Analysis.createindoormode({ showHelp: true });
          break;
        case 'c4':
        case "c4":
          window.sgworld.Analysis.createScreenshot();
          break;
      }
@@ -1396,89 +1497,87 @@
    setOrientation(res) {
      var resid;
      switch (res) {
        case 'f1':
        case "f1":
          resid = 1;
          break;
        case 'f2':
        case "f2":
          resid = 2;
          break;
      }
      var val = {
        name: 'Coord',
        name: "Coord",
        id: resid,
      };
      this.$bus.$emit('mapChangeBox', val);
      this.$bus.$emit("mapChangeBox", val);
    },
    setViewport(res) {
      switch (res) {
        case 'b1': //分屏
          this.$bus.$emit('changemap', 1);
        case "b1": //分屏
          this.$bus.$emit("changemap", 1);
          break;
        case 'b2': //二维
          this.$bus.$emit('changemap', 2);
        case "b2": //二维
          this.$bus.$emit("changemap", 2);
          break;
        case 'b3': //三维
          this.$bus.$emit('changemap', 3);
        case "b3": //三维
          this.$bus.$emit("changemap", 3);
          break;
        case 'b4': //全图
        case "b4": //全图
          window.sgworld.Navigate.jumpTo({
            //跳转视角
            destination: new Cesium.Cartesian3.fromDegrees(110, 32, 8000000),
          });
          window.map
            .getView()
            .setCenter(transform([110, 32], 'EPSG:4326', 'EPSG:3857'));
            .setCenter(transform([110, 32], "EPSG:4326", "EPSG:3857"));
          window.map.getView().setZoom(4);
          break;
        case 'b5': //放大
        case "b5": //放大
          window.sgworld.Navigate.zoomIn();
          // 获取当前视图
          var zoom = window.map.getView().getZoom(); // 获取当前缩放级别
          window.map.getView().setZoom(zoom + 1); // 设置缩放级别
          break;
        case 'b6': //缩小
        case "b6": //缩小
          window.sgworld.Navigate.zoomOut();
          var zoom = window.map.getView().getZoom(); // 获取当前缩放级别
          window.map.getView().setZoom(zoom - 1); // 设置缩放级别
          break;
        case 'b7': //比例尺
        case "b7": //比例尺
          this.isRuler = !this.isRuler;
          window.sgworld.navControl('scale', this.isRuler);
          window.sgworld.navControl("scale", this.isRuler);
          if (this.isRuler == true) {
            this.scaleLine = new ScaleLine({
              units: "metric"
              units: "metric",
            });
            window.map.addControl(this.scaleLine);
          } else {
            window.map.removeControl(this.scaleLine);
            this.scaleLine = false;
          }
          break;
        case 'b8': //指北针
        case "b8": //指北针
          this.isNaviget = !this.isNaviget;
          window.sgworld.navControl('nav', this.isNaviget);
          this.$store.state.isNaviget = this.isNaviget
          window.sgworld.navControl("nav", this.isNaviget);
          this.$store.state.isNaviget = this.isNaviget;
          break;
        case 'b9': //地下模式
        case "b9": //地下模式
          this.UndergroundMode = !this.UndergroundMode;
          window.sgworld.Analysis.UndergroundMode(this.UndergroundMode, 0.3)
          window.sgworld.Analysis.UndergroundMode(this.UndergroundMode, 0.3);
          break;
      }
    },
    setCoverage(res) {
      switch (res) {
        case 'a1':
        case "a1":
          if (this.$store.state.layerMnage == false) {
            this.$refs && this.$refs.maplayer && this.$refs.maplayer.closeAll();
            this.$refs && this.$refs.maplayer && this.$refs.maplayer.open();
            this.$store.state.layerMnage = true;
          } else if (this.$store.state.layerMnage == true) {
                       this.$bus.$emit("treeDataCopy","true");
            this.$bus.$emit("treeDataCopy", "true");
            this.$refs && this.$refs.maplayer && this.$refs.maplayer.closeAll();
            this.$store.state.layerMnage = false;
          }
          break;
@@ -1491,23 +1590,23 @@
  mounted() {
    this.measureData = new Map();
    this.colorAll = {
      point: Cesium.Color.fromCssColorString('#ff0000'),
      polyline: Cesium.Color.fromCssColorString('#ffff00').withAlpha(0.6),
      polygon: Cesium.Color.fromCssColorString('#ffff00').withAlpha(0.6),
      point: Cesium.Color.fromCssColorString("#ff0000"),
      polyline: Cesium.Color.fromCssColorString("#ffff00").withAlpha(0.6),
      polygon: Cesium.Color.fromCssColorString("#ffff00").withAlpha(0.6),
    };
    this.$bus.$on('setChangeTwoMenu', (res) => {
      if (res == 8) { this.setLayerScene(); } else {
    this.$bus.$on("setChangeTwoMenu", (res) => {
      if (res == 8) {
        this.setLayerScene();
      } else {
        this.menuChange(res);
      }
    });
    this.$store.state.showAllLayers = true;
    this.$store.state.layerMnage = false;
    this.$store.state.treeData = null;
    this.$store.state.checkedKeys = [];
    this.setCoverage('a1');
    this.setCoverage("a1");
  },
};
</script>
@@ -1523,6 +1622,7 @@
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  .leftMen_div {
    font-size: 16px;
    font-family: Microsoft YaHei;
@@ -1535,16 +1635,19 @@
    border-radius: 5px;
    text-align: center;
  }
  .leftMen_div:hover {
    background: rgba(64, 158, 255, 0.4);
    border: 1px solid #409eff;
    box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
  }
  .lefMenuDivActive {
    background: rgba(64, 158, 255, 0.4);
    border: 1px solid #409eff;
  }
  .menuTwoImage {
    width: 40px;
    height: 40px;
src/views/Tools/LayerTree.vue
@@ -10,8 +10,8 @@
      ref="tree"
      :data="treeData"
      node-key="id"
      default-expand-all
      show-checkbox
      :props="defaultProps"
      @node-click="handleLeftclick"
      @node-contextmenu="rightClick"
      @check-change="handleCheckChange"
@@ -59,7 +59,7 @@
      <div class="edit" @click="editNode()">
        <i class="el-icon-edit"></i>&nbsp;&nbsp;重命名
      </div>
      <div class="edit" @click="showLayerAttribute()">
      <div class="edit" @click="showLayerAttribute()" v-show="!firstLevel">
        <i class="el-icon-tickets"></i>&nbsp;&nbsp;属性
      </div>
      <!-- <div
@@ -89,7 +89,7 @@
          <el-select
            style="width: 100%"
            :popper-append-to-body="false"
            v-model="addFormServer.layerType"
            v-model="addFormServer.serveType"
            placeholder="请选择"
          >
            <el-option
@@ -102,14 +102,14 @@
          </el-select>
        </el-form-item>
        <el-form-item label="图层名称">
          <el-input v-model="addFormServer.label"></el-input>
          <el-input v-model="addFormServer.cnName"></el-input>
        </el-form-item>
        <el-form-item label="服务名称">
          <el-input v-model="addFormServer.resource"></el-input>
          <el-input v-model="addFormServer.url"></el-input>
        </el-form-item>
        <el-form-item label="服务地址">
          <el-input v-model="addFormServer.url"></el-input>
          <el-input v-model="addFormServer.resource"></el-input>
        </el-form-item>
        <el-form-item label="透明度">
          <el-slider v-model="addFormServer.opacity"></el-slider>
@@ -155,7 +155,7 @@
      dialogVisible: false,
      addFormServer: {
        opacity: 100,
        layerType: "WMS",
        serveType: "WMS",
        type: 2,
      },
      layerId: [
@@ -167,7 +167,7 @@
      treeData: [],
      defaultProps: {
        children: "children",
        label: "label",
        label: "cnName",
      },
      options: [
        {
@@ -215,10 +215,10 @@
    rightClick(event, object, Node, element) {
      this.currentData = object;
      this.currentNode = Node;
      if (Node.level === 1) {
        this.firstLevel = true;
      } else {
      if (Node.level === 3) {
        this.firstLevel = false;
      } else {
        this.firstLevel = true;
      }
      this.menuVisible = true;
@@ -270,7 +270,7 @@
      this.dialogVisible = false;
      this.addFormServer = {
        opacity: 100,
        layerType: "WMS",
        serveType: "WMS",
        type: 2,
      };
    },
@@ -287,22 +287,33 @@
    // 删除节点
    deleteNode() {
      this.foo();
      var label = this.currentNode.data.label;
      if (this.currentNode.data.layerType == "WMS") {
        for (var i in window.Viewer.imageryLayers_layers) {
          if (window.Viewer.imageryLayers_layers[i].name === label) {
      var label = this.currentNode.data.cnName;
      if (this.currentNode.data.serveType == "WMS") {
        for (var i in window.Viewer.imageryLayers._layers) {
          if (
            window.Viewer.imageryLayers._layers[i].imageryProvider.name ===
            label
          ) {
            window.Viewer.imageryLayers.remove(
              window.Viewer.imageryLayers_layers[i]
              window.Viewer.imageryLayers._layers[i]
            );
          }
        }
      } else if (this.currentNode.data.layerType == "WFS") {
      } else if (this.currentNode.data.serveType == "WFS") {
        for (var i in window.Viewer.dataSources._dataSources) {
          if (window.Viewer.dataSources._dataSources[i].name == label) {
            window.Viewer.dataSources.remove(
              window.Viewer.dataSources._dataSources[i]
            );
            std.push(data.label);
          }
        }
      } else if (this.currentNode.data.serveType == "Tileset") {
        for (var i in Viewer.scene.primitives._primitives) {
          // Viewer.scene.primitives._primitives[i].show = checked;
          if (Viewer.scene.primitives._primitives[i].id == label) {
            Viewer.scene.primitives.remove(
              Viewer.scene.primitives._primitives[i]
            );
          }
        }
      }
@@ -412,20 +423,13 @@
    },
    handleCheckChange(data, checked, indeterminate) {
      if (data.type != 2) return;
      //做判断是否是1:100万行政界面
      if (data.layer == window.XZOutlie && checked) {
        window.ImageLayer3.show = false;
      } else {
        window.ImageLayer3.show = true;
      }
      var std = [];
      if (data.layerType == "WMS") {
      if (data.serveType == "WMS") {
        var layers_ol = window.map.getAllLayers();
        for (var i = 0; i < window.Viewer.imageryLayers._layers.length; i++) {
          var val_id =
            window.Viewer.imageryLayers._layers[i].imageryProvider.name;
          if (val_id == data.label) {
          if (val_id == data.cnName) {
            std.push(data.label);
            const img_layer = window.Viewer.imageryLayers._layers[i];
@@ -435,18 +439,30 @@
        for (var i in layers_ol) {
          var layerOl = layers_ol[i];
          if (layerOl.values_.name == data.label) {
          if (layerOl.values_.name == data.cnName) {
            layerOl.setVisible(checked); //显示图层
          }
        }
      } else if (data.layerType == "WFS") {
      } else if (data.serveType == "WFS") {
        if (window.Viewer.dataSources._dataSources.length == 0) {
          this.setAddLayers(data);
        } else {
          for (var i in window.Viewer.dataSources._dataSources) {
            if (window.Viewer.dataSources._dataSources[i].name == data.label) {
            if (window.Viewer.dataSources._dataSources[i].name == data.cnName) {
              window.Viewer.dataSources._dataSources[i].show = checked;
              std.push(data.label);
            }
          }
        }
      } else if (data.serveType == "Tileset") {
        if (Viewer.scene.primitives._primitives.length == 0) {
          this.setAddLayers(data);
        } else {
          for (var i in Viewer.scene.primitives._primitives) {
            Viewer.scene.primitives._primitives[i].show = checked;
            if (Viewer.scene.primitives._primitives[i].id == data.cnName) {
              std.push(res.id);
              Viewer.flyTo(Viewer.scene.primitives._primitives[i]);
            }
          }
        }
@@ -463,19 +479,17 @@
      }
    },
    setAddLayers(res) {
      if (res.layerType == "WMS") {
        var url = geoServerURl;
        if (res.url != null && res.url != undefined) {
          url = res.url;
      if (res.serveType == "WMS") {
        // var resource = geoServerURl;
        var resource = "http://192.168.20.205:8088/geoserver/LF/wms";
        if (res.resource != null && res.resource != undefined) {
          resource = res.resource;
        }
        //var width = $("#mapdiv").width();
        //var height = $("#mapdiv").height();
        var imageryLayers = window.Viewer.scene.imageryLayers;
        let layerWMS = new Cesium.WebMapServiceImageryProvider({
          url: url,
          layers: res.resource,
          url: resource,
          layers: res.url,
          parameters: {
            transparent: true,
            format: "image/png",
@@ -485,21 +499,21 @@
          tileWidth: 512,
          tileHeight: 512,
        });
        layerWMS.name = res.label;
        layerWMS.name = res.cnName;
        //透明度
        var tdtAnnoLayer = imageryLayers.addImageryProvider(layerWMS);
        if (res.opacity) {
          tdtAnnoLayer.alpha = parseInt(res.opacity) / 100;
        }
        var layer2 = new Image({
          name: res.label,
          name: res.cnName,
          source: new ImageWMS({
            crossOrigin: "anonymous",
            url: url,
            url: resource,
            params: {
              FORMAT: "image/png",
              VERSION: "1.1.1",
              LAYERS: res.resource,
              LAYERS: res.url,
            },
          }),
        });
@@ -507,11 +521,11 @@
          layer2.setOpacity(parseInt(res.opacity) / 100);
        }
        window.map.addLayer(layer2);
      } else if (res.layerType == "WFS") {
      } else if (res.serveType == "WFS") {
        var url =
          res.url +
          "?service=WFS&version=1.0.0&request=GetFeature&typeName=" +
          res.resource +
          "?service=WFS&version=1.0.0&request=GetFeature&typeName=" +
          res.url +
          "&outputFormat=application%2Fjson";
        $.ajax({
          url: url,
@@ -526,7 +540,7 @@
              clampToGround: true, //是否贴地
            });
            datasource.then((data) => {
              data.name = res.label;
              data.name = res.cnName;
              window.Viewer.dataSources.add(data);
            });
          },
@@ -536,71 +550,74 @@
        });
        var vectorLayer = new VectorLayer({
          name: res.label,
          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, // 减少离相机较远的屏幕空间错误:false
            skipLevelOfDetail: true, // 在遍历时候跳过详情:false
          })
        );
        tileset.readyPromise.then(function (tileset) {
          tileset.id = res.cnName;
          Viewer.flyTo(tileset);
        });
      }
    },
    setTreeData(source) {
      let cloneData = JSON.parse(JSON.stringify(source)); // 对源数据深度克隆
      return cloneData.filter((father) => {
        // 循环所有项
        let branchArr = cloneData.filter((child) => father.id == child.pid); // 对比ID,分别上下级菜单,并返回数据
        branchArr.length > 0 ? (father.children = branchArr) : ""; // 给父级添加一个children属性,并赋值
        // 属于同一对象问题,例如:令 a=b、c=1 ,然后再令 b.c=c , 那么 a.c=b.c=c=1 ;同理,后续令 c.d=2 ,那么 a.c.d 也是=2;
        // 由此循环多次后,就能形成相应的树形数据结构
        return father.pid == 0; // 返回一级菜单
      });
    },
    async layersStart() {
      const data = await perms_selectLayers();
      if (data.code != 200) {
        return this.$message.error("图层列表查询失败");
      }
      this.newData = data.result;
      this.oriData = data.result;
      var std = [];
      var layer_list = [];
      var layer_groups = [];
      for (var i in data.result) {
        if (data.result[i].type == 1) {
          layer_groups.push({
            id: data.result[i].id,
            label: data.result[i].cnName,
            type: data.result[i].type,
            isEdit: false,
            children: [],
          });
        } else if (data.result[i].type == 2) {
          if (data.result[i].url != null) {
            var layer_entity = {
              id: data.result[i].id,
              pid: data.result[i].pid,
              label: data.result[i].cnName,
              resource: data.result[i].url,
              type: data.result[i].type,
              isEdit: false,
              layer: data.result[i].enName,
              layerType: data.result[i].serveType,
            };
            layer_list.push(layer_entity);
            if (data.result[i].isShow == 1) {
              std.push(data.result[i].id);
              this.setAddLayers(layer_entity);
            }
          }
      var std = data.result;
      var that = this;
      var checkKey = [];
      var val = std.filter((str) => {
        if (str.type == 1) {
          return str;
        }
      }
      for (var i in layer_list) {
        for (var j in layer_groups) {
          if (layer_list[i].pid === layer_groups[j].id) {
            layer_groups[j].children.push(layer_list[i]);
        if (str.url != null && str.type == 2) {
          if (str.isShow == 1) {
            checkKey.push(str.id);
            that.setAddLayers(str);
          }
        }
      }
      layer_groups = layer_groups.filter((res) => {
        if (res.children && res.children.length != 0) {
          return res;
          return str;
        }
      });
      this.treeData = layer_groups;
      this.$refs.tree.setCheckedKeys(std);
      var res = this.setTreeData(val);
      for (var i in res) {
        res[i].children = res[i].children.filter((val) => {
          if (val.children != null) {
            return val;
          }
        });
      }
      this.treeData = res;
      this.$refs.tree.setCheckedKeys(checkKey);
    },
    async treelayersStart() {
      const data = await perms_selectLayers();
@@ -700,7 +717,7 @@
}
.tree-container /deep/ .el-tree-node__expand-icon {
  margin-left: 15px;
  margin-left: 1px;
  padding: 0px;
}
@@ -710,7 +727,7 @@
.tree-container /deep/ .el-tree-node {
  position: relative;
  padding-left: 16px;
  padding-left: 10px;
  // text-indent: 16px;
}
@@ -838,6 +855,7 @@
    }
  }
}
/*.lalala {*/
/*position: relative;*/
/*}*/
src/views/Tools/maplayer.vue
@@ -32,7 +32,7 @@
    return {
      // 弹窗数据
      PopupData: ['maplayer'],
      left: 'calc(100% - 330px)',
      left: 'calc(100% - 370px)',
      top: 10,
    };
  },