surprise
2024-01-15 87e98d5b5efeb7a9cf6330ae03e6dd53699b7ef1
代码更新
已修改12个文件
157 ■■■■ 文件已修改
src/assets/App.css 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/Layer/batchAddGrid.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/Layer/drawGrid.js 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/Layer/mapInfo.js 63 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/Layer/mapViewer.js 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/js/Layer/model.js 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/left/layerTree/messageInfo.vue 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/left/layerTree/modelLayer.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/map/viewer.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/index.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
static/layers.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/App.css
@@ -35,9 +35,9 @@
}
.cesium-performanceDisplay-defaultContainer {
  display: none;
  /* top  : 32px;
  right: 85px; */
  /* display: none; */
  top  : 32px;
  right: 85px;
}
.cesium-viewer-bottom {
src/assets/js/Layer/batchAddGrid.js
@@ -8,7 +8,7 @@
        var shape = this.renderRect(points);
        var step = 0;
        var $this = this;
        store.state.isBatchGridArr = true;
        this.handler.setInputAction(function (e) {
            var cartesian = Viewer.scene.pickPosition(e.position);
            if (!Cesium.defined(cartesian)) {
@@ -132,6 +132,7 @@
        }
        store.state.batchGridArr = arr;
        // 显示点
        // for (var i = 0; i < arr.length; i++) {
        //     var p = arr[i];
src/assets/js/Layer/drawGrid.js
@@ -12,7 +12,7 @@
        var shape = this.renderRect(points);
        var step = 0;
        var $this = this;
       store.state.isBatchGridArr =true;
        this.handler.setInputAction(function (e) {
            var cartesian = viewer.scene.pickPosition(e.position);
            if (!Cesium.defined(cartesian)) {
@@ -203,6 +203,7 @@
                this.setInsertGridData(arr, ((i + 1) * (j + 1)));
            }
        }
        store.state.isBatchGridArr =false;
    },
    async setInsertGridData(res, num) {
        var obj =
src/assets/js/Layer/mapInfo.js
@@ -4,7 +4,7 @@
        '桩号_Point',
    ],
    mssageInfo: null,
    propertyNames:null,
    propertyNames: null,
    Init(html) {
        if (!html) return;
@@ -18,38 +18,71 @@
        store.state.isshowZhaiHai = false;
        store.state.showMessageInfo = false;
        this.mssageInfo = null;
           store.state.isShowImgUpDate = false;
        store.state.isShowImgUrl= null;
        this.propertyNames=null;
        store.state.isShowImgUpDate = false;
        store.state.isShowImgUrl = null;
        this.propertyNames = null;
        store.state.isireamUrl = null;
        store.state.isShowMenuCount = false;
    },
    setTileSetInfo(res) {
        var propertyNames = res.getPropertyIds();
        if(!propertyNames || propertyNames.length<=0)return;
        this.setRestLayer();
        var val = [];
        for(var i = 0; i <propertyNames.length;i++){
            var name= propertyNames[i]
            var obj = {
                name: name,
                value:  res.getProperty(name)
            }
            val.push(obj)
        }
        this.showMapInfo(val);
    },
    setGeoJsonInfo(res) {
        if (res.projectId && res.frameNo) {
            this.setRestLayer();
            this.setRestLayer();
            store.state.showZhaiHaiImg = res;
            store.state.isshowZhaiHai = true;
        }else if(res.sourceType && res.sourceType._value == "imgUp"){
        } else if (res.sourceType && res.sourceType._value == "imgUp") {
            this.setRestLayer();
            setTimeout(() => {
                store.state.isShowImgUrl= res._path._value;
                store.state.isShowImgUpDate = true;
                store.state.isShowImgUrl = res._path._value;
                store.state.isShowImgUpDate = true;
            }, 100);
        }else {
        } else {
            var val_name = res._propertyNames;
            this.propertyNames =res._propertyNames;
            this.propertyNames = res._propertyNames;
            var val = [];
            var enName = ['ZH', 'HY', 'YH', 'HZ', 'Lh', 'R', 'QZ', 'CORNER', 'SL', 'WIDEN']
            var cnName = [
                '前缓和曲线起点',
                '圆曲线起点',
                '圆曲线止点',
                '后缓和曲线止点',
                '缓和曲线长度',
                '平曲线半径',
                '圆曲线中心点',
                '转角',
                '超高值',
                '加宽值'
            ]
            for (var i = 0; i < val_name.length; i++) {
                var name = val_name[i]
                if (enName.indexOf(name) > -1) {
                    name = cnName[enName.indexOf(name)]
                }
                var obj = {
                    name: val_name[i],
                    name: name,
                    value: res[val_name[i]]._value,
                }
                val.push(obj)
            }
            this.showMapInfo(val);
        }
    },
src/assets/js/Layer/mapViewer.js
@@ -19,24 +19,30 @@
            let lat = Cesium.Math.toDegrees(cartographic.latitude); // 纬度
            let alt = cartographic.height; // 高度,椭球面height永远等于
            let coordinate = {
                longitude: Number(lng.toFixed(6)),
                latitude: Number(lat.toFixed(6)),
                longitude: Number(lng),
                latitude: Number(lat),
                altitude: Number(alt.toFixed(2)),
                heading: 0,
                pitch: 0,
                roll: 0,
                scale: 1,
            };
            store.state.coordinate = coordinate;
            if (store.state.addModelFlag) {
                model.setModelCoord(coordinate);
            if(store.state.isBatchGridArr){
            }
            if (store.state.isMeasureFlag) {
            }else  if (store.state.addModelFlag) {
                model.setModelCoord(coordinate);
            }else  if (store.state.isMeasureFlag) {
                store.state.measureCoordObj = coordinate;
                store.state.isShowMeasureCoord = true;
            }
            if (Cesium.defined(nPickFeature)) {
            }else if (store.state.isQueryFalag) {
                store.state.isQyeryCoord = coordinate;
            }else if (Cesium.defined(nPickFeature)) {
                mapInfo.setRestLayer();
                if (nPickFeature.id && nPickFeature.id.id == 'Rectangle')
                    return
@@ -53,14 +59,37 @@
                    } else if (name == "DLLMJ0001") {
                        store.state.isireamUrl = "/Data/html/hd3dmap.html?id=3493&type=8";
                        store.state.isShowMenuCount = true;
                    } else if (name == "DLBZP0023") {
                        store.state.isireamUrl = "/Data/html/hd3dmap.html?id=3494&type=5";
                        store.state.isShowMenuCount = true;
                    } else if (name == "DLBZP0024") {
                        store.state.isireamUrl = "/Data/html/hd3dmap.html?id=3491&type=8";
                        store.state.isShowMenuCount = true;
                    }else if(name === "DLBZP0026"){
                        store.state.isireamUrl = "/Data/html/hd3dmap.html?id=3505&type=8";
                        store.state.isShowMenuCount = true;
                    }else if(name === "DLBZP0029"){
                        store.state.isireamUrl = "/Data/html/hd3dmap.html?id=3646&type=5";
                        store.state.isShowMenuCount = true;
                    }else if(name === "DLBZP0027"){
                        store.state.isireamUrl = "/Data/html/hd3dmap.html?id=3685&type=99";
                        store.state.isShowMenuCount = true;
                    }  else if(name === "DLBZP0027"){
                        store.state.isireamUrl = "/Data/html/hd3dmap.html?id=3685&type=99";
                        store.state.isShowMenuCount = true;
                    }else if(name === "DLBZP0072"){
                        store.state.isireamUrl = "/Data/html/hd3dmap.html?id=3719&type=5";
                        store.state.isShowMenuCount = true;
                    }else{
                        mapInfo.setTileSetInfo(nPickFeature)
                    }
                }else{
                }
            }
            if (store.state.isQueryFalag) {
                store.state.isQyeryCoord = coordinate;
            }
        }, Cesium.ScreenSpaceEventType.LEFT_CLICK)
    },
    addRightClick() {
src/assets/js/Layer/model.js
@@ -46,7 +46,7 @@
                    name: this.title.name,
                    longitude: res.longitude,
                    latitude: res.latitude,
                    altitude: res.altitude,
                    altitude:  18.1,
                    heading: res.heading,
                    pitch: res.pitch,
                    roll: res.roll,
@@ -88,8 +88,8 @@
            id: res.id,
            url: url,
            scale: res.scale,
            minimumPixelSize: 200,
            maximumScale: 200000,
            minimumPixelSize: 1,
            maximumScale: 10,
            modelMatrix: modelMatrix
        }));
