shuishen
2022-03-25 62f4cdbb9f714692015c3643fa453cca5bafcd00
部分更改,及样式
11 files modified
382 ■■■■■ changed files
src/components/map/components/dimension.vue 268 ●●●● patch | view | raw | blame | history
src/components/searchDetails/index.vue 6 ●●●● patch | view | raw | blame | history
src/pcviews/specialmap/welcome.vue 68 ●●●●● patch | view | raw | blame | history
src/router/axios.js 2 ●●● patch | view | raw | blame | history
src/styles/pcpage/campus-nav.scss 4 ●●●● patch | view | raw | blame | history
src/styles/pcpage/publicBox/arc-nav-bar.scss 6 ●●●● patch | view | raw | blame | history
src/styles/pcpage/publicBox/org-nav-bar.scss 6 ●●●● patch | view | raw | blame | history
src/styles/pcpage/publicBox/service-nav-bar.scss 6 ●●●● patch | view | raw | blame | history
src/styles/pcpage/tool/layer-manage.scss 4 ●●●● patch | view | raw | blame | history
src/styles/pcpage/tool/ranging.scss 4 ●●●● patch | view | raw | blame | history
src/styles/pcpage/tool/sign.scss 8 ●●●● patch | view | raw | blame | history
src/components/map/components/dimension.vue
@@ -323,8 +323,8 @@
                    global.viewer.scene.screenSpaceCameraController.minimumZoomDistance = 100
                    global.eagleViewer.scene.screenSpaceCameraController.minimumZoomDistance = 1100
                    // 最大
                    global.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 400
                    global.eagleViewer.scene.screenSpaceCameraController.maximumZoomDistance = 1400
                    // global.viewer.scene.screenSpaceCameraController.maximumZoomDistance = 400
                    // global.eagleViewer.scene.screenSpaceCameraController.maximumZoomDistance = 1400
                    // 设置相机缩小时的速率
                    global.viewer.scene.screenSpaceCameraController._minimumZoomRate = 2000
