北京经济技术开发区经开区虚拟城市项目-【前端】-Web
lixuliang
2023-11-11 8b8662d719df88d74f5db6f7f85b8b2506f2d4c5
Merge branch 'master' of http://106.120.22.35:48888/r/PM20221203225_Web
已修改4个文件
17395 ■■■■■ 文件已修改
README.md 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
package-lock.json 17077 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/map/viewer.vue 60 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/map/viewer1.vue 256 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
README.md
@@ -1,6 +1,6 @@
# swzjxt
> ä¸‰ç»´æµ™æ±Ÿç³»ç»Ÿ
> äº¦åº„一张图系统
## Build Setup
package-lock.json
ÎļþÌ«´ó
src/components/map/viewer.vue
@@ -3,42 +3,22 @@
    <div id="sdkContainer"></div>
    <layerTreeTwoScreen v-if="layerTreeTwoScreen" />
    <!-- <div id="bottomInfo" v-html="bottomInfo"></div> -->
    <div
      id="switchImagerLayer"
      :style="{
        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})`,
      }"
    >
      <transition
        name="animate__animated animate__bounce"
        @click="switchImagerLayerShowOrHide"
        enter-active-class="animate__backInRight"
        leave-active-class="animate__backOutRight"
        appear
      >
    <div id="switchImagerLayer" :style="{
      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})`,
    }">
      <transition name="animate__animated animate__bounce" @click="switchImagerLayerShowOrHide"
        enter-active-class="animate__backInRight" leave-active-class="animate__backOutRight" appear>
        <switchImagerLayer v-show="switchImagerLayer" />
      </transition>
      <img
        class="swichImg"
        @click="switchImagerLayerShowOrHide"
        :src="switchImage"
      />
      <img class="swichImg" @click="switchImagerLayerShowOrHide" :src="switchImage" />
      <div class="bgbox">
        <img
          class="swichImg"
          @click="switchImagerLayerShowOrHide"
          src="@/assets/img/new/shiliang.png"
        />
        <img
          class="swichImg bgbox"
          @click="switchImagerLayerShowOrHide"
          src="@/assets/img/new/shiliang.png"
        />
        <img class="swichImg" @click="switchImagerLayerShowOrHide" src="@/assets/img/new/shiliang.png" />
        <img class="swichImg bgbox" @click="switchImagerLayerShowOrHide" src="@/assets/img/new/shiliang.png" />
      </div>
    </div>
  </div>
@@ -87,8 +67,8 @@
      window.sgworld = new SmartEarth.EarthCtrl(
        "sdkContainer",
        {
          StaticFileBaseUrl: "../../../static/CimSDK/",
          // StaticFileBaseUrl: "../../../SW/static/CimSDK/",
          // StaticFileBaseUrl: "../../../static/CimSDK/",
          StaticFileBaseUrl: "../../../YZXNCS/static/CimSDK/",
        },
        {},
        {},
@@ -202,6 +182,16 @@
          },
        },
      });
      //初始化弹窗事件
      // that.showBottom();
      that.initLayerOpen();
@@ -452,12 +442,14 @@
  border-radius: 10px;
  cursor: pointer;
}
.bgbox {
  position: absolute;
  top: 0;
  left: 8px;
  z-index: -1;
}
.mid {
  position: absolute;
  top: 50%;
src/components/map/viewer1.vue
@@ -189,7 +189,9 @@
      offset: "0%",
    };
  },
  created() {},
  created() {
  },
  computed: {
    ...mapState(["viewer1Show", "layerTreeTwoScreen"]),
  },
@@ -336,186 +338,7 @@
      // 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);
@@ -685,67 +508,6 @@
        }
      }, 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();
    });
    //关闭弹窗
    Bus.$on("closeLandInfoPop", (data) => {
@@ -790,17 +552,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;
      //根据页码展示内容