北京经济技术开发区经开区虚拟城市项目-【前端】-Web
lixuliang
2023-11-15 c658f316d2f464e510d10f1081c52848c3aefeb2
src/components/map/viewer1.vue
@@ -1,6 +1,17 @@
<template>
  <div>
    <div id="sdkContainer1" style="height: 100%"></div>
    <div class="listBox" v-show="!isLand">
      <ul>
        <li
          v-for="(item, index) in arr"
          :key="index"
          @click="changeLeftMap($event, item, index)"
        >
          {{ item }}
        </li>
      </ul>
    </div>
    <layerTreeTwoScreenRight
      v-if="layerTreeTwoScreen"
      id="layerTreeTwoScreen111"
@@ -54,87 +65,117 @@
        </div>
      </ul>
    </div>
    <el-dialog
      class="aboutDialog"
      title="企业信息"
      append-to-body
      width="60%"
      height="60%"
      style="overflow: auto"
      :visible.sync="QYbox"
      :before-close="dialogClose"
    <div
      :style="{
        width: `${size}`,
        height: `${size}`,
        transform: `scale(${scale}) translate(${offset},${offset})`,
        '-webkit-transform': `scale(${scale}) translate(${offset},${offset})`,
        '-moz-transform': `scale(${scale}) translate(${offset},${offset})`,
        '-o-transform': `scale(${scale}) translate(${offset},${offset})`,
        '-ms-transform': `scale(${scale}) translate(${offset},${offset})`,
      }"
    >
      <div class="el-dialog-div">
        <div class="inquire">
          <el-form
            size="medium"
            ref="queryForm"
            :model="queryForm"
            :inline="true"
      <el-dialog
        class="aboutDialog"
        title="企业信息"
        append-to-body
        width="50%"
        height="60%"
        style="overflow: auto"
        :visible.sync="QYbox"
        :before-close="dialogClose"
      >
        <div class="el-dialog-div">
          <div class="inquire">
            <el-form
              size="mini"
              ref="queryForm"
              :model="queryForm"
              :inline="true"
            >
              <el-form-item label="查询内容" prop="name">
                <el-input
                  v-model="queryForm.content"
                  placeholder="请输入查询内容"
                />
              </el-form-item>
              <el-form-item>
                <el-button
                  @click="queryInfo('queryForm')"
                  icon="el-icon-search"
                  class="primary"
                  >查询</el-button
                >
              </el-form-item>
            </el-form>
          </div>
          <el-table
            fit
            style="width: 100%"
            :data="tableData"
            highlight-current-row
            height="50"
          >
            <el-form-item label="查询内容" prop="name">
              <el-input
                v-model="queryForm.content"
                placeholder="请输入查询内容"
              />
            </el-form-item>
            <el-form-item>
              <el-button
                @click="queryInfo('queryForm')"
                icon="el-icon-search"
                class="primary"
                >查询</el-button
              >
            </el-form-item>
          </el-form>
        </div>
        <el-table
          fit
          style="width: 100%"
          :data="tableData"
          highlight-current-row
        >
          <el-table-column type="index" width="50"></el-table-column>
          <el-table-column
            property="企业名称"
            label="企业名称"
          ></el-table-column>
          <el-table-column
            property="企业类型"
            label="企业类型"
          ></el-table-column>
          <el-table-column
            property="成立时间"
            label="成立时间"
          ></el-table-column>
          <el-table-column
            property="所属行业"
            label="所属行业"
          ></el-table-column>
          <el-table-column property="法人" label="法人"></el-table-column>
          <el-table-column
            property="注册地址"
            label="注册地址"
          ></el-table-column>
        </el-table>
        <div
          slot="footer"
          class="dialog-footer"
          style="text-align: center; margin-top: 5px"
        >
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page.sync="currentPage"
            :page-size="10"
            :pager-count="11"
            layout="total, pager"
            :total="searchNum"
            <el-table-column type="index" width="40"></el-table-column>
            <el-table-column
              property="企业名称"
              label="企业名称"
              min-width="240"
            ></el-table-column>
            <el-table-column
              property="企业类型"
              label="企业类型"
              min-width="240"
            ></el-table-column>
            <el-table-column
              property="成立时间"
              label="成立时间"
              width="120"
            ></el-table-column>
            <!-- <el-table-column
              property="所属行业"
              label="所属行业"
            ></el-table-column> -->
            <el-table-column
              property="法人"
              label="法人"
              width="80"
            ></el-table-column>
            <!-- <el-table-column
              property="注册地址"
              label="注册地址"
            ></el-table-column> -->
            <el-table-column label="操作" width="80">
              <template slot-scope="scope">
                <el-button
                  @click="handleClick(scope.row)"
                  type="text"
                  size="small"
                  >详情</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          <div
            slot="footer"
            class="dialog-footer"
            style="text-align: center; margin-top: 2px"
          >
          </el-pagination>
            <el-pagination
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page.sync="currentPage"
              :page-size="10"
              :pager-count="11"
              layout="total, pager"
              :total="searchNum"
            >
            </el-pagination>
          </div>
        </div>
      </div>
    </el-dialog>
      </el-dialog>
    </div>
  </div>