@@ -470,153 +470,157 @@
                            }
                        }
                    document.querySelector('.dc-zoom-controller').children[2].onclick =
                        function () {
                            if (
                                that.dimensionValue != undefined &&
                                that.dimensionValue != '真三维'
                            ) {
                                const height = Math.ceil(
                                    global.viewer.camera.positionCartographic.height
                                )
                    // document.querySelector('.dc-zoom-controller').children[2].onclick =
                    //     function () {
                    //         if (
                    //             that.dimensionValue != undefined &&
                    //             that.dimensionValue != '真三维'
                    //         ) {
                    //             const height = Math.ceil(
                    //                 global.viewer.camera.positionCartographic.height
                    //             )
                                if (height < 150) {
                                    global.viewer.camera.setView({
                                        destination:
                                            global.DC.Namespace.Cesium.Cartesian3.fromRadians(
                                                global.viewer.camera.positionCartographic.longitude,
                                                global.viewer.camera.positionCartographic.latitude,
                                                200
                                            ),
                                        orientation: {
                                            // 指向
                                            heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
                                            // 视角
                                            pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
                                            roll: 0.0
                                        }
                                    })
                    //             if (height < 150) {
                    //                 global.viewer.camera.setView({
                    //                     destination:
                    //                         global.DC.Namespace.Cesium.Cartesian3.fromRadians(
                    //                             global.viewer.camera.positionCartographic.longitude,
                    //                             global.viewer.camera.positionCartographic.latitude,
                    //                             200
                    //                         ),
                    //                     orientation: {
                    //                         // 指向
                    //                         heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
                    //                         // 视角
                    //                         pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
                    //                         roll: 0.0
                    //                     }
                    //                 })
                                    return
                                }
                    //                 return
                    //             }
                                if (height < 250) {
                                    global.viewer.camera.setView({
                                        destination:
                                            global.DC.Namespace.Cesium.Cartesian3.fromRadians(
                                                global.viewer.camera.positionCartographic.longitude,
                                                global.viewer.camera.positionCartographic.latitude,
                                                300
                                            ),
                                        orientation: {
                                            // 指向
                                            heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
                                            // 视角
                                            pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
                                            roll: 0.0
                                        }
                                    })
                    //             if (height < 250) {
                    //                 global.viewer.camera.setView({
                    //                     destination:
                    //                         global.DC.Namespace.Cesium.Cartesian3.fromRadians(
                    //                             global.viewer.camera.positionCartographic.longitude,
                    //                             global.viewer.camera.positionCartographic.latitude,
                    //                             300
                    //                         ),
                    //                     orientation: {
                    //                         // 指向
                    //                         heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
                    //                         // 视角
                    //                         pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
                    //                         roll: 0.0
                    //                     }
                    //                 })
                                    return
                                }
                    //                 return
                    //             }
                                if (height < 350) {
                                    global.viewer.camera.setView({
                                        destination:
                                            global.DC.Namespace.Cesium.Cartesian3.fromRadians(
                                                global.viewer.camera.positionCartographic.longitude,
                                                global.viewer.camera.positionCartographic.latitude,
                                                400
                                            ),
                                        orientation: {
                                            // 指向
                                            heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
                                            // 视角
                                            pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
                                            roll: 0.0
                                        }
                                    })
                                }
                            }
                        }
                    //             if (height < 350) {
                    //                 global.viewer.camera.setView({
                    //                     destination:
                    //                         global.DC.Namespace.Cesium.Cartesian3.fromRadians(
                    //                             global.viewer.camera.positionCartographic.longitude,
                    //                             global.viewer.camera.positionCartographic.latitude,
                    //                             400
                    //                         ),
                    //                     orientation: {
                    //                         // 指向
                    //                         heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
                    //                         // 视角
                    //                         pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
                    //                         roll: 0.0
                    //                     }
                    //                 })
                    //             }
                    //         }
                    //     }
                    document.querySelector('.dc-zoom-controller').children[0].onclick =
                        function () {
                            if (
                                that.dimensionValue != undefined &&
                                that.dimensionValue != '真三维'
                            ) {
                                const height = Math.ceil(
                                    global.viewer.camera.positionCartographic.height
                                )
                    // document.querySelector('.dc-zoom-controller').children[0].onclick =
                    //     function () {
                    //         if (
                    //             that.dimensionValue != undefined &&
                    //             that.dimensionValue != '真三维'
                    //         ) {
                    //             const height = Math.ceil(
                    //                 global.viewer.camera.positionCartographic.height
                    //             )
                                if (height > 350) {
                                    global.viewer.camera.setView({
                                        destination:
                                            global.DC.Namespace.Cesium.Cartesian3.fromRadians(
                                                global.viewer.camera.positionCartographic.longitude,
                                                global.viewer.camera.positionCartographic.latitude,
                                                300
                                            ),
                                        orientation: {
                                            // 指向
                                            heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
                                            // 视角
                                            pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
                                            roll: 0.0
                                        }
                                    })
                    //             if (height > 350) {
                    //                 global.viewer.camera.setView({
                    //                     destination:
                    //                         global.DC.Namespace.Cesium.Cartesian3.fromRadians(
                    //                             global.viewer.camera.positionCartographic.longitude,
                    //                             global.viewer.camera.positionCartographic.latitude,
                    //                             300
                    //                         ),
                    //                     orientation: {
                    //                         // 指向
                    //                         heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
                    //                         // 视角
                    //                         pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
                    //                         roll: 0.0
                    //                     }
                    //                 })
                                    return
                                }
                    //                 return
                    //             }
                                if (height > 250) {
                                    global.viewer.camera.setView({
                                        destination:
                                            global.DC.Namespace.Cesium.Cartesian3.fromRadians(
                                                global.viewer.camera.positionCartographic.longitude,
                                                global.viewer.camera.positionCartographic.latitude,
                                                200
                                            ),
                                        orientation: {
                                            // 指向
                                            heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
                                            // 视角
                                            pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
                                            roll: 0.0
                                        }
                                    })
                    //             if (height > 250) {
                    //                 global.viewer.camera.setView({
                    //                     destination:
                    //                         global.DC.Namespace.Cesium.Cartesian3.fromRadians(
                    //                             global.viewer.camera.positionCartographic.longitude,
                    //                             global.viewer.camera.positionCartographic.latitude,
                    //                             200
                    //                         ),
                    //                     orientation: {
                    //                         // 指向
                    //                         heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
                    //                         // 视角
                    //                         pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
                    //                         roll: 0.0
                    //                     }
                    //                 })
                                    return
                                }
                    //                 return
                    //             }
                                if (height > 150) {
                                    global.viewer.camera.setView({
                                        destination:
                                            global.DC.Namespace.Cesium.Cartesian3.fromRadians(
                                                global.viewer.camera.positionCartographic.longitude,
                                                global.viewer.camera.positionCartographic.latitude,
                                                100
                                            ),
                                        orientation: {
                                            // 指向
                                            heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
                                            // 视角
                                            pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
                                            roll: 0.0
                                        }
                                    })
                                }
                            }
                        }
                    //             if (height > 150) {
                    //                 global.viewer.camera.setView({
                    //                     destination:
                    //                         global.DC.Namespace.Cesium.Cartesian3.fromRadians(
                    //                             global.viewer.camera.positionCartographic.longitude,
                    //                             global.viewer.camera.positionCartographic.latitude,
                    //                             100
                    //                         ),
                    //                     orientation: {
                    //                         // 指向
                    //                         heading: global.DC.Namespace.Cesium.Math.toRadians(0, 0),
                    //                         // 视角
                    //                         pitch: global.DC.Namespace.Cesium.Math.toRadians(-90),
                    //                         roll: 0.0
                    //                     }
                    //                 })
                    //             }
                    //         }
                    //     }
                    global.viewer.on(global.DC.SceneEventType.CAMERA_CHANGED, that.mapCameraEvent)
                    global.eagleViewer.on(global.DC.SceneEventType.CAMERA_CHANGED, that.smallMapCameraEvent)
                    // global.viewer.on(global.DC.SceneEventType.CAMERA_CHANGED, that.mapCameraEvent)
                    // global.eagleViewer.on(global.DC.SceneEventType.CAMERA_CHANGED, that.smallMapCameraEvent)
                }
            }
        }
    },
    methods: {
        zoomToOpen () {
        },
        locationSTM () {
            global.viewer.flyToPosition('116.45793269658417,39.92711385557482,617.5967826044838,181.95219395269424,-21.286437065473546')
        },
src/components/searchDetails/index.vue
@@ -240,9 +240,9 @@
                left: auto;
                bottom: 0;
                margin: auto;
                width: 14px;
                height: 14px;
                cursor: pointer;
                width: 16px;
                height: 16px;
                cursor: poiner;
            }
        }
