linwei
yesterday 0d1a0cfad99bce85d7ae376351afa995d1471b43
feat(map): 添加派出所区域图层显示功能

- 在多个视图中引入派出所树形结构数据获取功能
- 实现派出所区域边界面数据加载和渲染
- 添加多种颜色配置用于区分不同派出所区域
- 在地图上展示派出所边界线和填充效果
- 实现图层清理和资源释放机制
- 优化弹窗关闭时清除扫描图层功能
- 调整房屋信息弹窗尺寸和二维码大小
- 在房屋页面初始化地图位置功能
9 files modified
1 files added
42379 ■■■■■ changed files
public/static/update_generated.sql 41717 ●●●●● patch | view | raw | blame | history
src/components/siteDialog/index.vue 4 ●●●● patch | view | raw | blame | history
src/styles/media/index.scss 8 ●●●● patch | view | raw | blame | history
src/views/antiFraudShow/index.vue 107 ●●●●● patch | view | raw | blame | history
src/views/contradictionEventShow/index.vue 107 ●●●●● patch | view | raw | blame | history
src/views/house/index.vue 5 ●●●●● patch | view | raw | blame | history
src/views/policeAlarmRecordsManage/index.vue 107 ●●●●● patch | view | raw | blame | history
src/views/practitionersManage/index.vue 107 ●●●●● patch | view | raw | blame | history
src/views/rentalInfo/index.vue 107 ●●●●● patch | view | raw | blame | history
src/views/scanOrCode/index.vue 110 ●●●●● patch | view | raw | blame | history
public/static/update_generated.sql
New file
Diff too large
src/components/siteDialog/index.vue
@@ -450,6 +450,10 @@
    // 关闭弹窗按钮
    popupClose () {
      this.popupShow = false
       this.$EventBus.$emit("mapClearLayer", {
        layerName: "scanLayer",
        type: "VectorLayer",
      })
       this.$store.commit('SET_PLACEBASEPOPUP', false)
    },
