| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:17 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-02-14 10:29:23 |
| | | * @LastEditTime: 2023-02-15 15:54:57 |
| | | * @FilePath: \srs-police-affairs\src\views\home\index.vue |
| | | * @Description: 小区-栋-层-房屋 |
| | | * |
| | |
| | | :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }" |
| | | :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75', 'cursor': 'pointer' }" |
| | | > |
| | | <el-table-column prop="realName" label="姓名"></el-table-column> |
| | | <el-table-column prop="address" label="地址"></el-table-column> |
| | | <el-table-column prop="phone" label="电话"></el-table-column> |
| | | <el-table-column prop="policeStationName" label="所属派出所"></el-table-column> |
| | | <el-table-column prop="areaName" label="所属责任区"></el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="realName" label="姓名"></el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="address" label="地址"></el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="phone" label="电话"></el-table-column> |
| | | <el-table-column |
| | | :show-overflow-tooltip="true" |
| | | prop="policeStationName" |
| | | label="所属派出所" |
| | | ></el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="areaName" label="所属责任区"></el-table-column> |
| | | </el-table> |
| | | |
| | | <div class="pages" ref="tablePagination"> |
| | |
| | | :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', 'borderColor': '#324e75' }" |
| | | :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75', 'cursor': 'pointer' }" |
| | | > |
| | | <el-table-column prop="zdryxl" label="重点人员类型"></el-table-column> |
| | | <el-table-column prop="realName" label="姓名"></el-table-column> |
| | | <el-table-column prop="address" label="地址"></el-table-column> |
| | | <el-table-column prop="phone" label="电话"></el-table-column> |
| | | <el-table-column prop="policeStationName" label="所属派出所"></el-table-column> |
| | | <el-table-column prop="areaName" label="所属责任区"></el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="zdryxl" label="重点人员类型"></el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="realName" label="姓名"></el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="address" label="地址"></el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="phone" label="电话"></el-table-column> |
| | | <el-table-column |
| | | :show-overflow-tooltip="true" |
| | | prop="policeStationName" |
| | | label="所属派出所" |
| | | ></el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="areaName" label="所属责任区"></el-table-column> |
| | | </el-table> |
| | | |
| | | <div class="pages" ref="tablePagination"> |
| | |
| | | :cell-style="{ 'text-align': 'center', 'borderColor': '#324e75' }" |
| | | :row-class-name="tableRowClassName" |
| | | > |
| | | <el-table-column type="index" :index="indexMethod" label="序号"></el-table-column> |
| | | <el-table-column prop="channelId" label="通道编号"></el-table-column> |
| | | <el-table-column prop="deviceId" label="设备编号"></el-table-column> |
| | | <el-table-column prop="name" label="设备名称"></el-table-column> |
| | | <el-table-column |
| | | :show-overflow-tooltip="true" |
| | | type="index" |
| | | :index="indexMethod" |
| | | label="序号" |
| | | ></el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="channelId" label="通道编号"></el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="deviceId" label="设备编号"></el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="name" label="设备名称"></el-table-column> |
| | | <el-table-column label="设备状态"> |
| | | <template slot-scope="scope"> |
| | | <span>{{ scope.row.status == 0 ? '离线' : '在线' }}</span> |
| | |
| | | <span>{{(landPage.currentPage - 1) * landPage.pageSize + scope.$index + 1}}</span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="name" label="责任区名称" v-if="this.landType == 1"></el-table-column> |
| | | <el-table-column prop="aoiName" label="小区名称" v-if="this.landType == 2"></el-table-column> |
| | | <el-table-column prop="policeName" label="负责人"></el-table-column> |
| | | <el-table-column prop="phone" label="联系电话"></el-table-column> |
| | | <el-table-column |
| | | :show-overflow-tooltip="true" |
| | | prop="name" |
| | | label="责任区名称" |
| | | v-if="this.landType == 1" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | :show-overflow-tooltip="true" |
| | | prop="aoiName" |
| | | label="小区名称" |
| | | v-if="this.landType == 2" |
| | | ></el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="policeName" label="负责人"></el-table-column> |
| | | <el-table-column :show-overflow-tooltip="true" prop="phone" label="联系电话"></el-table-column> |
| | | </el-table> |
| | | |
| | | <div class="pages" ref="tablePagination"> |
| | |
| | | <script> |
| | | let cylinderLayer = null |
| | | let circleLayer = null |
| | | let DataSourcesArray = [] |
| | | |
| | | let treeData = [ |
| | | { |
| | | label: '全部', |
| | |
| | | } |
| | | ] |
| | | let positionColor = [ |
| | | global.DC.Namespace.Cesium.Color.fromBytes(3, 255, 13, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(102, 176, 255, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(230, 162, 60, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(168, 45, 177, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(245, 108, 108, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(139, 195, 74, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(244, 67, 54, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(255, 127, 80, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(100, 149, 237, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(220, 20, 60, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(0, 0, 139, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(189, 183, 107, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(148, 0, 211, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(255, 20, 147, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(216, 191, 216, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(238, 130, 238, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(245, 222, 179, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(154, 205, 50, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(64, 224, 208, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(70, 130, 180, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(255, 99, 71, 100), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(3, 255, 13, 150), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(102, 176, 255, 150), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(230, 162, 60, 150), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(168, 45, 177, 150), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(245, 108, 108, 150), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(139, 195, 74, 150), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(244, 67, 54, 150), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(255, 127, 80, 150), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(100, 149, 237, 150), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(220, 20, 60, 150), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(0, 0, 139, 150), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(189, 183, 107, 150), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(148, 0, 211, 150), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(255, 20, 147, 150), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(216, 191, 216, 150), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(238, 130, 238, 150), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(245, 222, 179, 150), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(154, 205, 50, 150), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(64, 224, 208, 150), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(70, 130, 180, 150), |
| | | global.DC.Namespace.Cesium.Color.fromBytes(255, 99, 71, 150), |
| | | ] |
| | | let timer = [] |
| | | |
| | |
| | | this.policeStaionID = this.userInfo.dept_id |
| | | } |
| | | |
| | | |
| | | this.getPoliceStationTree(1) |
| | | |
| | | // setTimeout(() => { |
| | |
| | | name: '全部', |
| | | id: 1 |
| | | }) |
| | | |
| | | |
| | | if (this.userInfo.dept_id != '1123598813738675201') { |
| | | |
| | |
| | | |
| | | /** |
| | | * @description: 计算多个多边形面中心点 |
| | | * @param {Array} data 多个面的数据 |
| | | * @param {Array} params 多个面的数据 |
| | | * @return {Array} 多边形的中心点坐标 |
| | | */ |
| | | getRegionCenter (data) { |
| | | getRegionCenter (params) { |
| | | let arr = [] |
| | | |
| | | data.forEach(areaArray => { |
| | | let tempData = areaArray.slice(15, areaArray.length - 3) |
| | | |
| | | if (tempData.indexOf('),(') != -1) { |
| | | let tempPloyganList = tempData.split('),(') |
| | | |
| | | tempPloyganList.forEach((polygonStr) => { |
| | | |
| | | arr.push(this.getCurrentAreaCenter(polygonStr)) |
| | | |
| | | }) |
| | | |
| | | } else { |
| | | let polygonStr = tempData |
| | | |
| | | arr.push(this.getCurrentAreaCenter(polygonStr)) |
| | | } |
| | | |
| | | params.forEach(areaArray => { |
| | | JSON.parse(areaArray).coordinates.forEach(item => { |
| | | arr.push(this.$turf.centroid(this.$turf.polygon([item[0]])).geometry.coordinates) |
| | | }) |
| | | }) |
| | | |
| | | if (arr.length == 1) { |
| | |
| | | |
| | | return this.$turf.centroid(this.$turf.polygon([arr])).geometry.coordinates |
| | | } |
| | | |
| | | }, |
| | | |
| | | /** |
| | | * @description: 获取中心点 |
| | | * @param {*} polygonStr |
| | | * @return {*} |
| | | */ |
| | | getCurrentAreaCenter (polygonStr) { |
| | | |
| | | polygonStr = polygonStr.split(',') |
| | | |
| | | // 存储一个多边形的面数组 |
| | | let currentArea = polygonStr.reduce((pre, cur, index) => { |
| | | pre.push(cur.split(' ').map(i => Number(i))) |
| | | |
| | | return pre |
| | | }, []) |
| | | |
| | | return this.$turf.centroid(this.$turf.polygon([currentArea])).geometry.coordinates |
| | | |
| | | }, |
| | | |
| | |
| | | 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) => { |
| | | |
| | | item.position.forEach(it => { |
| | | let polygonData = this.multPolyganToList(it) // 把multipolygon处理成多个polygon |
| | | |
| | | if (polygonData.type == 'Array') { |
| | | polygonData.data.forEach(dataStr => { |
| | | this.$EventBus.$emit('layerPolygonAdd', { |
| | | layerName: 'polygonLayer', |
| | | positions: dataStr, |
| | | material: positionColor[index], |
| | | }) |
| | | }) |
| | | } else { |
| | | this.$EventBus.$emit('layerPolygonAdd', { |
| | | layerName: 'polygonLayer', |
| | | positions: polygonData.data, |
| | | material: positionColor[index], |
| | | }) |
| | | } |
| | | const Json = { ...JSON.parse(sourceItem) } |
| | | global.DC.Namespace.Cesium.GeoJsonDataSource.load(Json, { |
| | | stroke: positionColor[index], |
| | | fill: positionColor[index], //注意:颜色必须大写,即不能为blue |
| | | strokeWidth: 0, |
| | | }).then(function (dataSource) { |
| | | DataSourcesArray.push(dataSource) |
| | | global.viewer.dataSources.add(dataSource) |
| | | }) |
| | | |
| | | }) |
| | | |
| | |
| | | // }) |
| | | // cylinderLayer.addOverlay(cylinder) |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | const center = this.getAllRegionCenter(this.policeStationOptions) |
| | | |
| | |
| | | sitePitch: -45 |
| | | }) |
| | | |
| | | // this.houseChange(true) |
| | | this.houseChange(true) |
| | | }, |
| | | |
| | | initAreaOptionLayer (item) { |
| | | this.clearPolygonLayer() |
| | | item.position.forEach((it, index) => { |
| | | item.position.forEach((sourceItem, index) => { |
| | | |
| | | let polygonData = this.multPolyganToList(it) // 把multipolygon处理成多个polygon |
| | | |
| | | if (polygonData.type == 'Array') { |
| | | polygonData.data.forEach(dataStr => { |
| | | this.$EventBus.$emit('layerPolygonAdd', { |
| | | layerName: 'polygonLayer', |
| | | positions: dataStr, |
| | | material: positionColor[index], |
| | | }) |
| | | }) |
| | | } else { |
| | | this.$EventBus.$emit('layerPolygonAdd', { |
| | | layerName: 'polygonLayer', |
| | | positions: polygonData.data, |
| | | material: positionColor[index], |
| | | }) |
| | | } |
| | | |
| | | const Json = { ...JSON.parse(sourceItem) } |
| | | global.DC.Namespace.Cesium.GeoJsonDataSource.load(Json, { |
| | | stroke: positionColor[index], |
| | | fill: positionColor[index], //注意:颜色必须大写,即不能为blue |
| | | strokeWidth: 0, |
| | | }).then(function (dataSource) { |
| | | DataSourcesArray.push(dataSource) |
| | | global.viewer.dataSources.add(dataSource) |
| | | }) |
| | | }) |
| | | |
| | | const center = this.getRegionCenter(item.position) |
| | |
| | | }, |
| | | |
| | | clearPolygonLayer () { |
| | | DataSourcesArray.forEach(item => { |
| | | global.viewer.dataSources.remove(item, true) |
| | | }) |
| | | |
| | | DataSourcesArray = [] |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'polygonLayer', |
| | | type: 'VectorLayer' |
| | |
| | | }, |
| | | |
| | | destroyed () { |
| | | this.clearPolygonLayer() |
| | | |
| | | this.$store.commit('SET_DETAILSPOPUP', { |
| | | showBox: false, |
| | | showBtn: false |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'polygonLayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapRemoveLayer', { |