src/pcviews/specialmap/welcome.vue
@@ -73,6 +73,16 @@
                </div>
            </div>
        </div>
        <!-- <div v-show="layerList.length > 0" class="layer-manage-container">
            <div class="header">图层管理</div>
            <ul class="content">
                <li v-for="(item, index) in layerList" :key="index">
                    {{item.name}}:
                    <el-switch v-model="item.flag" @change="switchChange(item)"></el-switch>
                </li>
            </ul>
        </div>-->
    </div>
</template>
@@ -86,6 +96,8 @@
export default {
    data () {
        return {
            url: '',
            layerList: [],
            time: '',
            sponsor: '',
            undertake: '',
@@ -155,6 +167,26 @@
        ])
    },
    methods: {
        switchChange (item) {
            if (item.flag == true) {
            } else {
            }
        },
        addArcgisLayer (url) {
            global.viewer.imageryLayers.addImageryProvider(
                new global.DC.Namespace.Cesium.ArcGisMapServerImageryProvider({
                    url: url
                })
            )
        },
        removeArcgisLayer () {
        },
        getData () {
            getWelcome({ hdname: this.urlDataName }).then((res) => {
                var result = res.data.data
@@ -172,6 +204,17 @@
                this.list = result.tpurl.split(',')
                this.pointNameList = result.addressname.split(',')
                this.pointList = result.address.split(';')
                this.layerList = []
                if (result.mapname != '' && result.mapname != null && result.mapname != undefined) {
                    var mapname = result.mapname.split(',')
                    var url = result.url.split(',')
                    mapname.forEach((item, index) => {
                        this.layerList.push({ flag: false, name: item, url: url[index] })
                    })
                    this.layerList[0].flag = true
                    this.addArcgisLayer(this.layerList[0].url)
                }
                var a = result.lx.split(';')
@@ -202,6 +245,7 @@
                this.pointList.forEach((item, index) => {
                    this.drawPoint(item.split(','), this.pointNameList[index])
                })
                if (this.pointList.length > 0) {
                    this.$store.dispatch('pcMoveView', {
                        viewer: global.viewer,
@@ -529,4 +573,28 @@
        }
    }
}
.layer-manage-container {
    padding: 0 10px 10px 10px;
    position: fixed;
    right: 10px;
    bottom: 240px;
    width: 120px;
    background: rgba(40, 187, 240, 0.7);
    border-radius: 10px;
    color: #fff;
    border: 1px solid #29baf1;
    box-shadow: 0 0 10px 2px #29baf1;
    .header {
        line-height: 36px;
        text-align: center;
    }
    .content {
        max-height: calc(180px - 36px);
        overflow-y: auto;
        text-align: center;
    }
}
</style>
src/router/axios.js
@@ -13,7 +13,7 @@
//   console.log(url);
// }, 3000);
window.$apiUrls = 'http://171.34.197.243:782'
// window.$apiUrls = 'http://192.168.0.222:82'
// window.$apiUrls = 'http://192.168.0.102:82'
const service = axios.create({
    //   baseURL: 'http://192.168.0.107:83',
src/styles/pcpage/campus-nav.scss
@@ -43,8 +43,8 @@
            left: auto;
            bottom: 0;
            margin: auto;
            width: 14px;
            height: 14px;
            width: 16px;
            height: 16px;
            cursor: pointer;
        }
    }
src/styles/pcpage/publicBox/arc-nav-bar.scss
@@ -50,8 +50,8 @@
            left: auto;
            bottom: 0;
            margin: auto;
            width: 14px;
            height: 14px;
            width: 16px;
            height: 16px;
            cursor: pointer;
        }
    }
@@ -121,7 +121,7 @@
                    top: 0;
                    bottom: 0;
                    margin: auto;
                    width: 14px;
                    width: 16px;
                }
                span {
src/styles/pcpage/publicBox/org-nav-bar.scss
@@ -50,8 +50,8 @@
            left: auto;
            bottom: 0;
            margin: auto;
            width: 14px;
            height: 14px;
            width: 16px;
            height: 16px;
            cursor: pointer;
        }
    }