src/components/left/layerTree/messageInfo.vue
@@ -15,7 +15,10 @@
    </div>
    <div class="modelContent">
      <div v-show="!showMenuGrid" class="contentMessage" v-for="(item, index) in modelOption" :key="index">
        <div>{{ item.name }}</div>
        <div>
          <label>{{ item.name }}</label>
        </div>
        <div>{{ item.value }}</div>
      </div>
      <div v-show="showMenuGrid" class="contentMessage" v-for="(item, index) in modelOption" :key="index">
@@ -203,6 +206,8 @@
        line-height: 50px;
        border-right: 1px solid white;
        border-top: 1px solid white !important;
        word-wrap:break-word;
      }
      div:first-child {
src/components/left/layerTree/modelLayer.vue
@@ -52,7 +52,7 @@
        model.changeLayer(item, true);
      } else {
        model.changeBatchLayer(item, true);
        this.$store.state.isBatchGridArr =false;
        let coordinates = this.$store.state.batchGridArr;
        let shape = this.$store.state.batchShape;
        Viewer.entities.remove(shape);
src/components/map/viewer.vue
@@ -102,9 +102,9 @@
      window.sgworld = new SmartEarth.EarthCtrl(
        "sdkContainer",
        {
          StaticFileBaseUrl: "../../../static/CimSDK/",
          // StaticFileBaseUrl: "../../../static/CimSDK/",
          // StaticFileBaseUrl: "../../../SW/static/CimSDK/",
          // StaticFileBaseUrl: "../../../JSJKZHGS/static/CimSDK/",
          StaticFileBaseUrl: "../../../JSJKZHGS/static/CimSDK/",
        },
        {},
        {},
@@ -131,7 +131,8 @@
      window.viewer = sgworld._Viewer;
      sgworld._Viewer.scene.moon.show = false;
      // Viewer.terrainProvider=Cesium.createWorldTerrain()
      //显示fps
      sgworld._Viewer.scene.debugShowFramesPerSecond = true;
      window.sgwfs = new SmartEarth.WFSTool(sgworld._Viewer, Cesium);
      Viewer.shadows = false;
      //深度检测
src/router/index.js
@@ -30,7 +30,7 @@
];
const router = new Router({
  mode: "history",
  // base: '/JSJKZHGS',//正式版 打包时解开
  base: '/JSJKZHGS',//正式版 打包时解开
  // base: '/SW',//测试版 打包时解开
  routes,
});
src/store/index.js
@@ -55,6 +55,7 @@
    batchGridArr: [],
    isShowMenuCount:false,
    isireamUrl:null,
    isBatchGridArr:false,
  },
  mutations: {
    selectedLayer(state, b) {
static/layers.json
@@ -145,7 +145,7 @@
                    "effectsMaxHeight": 0,
                    "skipLevelofDetail": true,
                    "preferLeaves": true,
                    "maximumScreenSpaceError": 24,
                    "maximumScreenSpaceError": 2,
                    "maximumMemoryUsage": 1024
                }
            ],