shuishen
2025-10-24 0e8de0792efabb272fcb69a13aba634660d2ec28
feat:社区感知行政区划加载
1 files modified
148 ■■■■ changed files
src/views/house/index.vue 148 ●●●● patch | view | raw | blame | history
src/views/house/index.vue
@@ -182,7 +182,8 @@
                  <i v-show="buildingList.length > 10 && nextBtnShow" class="el-icon-caret-right"></i>
                </div>
              </div>
              <div class="build-info" v-show="!BuildListLoading && !buildingList.length" style="justify-content: center;">
              <div class="build-info" v-show="!BuildListLoading && !buildingList.length"
                style="justify-content: center;">
                暂无楼栋数据</div>
            </el-main>
            <div class="ridgepole-info" v-if="isShowHouseBox">
@@ -300,13 +301,13 @@
                        {{ unitChoosedArr[index * 5 - 5].sname }}{{ unitChoosedArr[index * 5
                          - 5].sname ==
                          unitChoosedArr[unitChoosedArr.length - 1].sname ? '' : '-' }}{{
    unitChoosedArr[index *
    5
    - 1] ? (unitChoosedArr[index * 5
      - 1].sname) : (unitChoosedArr[index * 5 - 5].sname ==
        unitChoosedArr[unitChoosedArr.length - 1].sname
        ? '' : unitChoosedArr[unitChoosedArr.length - 1].sname)
  }}层
                          unitChoosedArr[index *
                            5
                            - 1] ? (unitChoosedArr[index * 5
                              - 1].sname) : (unitChoosedArr[index * 5 - 5].sname ==
                                unitChoosedArr[unitChoosedArr.length - 1].sname
                                ? '' : unitChoosedArr[unitChoosedArr.length - 1].sname)
                        }}层
                      </div>
                    </div>
                  </div>
@@ -318,8 +319,8 @@
                  <div v-for="(item, index) in unitChoosedArr.slice((floorsType - 1) * 5, floorsType * 5)" :key="index">
                    <div class="title">{{ item.sname }}层:</div>
                    <div class="detail">
                      <div v-for="(value, index) in item.children_infos" :key="index" @click="residentDetailsClick(value)"
                        :class="{ on: floorChoosed == value.sname }">{{ value.sname
                      <div v-for="(value, index) in item.children_infos" :key="index"
                        @click="residentDetailsClick(value)" :class="{ on: floorChoosed == value.sname }">{{ value.sname
                        }}室
                        <div class="flow"
                          :class="[value.isBus == '1' ? 'red' : '', value.isBus == '2' ? 'grey' : '', value.isBus == '3' ? 'green' : '']">
@@ -352,8 +353,8 @@
            <el-table :data="parkingLotData" style="width: 100%"
              :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }"
              :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }" :row-class-name="tableRowClassName"
              @row-click="deepDataRowClick($event, 'park')" :empty-text="houseDeepNoDataText" v-loading="houseDeepLoading"
              element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
              @row-click="deepDataRowClick($event, 'park')" :empty-text="houseDeepNoDataText"
              v-loading="houseDeepLoading" element-loading-text="拼命加载中" element-loading-spinner="el-icon-loading"
              element-loading-background="rgba(0, 0, 0, 0.5)">
              <el-table-column prop="name" label="名称" width="180" :show-overflow-tooltip="true"></el-table-column>
              <el-table-column prop="x" label="经度" width="100"></el-table-column>
@@ -369,7 +370,8 @@
              @row-click="deepDataRowClick($event, 'business')" @sort-change="sortDevName"
              :empty-text="houseDeepNoDataText" v-loading="houseDeepLoading" element-loading-text="拼命加载中"
              element-loading-spinner="el-icon-loading" element-loading-background="rgba(0, 0, 0, 0.5)"
              :show-overflow-tooltip="true" @cell-mouse-enter="businessMouseEnter" @cell-mouse-leave="businessMouseLeave">
              :show-overflow-tooltip="true" @cell-mouse-enter="businessMouseEnter"
              @cell-mouse-leave="businessMouseLeave">
              <el-table-column sortable="custom" prop="placeName" label="场所名称"
                :show-overflow-tooltip="true"></el-table-column>
              <el-table-column prop="labelName" label="场所类型"></el-table-column>
@@ -555,7 +557,8 @@
        </div>
        <div v-if="hushiPeoTy == 8" class="pay-info-box">
          <scanCodeAlarm :residentIdSave="residentIdSave" :residentDetailsType="residentDetailsType" ref="scanCodeAlarm">
          <scanCodeAlarm :residentIdSave="residentIdSave" :residentDetailsType="residentDetailsType"
            ref="scanCodeAlarm">
          </scanCodeAlarm>
        </div>
@@ -815,8 +818,9 @@
          <el-table-column prop="areaName" label="所属责任区"></el-table-column>
        </el-table>
        <div class="pages all-pagination-sty" ref="tablePagination" v-show="!keyPeopleLoading">
          <el-pagination background layout="prev, pager, next" :page-size="peoplePage.pageSize" :total="peoplePage.total"
            :current-page="peoplePage.currentPage" @current-change="peopleHandleCurrentChange"></el-pagination>
          <el-pagination background layout="prev, pager, next" :page-size="peoplePage.pageSize"
            :total="peoplePage.total" :current-page="peoplePage.currentPage"
            @current-change="peopleHandleCurrentChange"></el-pagination>
        </div>
      </el-main>
    </el-dialog>
@@ -824,10 +828,42 @@
</template>
<script>
let cylinderLayer = null
let DataSourcesArray = []
let circleLayer = null
let timer = []
let JQSmychart = null
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 {
  getSearchExtensively,
@@ -847,6 +883,9 @@
  getPersonConnectionConditionByBuildingId,
  getBusinessList
} from "@/api/dept/index.js"
import { getPoliceStationTree } from "@/api/home/index.js"
import { getAlarmList, getAlarmStatistics } from "@/api/home/index.js"
import employees from "./components/employees"
@@ -1154,7 +1193,9 @@
          value: 3,
          isHover: true,
        },
      ]
      ],
      policeStationOptions: []
    }
  },
@@ -1214,6 +1255,8 @@
    }
    const that = this
    this.getPoliceStationTree(1)
    this.$EventBus.$on("housingPoliceSiteClick", (params) => {
      that.housingPoliceSiteClick(params)
@@ -2820,9 +2863,80 @@
      }
      return ["others", 999]
    },
    // 加载首页下拉列表数据
    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: true
            }).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: 2,
                  material: global.DC.Namespace.Cesium.Color.fromCssColorString('#ED7C2F')
                }
              }
              DataSourcesArray.push(dataSource)
              dataSource.show = true
              global.viewer.dataSources.add(dataSource)
            })
          })
        }
      })
    },
  },
  destroyed () {
    DataSourcesArray.forEach(item => {
      global.viewer.dataSources.remove(item, true)
    })
    DataSourcesArray = []
    if (cylinderLayer != null) {
      cylinderLayer.remove()
      cylinderLayer = null
    }
    this.$EventBus.$off("housingPoliceSiteClick")
    this.$EventBus.$off("showHouseingTileset")