管道基础大数据平台系统开发-【前端】-新系統界面
Surpriseplus
2023-08-14 04dae190af26730e8e0dcfb7cb4ec066400422f3
src/components/Screen/bottom.vue
@@ -28,7 +28,10 @@
                  v-model="searchName"
                  @change="handleSearchChange(item)"
                >
                  <el-button slot="append" icon="el-icon-search"></el-button>
                  <el-button
                    slot="append"
                    icon="el-icon-search"
                  ></el-button>
                </el-input>
              </div>
              <div class="popover-content__list">
@@ -56,7 +59,12 @@
        </div>
      </div>
      <div class="bottom13">
        <div class="bottom13-wrapper" :class="isExpand ? 'expend' : 'fold'" @mouseover="handleMouseOver" @mouseout="handleMouseOut">
        <div
          class="bottom13-wrapper"
          :class="isExpand ? 'expend' : 'fold'"
          @mouseover="handleMouseOver"
          @mouseout="handleMouseOut"
        >
          <div
            v-for="item in yxList"
            yxList
@@ -200,8 +208,10 @@
  },
  computed: {
    currMenuList() {
      const menu = this.menuList.find(item => item.menuName == this.currMenu)
      const filterChildren = []
      const value = this.searchName
      menu.children.forEach(item => {
        if (item.name && item.name.includes(value)) {
@@ -218,48 +228,88 @@
  methods: {
    ChangeBaseLayer(name) {
      this.currYX = name
      Viewer.imageryLayers._layers[1].show = false
      Viewer.imageryLayers._layers[2].show = false
      Viewer.imageryLayers._layers[3].show = false
      if (is_production) {
        Viewer.imageryLayers._layers[2].show = false
        Viewer.imageryLayers._layers[1].show = false
      } else {
        Viewer.imageryLayers._layers[1].show = false
      }
      if (yunxuanLayer) {
        yunxuanLayer.item.show = false
        Viewer.imageryLayers.remove(yunxuanLayer);
        yunxuanLayer = null
      }
      switch (name) {
        case "晕渲图":
          if (yunxuanLayer == null) {
            var urls = "https://tiles3.geovisearth.com/base/v1/ter"
            // 星图地球地形晕渲
            yunxuanLayer = sgworld.Creator.createUrlTemplateImageryProvider(
              "星图地球地形晕渲",
              {
                url:
                  urls +
                  "/{z}/{x}/{y}?format=webp&token=486dac3bec56d7d7c2a581c150be2bd937462f1e8f3bc9c78b5658b396122405",
              },
              "0",
              undefined,
              true,
              ""
            )
            // var urls = "https://tiles3.geovisearth.com/base/v1/ter"
            // // 星图地球地形晕渲
            // yunxuanLayer = sgworld.Creator.createUrlTemplateImageryProvider(
            //   "星图地球地形晕渲",
            //   {
            //     url:
            //       urls +
            //       "/{z}/{x}/{y}?format=webp&token=486dac3bec56d7d7c2a581c150be2bd937462f1e8f3bc9c78b5658b396122405",
            //   },
            //   "0",
            //   undefined,
            //   true,
            //   ""
            // )
            var urls = "http://t0.tianditu.com/ter_w/wmts?service=wmts&request=GetTile&version=1.0.0&LAYER=ter&tileMatrixSet=w&TileMatrix={TileMatrix}&TileRow={TileRow}&TileCol={TileCol}&style=default&format=tiles&tk=";
            var tokne = "94a34772eb88317fcbf8428e10448561"
            if (is_production) {
              var baseUrl_yx = window.sceneConfig.baseUrl_yx;
              if (baseUrl_yx.indexOf('{host}') > -1) {
                baseUrl_yx = baseUrl_yx.replace("{host}", iisHost)
              }
              yunxuanLayer = Viewer.imageryLayers.addImageryProvider(
                new Cesium.UrlTemplateImageryProvider({
                  url: baseUrl_yx,
                  maximumLevel: 22,
                })
              );
            } else {
              yunxuanLayer = Viewer.imageryLayers.addImageryProvider(new Cesium.WebMapTileServiceImageryProvider({
                url: urls + tokne,
                layer: "tdtImgLayer",
                style: "default",
                format: "image/jpeg",
                tileMatrixSetID: "GoogleMapsCompatible",
              }))
            }
            Viewer.imageryLayers.lowerToBottom(yunxuanLayer);//将图层移到最底层
            Viewer.imageryLayers.raise(yunxuanLayer);//将图层上移一层
          }
          yunxuanLayer.item.show = true
          break
        case "影像图":
          Viewer.imageryLayers._layers[2].show = true
          if (is_production) {
            Viewer.imageryLayers._layers[1].show = true
          }
          break
        case "注记图":
          Viewer.imageryLayers._layers[1].show = true
          if (is_production) {
            Viewer.imageryLayers._layers[2].show = true
          } else {
            Viewer.imageryLayers._layers[1].show = true
          }
          break
        default:
          break
      }
    },
    handleMenuClick(menu) {
      this.currMenu = menu.menuName
    },
    handlePopoverClick(child) {
@@ -270,12 +320,13 @@
          this.showPathLine(child)
          break
        case "项目展示":
          this.$bus.$emit("changeProjectLayer", child.id)
          this.DisplayCurrentProject(child)
          this.changeProject(child)
          this.$bus.$emit("changeProjectCode", child.id)
          break
        case "专题展示":
          this.$bus.$emit("changeProjectLayer", child.id)
          this.changeProject(child)
          break
@@ -286,6 +337,9 @@
    //工程巡视
    async showPathLine(params) {
      this.$bus.$emit("closeLeftAndRightMenu", true)
      const line = wktToGeoJSON(params.wkt)
      const position = line.coordinates[0]
      const result = []
@@ -294,7 +348,7 @@
        pos.push(1000)
        result.push(...pos)
      })
      // console.log("line", position)
      window.sgworld.Creator.getFlyData(result, data => {
        data.showPoint = false
@@ -306,6 +360,7 @@
        window.PathAnimationData = {
          flyData: data,
        }
        var that = this
        window.PathAnimationData.winIndex = layer.open({
          type: 2,
          title: "工程巡视",
@@ -316,6 +371,7 @@
          content: SmartEarthRootUrl + "Workers/path/ProjectPath.html",
          end: function () {
            PathAnimationData.fly && PathAnimationData.fly.exit()
            that.$bus.$emit("closeLeftAndRightMenu", false)
          },
        })
      })
@@ -350,7 +406,7 @@
      return menu.children
      // return menu.children.filter(item => item.name.indexOf(searchName) > -1)
    },
    handleSearchChange(currMenu) {},
    handleSearchChange(currMenu) { },
    async getCountProjectDisplay() {
      // const res = await countProjectLocation()
      // if (res.code === 200) {
@@ -379,7 +435,9 @@
    async getCountProjectTour() {
      const res = await countProjectTour()
      if (res.code === 200) {
        const menu = this.menuList.find(item => item.menuName == "工程巡视")
        menu.children = res.result.map(item => {
          return {
            name: item.projname,
@@ -392,6 +450,31 @@
    //专题展示
    changeProject(params) {
      this.$bus.$emit("changeProject", params.name)
      var lon, lat, height;
      if (params.name.indexOf("全国") != -1) {
        height = 20000000;
        lon = 110;
        lat = 32;
        window.viewer.camera.flyTo({
          destination: new Cesium.Cartesian3.fromDegrees(lon, lat, height),
          orientation: {
            heading: Cesium.Math.toRadians(0),
            pitch: Cesium.Math.toRadians(-90),
          },
        })
      } else if (params.name.indexOf("全球") != -1) {
        lon = 85;
        lat = 25;
        height = 30000000;
        window.viewer.camera.flyTo({
          destination: new Cesium.Cartesian3.fromDegrees(lon, lat, height),
          orientation: {
            heading: Cesium.Math.toRadians(0),
            pitch: Cesium.Math.toRadians(-90),
          },
        })
      }
    },
    handleTree(params) {
      this.showTree = !this.showTree
@@ -521,7 +604,7 @@
      background: url(~@/assets/img/Screen/centerbtn.png);
      background-size: 100% 100%;
      background-repeat: no-repeat;
      font-size: 1rem;
      font-size: 16px;
      display: flex;
      align-items: center;
      justify-content: center;