</template>
@@ -147,8 +188,17 @@
import Bus from "../tools/Bus";
let line, line1, handler, handler1, divPoint, divPoint1, dx;
let line,
  line1,
  handler,
  handler1,
  divPoint,
  divPoint1,
  dx,
  activeLi,
  nLayer,
  TDLayer,
  LWLayer;
export default {
  name: "viewer1",
  components: { layerTreeTwoScreenRight },
@@ -179,7 +229,12 @@
      currentPage: 1,
      pageSize: 10,
      searchNum: 0,
      arr: [
        2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012,
        2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021,
      ],
      tableData: [],
      queryForm: {
        type: "企业名称",
        content: "",
@@ -191,7 +246,7 @@
  },
  created() {},
  computed: {
    ...mapState(["viewer1Show", "layerTreeTwoScreen"]),
    ...mapState(["viewer1Show", "isLand", "layerTreeTwoScreen"]),
  },
  watch: {
    viewer1Show: {
@@ -212,8 +267,31 @@
        }, 2000);
      },
    },
    isLand(newvalue, oldvalue) {
      if (!newvalue) {
        if (TDLayer) {
          TDLayer.deleteObject();
          TDLayer = null;
        }
        if (line) {
          sgworld.Creator.DeleteObject(line);
        }
        if (line1) {
          sgworld1.Creator.DeleteObject(line1);
        }
      } else {
        this.destroyImageLayer();
        if (!TDLayer) {
          this.loadTDGLLayer();
        }
      }
    },
  },
  mounted() {
    let size = this.detectZoom();
    this.scale = (100 / size).toFixed(2);
    this.offset = "-" + ((size - 100) / 2).toFixed(2) + "%";
    this.size = size + "%";
    this.$nextTick(function () {
      let that = this;
      let option = {
@@ -228,22 +306,6 @@
          },
        },
      };
      // let option = {
      //   url: SmartEarthRootUrl + "Workers/image/earth.jpg",
      //   fullscreenButton: true,
      //   licenseServer: "http://183.162.245.49:18080",
      //   minViewHeight: parseFloat(common.minviewheight),
      //   contextOptions: {
      //     failIfMajorPerformanceCaveat: false,
      //     webgl: {
      //       alpha: true,
      //       preserveDrawingBuffer: true
      //     }
      //   }
      // };
      //EPSG4326
      // Cesium.ExpandBySmartEarth.Ellipsoid.z = 6356752.3142451793;
      // 北京
      window.sgworld1 = new SmartEarth.EarthCtrl(
@@ -262,34 +324,13 @@
              enablePickFeatures: false,
            },
            "0",
            undefined,
            1,
            true,
            ""
          );
          let treeNode = URLInCode.tdglTmsCode;
          sgworld1.Creator.createImageryProvider(
            treeNode.name,
            "tms",
            {
              id: treeNode.id,
              url: treeNode.urls,
              fileExtension: treeNode.img || "png",
              enablePickFeatures: false,
              level: treeNode.Level,
              minimumLevel: treeNode.minimumLevel,
              maximumLevel: treeNode.maximumLevel,
              tilingScheme:
                treeNode.tileType === "Geo"
                  ? new Cesium.GeographicTilingScheme()
                  : new Cesium.WebMercatorTilingScheme(),
              alpha: treeNode.alpha,
            },
            "0",
            treeNode.zIndex,
            true,
            ""
          );
          if (this.isLand) {
            this.loadTDGLLayer();
          }
          var p = {
            destination: sgworld.Navigate.getPosition(),
            orientation: {
@@ -300,32 +341,14 @@
          };
          sgworld1.Viewer.camera.setView(p);
          setTimeout(() => {
            window.loading && window.loading.close();
          }, 100);
          setTimeout(() => {
            window.APPLoading && window.APPLoading.close();
          }, 1000);
          }, 100);
        }
      );
      // 合肥
      // window.sgworld1 = new SmartEarth.SGWorld(
      //   "sdkContainer1",
      //   Cesium,
      //   option,
      //   null,
      //   function () {
      //     var p = {
      //       destination: sgworld.Navigate.getPosition(),
      //       orientation: {
      //         heading: sgworld.Viewer.camera.heading,
      //         pitch: sgworld.Viewer.camera.pitch,
      //         roll: sgworld.Viewer.camera.roll,
      //       },
      //     };
      //     sgworld1.Viewer.camera.setView(p);
      //     setTimeout(() => {
      //       window.APPLoading && window.APPLoading.close();
      //     }, 1000);
      //   }
      // );
      window.Viewer1 = sgworld1._Viewer;
      Viewer1.shadows = false;
