shuishen
2023-04-25 3be1ed4d1ade9ffd6044ffc326cb12d4c0dea73c
小区面加载方式更改
2 files modified
33 ■■■■■ changed files
src/views/home/index.vue 27 ●●●●● patch | view | raw | blame | history
vue.config.js 6 ●●●● patch | view | raw | blame | history
src/views/home/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 16:18:17
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-04-21 16:39:18
 * @LastEditTime: 2023-04-25 16:30:36
 * @FilePath: \srs-police-affairs\src\views\home\index.vue
 * @Description: 小区-栋-层-房屋
 *
@@ -1516,7 +1516,6 @@
            const that = this
            this.clearPolygonLayer()
            this.areaOptions.forEach((item, index) => {
                item.position && item.position.forEach(sourceItem => {
                    const Json = { ...JSON.parse(sourceItem) }
                    global.DC.Namespace.Cesium.GeoJsonDataSource.load(Json, {
@@ -1570,6 +1569,7 @@
        },
        initHousingLayer () {
            const that = this
            let positionArr = JSON.parse(this.areaChecked.position).coordinates[0][0]
            let polygon = this.$turf.polygon([positionArr])
            let center = this.$turf.centroid(polygon)
@@ -1582,14 +1582,21 @@
                siteHeading: -3,
                sitePitch: -45
            })
            let str = ''
            positionArr.forEach(it => {
                str = str + `${it[0]},${it[1]};`
            })
            this.$EventBus.$emit('layerPolygonAdd', {
                layerName: 'polygonLayer',
                positions: str,
                material: positionColor[0]
            this.areaChecked.position && this.areaChecked.position.forEach(sourceItem => {
                const Json = { ...JSON.parse(sourceItem) }
                global.DC.Namespace.Cesium.GeoJsonDataSource.load(Json, {
                    stroke: positionColor[0],
                    fill: positionColor[0], //注意:颜色必须大写,即不能为blue
                    strokeWidth: 0,
                    clampToGround: true
                }).then(function (dataSource) {
                    DataSourcesArray.push(dataSource)
                    that.areaPolygonLayerShow == false ? dataSource.show = false : dataSource.show = true
                    global.viewer.dataSources.add(dataSource)
                })
            })
            this.housingOptions.length > 0 && this.housingOptions.forEach(item => {
vue.config.js
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-09-07 09:37:07
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2023-04-19 12:04:13
 * @LastEditTime: 2023-04-25 16:23:53
 * @FilePath: \srs-police-affairs\vue.config.js
 * @Description:
 *
@@ -166,9 +166,9 @@
            "/api": {
                // target用于配置你允许访问数据的计算机名称,即是你的api接口的服务器地址
                // target: "http://localhost:82",
                target: "http://106.225.193.35:82",
                // target: "http://106.225.193.35:82",
                // target: "http://192.168.0.100:82",
                // target: "http://17.20.10.3:82",
                target: "http://172.16.13.150:82",
                // target: "http://10.141.11.11:8081/api",
                // ws: true, //启用webSocket6566
                changeOrigin: true, //开启代理跨域