@@ -95,7 +95,7 @@
                    top: 0;
                    bottom: 0;
                    margin: auto;
                    width: 14px;
                    width: 16px;
                }
                span {
src/styles/pcpage/publicBox/service-nav-bar.scss
@@ -50,8 +50,8 @@
            left: auto;
            bottom: 0;
            margin: auto;
            width: 14px;
            height: 14px;
            width: 16px;
            height: 16px;
            cursor: pointer;
        }
    }
@@ -121,7 +121,7 @@
                    top: 0;
                    bottom: 0;
                    margin: auto;
                    width: 14px;
                    width: 16px;
                }
                span {
src/styles/pcpage/tool/layer-manage.scss
@@ -40,8 +40,8 @@
            left: auto;
            bottom: 0;
            margin: auto;
            width: 14px;
            height: 14px;
            width: 16px;
            height: 16px;
            cursor: pointer;
        }
    }
src/styles/pcpage/tool/ranging.scss
@@ -40,8 +40,8 @@
            left: auto;
            bottom: 0;
            margin: auto;
            width: 14px;
            height: 14px;
            width: 16px;
            height: 16px;
            cursor: pointer;
        }
    }
src/styles/pcpage/tool/sign.scss
@@ -40,8 +40,8 @@
            left: auto;
            bottom: 0;
            margin: auto;
            width: 14px;
            height: 14px;
            width: 16px;
            height: 16px;
            cursor: pointer;
        }
@@ -52,8 +52,8 @@
            left: auto;
            bottom: 0;
            margin: auto;
            width: 14px;
            height: 14px;
            width: 16px;
            height: 16px;
            cursor: pointer;
        }
    }