guanqb
2023-04-10 2b28026e4d725a1147d1ca28986224c6e9219643
信州分局边界图
3 files modified
1 files added
15952 ■■■■■ changed files
src/components/map/index.vue 26 ●●●● patch | view | raw | blame | history
src/views/home/index.vue 24 ●●●● patch | view | raw | blame | history
src/views/home/xinzhou.js 15898 ●●●●● patch | view | raw | blame | history
vue.config.js 4 ●●●● patch | view | raw | blame | history
src/components/map/index.vue
@@ -20,12 +20,12 @@
        <!-- 全屏控制按钮 -->
        <div class="screen-full-btn">
            <!-- <el-tooltip v-if="isFullscreen" content="缩放" placement="top" effect="dark">
                                                                                            <i class="fa fa-compress" style="vertical-align: middle; cursor: pointer" @click="fullscreenchange"></i>
                                                                                        </el-tooltip> -->
                                                                                                        <i class="fa fa-compress" style="vertical-align: middle; cursor: pointer" @click="fullscreenchange"></i>
                                                                                                    </el-tooltip> -->
            <!-- <el-tooltip v-if="!isFullscreen" content="全屏" placement="top" effect="dark">
                                                                                                <i class="fa fa-expand" style="vertical-align: middle; cursor: pointer" @click="fullscreenchange"></i>
                                                                                            </el-tooltip> -->
                                                                                                            <i class="fa fa-expand" style="vertical-align: middle; cursor: pointer" @click="fullscreenchange"></i>
                                                                                                        </el-tooltip> -->
            <el-tooltip content="显示/隐藏" placement="top" effect="dark">
                <i class="fa fa-expand" style="vertical-align: middle; cursor: pointer" @click="switchShowHomeContent"></i>
            </el-tooltip>
@@ -294,15 +294,15 @@
            that.switchImg()
            // 外网
            // global.viewer.imageryLayers.addImageryProvider(
            //     new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
            //         url: 'http://t{s}.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=e45274b0235bb913eceb393aabbf9c9c',
            //         subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
            //         format: 'image/jpeg',
            //         show: true,
            //         maximumLevel: 18
            //     })
            // )
            global.viewer.imageryLayers.addImageryProvider(
                new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({
                    url: 'http://t{s}.tianditu.gov.cn/DataServer?T=vec_w&x={x}&y={y}&l={z}&tk=e45274b0235bb913eceb393aabbf9c9c',
                    subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
                    format: 'image/jpeg',
                    show: true,
                    maximumLevel: 18
                })
            )
            // 设置地图初始位置,角度等
            global.viewer.camera.setView({
src/views/home/index.vue
@@ -310,9 +310,7 @@
let circleLayer = null
let DataSourcesArray = []
let loading = null
import { mapGetters } from 'vuex'
let xinzhouLayer = null
let treeData = [
    {
@@ -435,6 +433,8 @@
import keyPersonBox from './components/dialog/keyPersonBox.vue'
import { initMapPosition } from '@/utils/mapPositionInit'
import { mapGetters } from 'vuex'
import { xinzhou } from './xinzhou.js'
export default {
    inject: ['userInfo'],
@@ -626,6 +626,23 @@
                    }
                })
            }
            // 绘制信州边界线
            let xinzhouRange = xinzhou.reduce(
                (previous, current) => {
                    previous += current[0] + ',' + current[1] + ';'
                    return previous
                },
                []
            )
            xinzhouLayer = new global.DC.VectorLayer('xinzhouLayer')
            global.viewer.addLayer(xinzhouLayer)
            let xinzhouPolyline = new global.DC.Polyline(xinzhouRange)
            xinzhouPolyline.setStyle({
                width: 20,
                material: global.DC.Namespace.Cesium.Color.fromBytes(255, 202, 143, 255),
                clampToGround: true
            })
            xinzhouLayer.addOverlay(xinzhouPolyline)
        })
        const that = this
@@ -634,6 +651,7 @@
        })
        window.addEventListener('resize', this.setDomStyle)
    },
    methods: {
src/views/home/xinzhou.js
New file
Diff too large
vue.config.js
@@ -161,8 +161,8 @@
        proxy: {
            "/api": {
                // target用于配置你允许访问数据的计算机名称,即是你的api接口的服务器地址
                target: "http://localhost:82",
                // target: "http://192.168.0.100:82",
                // target: "http://localhost:82",
                target: "http://192.168.0.100:82",
                // target: "http://17.20.10.3:82",
                // target: "http://10.141.11.11:8081/api",
                // ws: true, //启用webSocket6566