src/styles/media/index.scss
@@ -2060,20 +2060,20 @@
                        .el-dialog__body {
                            display: flex;
                            flex-direction: row;
                            height: countSizeVh(360);
                            height: countSizeVh(160);
                            .house-info-box {
                                width: countSizeVw(240, 1920);
                                height: 100%;
                                .house-title {
                                    font-size: countSizeVh(18);
                                    font-weight: 700;
                                }
                                .mini-code {
                                    width: countSizeVw(200, 1920);
                                    height: countSizeVw(200, 1920);
                                    width: countSizeVw(172, 1920);
                                    height: countSizeVw(172, 1920);
                                    margin-top: countSizeVh(20);
                                    margin-left: countSizeVw(20, 1920);
                                }
src/views/antiFraudShow/index.vue
@@ -70,12 +70,45 @@
</template>
<script>
let cylinderLayer = null
let DataSourcesArray = []
let positionColor = [
  global.DC.Namespace.Cesium.Color.fromBytes(255, 97, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 142, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 192, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 58, 242, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(0, 185, 209, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(250, 84, 28, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(221, 255, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(51, 255, 0, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(97, 255, 181, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(58, 181, 252, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 129, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(58, 252, 236, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(97, 184, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 58, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(97, 113, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(81, 252, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(126, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(168, 252, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(171, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 249, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(210, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 174, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 226, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 97, 176, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(58, 252, 155, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 58, 155, 20),
]
import { initMapPosition } from '@/utils/mapPositionInit'
import {
  getBackblastPubRecordList,
  getBackblastWarnHanRecList,
  getStatistic
} from "@/api/antiFraudShow/index.js"
import { getPoliceStationTree } from "@/api/home/index.js"
import detailDialog from './components/detailDialog.vue'
let loading = null
@@ -105,6 +138,7 @@
        count: 0,
        currentPage: 1
      },
      policeStationOptions: []
    }
  },
@@ -116,6 +150,7 @@
      that.getList()
      that.getStatistic()
    })
    this.getPoliceStationTree(1)
  },
  mounted () {
@@ -153,6 +188,67 @@
  },
  methods: {
    // 加载首页下拉列表数据
    getPoliceStationTree (type, id = '') {
      var that = this
      getPoliceStationTree(type, id).then(res => {
        if (type == 1) {
          this.policeStationOptions = res.data.data
          this.policeStationOptions.unshift({
            name: '全部',
            id: 1
          })
          this.initPoliceStationLayer()
        }
      })
    },
    // 加载面数据的方法
    initPoliceStationLayer () {
      const that = this
      cylinderLayer = new global.DC.PrimitiveLayer('cylinderLayer')
      global.viewer.addLayer(cylinderLayer)
      DataSourcesArray.forEach(item => {
        global.viewer.dataSources.remove(item, true)
      })
      this.policeStationOptions.forEach((item, index) => {
        if (item.position && item.position.length > 0) {
          item.position.forEach((sourceItem, sourceIndex) => {
            const Json = { ...JSON.parse(sourceItem) }
            global.DC.Namespace.Cesium.GeoJsonDataSource.load(Json, {
              stroke: positionColor[index],
              fill: positionColor[index], //注意:颜色必须大写,即不能为blue
              strokeWidth: 0,
              clampToGround: false
            }).then(function (dataSource) {
              let entities = dataSource.entities.values
              //修改entity样式
              for (let i = 0; i < entities.length; i++) {
                let entity = entities[i]
                entity.polyline = {
                  positions: entity.polygon.hierarchy._value.positions,
                  width: 4,
                  material: global.DC.Namespace.Cesium.Color.fromCssColorString('#19298d'),
                  clampToGround: true
                }
              }
              DataSourcesArray.push(dataSource)
              dataSource.show = true
              global.viewer.dataSources.add(dataSource)
            })
          })
        }
      })
    },
    // 过滤
    filterAppBtn (isFzApp) {
      this.isFzApp = isFzApp
@@ -402,6 +498,17 @@
  },
  destroyed () {
    DataSourcesArray.forEach(item => {
      global.viewer.dataSources.remove(item, true)
    })
    DataSourcesArray = []
    if (cylinderLayer != null) {
      cylinderLayer.remove()
      cylinderLayer = null
    }
    loading && loading.close()
    window.removeEventListener('resize', this.setTableHeight)
src/views/contradictionEventShow/index.vue
@@ -67,12 +67,45 @@
</template>
<script>
let cylinderLayer = null
let DataSourcesArray = []
let positionColor = [
  global.DC.Namespace.Cesium.Color.fromBytes(255, 97, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 142, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 192, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 58, 242, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(0, 185, 209, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(250, 84, 28, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(221, 255, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(51, 255, 0, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(97, 255, 181, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(58, 181, 252, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 129, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(58, 252, 236, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(97, 184, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 58, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(97, 113, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(81, 252, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(126, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(168, 252, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(171, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 249, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(210, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 174, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 226, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 97, 176, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(58, 252, 155, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 58, 155, 20),
]
import { initMapPosition } from "@/utils/mapPositionInit"
import {
  getDisputeRecordList,
  getStatistic,
} from "@/api/contradictionEventShow/index.js"
import { getDictionaryListByCode } from "@/api/rentalInfo/index.js"
import { getPoliceStationTree } from "@/api/home/index.js"
import detailDialog from "./components/detailDialog.vue"
@@ -103,6 +136,7 @@
      },
      disputeTypeList: [],
      disputeSourceList: [],
      policeStationOptions: []
    }
  },
@@ -115,6 +149,7 @@
      that.getStatistic()
      that.getList()
    })
    this.getPoliceStationTree(1)
  },
  mounted () {
@@ -162,6 +197,67 @@
  },
  methods: {
    // 加载首页下拉列表数据
    getPoliceStationTree (type, id = '') {
      var that = this
      getPoliceStationTree(type, id).then(res => {
        if (type == 1) {
          this.policeStationOptions = res.data.data
          this.policeStationOptions.unshift({
            name: '全部',
            id: 1
          })
          this.initPoliceStationLayer()
        }
      })
    },
    // 加载面数据的方法
    initPoliceStationLayer () {
      const that = this
      cylinderLayer = new global.DC.PrimitiveLayer('cylinderLayer')
      global.viewer.addLayer(cylinderLayer)
      DataSourcesArray.forEach(item => {
        global.viewer.dataSources.remove(item, true)
      })
      this.policeStationOptions.forEach((item, index) => {
        if (item.position && item.position.length > 0) {
          item.position.forEach((sourceItem, sourceIndex) => {
            const Json = { ...JSON.parse(sourceItem) }
            global.DC.Namespace.Cesium.GeoJsonDataSource.load(Json, {
              stroke: positionColor[index],
              fill: positionColor[index], //注意:颜色必须大写,即不能为blue
              strokeWidth: 0,
              clampToGround: false
            }).then(function (dataSource) {
              let entities = dataSource.entities.values
              //修改entity样式
              for (let i = 0; i < entities.length; i++) {
                let entity = entities[i]
                entity.polyline = {
                  positions: entity.polygon.hierarchy._value.positions,
                  width: 4,
                  material: global.DC.Namespace.Cesium.Color.fromCssColorString('#19298d'),
                  clampToGround: true
                }
              }
              DataSourcesArray.push(dataSource)
              dataSource.show = true
              global.viewer.dataSources.add(dataSource)
            })
          })
        }
      })
    },
    // 统计
    getStatistic () {
      var that = this
@@ -430,6 +526,17 @@
  },
  destroyed () {
    DataSourcesArray.forEach(item => {
      global.viewer.dataSources.remove(item, true)
    })
    DataSourcesArray = []
    if (cylinderLayer != null) {
      cylinderLayer.remove()
      cylinderLayer = null
    }
    loading && loading.close()
    window.removeEventListener("resize", this.setTableHeight)
src/views/house/index.vue
@@ -839,6 +839,8 @@
</template>
<script>
import { initMapPosition } from '@/utils/mapPositionInit'
let cylinderLayer = null
let DataSourcesArray = []
let circleLayer = null
@@ -1323,6 +1325,9 @@
        ]
      }
      if (JQSmychart) JQSmychart.setOption(option, true)
      initMapPosition()
    })
  },
src/views/policeAlarmRecordsManage/index.vue
@@ -81,8 +81,41 @@
</template>
<script>
let cylinderLayer = null
let DataSourcesArray = []
let positionColor = [
  global.DC.Namespace.Cesium.Color.fromBytes(255, 97, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 142, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 192, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 58, 242, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(0, 185, 209, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(250, 84, 28, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(221, 255, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(51, 255, 0, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(97, 255, 181, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(58, 181, 252, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 129, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(58, 252, 236, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(97, 184, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 58, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(97, 113, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(81, 252, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(126, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(168, 252, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(171, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 249, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(210, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 174, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 226, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 97, 176, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(58, 252, 155, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 58, 155, 20),
]
import { initMapPosition } from '@/utils/mapPositionInit'
import { getList, getApplyAlarmType, getStatistic } from "@/api/policeAlarmRecordsManage/index.js"
import { getPoliceStationTree } from "@/api/home/index.js"
let loading = null
@@ -107,6 +140,7 @@
      },
      scycNum: 0,
      criminalRecordFlag: '',
      policeStationOptions: []
    }
  },
@@ -119,6 +153,7 @@
    that.$nextTick(() => {
      initMapPosition()
    })
    this.getPoliceStationTree(1)
  },
  mounted () {
@@ -152,6 +187,67 @@
  },
  methods: {
    // 加载首页下拉列表数据
    getPoliceStationTree (type, id = '') {
      var that = this
      getPoliceStationTree(type, id).then(res => {
        if (type == 1) {
          this.policeStationOptions = res.data.data
          this.policeStationOptions.unshift({
            name: '全部',
            id: 1
          })
          this.initPoliceStationLayer()
        }
      })
    },
    // 加载面数据的方法
    initPoliceStationLayer () {
      const that = this
      cylinderLayer = new global.DC.PrimitiveLayer('cylinderLayer')
      global.viewer.addLayer(cylinderLayer)
      DataSourcesArray.forEach(item => {
        global.viewer.dataSources.remove(item, true)
      })
      this.policeStationOptions.forEach((item, index) => {
        if (item.position && item.position.length > 0) {
          item.position.forEach((sourceItem, sourceIndex) => {
            const Json = { ...JSON.parse(sourceItem) }
            global.DC.Namespace.Cesium.GeoJsonDataSource.load(Json, {
              stroke: positionColor[index],
              fill: positionColor[index], //注意:颜色必须大写,即不能为blue
              strokeWidth: 0,
              clampToGround: false
            }).then(function (dataSource) {
              let entities = dataSource.entities.values
              //修改entity样式
              for (let i = 0; i < entities.length; i++) {
                let entity = entities[i]
                entity.polyline = {
                  positions: entity.polygon.hierarchy._value.positions,
                  width: 4,
                  material: global.DC.Namespace.Cesium.Color.fromCssColorString('#19298d'),
                  clampToGround: true
                }
              }
              DataSourcesArray.push(dataSource)
              dataSource.show = true
              global.viewer.dataSources.add(dataSource)
            })
          })
        }
      })
    },
    filterBtn (status) {
      this.status = status
      this.onLoad()
@@ -319,6 +415,17 @@
  },
  destroyed () {
    DataSourcesArray.forEach(item => {
      global.viewer.dataSources.remove(item, true)
    })
    DataSourcesArray = []
    if (cylinderLayer != null) {
      cylinderLayer.remove()
      cylinderLayer = null
    }
    loading && loading.close()
    this.$parent.$parent.resize('0px')
src/views/practitionersManage/index.vue
@@ -67,8 +67,41 @@
</template>
<script>
let cylinderLayer = null
let DataSourcesArray = []
let positionColor = [
  global.DC.Namespace.Cesium.Color.fromBytes(255, 97, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 142, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 192, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 58, 242, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(0, 185, 209, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(250, 84, 28, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(221, 255, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(51, 255, 0, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(97, 255, 181, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(58, 181, 252, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 129, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(58, 252, 236, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(97, 184, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 58, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(97, 113, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(81, 252, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(126, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(168, 252, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(171, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 249, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(210, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 174, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 226, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 97, 176, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(58, 252, 155, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 58, 155, 20),
]
import { initMapPosition } from '@/utils/mapPositionInit'
import { getPlacePractitionerPage, getCountByType } from "@/api/practitionersManage/index.js"
import { getPoliceStationTree } from "@/api/home/index.js"
let loading = null
@@ -88,6 +121,7 @@
      },
      scycNum: 0,
      criminalRecordFlag: '',
      policeStationOptions: []
    }
  },
@@ -99,6 +133,7 @@
    that.$nextTick(() => {
      initMapPosition()
    })
    this.getPoliceStationTree(1)
  },
  mounted () {
@@ -132,6 +167,67 @@
  },
  methods: {
    // 加载首页下拉列表数据
    getPoliceStationTree (type, id = '') {
      var that = this
      getPoliceStationTree(type, id).then(res => {
        if (type == 1) {
          this.policeStationOptions = res.data.data
          this.policeStationOptions.unshift({
            name: '全部',
            id: 1
          })
          this.initPoliceStationLayer()
        }
      })
    },
    // 加载面数据的方法
    initPoliceStationLayer () {
      const that = this
      cylinderLayer = new global.DC.PrimitiveLayer('cylinderLayer')
      global.viewer.addLayer(cylinderLayer)
      DataSourcesArray.forEach(item => {
        global.viewer.dataSources.remove(item, true)
      })
      this.policeStationOptions.forEach((item, index) => {
        if (item.position && item.position.length > 0) {
          item.position.forEach((sourceItem, sourceIndex) => {
            const Json = { ...JSON.parse(sourceItem) }
            global.DC.Namespace.Cesium.GeoJsonDataSource.load(Json, {
              stroke: positionColor[index],
              fill: positionColor[index], //注意:颜色必须大写,即不能为blue
              strokeWidth: 0,
              clampToGround: false
            }).then(function (dataSource) {
              let entities = dataSource.entities.values
              //修改entity样式
              for (let i = 0; i < entities.length; i++) {
                let entity = entities[i]
                entity.polyline = {
                  positions: entity.polygon.hierarchy._value.positions,
                  width: 4,
                  material: global.DC.Namespace.Cesium.Color.fromCssColorString('#19298d'),
                  clampToGround: true
                }
              }
              DataSourcesArray.push(dataSource)
              dataSource.show = true
              global.viewer.dataSources.add(dataSource)
            })
          })
        }
      })
    },
    // 有前科筛选按钮
    filterBtn () {
      if (this.criminalRecordFlag == '1') {
@@ -277,6 +373,17 @@
  },
  destroyed () {
    DataSourcesArray.forEach(item => {
      global.viewer.dataSources.remove(item, true)
    })
    DataSourcesArray = []
    if (cylinderLayer != null) {
      cylinderLayer.remove()
      cylinderLayer = null
    }
    loading && loading.close()
    this.$parent.$parent.resize('0px')
src/views/rentalInfo/index.vue
@@ -101,8 +101,41 @@
</template>
<script>
let cylinderLayer = null
let DataSourcesArray = []
let positionColor = [
  global.DC.Namespace.Cesium.Color.fromBytes(255, 97, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 142, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 192, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 58, 242, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(0, 185, 209, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(250, 84, 28, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(221, 255, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(51, 255, 0, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(97, 255, 181, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(58, 181, 252, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 129, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(58, 252, 236, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(97, 184, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 58, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(97, 113, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(81, 252, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(126, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(168, 252, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(171, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 249, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(210, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 174, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 226, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 97, 176, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(58, 252, 155, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 58, 155, 20),
]
import { initMapPosition } from '@/utils/mapPositionInit'
import { getTaskResidencePermitApplyList, getHouseRentalList, getHouseholdSelectTenantList, getDictionaryListByCode, selectTenantStatistic, selectTenantPage } from "@/api/rentalInfo/index.js"
import { getPoliceStationTree } from "@/api/home/index.js"
import detailDialog from './components/detailDialog.vue'
let loading = null
@@ -150,6 +183,7 @@
      nationTypeList: [],
      keyManFlag: '',
      keyword: '',
      policeStationOptions: []
    }
  },
@@ -161,6 +195,7 @@
      this.initTableList()
      this.getDictionaryListByCode()
    })
    this.getPoliceStationTree(1)
  },
  mounted () {
@@ -194,6 +229,67 @@
  },
  methods: {
    // 加载首页下拉列表数据
    getPoliceStationTree (type, id = '') {
      var that = this
      getPoliceStationTree(type, id).then(res => {
        if (type == 1) {
          this.policeStationOptions = res.data.data
          this.policeStationOptions.unshift({
            name: '全部',
            id: 1
          })
          this.initPoliceStationLayer()
        }
      })
    },
    // 加载面数据的方法
    initPoliceStationLayer () {
      const that = this
      cylinderLayer = new global.DC.PrimitiveLayer('cylinderLayer')
      global.viewer.addLayer(cylinderLayer)
      DataSourcesArray.forEach(item => {
        global.viewer.dataSources.remove(item, true)
      })
      this.policeStationOptions.forEach((item, index) => {
        if (item.position && item.position.length > 0) {
          item.position.forEach((sourceItem, sourceIndex) => {
            const Json = { ...JSON.parse(sourceItem) }
            global.DC.Namespace.Cesium.GeoJsonDataSource.load(Json, {
              stroke: positionColor[index],
              fill: positionColor[index], //注意:颜色必须大写,即不能为blue
              strokeWidth: 0,
              clampToGround: false
            }).then(function (dataSource) {
              let entities = dataSource.entities.values
              //修改entity样式
              for (let i = 0; i < entities.length; i++) {
                let entity = entities[i]
                entity.polyline = {
                  positions: entity.polygon.hierarchy._value.positions,
                  width: 4,
                  material: global.DC.Namespace.Cesium.Color.fromCssColorString('#19298d'),
                  clampToGround: true
                }
              }
              DataSourcesArray.push(dataSource)
              dataSource.show = true
              global.viewer.dataSources.add(dataSource)
            })
          })
        }
      })
    },
    selectTenantStatistic () {
      var that = this
      selectTenantStatistic({
@@ -485,6 +581,17 @@
  },
  destroyed () {
    DataSourcesArray.forEach(item => {
      global.viewer.dataSources.remove(item, true)
    })
    DataSourcesArray = []
    if (cylinderLayer != null) {
      cylinderLayer.remove()
      cylinderLayer = null
    }
    loading && loading.close()
    this.$parent.$parent.resize('0px')
src/views/scanOrCode/index.vue
@@ -108,8 +108,42 @@
<script>
import { initMapPosition } from '@/utils/mapPositionInit'
import { getAppOwerRenterRegistrantList, getAppOwerRenterRegistrantCohabitList, getAppRegisterInfoList, getAppEmploymentRegistrationList, getAddressManageList } from "@/api/scanOrCode/index.js"
import { getPoliceStationTree } from "@/api/home/index.js"
let loading = null
let cylinderLayer = null
let DataSourcesArray = []
let positionColor = [
  global.DC.Namespace.Cesium.Color.fromBytes(255, 97, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 142, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 192, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 58, 242, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(0, 185, 209, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(250, 84, 28, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(221, 255, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(51, 255, 0, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(97, 255, 181, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(58, 181, 252, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 129, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(58, 252, 236, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(97, 184, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 58, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(97, 113, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(81, 252, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(126, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(168, 252, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(171, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 249, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(210, 97, 255, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 174, 58, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 226, 97, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(255, 97, 176, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(58, 252, 155, 20),
  global.DC.Namespace.Cesium.Color.fromBytes(252, 58, 155, 20),
]
export default {
  inject: ['userInfo'],
@@ -155,6 +189,7 @@
          label: '扫码上报'
        }
      ],
      policeStationOptions: []
    }
  },
@@ -165,6 +200,8 @@
      initMapPosition()
      that.getList()
    })
    this.getPoliceStationTree(1)
  },
  mounted () {
@@ -202,6 +239,68 @@
  },
  methods: {
     // 加载首页下拉列表数据
    getPoliceStationTree (type, id = '') {
      var that = this
      getPoliceStationTree(type, id).then(res => {
        if (type == 1) {
          this.policeStationOptions = res.data.data
          this.policeStationOptions.unshift({
            name: '全部',
            id: 1
          })
          this.initPoliceStationLayer()
        }
      })
    },
      // 加载面数据的方法
    initPoliceStationLayer () {
      const that = this
      cylinderLayer = new global.DC.PrimitiveLayer('cylinderLayer')
      global.viewer.addLayer(cylinderLayer)
      DataSourcesArray.forEach(item => {
        global.viewer.dataSources.remove(item, true)
      })
      this.policeStationOptions.forEach((item, index) => {
        if (item.position && item.position.length > 0) {
          item.position.forEach((sourceItem, sourceIndex) => {
            const Json = { ...JSON.parse(sourceItem) }
            global.DC.Namespace.Cesium.GeoJsonDataSource.load(Json, {
              stroke: positionColor[index],
              fill: positionColor[index], //注意:颜色必须大写,即不能为blue
              strokeWidth: 0,
              clampToGround: false
            }).then(function (dataSource) {
              let entities = dataSource.entities.values
              //修改entity样式
              for (let i = 0; i < entities.length; i++) {
                let entity = entities[i]
                entity.polyline = {
                  positions: entity.polygon.hierarchy._value.positions,
                  width: 4,
                  material: global.DC.Namespace.Cesium.Color.fromCssColorString('#19298d'),
                  clampToGround: true
                }
              }
              DataSourcesArray.push(dataSource)
              dataSource.show = true
              global.viewer.dataSources.add(dataSource)
            })
          })
        }
      })
    },
    // 根据类型获取数据--暂时为测试数据
    getRowData (row) {
      let data = []
@@ -794,6 +893,17 @@
  },
  destroyed () {
    DataSourcesArray.forEach(item => {
      global.viewer.dataSources.remove(item, true)
    })
    DataSourcesArray = []
    if (cylinderLayer != null) {
      cylinderLayer.remove()
      cylinderLayer = null
    }
    loading && loading.close()
    window.removeEventListener('resize', this.setTableHeight)