北京经济技术开发区经开区虚拟城市项目-【前端】-移动端Web
lixuliang
2024-03-13 edba1eb33a06bfb9b64e9d6d2e3de8bc49eca333
20240313
已修改3个文件
96 ■■■■■ 文件已修改
src/components/sideMenu/layerMenu/layerPanel2.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/viewer2.vue 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/utils/map2.js 76 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/sideMenu/layerMenu/layerPanel2.vue
@@ -209,7 +209,7 @@
      ],
      zhuantiList: ZTTitem,
      //curMapModelIndex: 1,
      curEMapModelIndex: 1,
      curEMapModelIndex: 0,
      curSMapModelIndex: -1,
      curAreaTypeIndex: -1,
      curYjIndex: -1,
@@ -275,9 +275,9 @@
      clearAll();
      switch (result.name) {
        case "二维地图":
          loadGeoMap();
          // loadGeoMap();
          loadBaseMap();
          addAnnotationLayer();
          // addAnnotationLayer();
          addHxLayer();
          addYzLayer();
          window.mapapi.getView().setZoom(14);
src/components/viewer2.vue
@@ -259,15 +259,21 @@
        view: new ol.View({
          center: [116.505348, 39.795592],
          projection: "EPSG:4326",
          zoom: 12,
          minZoom: 9.5,
          zoom: 15,
          minZoom: 12,
          maxZoom: 18,
          enableRotation: false,
        }),
      });
      window.mapapi = map;
      addImageLayer();
      addAnnotationLayer();
      // 加载影像底图
      // addImageLayer();
      // 加载高德注记
      // addAnnotationLayer();
      // 加载矢量地图
      loadBaseMap();
      addHxLayer();
      addYzLayer();
src/utils/map2.js
@@ -2382,41 +2382,57 @@
                let properties = feature.getProperties().features[0].values_;
                for (const propertyNames in properties) {
                    if (propertyNames.indexOf("监控名") !== -1) {
                        // objdata = {
                        //     POITYPE: "SPJK",
                        //     name: properties["JK名称"]._value,
                        //     type: properties["JK类型"]._value,
                        //     function: properties["功能"]._value,
                        //     area: properties["所在区"]._value,
                        //     number: properties["JK编号"]._value,
                        //     code: properties["JK内码"]._value,
                        //     lon: lon,
                        //     lat: lat,
                        // }
                        Message({
                            message: '连接状态查询中',
                        const infoM = Message({
                            message: '该点位视频监控查询中,请稍后',
                            type: 'info',
                            offset: 60,
                            offset: 75,
                            center: true,
                            duration: 1000,
                            duration: 0,
                        });
                        layerOpen(properties["JK名称"], {
                            width: "100%",
                            height: "40%",
                            // offset: [offsetTop + "px", "380px"],
                            url: "../../static/video/video.html?code=" + properties["JK内码"],
                            fn: {
                                success: (layero, index) => {
                                    SmartEarthPopupData.layerContainer = layero;
                                },
                                end: () => {
                        axios
                            .get(
                                // 请求在线状态
                                window.gisBaseUrl + "BEApi/getCameraDetails?cameraIndexCode=" +
                                properties["JK内码"]
                            ).then(res => {
                                if (res.data.data.status == 1) {
                                    infoM.close();
                                    Message({
                                        message: '视频监控在线中',
                                        type: 'success',
                                        offset: 75,
                                        center: true,
                                        duration: 2000,
                                    });
                                    layerOpen(properties["JK名称"], {
                                        width: "100%",
                                        height: "40%",
                                        // offset: [offsetTop + "px", "380px"],
                                        url: "../../static/video/video.html?code=" + properties["JK内码"],
                                        fn: {
                                            success: (layero, index) => {
                                                SmartEarthPopupData.layerContainer = layero;
                                            },
                                            end: () => {
                                },
                                cancel: () => {
                                            },
                                            cancel: () => {
                                },
                            },
                        });
                                            },
                                        },
                                    });
                                } else {
                                    infoM.close();
                                    Message({
                                        message: '该点位视频监控离线中',
                                        type: 'errer',
                                        offset: 75,
                                        center: true,
                                        duration: 2000,
                                    });
                                    return
                                }
                            })
                        return
                    } else if (propertyNames.indexOf("部件名称") !== -1) {
                        objdata = {