@@ -336,416 +359,8 @@
      // Viewer.scene.screenSpaceCameraController.enableCollisionDetection = false;
      Viewer1.scene.globe.translucency.frontFaceAlpha = 0.5;
      Viewer1.scene.globe.undergroundColor = undefined;
      // let layer = sgworld1.Creator.createUrlTemplateImageryProvider(
      //   "规划用地",
      //   {
      //     id: "guihuayongdi",
      //     url:
      //       // "http://10.10.4.115/geowinmap/ds?serviceproviderid=map.cachedtms&serviceid=gettile&tilename=xncs_guihua225&x={x}&y={y}&z={z}&srs=EPSG:3857&resolution=0.000244140625&wrap=true",
      //       Cesium.buildModuleUrl(urls + "/{z}/{x}/{reverseY}.jpeg"),
      //     enablePickFeatures: false,
      //   },
      //   "0",
      //   9999,
      //   true,
      //   ""
      // );
      //左侧加载规划区
      // dx = sgworld.Creator.createImageryProvider(
      //   "gisserver",
      //   "wms",
      //   {
      //     url: "http://10.10.4.116:8070/gisserver/wmsserver/FWFQ225",
      //     layers: "",
      //     parameters: {
      //       format: "image/png",
      //       transparent: true
      //     }
      //   },
      //   "0",
      //   undefined,
      //   true,
      //   ""
      // );
      let type = 0;
      //点击右侧
      // handler = new Cesium.ScreenSpaceEventHandler(Viewer.scene.canvas);
      // handler.setInputAction((event) => {
      //   let p;
      //   if (type === 0) {
      //     p = sgworld.Navigate.getMouseDegrees(event);
      //   } else {
      //     p = sgworld.Navigate.getMousePosition(event);
      //   }
      //   // alert(JSON.stringify(p))
      //   // console.log(p);
      //   if (p) {
      //     if (line) {
      //       sgworld.Creator.DeleteObject(line);
      //     }
      //     if (line1) {
      //       sgworld1.Creator.DeleteObject(line1);
      //     }
      //     if (divPoint) {
      //       sgworld.Creator.DeleteObject(divPoint);
      //     }
      //     if (divPoint1) {
      //       sgworld1.Creator.DeleteObject(divPoint1);
      //     }
      //     axios
      //       .get(
      //         "http://10.10.4.115:8022/geowinmap_xncs/ds?r=0.9158559377752831&serviceproviderid=map.vectorserviceprovider&serviceid=queryfeature&featcls=225%25E8%258C%2583%25E5%259B%25B4%25E5%2588%2586%25E5%258C%25BA%25E8%25A7%2584%25E5%2588%2592.geojson&lng=" +
      //           p.lon +
      //           "&lat=" +
      //           p.lat +
      //           "&geom=true&requesttype=json"
      //       )
      //       .then(
      //         (response) => {
      //           let center = { lon: 0, lat: 0 };
      //           let polygon = that.read(response.data.geometry);
      //           if (polygon.length > 0) {
      //             var geometry = [];
      //             let points = polygon[0].split(",");
      //             for (let i = 0; i < points.length; i++) {
      //               let point = points[i].replace(/^\s+|\s+$/g, "").split(" ");
      //               center.lon += parseFloat(point[0]) / points.length;
      //               center.lat += parseFloat(point[1]) / points.length;
      //               geometry.push({
      //                 x: parseFloat(point[0]),
      //                 y: parseFloat(point[1]),
      //                 z: 0,
      //               });
      //             }
      //             line = sgworld.Creator.createPolyline(
      //               geometry,
      //               "#ff0000",
      //               1,
      //               0,
      //               "线"
      //             );
      //             line1 = sgworld1.Creator.createPolyline(
      //               geometry,
      //               "#ff0000",
      //               1,
      //               0,
      //               "线"
      //             );
      //           }
      //           if (center.lon != 0 && center.lat != 0) {
      //             axios
      //               .get(
      //                 "http://10.10.4.115:8022//poisearch/guihuacon/getInfo?ydbm=" +
      //                   response.data.NO
      //               )
      //               .then(
      //                 (info) => {
      //                   try {
      //                     if (divPoint) {
      //                       sgworld.Creator.DeleteObject(divPoint);
      //                     }
      //                     if (divPoint1) {
      //                       sgworld1.Creator.DeleteObject(divPoint1);
      //                     }
      //                     //console.log(info.data);
      //                     let data = info.data.data;
      //                     let ydbm = data.qiyexinxi[0]["地块编号"];
      //                     let ydlx = data.yongdishuju["ydlxmc"];
      //                     let cyfx = data.yongdishuju["cyfx"];
      //                     let crzt = response.data["ZT"];
      //                     let ydmj = data.yongdishuju["ydmj"];
      //                     let crnx = data.churangxinxi["crnx"];
      //                     let crnf = data.churangxinxi["crnf"];
      //                     let rjl = data.yongdishuju["rjl"];
      //                     let jzxg = data.yongdishuju["jzxg"];
      //                     let jzmd = data.yongdishuju["jzxg"];
      //                     let qysl = data.qiyexinxi.length;
      //                     // divPoint = sgworld.Creator.createDivPoint(
      //                     //   "亦庄",
      //                     //   { lon: center.lon, lat: center.lat },
      //                     //   {
      //                     //     type: "custom",
      //                     //     description: `
      //                     //       <div class="smartEarthBlackPanel">
      //                     //         <div class="smartEarthBlackPanel-text"
      //                     //         style="
      //                     //           width:100%;
      //                     //           text-align:left;
      //                     //           background:rgba(0, 0, 0,.4);
      //                     //           border:1px #000 soild;
      //                     //           color:#fff;
      //                     //           padding:10px;
      //                     //         ">
      //                     //         <ul>
      //                     //             <li class="title">基本信息</li>
      //                     //             <li>用地编码:${ydbm}</li>
      //                     //             <li>用地类型:${ydlx}</li>
      //                     //             <li>产业方向: ${cyfx}</li>
      //                     //             <li class="title">出让信息</li>
      //                     //             <li>出让状态: ${crzt}</li>
      //                     //             <li>用地面积: ${ydmj}平方米</li>
      //                     //             <li>出让年限: ${crnx}</li>
      //                     //             <li>出让年份: ${crnf}</li>
      //                     //             <li class="title">规划指标</li>
      //                     //             <li>容积率: ${rjl}</li>
      //                     //             <li>建筑限高: ${jzxg}</li>
      //                     //             <li>建筑密度: ${jzmd}</li>
      //                     //             <li class="title">企业 ${qysl} 家 </li>
      //                     //         </ul>
      //                     //         </div>
      //                     //       </div>
      //                     //     `,
      //                     //     near: 0,
      //                     //     far: 200000,
      //                     //   }
      //                     // );
      //                   } catch (e) {}
      //                 },
      //                 (info) => {
      //                   console.log("查询失败!");
      //                 }
      //               );
      //           }
      //         },
      //         (response) => {
      //           console.log("查询失败!");
      //         }
      //       );
      //   }
      // }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
      //点击左侧显示范围、详情
      handler1 = new Cesium.ScreenSpaceEventHandler(Viewer1.scene.canvas);
      handler1.setInputAction((event) => {
        let that = this;
        this.clearInfoPanel();
        let p;
        if (type === 0) {
          p = sgworld1.Navigate.getMouseDegrees(event);
        } else {
          p = sgworld1.Navigate.getMousePosition(event);
        }
        // alert(JSON.stringify(p))
        // console.log(p);
        if (p) {
          if (line) {
            sgworld.Creator.DeleteObject(line);
            line = null;
          }
          if (line1) {
            sgworld1.Creator.DeleteObject(line1);
            line1 = null;
          }
          if (divPoint) {
            sgworld.Creator.DeleteObject(divPoint);
            divPoint = null;
          }
          if (divPoint1) {
            sgworld1.Creator.DeleteObject(divPoint1);
            divPoint1 = null;
          }
          axios
            .get(
              "http://10.10.4.115:8022/geowinmap_xncs/ds?r=0.9158559377752831&serviceproviderid=map.vectorserviceprovider&serviceid=queryfeature&featcls=225%25E8%258C%2583%25E5%259B%25B4%25E5%2588%2586%25E5%258C%25BA%25E8%25A7%2584%25E5%2588%2592.geojson&lng=" +
                p.lon +
                "&lat=" +
                p.lat +
                "&geom=true&requesttype=json"
            )
            .then((response) => {
              let center = { lon: 0, lat: 0 };
              let polygon = that.read(response.data.geometry);
              if (polygon.length > 0) {
                var geometry = [];
                let points = polygon[0].split(",");
                for (let i = 0; i < points.length; i++) {
                  let point = points[i].replace(/^\s+|\s+$/g, "").split(" ");
                  center.lon += parseFloat(point[0]) / points.length;
                  center.lat += parseFloat(point[1]) / points.length;
                  geometry.push({
                    x: parseFloat(point[0]),
                    y: parseFloat(point[1]),
                    z: 0,
                  });
                }
                if (line) {
                  sgworld.Creator.DeleteObject(line);
                  line = null;
                }
                if (line1) {
                  sgworld1.Creator.DeleteObject(line1);
                  line1 = null;
                }
                line = sgworld.Creator.createPolyline(
                  geometry,
                  "#ff0000",
                  1,
                  0,
                  "线"
                );
                line1 = sgworld1.Creator.createPolyline(
                  geometry,
                  "#ff0000",
                  1,
                  0,
                  "线"
                );
              }
              if (center.lon != 0 && center.lat != 0) {
                axios
                  .get(
                    "http://10.10.4.115:8022//poisearch/guihuacon/getInfo?ydbm=" +
                      response.data.NO
                  )
                  .then(
                    (info) => {
                      try {
                        if (divPoint) {
                          sgworld.Creator.DeleteObject(divPoint);
                          divPoint = null;
                        }
                        if (divPoint1) {
                          sgworld1.Creator.DeleteObject(divPoint1);
                          divPoint1 = null;
                        }
                        // console.log(info.data.data);
                        //关闭弹窗
                        layuiLayer.close(SmartEarthPopupData.layerProp);
                        //关闭右侧信息弹窗
                        Bus.$emit("closeRightPop", true);
                        this.showTDinfo = true;
                        let data = info.data.data;
                        if (data.yongdishuju === null) {
                          this.dikuanxinxi = true;
                          return;
                        } else {
                          this.dikuanxinxi = false;
                        }
                        this.qiyexinxi = info.data.data.qiyexinxi;
                        this.qysl = data.qiyexinxi.length;
                        if (this.qysl > 0) {
                          this.ydbm = data.qiyexinxi[0]["地块编号"];
                        } else {
                          this.ydbm = data.churangxinxi["ydbh"];
                        }
                        try {
                          this.ydlx = data.yongdishuju["ydlxmc"];
                        } catch (e) {}
                        try {
                          this.cyfx = data.yongdishuju["cyfx"];
                        } catch (e) {}
                        try {
                          // this.crzt = response.data["ZT"];
                          switch (response.data["ZT"]) {
                            case 3:
                              this.crzt = "已出让";
                              break;
                            case 4:
                              this.crzt = "未出让";
                              break;
                          }
                        } catch (e) {}
                        try {
                          this.ydmj = parseFloat(
                            "" + data.yongdishuju["ydmj"]
                          ).toFixed(0);
                        } catch (e) {}
                        try {
                          this.crnx = data.churangxinxi["crnx"];
                        } catch (e) {}
                        try {
                          this.crnf = data.churangxinxi["crnf"];
                        } catch (e) {}
                        try {
                          this.rjl = data.yongdishuju["rjl"];
                        } catch (e) {}
                        try {
                          this.jzxg = data.yongdishuju["jzxg"];
                        } catch (e) {}
                        try {
                          this.jzmd = data.yongdishuju["jzmd"];
                        } catch (e) {}
                      } catch (e) {}
                    },
                    (info) => {
                      this.$notify.error({
                        title: "提示",
                        message: "未查询到数据!",
                      });
                      // alert("未查询到数据!");
                      console.log("查询失败!");
                    }
                  );
              }
            });
        }
      }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
      //属性显示
      // sgworld.Creator.GeoJsonFeatureLayer.attributeShow({
      //   editProp: true,
      //   editPropData: {
      //     offset: ["5%", Viewer.container.offsetWidth - 360 - 110 + "px"],
      //     height: 650,
      //     success(layero, index) {
      //       let contentWindow = layero.find("iframe")[0].contentWindow;
      //       let layeroHeight = layero.height();
      //       let titleHeight = layero.find(".layui-layer-title").height();
      //       let htmlHeight =
      //         contentWindow.document.firstElementChild.offsetHeight;
      //       if (layeroHeight > titleHeight + htmlHeight) {
      //         layero.height(titleHeight + htmlHeight);
      //         layero.find("iframe").height(htmlHeight);
      //       }
      //     },
      //   },
      // });
      // //标会编辑
      // sgworld1.Creator.SimpleGraphic.setEdit(true, {
      //   editProp: true,
      //   editPropData: {
      //     offset: ["5%", Viewer.container.offsetWidth - 360 - 110 + "px"],
      //     height: 650,
      //     success(layero, index) {
      //       let contentWindow = layero.find("iframe")[0].contentWindow;
      //       let layeroHeight = layero.height();
      //       let titleHeight = layero.find(".layui-layer-title").height();
      //       let htmlHeight =
      //         contentWindow.document.firstElementChild.offsetHeight;
      //       if (layeroHeight > titleHeight + htmlHeight) {
      //         layero.height(titleHeight + htmlHeight);
      //         layero.find("iframe").height(htmlHeight);
      //       }
      //     },
      //   },
      // });
      // //军标编辑
      // sgworld1.Creator.MilitaryPlotting.setEdit(true, {
      //   editProp: true,
      //   editPropData: {
      //     offset: ["5%", Viewer.container.offsetWidth - 360 - 110 + "px"],
      //     height: 650,
      //     success(layero, index) {
      //       let contentWindow = layero.find("iframe")[0].contentWindow;
      //       let layeroHeight = layero.height();
      //       let titleHeight = layero.find(".layui-layer-title").height();
      //       let htmlHeight =
      //         contentWindow.document.firstElementChild.offsetHeight;
      //       if (layeroHeight >= titleHeight + htmlHeight) {
      //         layero.height(titleHeight + htmlHeight);
      //       }
      //     },
      //   },
      // });
      // //初始化弹窗事件
      // that.initLayerOpen();
      // that.showBottom();
      this.addEvent();
    });
    //关闭弹窗
    Bus.$on("closeLandInfoPop", (data) => {
@@ -755,6 +370,313 @@
    });
  },
  methods: {
    setImageComparison(isStart) {
      this.isImage = isStart;
      if (!this.isImage) {
        this.destroyImageLayer();
      }
    },
    destroyImageLayer() {
      if (activeLi) {
        activeLi.classList.remove("active");
        activeLi = null;
      }
      if (nLayer) {
        Viewer1.imageryLayers.remove(nLayer, true);
        nLayer = null;
      }
      if (LWLayer) {
        Viewer1.imageryLayers.remove(LWLayer, true);
        LWLayer = null;
      }
    },
    changeLeftMap(event, item, index) {
      let liObj = event.currentTarget;
      if (activeLi) {
        activeLi.classList.remove("active");
        activeLi = null;
      }
      liObj.classList.add("active");
      activeLi = liObj;
      this.loadImageLayer(item);
    },
    loadImageLayer(year) {
      if (nLayer) {
        Viewer1.imageryLayers.remove(nLayer, true);
        nLayer = null;
      }
      nLayer = this.loadBJ54ImageLayer(year);
      if (!LWLayer) {
        LWLayer = this.loadBJ54LWLayer();
      }
    },
    loadBJ54LWLayer() {
      let url = "http://172.26.64.84/service/ImageEngine/picdis/abc";
      //let url = option.url;
      //let year = option.year;
      let paramUrl = `${url}?user=jjjskfq&password=Jjjskfq@2022&layer=Shiliang_Lw_2019&style=&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fpng&TileMatrix={z}&TileCol={nx}&TileRow={ny}`;
      let minx = (113.168199 * Math.PI) / 180.0;
      let miny = (39.230551 * Math.PI) / 180.0;
      let maxx = (118.562362 * Math.PI) / 180.0;
      let maxy = (41.294714 * Math.PI) / 180.0;
      let rectangle = new Cesium.Rectangle(minx, miny, maxx, maxy);
      let tilingScheme = new Cesium.GeographicTilingScheme({
        rectangle: rectangle,
        numberOfLevelZeroTilesX: 2,
        numberOfLevelZeroTilesY: 1,
      });
      var dx = {
        url: paramUrl,
        tilingScheme: tilingScheme,
        customTags: {
          nx: function (imageryProvider, x, y, level) {
            return (2 << (level - 1)) + x;
          },
          ny: function (imageryProvider, x, y, level) {
            return (2 << (level - 1)) + y;
          },
        },
      };
      var imageryProvider = new Cesium.UrlTemplateImageryProvider(dx);
      let imageLayer = new Cesium.ImageryLayer(imageryProvider, {
        alpha: 1,
        brightness: 1.0,
      });
      Viewer1.imageryLayers.add(imageLayer, 3);
      return imageLayer;
    },
    loadBJ54ImageLayer(year) {
      let url = "http://172.26.64.84/service/ImageEngine/picdis/abc";
      //let url = option.url;
      //let year = option.year;
      let paramUrl = `${url}?user=jjjskfq&password=Jjjskfq@2022&layer=Sate_${year}&style=&Service=WMTS&Request=GetTile&Version=1.0.0&Format=image%2Fpng&TileMatrix={z}&TileCol={nx}&TileRow={ny}`;
      let minx = (113.168199 * Math.PI) / 180.0;
      let miny = (39.230551 * Math.PI) / 180.0;
      let maxx = (118.562362 * Math.PI) / 180.0;
      let maxy = (41.294714 * Math.PI) / 180.0;
      let rectangle = new Cesium.Rectangle(minx, miny, maxx, maxy);
      let tilingScheme = new Cesium.GeographicTilingScheme({
        rectangle: rectangle,
        numberOfLevelZeroTilesX: 2,
        numberOfLevelZeroTilesY: 1,
      });
      var dx = {
        url: paramUrl,
        tilingScheme: tilingScheme,
        customTags: {
          nx: function (imageryProvider, x, y, level) {
            return (2 << (level - 1)) + x;
          },
          ny: function (imageryProvider, x, y, level) {
            return (2 << (level - 1)) + y;
          },
        },
      };
      var imageryProvider = new Cesium.UrlTemplateImageryProvider(dx);
      let imageLayer = new Cesium.ImageryLayer(imageryProvider, {
        alpha: 1,
        brightness: 1.0,
      });
      Viewer1.imageryLayers.add(imageLayer, 2);
      return imageLayer;
    },
    loadTDGLLayer() {
      let treeNode = URLInCode.tdglTmsCode;
      TDLayer = sgworld1.Creator.createImageryProvider(
        treeNode.name,
        "tms",
        {
          id: treeNode.id,
          url: treeNode.urls,
          fileExtension: treeNode.img || "png",
          enablePickFeatures: false,
          level: treeNode.Level,
          minimumLevel: treeNode.minimumLevel,
          maximumLevel: treeNode.maximumLevel,
          tilingScheme:
            treeNode.tileType === "Geo"
              ? new Cesium.GeographicTilingScheme()
              : new Cesium.WebMercatorTilingScheme(),
          alpha: treeNode.alpha,
        },
        "0",
        treeNode.zIndex,
        true,
        ""
      );
    },
    addEvent() {
      let type = 0;
      //点击左侧显示范围、详情
      handler1 = new Cesium.ScreenSpaceEventHandler(Viewer1.scene.canvas);
      handler1.setInputAction((event) => {
        if (this.isLand) {
          let that = this;
          this.clearInfoPanel();
          let p;
          if (type === 0) {
            p = sgworld1.Navigate.getMouseDegrees(event);
          } else {
            p = sgworld1.Navigate.getMousePosition(event);
          }
          // alert(JSON.stringify(p))
          // console.log(p);
          if (p) {
            if (line) {
              sgworld.Creator.DeleteObject(line);
              line = null;
            }
            if (line1) {
              sgworld1.Creator.DeleteObject(line1);
              line1 = null;
            }
            if (divPoint) {
              sgworld.Creator.DeleteObject(divPoint);
              divPoint = null;
            }
            if (divPoint1) {
              sgworld1.Creator.DeleteObject(divPoint1);
              divPoint1 = null;
            }
            axios
              .get(
                "http://10.10.4.115:8022/geowinmap_xncs/ds?r=0.9158559377752831&serviceproviderid=map.vectorserviceprovider&serviceid=queryfeature&featcls=225%25E8%258C%2583%25E5%259B%25B4%25E5%2588%2586%25E5%258C%25BA%25E8%25A7%2584%25E5%2588%2592.geojson&lng=" +
                  p.lon +
                  "&lat=" +
                  p.lat +
                  "&geom=true&requesttype=json"
              )
              .then((response) => {
                let center = { lon: 0, lat: 0 };
                let polygon = that.read(response.data.geometry);
                if (polygon.length > 0) {
                  var geometry = [];
                  let points = polygon[0].split(",");
                  for (let i = 0; i < points.length; i++) {
                    let point = points[i].replace(/^\s+|\s+$/g, "").split(" ");
                    center.lon += parseFloat(point[0]) / points.length;
                    center.lat += parseFloat(point[1]) / points.length;
                    geometry.push({
                      x: parseFloat(point[0]),
                      y: parseFloat(point[1]),
                      z: 0,
                    });
                  }
                  if (line) {
                    sgworld.Creator.DeleteObject(line);
                    line = null;
                  }
                  if (line1) {
                    sgworld1.Creator.DeleteObject(line1);
                    line1 = null;
                  }
                  line = sgworld.Creator.createPolyline(
                    geometry,
                    "#ff0000",
                    1,
                    0,
                    "线"
                  );
                  line1 = sgworld1.Creator.createPolyline(
                    geometry,
                    "#ff0000",
                    1,
                    0,
                    "线"
                  );
                }
                if (center.lon != 0 && center.lat != 0) {
                  axios
                    .get(
                      "http://10.10.4.115:8022//poisearch/guihuacon/getInfo?ydbm=" +
                        response.data.NO
                    )
                    .then(
                      (info) => {
                        try {
                          if (divPoint) {
                            sgworld.Creator.DeleteObject(divPoint);
                            divPoint = null;
                          }
                          if (divPoint1) {
                            sgworld1.Creator.DeleteObject(divPoint1);
                            divPoint1 = null;
                          }
                          // console.log(info.data.data);
                          //关闭弹窗
                          layuiLayer.close(SmartEarthPopupData.layerProp);
                          //关闭右侧信息弹窗
                          Bus.$emit("closeRightPop", true);
                          this.showTDinfo = true;
                          let data = info.data.data;
                          if (data.yongdishuju === null) {
                            this.dikuanxinxi = true;
                            return;
                          } else {
                            this.dikuanxinxi = false;
                          }
                          this.qiyexinxi = info.data.data.qiyexinxi;
                          this.qysl = data.qiyexinxi.length;
                          if (this.qysl > 0) {
                            this.ydbm = data.qiyexinxi[0]["地块编号"];
                          } else {
                            this.ydbm = data.churangxinxi["ydbh"];
                          }
                          try {
                            this.ydlx = data.yongdishuju["ydlxmc"];
                          } catch (e) {}
                          try {
                            this.cyfx = data.yongdishuju["cyfx"];
                          } catch (e) {}
                          try {
                            // this.crzt = response.data["ZT"];
                            switch (response.data["ZT"]) {
                              case 3:
                                this.crzt = "已出让";
                                break;
                              case 4:
                                this.crzt = "未出让";
                                break;
                            }
                          } catch (e) {}
                          try {
                            this.ydmj = parseFloat(
                              "" + data.yongdishuju["ydmj"]
                            ).toFixed(0);
                          } catch (e) {}
                          try {
                            this.crnx = data.churangxinxi["crnx"];
                          } catch (e) {}
                          try {
                            this.crnf = data.churangxinxi["crnf"];
                          } catch (e) {}
                          try {
                            this.rjl = data.yongdishuju["rjl"];
                          } catch (e) {}
                          try {
                            this.jzxg = data.yongdishuju["jzxg"];
                          } catch (e) {}
                          try {
                            this.jzmd = data.yongdishuju["jzmd"];
                          } catch (e) {}
                        } catch (e) {}
                      },
                      (info) => {
                        this.$notify.error({
                          title: "提示",
                          message: "未查询到数据!",
                        });
                        // alert("未查询到数据!");
                        console.log("查询失败!");
                      }
                    );
                }
              });
          }
        }
      }, Cesium.ScreenSpaceEventType.LEFT_CLICK);
    },
    dialogClose() {
      this.queryForm.content = "";
      this.queryForm.type = "企业名称";
@@ -790,17 +712,7 @@
      const tableData = this.qiyexinxi;
      // 搜索出的结果
      let searchTable = this.tableRes(this.queryForm.content, tableData);
      // let searchTable =tableData.filter(item => {
      //   if (item[param]) {
      //     return (
      //       !this.queryForm.content ||
      //       item[param]
      //         .toLowerCase()
      //         .includes(this.queryForm.content.toLowerCase())
      //     );
      //   }
      // });
      // console.log(searchTable);
      // 搜索出的数量进行分页
      this.searchNum = searchTable.length;
      //根据页码展示内容
@@ -829,7 +741,13 @@
      }
      return table;
    },
    handleClick(row) {
      window.open(
        "https://qylweb.bda.gov.cn/alldetails/#/newEnterprisedetails?uscc=" +
          row["统一社会信用代码"] +
          "&systemName=中小微"
      );
    },
    detectZoom() {
      var ratio = 0,
        screen = window.screen,
@@ -1076,21 +994,13 @@
      this.qysl = 0;
      this.ydbm = "";
      this.ydlx = "";
      this.cyfx = "";
      this.crzt = "";
      this.ydmj = "";
      this.crnx = "";
      this.crnf = "";
      this.rjl = "";
      this.jzxg = "";
      this.jzmd = "";
    },
    //初始化弹窗事件
@@ -1267,21 +1177,20 @@
}
.noInfo {
  margin-top: 30px;
  margin-left: 20px;
  width: 150px;
  margin: 30px 20px 20px;
  width: 200px;
  text-align: center;
}
.tdInfo {
  position: absolute;
  z-index: 999;
  top: 20%;
  left: 35%;
  /* right: -68%; */
  padding-top: 20px;
  width: 401px;
  height: 549px;
  box-sizing: border-box;
  top: 15%;
  right: 0%;
  transform: translateX(50%);
  padding: 20px 0;
  /* height: 529px; */
  /* box-sizing: border-box; */
  background: rgba(14, 50, 143, 0.85);
  border: 1px solid #205fbc;
  box-shadow: 0px 1px 10px 0px rgba(3, 10, 26, 0.38);
@@ -1291,54 +1200,44 @@
}
.tdInfo .title {
  width: 378px;
  height: 30px;
  background-image: url("~@/assets/img/new/tdgltitle.png");
  background-size: 100% 100%;
  margin: 0 auto;
}
.tdInfo .title li {
  margin-left: 32px;
  /* width: 78px; */
  line-height: 30px;
  font-size: 18px;
  font-weight: bold;
  color: #ffffff;
  background: linear-gradient(0deg, #9cd2ff 0%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.content1,
.content2,
.content3 {
  width: 342px;
  /* width: 100%; */
  box-sizing: border-box;
  margin-left: 42px;
  /* margin-left: 42px; */
  min-width: 220px;
  max-width: 280px;
  margin: 0 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 19px 0;
}
.content1 li,
.content2 li,
.content3 li {
  font-size: 16px;
  font-weight: 400;
  color: #ffffff;
  /* background-color: rgb(255, 218, 170); */
  line-height: 26px;
  text-shadow: 0px 1px 6px rgba(3, 10, 26, 0.5);
}
.content1 {
  height: 136px;
  padding: 19px 0;
}
.content2 {
  height: 132px;
  padding: 21px 0;
}
.content3 {
  height: 116px;
  padding-top: 21px;
  padding-bottom: 27px;
}
.tdInfo a {
@@ -1352,18 +1251,13 @@
  font-weight: bold;
  color: #ebb01e;
  /* text-shadow: 0px 2px 9px #003f85; */
  background: linear-gradient(0deg, #ecaa0b 0%, #ffffff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
/*
 */
.aboutDialog /deep/ .el-dialog {
  background: rgba(14, 50, 143, 0.7);
  background: rgba(14, 50, 143, 0.8);
  border: 2px solid #205fbc;
  border-radius: 10px;
  box-shadow: 0px 1px 10px 0px rgba(3, 10, 26, 0.38);
@@ -1372,11 +1266,11 @@
.aboutDialog >>> .el-dialog__body {
  height: 77%;
  padding: 0px !important;
  padding: 15px !important;
  padding: 10px 10px 8px !important;
}
.aboutDialog >>> .el-dialog__header {
  padding: 10px 20px;
  padding: 10px 20px 0;
  height: 25px;
  line-height: 25px;
  font-weight: bold;
@@ -1407,6 +1301,7 @@
.el-form >>> .el-form-item__label {
  color: #fff;
  margin-left: 10px;
}
.aboutDialog .el-dialog-div {
@@ -1422,6 +1317,10 @@
  height: 80% !important;
  overflow: auto;
}
.el-table /deep/ .el-button--text {
  /* color: #fff; */
  font-size: 14px;
}
.el-table thead {
  font-weight: 500;
@@ -1431,8 +1330,11 @@
  width: 383px;
}
.el-table /deep/ th {
.el-table /deep/ th,
.el-table /deep/ td {
  background-color: transparent;
  padding-top: 4px;
  padding-bottom: 4px;
}
.el-table /deep/ tr {
@@ -1494,6 +1396,40 @@
  color: #fff;
}
.listBox {
  position: absolute;
  right: 20px;
  top: 100px;
}
.listBox .active {
  background: rgba(255, 166, 0, 0.808);
}
.listBox li {
  padding: 2px;
  margin-top: 1px;
  border-radius: 2px;
  color: white;
  background: rgba(14, 50, 143, 0.6);
  font-size: 14px;
  cursor: pointer;
}
/* 屏幕分辨率放大为 125 */
@media (-webkit-min-device-pixel-ratio: 1.25) {
  .listBox li {
    font-size: 12px;
  }
  .el-table {
    font-size: 12px;
  }
}
.listBox li:hover {
  background: rgba(255, 166, 0, 0.808);
}
::-webkit-scrollbar {
  /*滚动条整体样式*/
  width: 4px;