Merge branch 'master' of http://192.168.0.105:10010/r/srs-police-affairs
10 files modified
5 files added
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2023-02-21 14:16:56 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-02-21 16:27:46 |
| | | * @LastEditTime: 2023-02-22 11:23:04 |
| | | * @FilePath: \srs-police-affairs\public\static\config.js |
| | | * @Description: |
| | | * |
| | |
| | | VUE_APP_INTRANET_TILEURL: 'http://10.141.11.11:80/mxapi', |
| | | |
| | | // 后台管理跳转地址 |
| | | VUE_APP_OUTER_NET_HTURL: 'http://192.168.0.109:1888', |
| | | VUE_APP_INTRANET_HTURL: 'http://10.141.11.11:8081', |
| | | VUE_APP_OUTER_NET_HTURL: 'http://192.168.0.199:1888/', |
| | | VUE_APP_INTRANET_HTURL: 'http://10.141.11.11:8081/', |
| | | |
| | | // 栅格地图的 |
| | | VUE_APP_MAP_YX: 'http://10.141.11.11:80/ysapi', |
| | |
| | | * @param {*} id 数据唯一标识 |
| | | * @returns |
| | | */ |
| | | export const updateActivityCar = (id, carId, color, width) => { |
| | | export const updateActivityCar = (id, carId, color, width, type, position) => { |
| | | return request({ |
| | | url: `/api/securityManageCar/securityManageCar/update`, |
| | | method: 'post', |
| | |
| | | id, |
| | | carId, |
| | | color, |
| | | width |
| | | width, |
| | | type, |
| | | position |
| | | } |
| | | }) |
| | | } |
| New file |
| | |
| | | <template> |
| | | <div class="loading-container"> |
| | | <div class="loadingSeven"> |
| | | <span></span> |
| | | <span></span> |
| | | <span></span> |
| | | <span></span> |
| | | <span></span> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: 'videoLoading' |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | .loading-container { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .loadingSeven { |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .loadingSeven span { |
| | | margin: 0 2px; |
| | | width: 8px; |
| | | border-radius: 4px; |
| | | background: #ff0000; |
| | | animation: loadsaven 1.04s ease infinite; |
| | | } |
| | | |
| | | @keyframes loadsaven { |
| | | 0%, |
| | | 100% { |
| | | height: 20px; |
| | | background: #ff0000; |
| | | } |
| | | 50% { |
| | | height: 40px; |
| | | background: #ff6700; |
| | | } |
| | | } |
| | | |
| | | .loadingSeven span:nth-child(2) { |
| | | animation-delay: 0.13s; |
| | | } |
| | | .loadingSeven span:nth-child(3) { |
| | | animation-delay: 0.26s; |
| | | } |
| | | .loadingSeven span:nth-child(4) { |
| | | animation-delay: 0.39s; |
| | | } |
| | | .loadingSeven span:nth-child(5) { |
| | | animation-delay: 0.52s; |
| | | } |
| | | </style> |
| New file |
| | |
| | | <template> |
| | | <div></div> |
| | | </template> |
| | | |
| | | <script> |
| | | let viewer = undefined |
| | | |
| | | function generatePosition (num) { |
| | | var list = [] |
| | | for (var i = 0; i < num; i++) { |
| | | var lng = 120.38105869 + Math.random() * 0.5 |
| | | var lat = 31.10115627 + Math.random() * 0.5 |
| | | list.push(new global.DC.Position(lng, lat)) |
| | | } |
| | | return list |
| | | } |
| | | |
| | | function initViewer () { |
| | | viewer = new global.DC.Viewer('viewer-container') |
| | | let baselayer = global.DC.ImageryLayerFactory.createAmapImageryLayer() |
| | | viewer.addBaseLayer(baselayer) |
| | | let layer = new global.DC.ClusterLayer('layer') |
| | | |
| | | viewer.addLayer(layer) |
| | | let positions = generatePosition(10000) |
| | | positions.forEach(item => { |
| | | let billboard = new global.DC.Billboard(item, 'examples/images/icon/camera.png') |
| | | billboard.attrParams = { |
| | | name: '中国' + Math.random(), |
| | | alt: 2000 |
| | | } |
| | | layer.addOverlay(billboard) |
| | | }) |
| | | |
| | | viewer.on(global.DC.MouseEventType.CLICK, (e) => { |
| | | console.log(e) |
| | | |
| | | e.target.id.length > 0 && e.target.id.forEach(item => { |
| | | console.log(layer.getOverlay(item.overlayId), 'id99999999999') |
| | | }) |
| | | }) |
| | | viewer.flyTo(layer) |
| | | } |
| | | global.DC.ready(initViewer) |
| | | |
| | | export default { |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 17:00:30 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-02-21 16:27:22 |
| | | * @LastEditTime: 2023-02-22 15:46:15 |
| | | * @FilePath: \srs-police-affairs\src\components\map\index.vue |
| | | * @Description: 公用地图组件 |
| | | * |
| | |
| | | } |
| | | }) |
| | | |
| | | global.viewer.setPitchRange(-90, -45) |
| | | |
| | | // global.viewer.scene.globe.depthTestAgainstTerrain = false |
| | | |
| | | // 去除logo |
| | |
| | | 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.imageryLayers.addImageryProvider( |
| | | new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({ |
| | | url: '/sryx/{z}/{x}/{y}.png', |
| | | }) |
| | | ) |
| | | |
| | | global.viewer.imageryLayers.addImageryProvider( |
| | | new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({ |
| | | url: '/sryx/{z}/{x}/{y}.png', |
| | | }) |
| | | ) |
| | | // global.viewer.imageryLayers.addImageryProvider( |
| | | // new global.DC.Namespace.Cesium.UrlTemplateImageryProvider({ |
| | | // url: '/sryx/{z}/{x}/{y}.png', |
| | | // }) |
| | | // ) |
| | | |
| | | // 设置地图初始位置,角度等 |
| | | global.viewer.camera.setView({ |
| | |
| | | baseLayers != null && global.viewer.imageryLayers.remove(baseLayers) |
| | | baseLayers = global.viewer.imageryLayers.addImageryProvider( |
| | | new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({ |
| | | url: `${window.VUE_APP_MAP_YX}/geoserver/gwc/service/wmts`, |
| | | url: `${window.BASE_URL_CONFIG.VUE_APP_MAP_YX}/geoserver/gwc/service/wmts`, |
| | | layer: "test", |
| | | style: "", |
| | | format: "image/png", |
| | |
| | | baseLayers != null && global.viewer.imageryLayers.remove(baseLayers) |
| | | baseLayers = global.viewer.imageryLayers.addImageryProvider( |
| | | new global.DC.Namespace.Cesium.WebMapTileServiceImageryProvider({ |
| | | url: ` ${window.VUE_APP_MAP_SL}/MapTileService/wmts?STORETYPE=merged-dat&PROJECTION=4326`, |
| | | url: `${window.BASE_URL_CONFIG.VUE_APP_MAP_SL}/MapTileService/wmts?STORETYPE=merged-dat&PROJECTION=4326`, |
| | | layer: "wmts_4326_361100", |
| | | style: "default", |
| | | format: "image/png", |
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-09-07 09:34:58 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-02-20 09:52:16 |
| | | * @LastEditTime: 2023-02-22 11:58:46 |
| | | * @FilePath: \srs-police-affairs\src\main.js |
| | | * @Description: |
| | | * |
| | |
| | | import App from './App.vue' |
| | | import router from './router/page' |
| | | import store from './store' |
| | | import videoLoading from '@/components/loading' |
| | | |
| | | import { EventBus } from '@/eventBus/event-bus' |
| | | |
| | |
| | | Vue.prototype.$EventBus = EventBus |
| | | Vue.use(ElementUI) |
| | | Vue.use(VueAxios, axios) |
| | | Vue.use(videoLoading) |
| | | |
| | | new Vue({ |
| | | router, |
| | |
| | | const videoList = () => import('../../views/video/list.vue') |
| | | const videoRegion = () => import('../../views/video/region.vue') |
| | | const activity = () => import('../../views/activity/index.vue') |
| | | const policeInfor = () => import('../../views/policeInfor/index.vue') |
| | | |
| | | const login = () => import('../../views/login/index.vue') |
| | | |
| | | const routes = [ |
| | |
| | | component: house |
| | | }, |
| | | { |
| | | path: 'police', |
| | | path: 'policeresouce', |
| | | meta: { |
| | | title: '警力资源' |
| | | }, |
| | |
| | | title: '安保活动' |
| | | }, |
| | | component: activity |
| | | }, |
| | | { |
| | | path: 'policeinfor', |
| | | meta: { |
| | | title: '警情信息' |
| | | }, |
| | | component: policeInfor |
| | | } |
| | | |
| | | ] |
| | |
| | | content: "替"; |
| | | font-size: countSizeVh(16); |
| | | visibility: hidden; |
| | | } |
| | | |
| | | .el-icon-user-back { |
| | | background: url(/img/icon/user-back.png) center no-repeat; |
| | | background-size: countSizeVh(16) countSizeVh(16); |
| | | } |
| | | |
| | | .el-icon-user-back:before { |
| | | content: "替"; |
| | | font-size: countSizeVh(16); |
| | | visibility: hidden; |
| | | } |
| | | |
| | | .el-icon-user-quit { |
| | | background: url(/img/icon/user-quit.png) center no-repeat; |
| | | background-size: countSizeVh(16) countSizeVh(16); |
| | | } |
| | | |
| | | .el-icon-user-quit:before { |
| | | content: "替"; |
| | | font-size: countSizeVh(16); |
| | | visibility: hidden; |
| | | } |
| | |
| | | </div> |
| | | <div> |
| | | <el-button @click="watchVideo">查看视频</el-button> |
| | | <el-button @click="editLineInfo">编辑</el-button> |
| | | <el-button @click="saveLineInfo">保存</el-button> |
| | | <el-button @click="deleteLine">删除</el-button> |
| | | <el-button @click="lineEditVisible = false">取消</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | |
| | | let arrowsListLayer = null |
| | | let plot = undefined |
| | | let arrowPlot = undefined |
| | | let lineLayer = undefined |
| | | let tc = undefined |
| | | let track = undefined |
| | | let loading = null |
| | |
| | | searchPoliceTreeId: '', |
| | | searchTreeShowFlag: false, |
| | | plotOverlayData: null, |
| | | lineObjdata: null, |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | if (arrowsListLayer == null) { |
| | | arrowsListLayer = new global.DC.VectorLayer('arrowsListLayer') |
| | | global.viewer.addLayer(arrowsListLayer) |
| | | } |
| | | |
| | | if (lineLayer == null) { |
| | | lineLayer = new global.DC.VectorLayer('lineLayer') |
| | | global.viewer.addLayer(lineLayer) |
| | | } |
| | | |
| | | if (polylineAreaLayer == null) { |
| | |
| | | layerName: 'newCarDrawLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | polylineAreaLayer.clear() |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'newCarDrawLineLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | if (polylineAreaLayer != null) { |
| | | polylineAreaLayer.clear() |
| | | } |
| | | if (lineLayer != null) { |
| | | lineLayer.clear() |
| | | } |
| | | |
| | | getSecurityCarList(securityId).then(res => { |
| | | this.isHavePoliceCar = res.data.data.some(item => { |
| | | return item.type == 3 |
| | |
| | | position += item._lng + ',' + item._lat + ';' |
| | | }) |
| | | item.polygonPositionStr = position |
| | | this.$EventBus.$emit('layerPolygonAdd', { |
| | | layerName: 'newCarDrawLayers', |
| | | positions: position, |
| | | material: color, |
| | | params: item, |
| | | incident: this.lineOverlayTypeClick |
| | | }) |
| | | |
| | | // polylineAreaLayer.show = false |
| | | let positionStr = '' |
| | | coords.forEach(item => { |
| | | positionStr += item[0] + ',' + item[1] + ';' |
| | | }) |
| | | // this.getRegionList(positionStr) |
| | | this.$EventBus.$emit('layerPolylineAdd', { |
| | | layerName: 'newCarDrawLayers', |
| | | positions: positionNewArr, |
| | | material: global.DC.Color.RED.withAlpha(0.8), |
| | | width: 3, |
| | | let lineObj = new global.DC.Polyline(positionNewArr) |
| | | lineLayer.addOverlay(lineObj) |
| | | lineObj.setStyle({ |
| | | 'material': global.DC.Color.RED.withAlpha(0.8), |
| | | 'width': 3 |
| | | }) |
| | | item.lineObj = lineObj |
| | | // this.$EventBus.$emit('layerPolylineAdd', { |
| | | // layerName: 'newCarDrawLayers', |
| | | // positions: positionNewArr, |
| | | // material: global.DC.Color.RED.withAlpha(0.8), |
| | | // width: 3, |
| | | // params: item, |
| | | // }) |
| | | this.$EventBus.$emit('layerPolygonAdd', { |
| | | layerName: 'newCarDrawLineLayers', |
| | | positions: position, |
| | | material: color, |
| | | params: item, |
| | | incident: this.lineOverlayTypeClick |
| | | }) |
| | | } else if (item.type == 2) { |
| | | let positionNewArr = this.convertPolylineOrPolygonPositionDate(item.position, item.type) |
| | |
| | | }, |
| | | |
| | | // 修改活动警车 |
| | | updateActivityCar (id, carId, color, width) { |
| | | updateActivityCar(id, carId, color, width).then(res => { |
| | | updateActivityCar (id, carId, color, width, type, position) { |
| | | updateActivityCar(id, carId, color, width, type, position).then(res => { |
| | | if (res.data.success) { |
| | | this.$message({ |
| | | message: '保存成功', |
| | |
| | | this.addCarAndRange(this.policeType, position, this.showingSecurityId, type) |
| | | } else if (this.policeChooseVisible == true) { |
| | | this.policeChooseVisible = false |
| | | |
| | | this.addActivityPolice(this.searchPoliceTreeId, position, this.showingSecurityId, type) |
| | | } |
| | | this.policeIconIsCreated = false |
| | |
| | | } |
| | | }, |
| | | |
| | | // 巡逻路线面点击事件 |
| | | lineOverlayTypeClick (e) { |
| | | this.videoShow = false |
| | | this.lineWidth = e.overlay.attrParams.width != -1 ? e.overlay.attrParams.width : 100 |
| | | this.chooseColor = e.overlay.attrParams.color != '' ? e.overlay.attrParams.color : '#FF0000' |
| | | this.policeIconId = e.overlay.attrParams.id |
| | | this.linePosition = e.overlay.attrParams.linePositionStr |
| | | this.lineObjdata = e.overlay.attrParams.lineObj |
| | | this.polygonPosition = e.overlay.attrParams.polygonPositionStr |
| | | if (this.userInfo.dept_id == '1123598813738675201' || this.userInfo.dept_id == this.activityDeptId) { |
| | | this.lineEditVisible = true |
| | |
| | | let g = parseInt(item.color.slice(3, 5), 16) |
| | | let b = parseInt(item.color.slice(5, 7), 16) |
| | | color = global.DC.Namespace.Cesium.Color.fromBytes(r, g, b, 150) |
| | | } |
| | | if (item.id == 202) { |
| | | console.log('item', item) |
| | | } |
| | | chooseArrow.attrParams = { 'id': item.id, 'color': item.color } |
| | | arrowsListLayer.addOverlay(chooseArrow) |
| | |
| | | |
| | | // 保存巡逻路线信息 |
| | | saveLineInfo () { |
| | | this.updateActivityCar(this.policeIconId, 2, this.chooseColor, this.lineWidth) |
| | | this.updateActivityCar(this.policeIconId, '', this.chooseColor, this.lineWidth) |
| | | this.lineEditVisible = false |
| | | }, |
| | | |
| | | // 修改巡逻路线位置信息 |
| | | editLineInfo () { |
| | | this.lineEditVisible = false |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'newCarDrawLineLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | let overlayData = this.lineObjdata |
| | | plot.edit(overlayData, (e) => { |
| | | let position = '' |
| | | overlayData._positions.forEach(item => { |
| | | position += item._lng + ' ' + item._lat + ',' |
| | | }) |
| | | position = position.slice(0, position.length - 1) |
| | | lineLayer.addOverlay(overlayData) |
| | | this.updateActivityCar(this.policeIconId, '', this.chooseColor, this.lineWidth, 1, position) |
| | | }) |
| | | }, |
| | | |
| | | // 点击区域 |
| | |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'newCarDrawLineLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'searchLayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | |
| | | |
| | | analyseLayer.clear() |
| | | arrowsListLayer.clear() |
| | | lineLayer.clear() |
| | | |
| | | this.removeAll() |
| | | this.removeAllArrow() |
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:17 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-02-21 16:52:21 |
| | | * @LastEditTime: 2023-02-22 11:34:22 |
| | | * @FilePath: \srs-police-affairs\src\views\home\index.vue |
| | | * @Description: 小区-栋-层-房屋 |
| | | * |
| | |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | }) |
| | | }, |
| | | |
| | |
| | | }, |
| | | |
| | | destroyed () { |
| | | this.destroyFlag = false |
| | | |
| | | this.clearPolygonLayer() |
| | | |
| | | // cylinderLayer != null && cylinderLayer != undefined && cylinderLayer != '' && cylinderLayer.remove() |
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:17 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-02-20 10:40:21 |
| | | * @LastEditTime: 2023-02-22 15:12:21 |
| | | * @FilePath: \srs-police-affairs\src\views\house\index.vue |
| | | * @Description: 小区-栋-层-房屋 |
| | | * |
| | |
| | | }, |
| | | |
| | | buildingClick (item, aoiArr) { |
| | | console.log(item, 456) |
| | | this.unitHouseChoosed = [] |
| | | this.pictLoading = true |
| | | if (!aoiArr) { |
| | | this.$EventBus.$emit('clearHouse3D') |
| | | this.$EventBus.$emit('toPosition', item) |
| | | this.$EventBus.$emit('toPosition', { |
| | | ...item, |
| | | siteJd: Number(item.siteJd), |
| | | siteWd: Number(item.siteWd) - 0.0021, |
| | | siteGd: 240, |
| | | sitePitch: -45 |
| | | }) |
| | | } |
| | | this.buildingChoosed = item |
| | | this.floorInfo.elev = item.elev |
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:24 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-02-20 16:11:36 |
| | | * @LastEditTime: 2023-02-22 13:43:08 |
| | | * @FilePath: \srs-police-affairs\src\views\layout\index.vue |
| | | * @Description: |
| | | * |
| | |
| | | <div class="triangle"></div> |
| | | <div class="userName">用户名:{{ currentUserInfo.user_name }}</div> |
| | | <div class="userBtn"> |
| | | <div class="back-system" v-if="userBackSystem" @click="goToBack"> |
| | | <i class="el-icon-user-back"></i> |
| | | 运维管理 |
| | | </div> |
| | | <div class="edit" @click="goTOLogout"> |
| | | <img src="../../../public/img/bg/editLogin.webp" alt /> |
| | | <i class="el-icon-user-quit"></i> |
| | | 退出登录 |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | }, |
| | | { |
| | | menuName: '警力资源', |
| | | path: '/layout/police' |
| | | path: '/layout/policeresouce' |
| | | |
| | | } |
| | | ], |
| | |
| | | { |
| | | menuName: '安保活动', |
| | | path: '/layout/activity' |
| | | }, |
| | | { |
| | | menuName: '警情信息', |
| | | path: '/layout/policeinfor' |
| | | } |
| | | ], |
| | | |
| | |
| | | //刷新token锁 |
| | | refreshLock: false, |
| | | //刷新token的时间 |
| | | refreshTime: "" |
| | | refreshTime: "", |
| | | |
| | | userBackSystem: false, |
| | | } |
| | | }, |
| | | |
| | |
| | | this.init() |
| | | |
| | | if (JSON.parse(getUserInfo()).dept_id == '1123598813738675201') { |
| | | this.menuRightList.push({ |
| | | menuName: '运维管理', |
| | | openExternal: true, |
| | | path: HTUrl |
| | | }) |
| | | this.userBackSystem = true |
| | | } |
| | | |
| | | //实时检测刷新token |
| | |
| | | this.$router.push({ path: "/login" }) |
| | | }) |
| | | }, |
| | | |
| | | /** |
| | | * @description: 跳转运维管理平台 |
| | | * @return {*} |
| | | */ |
| | | goToBack () { |
| | | var path = HTUrl + "?token=" + getToken() |
| | | window.open(path) |
| | | }, |
| | | /** |
| | | * @description: 路由跳转的事件 |
| | | * 通过给父元素绑定事件-子元素触发,并传入参数 |
| | |
| | | * @return {*} 没有返回值 |
| | | */ |
| | | goToPath (params) { |
| | | if (params.openExternal) { |
| | | // 跳过登录方式 |
| | | var path = params.path + "?token=" + getToken() |
| | | //账户名密码模拟登录方式 |
| | | // var path = params.path + '?securitySupervisionSystem={"tokenMY":"987654321S","data":{"rese":"admin","sap":"admin","dip":"000000"}}' |
| | | // console.log(path,5555) |
| | | window.open(path) |
| | | return |
| | | } |
| | | |
| | | if (params.children && params.children.length > 0) return |
| | | |
| | | if (params.path) { |
| | |
| | | } |
| | | |
| | | .userDetail { |
| | | width: 180px; |
| | | height: 92px; |
| | | width: 160px; |
| | | position: absolute; |
| | | top: 64px; |
| | | right: 4px; |
| | |
| | | } |
| | | |
| | | .userName { |
| | | margin-top: 4px; |
| | | width: 100%; |
| | | height: 40px; |
| | | height: 32px; |
| | | line-height: 32px; |
| | | font-size: 14px; |
| | | font-weight: 500; |
| | | box-sizing: content-box; |
| | | color: #fff; |
| | | line-height: 40px; |
| | | border-bottom: 1px solid rgba(255, 255, 255, 0.5); |
| | | position: absolute; |
| | | top: 0px; |
| | | } |
| | | |
| | | .userBtn { |
| | | margin-bottom: 4px; |
| | | width: 100%; |
| | | height: 50px; |
| | | position: absolute; |
| | | bottom: 0px; |
| | | display: flex; |
| | | justify-content: space-around; |
| | | padding-top: 4px; |
| | | flex-direction: column; |
| | | align-items: center; |
| | | font-size: 16px; |
| | | font-weight: normal; |
| | | |
| | | & > div { |
| | | margin-top: 4px; |
| | | width: 100px; |
| | | height: 40px; |
| | | background-color: rgba(168, 222, 255, 0.6); |
| | | height: 32px; |
| | | line-height: 32px; |
| | | background-color: rgba(159, 165, 255, 0.6); |
| | | border-radius: 4px; |
| | | cursor: pointer; |
| | | line-height: 44px; |
| | | |
| | | img { |
| | | width: 76px; |
| | | height: 20px; |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | <!-- |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:17 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-02-21 16:54:24 |
| | | * @FilePath: \srs-police-affairs\src\views\police\index.vue |
| | | * @Description: 辖区管理 |
| | | * |
| | | * Copyright (c) 2022 by shuishen 1109946754@qq.com, All Rights Reserved. |
| | | --> |
| | | |
| | | <template> |
| | | <div class="police-page container"> |
| | | <div v-show="boxShow" class="container-content"> |
| | | <div class="switch-box" v-show="!detailFlag"> |
| | | 资源类别: |
| | | <el-select |
| | | v-model="typeValue" |
| | | @change="navClick" |
| | | placeholder="请选择" |
| | | class="type-select-css" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | class="option-css" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | |
| | | <div class="list-show" v-if="!detailFlag"> |
| | | <div class="search-box"> |
| | | 资源名称: |
| | | <input |
| | | v-model="searchValue" |
| | | @input="searchChange" |
| | | type="text" |
| | | placeholder="请输入…" |
| | | /> |
| | | </div> |
| | | |
| | | <div class="list" ref="tableBox"> |
| | | <el-table |
| | | :data="equimentTableData" |
| | | :header-cell-style="{ 'text-align': 'center', 'background-color': '#203c60', borderColor: '#324e75' }" |
| | | :cell-style="{ 'text-align': 'center', borderColor: '#324e75', cursor: 'pointer' }" |
| | | :height="currentTableHeight" |
| | | > |
| | | <el-table-column |
| | | prop="newName" |
| | | :show-overflow-tooltip="true" |
| | | label="名称" |
| | | :min-width="typeValue == 0 ? '56%' : '68%'" |
| | | ></el-table-column> |
| | | <el-table-column |
| | | prop="status" |
| | | label="状态" |
| | | :min-width="typeValue == 0 ? '14%' : '14%'" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <div class="state-box" :class="{ online: scope.row.status == '1' }"></div> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="操作" |
| | | align="center" |
| | | :min-width="typeValue == 0 ? '30%' : '18%'" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | @click="rowClick(scope.row)" |
| | | type="text" |
| | | size="small" |
| | | title="定位" |
| | | > |
| | | <i class="el-icon-location"></i> |
| | | </el-button> |
| | | <el-button |
| | | v-show="navType == 0" |
| | | @click="equipmentTrack(scope.row)" |
| | | type="text" |
| | | size="small" |
| | | title="轨迹" |
| | | > |
| | | <i class="el-icon-position"></i> |
| | | </el-button> |
| | | <el-button |
| | | @click="play(scope.row)" |
| | | type="text" |
| | | size="small" |
| | | title="播放视频" |
| | | > |
| | | <i class="el-icon-video-play"></i> |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <div class="pages" ref="tablePagination"> |
| | | <el-pagination |
| | | background |
| | | layout="prev, pager, next" |
| | | :page-size="equimentPage.pageSize" |
| | | :page-count="equimentPage.count" |
| | | :pager-count="4" |
| | | :current-page="equimentPage.currentPage" |
| | | @current-change="handleCurrentChange" |
| | | ></el-pagination> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="track-box" v-show="detailFlag"> |
| | | <div class="track-box-info"> |
| | | <div class="back-btn" @click="goBack" title="轨迹">详细资料及轨迹查询</div> |
| | | <ul> |
| | | <li> |
| | | <div>通道编号:</div> |
| | | <div>{{ currentSelectEquipment.channelId ? currentSelectEquipment.channelId : '' }}</div> |
| | | </li> |
| | | |
| | | <li> |
| | | <div>设备编号:</div> |
| | | <div>{{ currentSelectEquipment.deviceId ? currentSelectEquipment.deviceId : '' }}</div> |
| | | </li> |
| | | |
| | | <li> |
| | | <div>通道名称:</div> |
| | | <div>{{ currentSelectEquipment.name ? currentSelectEquipment.name : '' }}</div> |
| | | </li> |
| | | |
| | | <li> |
| | | <div>状态:</div> |
| | | <div> |
| | | {{ |
| | | currentSelectEquipment.status ? (currentSelectEquipment.status == 0 ? '离线' : '在线') : |
| | | '' |
| | | }} |
| | | </div> |
| | | </li> |
| | | |
| | | <li> |
| | | <div>选择时间:</div> |
| | | <div class="datetime"> |
| | | <el-date-picker |
| | | v-model="trackTime" |
| | | type="daterange" |
| | | unlink-panels |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | size="mini" |
| | | :editable="false" |
| | | end-placeholder="结束日期" |
| | | ></el-date-picker> |
| | | </div> |
| | | </li> |
| | | |
| | | <li> |
| | | <el-button type="text" @click="lookTrack">查看轨迹</el-button> |
| | | </li> |
| | | </ul> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="search-content"> |
| | | <input |
| | | v-model="searchExtensivelyValue" |
| | | @input="searchExtensivelyChange" |
| | | @focus="searchExtensivelyFocus" |
| | | type="text" |
| | | placeholder="请输入搜索条件" |
| | | /> |
| | | <div class="clear" v-show="isShowClearBtn" @click="clearSearchValue" title="清空"> |
| | | <img src="../../../public/img/icon/clear.png" alt /> |
| | | </div> |
| | | <button @click="searchExtensivelyClick" class="el-icon-search"></button> |
| | | </div> |
| | | |
| | | <div v-show="searchExtensivelyValBoxShow" class="searchExtensively-val-box"> |
| | | <div> |
| | | <div |
| | | @click="searchExtensivelyVlaClick(item)" |
| | | v-for="(item, index) in searchExtensivelyArray" |
| | | :key="index" |
| | | >{{ item.name }}</div> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-dialog |
| | | :title="dialogTitle" |
| | | :modal="false" |
| | | :visible.sync="dialogVisible" |
| | | :before-close="dialogBeforeClose" |
| | | :close-on-click-modal="true" |
| | | class="car-video-box" |
| | | > |
| | | <video |
| | | autoplay |
| | | controls |
| | | width="100%" |
| | | height="100%" |
| | | ref="videoElement" |
| | | id="videoElement" |
| | | style="object-fit: fill" |
| | | ></video> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getHistoricalTrack } from '@/api/police/index.js' |
| | | import { getSearchExtensively } from '@/api/dept/index.js' |
| | | import { getDevices } from '@/api/video/index.js' |
| | | import flvjs from 'flv.js' |
| | | import { getEquipmentPaging } from '@/api/home/index.js' |
| | | |
| | | let tc = null |
| | | let track = null |
| | | |
| | | export default { |
| | | inject: ['userInfo'], |
| | | |
| | | data () { |
| | | return { |
| | | navType: 0, |
| | | dialogTitle: '', |
| | | dialogVisible: false, |
| | | searchValue: '', |
| | | currentTableHeight: 0, |
| | | detailFlag: false, |
| | | trackTime: [], |
| | | options: [ |
| | | { |
| | | value: '0', |
| | | label: '警车' |
| | | }, |
| | | { |
| | | value: '1', |
| | | label: '摄像头' |
| | | } |
| | | // , { |
| | | // value: '3', |
| | | // label: '电台' |
| | | // }, { |
| | | // value: '4', |
| | | // label: '执法记录仪' |
| | | // } |
| | | ], |
| | | typeValue: '0', |
| | | boxShow: true, |
| | | searchExtensivelyValue: '', |
| | | searchExtensivelyValBoxShow: false, |
| | | searchExtensivelyArray: [], |
| | | flvPlayer: null, |
| | | |
| | | equimentTableData: [], |
| | | equimentPage: { |
| | | total: 0, |
| | | pageSize: 25, |
| | | count: 0, |
| | | currentPage: 1 |
| | | }, |
| | | |
| | | currentSelectEquipment: {} |
| | | } |
| | | }, |
| | | created () { |
| | | window.addEventListener('resize', this.setTableHeight) |
| | | }, |
| | | mounted () { |
| | | this.$parent.$parent.resize('400px', true) |
| | | |
| | | this.navClick() |
| | | |
| | | tc = new global.DC.TrackController(global.viewer) |
| | | |
| | | this.$nextTick(() => { |
| | | this.setTableHeight() |
| | | }) |
| | | }, |
| | | methods: { |
| | | // 搜索框改变事件 |
| | | searchChange () { |
| | | this.detailFlag = false |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'polylineLayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.equimentPage.currentPage = 1 |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'carLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'policeMonitoringLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.getEquipmentPaging({ type: this.navType }) |
| | | }, |
| | | // 设备分页处理 |
| | | handleCurrentChange (currentPage) { |
| | | this.equimentPage.currentPage = currentPage |
| | | |
| | | this.getEquipmentPaging({ type: this.navType }) |
| | | }, |
| | | |
| | | // 获取设备分页数据 |
| | | getEquipmentPaging (params) { |
| | | getEquipmentPaging({ page: this.equimentPage.currentPage, count: this.equimentPage.pageSize, ...params, query: this.searchValue, dwbh: this.userInfo.dept_id }).then(res => { |
| | | this.equimentTableData = [] |
| | | this.equimentPage.count = 0 |
| | | |
| | | if (res.data.data.list.length > 0) { |
| | | this.equimentTableData = res.data.data.list.map(item => { |
| | | let newName = '' |
| | | if (params.type == 0) { |
| | | newName = item.name.replace('上饶-', '') |
| | | } else { |
| | | if (item.name.charAt(7) == '-') { |
| | | newName = item.name.slice(8) |
| | | } else { |
| | | newName = item.name.slice(7) |
| | | } |
| | | } |
| | | |
| | | return { ...item, newName: newName, lng: item.longitude, lat: item.latitude, alt: 100 } |
| | | }) |
| | | |
| | | this.equimentTableData.forEach(item => { |
| | | if (this.navType == 0) { |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'carLayers', |
| | | type: 'billboard', |
| | | params: { |
| | | ...item, |
| | | url: '/img/icon/car.png' |
| | | }, |
| | | incident: this.siteClick |
| | | }) |
| | | } else if (this.navType == 1) { |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'policeMonitoringLayers', |
| | | type: 'billboard', |
| | | params: { |
| | | ...item, |
| | | url: '/img/icon/camera.png' |
| | | }, |
| | | incident: this.siteClick |
| | | }) |
| | | } |
| | | }) |
| | | |
| | | this.equimentPage.count = res.data.data.pages |
| | | } else { |
| | | this.equimentTableData = [] |
| | | |
| | | this.equimentPage.total = 0 |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // 类别切换 |
| | | navClick (type) { |
| | | if (type && type == this.navType) return |
| | | this.detailFlag = false |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'polylineLayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | if (type) { |
| | | this.navType = type |
| | | } |
| | | |
| | | this.searchValue = '' |
| | | |
| | | this.equimentPage.currentPage = 1 |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'carLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'policeMonitoringLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.getEquipmentPaging({ type: this.navType }) |
| | | }, |
| | | |
| | | // 表格行点击查看定位 |
| | | rowClick (row) { |
| | | if (row.lng == 0 || row.lat == 0) { |
| | | this.$message.error('暂无位置信息!') |
| | | |
| | | return |
| | | } |
| | | this.$EventBus.$emit('toPosition', { |
| | | layerName: 'carLayers', |
| | | siteJd: row.lng, |
| | | siteWd: row.lat |
| | | }) |
| | | }, |
| | | |
| | | // 表格行点击查看轨迹 |
| | | equipmentTrack (row) { |
| | | this.detailFlag = true |
| | | |
| | | this.currentSelectEquipment = row |
| | | }, |
| | | |
| | | async play (row) { |
| | | if (this.flvPlayer != null) { |
| | | this.flvPlayer.pause() |
| | | this.flvPlayer.unload() |
| | | this.flvPlayer.detachMediaElement() |
| | | this.flvPlayer.destroy() |
| | | this.flvPlayer = null |
| | | } |
| | | |
| | | this.dialogTitle = row.name |
| | | let flvUrl = '' |
| | | |
| | | await this.getDevices(row.channelId).then(res => { |
| | | flvUrl = res |
| | | }) |
| | | |
| | | if (typeof flvUrl === 'object') { |
| | | this.$message.error(flvUrl.msg) |
| | | |
| | | return |
| | | } |
| | | |
| | | this.dialogVisible = true |
| | | |
| | | if (flvjs.isSupported()) { |
| | | this.$nextTick(() => { |
| | | var videoElement = document.getElementById('videoElement') |
| | | this.flvPlayer = flvjs.createPlayer({ |
| | | type: 'flv', |
| | | isLive: true, |
| | | hasAudio: false, |
| | | url: flvUrl |
| | | }) |
| | | this.flvPlayer.attachMediaElement(videoElement) |
| | | this.flvPlayer.load() |
| | | this.flvPlayer.play() |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | async getDevices (channelId) { |
| | | let flvAddress = '' |
| | | await getDevices(channelId).then(res => { |
| | | if ('data' in res.data) { |
| | | flvAddress = res.data.data.flv |
| | | } else { |
| | | flvAddress = res.data |
| | | } |
| | | }) |
| | | return flvAddress |
| | | }, |
| | | |
| | | siteClick (e) { |
| | | this.play(e.overlay.attrParams) |
| | | }, |
| | | |
| | | dialogBeforeClose () { |
| | | this.$refs.videoElement.pause() |
| | | this.dialogVisible = false |
| | | }, |
| | | |
| | | // 轨迹返回 |
| | | goBack () { |
| | | this.detailFlag = !this.detailFlag |
| | | this.trackTime = [] |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'polylineLayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | tc.pause() |
| | | |
| | | tc.removeTrack(track) |
| | | }, |
| | | |
| | | // 查看轨迹 |
| | | async lookTrack () { |
| | | global.viewer.scene.globe.depthTestAgainstTerrain = false |
| | | |
| | | if (this.trackTime.length == 0) { |
| | | this.$message({ message: '请选择开始时间', duration: 2000 }) |
| | | return |
| | | } |
| | | const startTime = new Date(this.trackTime[0]) |
| | | const start = startTime.getFullYear() + '-' + this.disposeTime(startTime.getMonth() + 1) + '-' + this.disposeTime(startTime.getDate()) + ' ' + this.disposeTime(startTime.getHours()) + ':' + this.disposeTime(startTime.getMinutes()) + ':' + this.disposeTime(startTime.getSeconds()) |
| | | if (this.trackTime.length == 1) { |
| | | this.$message({ message: '请选择结束时间', duration: 2000 }) |
| | | return |
| | | } |
| | | const endTime = new Date(this.trackTime[1]) |
| | | const end = endTime.getFullYear() + '-' + this.disposeTime(endTime.getMonth() + 1) + '-' + this.disposeTime(endTime.getDate()) + ' ' + this.disposeTime(endTime.getHours()) + ':' + this.disposeTime(endTime.getMinutes()) + ':' + this.disposeTime(endTime.getSeconds()) |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'polylineLayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | let positionsArr = [] |
| | | await this.getHistoricalTrack({ start: start, end: end, channelId: this.currentSelectEquipment.channelId }).then(res => { |
| | | positionsArr = res |
| | | }) |
| | | |
| | | if (positionsArr.length == 0) { |
| | | this.$message({ |
| | | message: '该设备暂无轨迹数据', |
| | | type: 'warning' |
| | | }) |
| | | |
| | | return |
| | | } |
| | | |
| | | let positionStr = '' |
| | | positionsArr.forEach(item => { |
| | | positionStr = positionStr + item.longitude + ',' + item.latitude + ';' |
| | | }) |
| | | |
| | | this.$EventBus.$emit('layerPolylineAdd', { |
| | | layerName: 'polylineLayer', |
| | | positions: positionStr, |
| | | material: new global.DC.PolylineImageTrailMaterialProperty({ |
| | | color: global.DC.Color.GREEN, |
| | | speed: 10, |
| | | image: '/img/icon/arrow.png', |
| | | repeat: { x: 10, y: 1 } |
| | | }), |
| | | width: 6 |
| | | }) |
| | | |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'polylineLayer', |
| | | type: 'billboard', |
| | | params: { |
| | | lng: positionsArr[0].longitude, |
| | | lat: positionsArr[0].latitude, |
| | | alt: 0, |
| | | url: '/img/icon/orgin.png' |
| | | } |
| | | }) |
| | | |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'polylineLayer', |
| | | type: 'billboard', |
| | | params: { |
| | | lng: positionsArr[positionsArr.length - 1].longitude, |
| | | lat: positionsArr[positionsArr.length - 1].latitude, |
| | | alt: 0, |
| | | url: '/img/icon/end.png' |
| | | } |
| | | }) |
| | | |
| | | track = new global.DC.Track(positionStr, 5000) |
| | | |
| | | track.setModel('/model/qiche.gltf', { |
| | | scale: 1 |
| | | }) |
| | | |
| | | tc.addTrack(track) |
| | | |
| | | this.$EventBus.$emit('toPosition', { |
| | | siteJd: 114.928669, |
| | | siteWd: 25.850383, |
| | | siteGd: 500, |
| | | siteHeading: 0, |
| | | sitePitch: -90 |
| | | }) |
| | | |
| | | tc.play() |
| | | }, |
| | | |
| | | // 处理时间补零操作 |
| | | disposeTime (s) { |
| | | return s < 10 ? '0' + s : s |
| | | }, |
| | | |
| | | setTableHeight () { |
| | | this.currentTableHeight = this.$refs.tableBox.offsetHeight - this.$refs.tablePagination.offsetHeight |
| | | }, |
| | | |
| | | // 大小重置 |
| | | boxResize (val) { |
| | | this.boxShow = val |
| | | }, |
| | | |
| | | async getHistoricalTrack (params) { |
| | | let positionArr = [] |
| | | |
| | | await getHistoricalTrack(params).then(res => { |
| | | positionArr = res.data.data |
| | | }) |
| | | return positionArr |
| | | }, |
| | | |
| | | // 大搜 |
| | | getSearchExtensively (ak, region, query) { |
| | | getSearchExtensively(ak, region, query).then(res => { |
| | | this.searchExtensivelyArray = res.data.result |
| | | }) |
| | | }, |
| | | |
| | | searchExtensivelyClick () { |
| | | this.getSearchExtensively('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', this.searchExtensivelyValue) |
| | | this.searchExtensivelyValBoxShow = false |
| | | if (this.searchExtensivelyArray.length > 0) { |
| | | this.$EventBus.$emit('toPosition', { |
| | | siteJd: `${this.searchExtensivelyArray[0].location.lng}`, |
| | | siteWd: `${this.searchExtensivelyArray[0].location.lat}`, |
| | | siteGd: 200 |
| | | }) |
| | | this.searchExtensivelyValue = this.searchExtensivelyArray[0].name |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'searchLayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'searchLayer', |
| | | type: 'label', |
| | | params: { |
| | | lng: `${this.searchExtensivelyArray[0].location.lng}`, |
| | | lat: `${this.searchExtensivelyArray[0].location.lat}`, |
| | | alt: 0, |
| | | text: this.searchExtensivelyArray[0].name |
| | | } |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | searchExtensivelyChange () { |
| | | if (this.searchExtensivelyValue == '') { |
| | | this.searchExtensivelyValBoxShow = false |
| | | this.isShowClearBtn = false |
| | | this.searchExtensivelyArray = [] |
| | | } else { |
| | | this.searchExtensivelyValBoxShow = true |
| | | this.isShowClearBtn = true |
| | | this.getSearchExtensively('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', this.searchExtensivelyValue) |
| | | } |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'searchLayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | | }, |
| | | |
| | | searchExtensivelyVlaClick (item) { |
| | | this.searchExtensivelyValBoxShow = false |
| | | this.searchExtensivelyValue = item.name |
| | | this.$EventBus.$emit('toPosition', { |
| | | siteJd: `${item.location.lng}`, |
| | | siteWd: `${item.location.lat}`, |
| | | siteGd: 200 |
| | | }) |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'searchLayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'searchLayer', |
| | | type: 'label', |
| | | params: { |
| | | lng: `${item.location.lng}`, |
| | | lat: `${item.location.lat}`, |
| | | alt: 0, |
| | | text: item.name |
| | | } |
| | | }) |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'searchLayer', |
| | | type: 'billboard', |
| | | params: { |
| | | lng: `${item.location.lng}`, |
| | | lat: `${item.location.lat}`, |
| | | alt: 0, |
| | | url: '/img/icon/location.png' |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | searchExtensivelyFocus () { |
| | | this.searchExtensivelyValBoxShow = true |
| | | this.getSearchExtensively('ebf48ecaa1fd436fa3d40c4600aa051f', '361100', this.searchExtensivelyValue) |
| | | }, |
| | | |
| | | clearSearchValue () { |
| | | this.searchExtensivelyValue = '' |
| | | this.searchExtensivelyChange() |
| | | } |
| | | }, |
| | | |
| | | destroyed () { |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'carLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'policeMonitoringLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'polylineLayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'searchLayer', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | | tc.pause() |
| | | |
| | | tc.removeTrack(track) |
| | | |
| | | window.removeEventListener('resize', this.setTableHeight) |
| | | |
| | | this.$parent.$parent.resize('0px') |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped lang="scss"> |
| | | .container { |
| | | position: relative; |
| | | width: 100%; |
| | | height: 100%; |
| | | |
| | | &-content { |
| | | display: flex; |
| | | flex-direction: column; |
| | | width: 100%; |
| | | height: 100%; |
| | | color: #fff; |
| | | background: $bg-color; |
| | | |
| | | .switch-box { |
| | | padding: 6px; |
| | | // background: blue; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-around; |
| | | |
| | | & > div { |
| | | flex: 1; |
| | | } |
| | | } |
| | | |
| | | .list-show { |
| | | position: relative; |
| | | height: calc(100% - 50px); |
| | | |
| | | .search-box { |
| | | padding: 6px; |
| | | padding-top: 0; |
| | | height: 46px; |
| | | display: flex; |
| | | align-items: center; |
| | | |
| | | input { |
| | | flex: 1; |
| | | height: 100%; |
| | | font-size: 18px; |
| | | text-indent: 1em; |
| | | color: #ffffff; |
| | | background-color: rgba(24, 79, 202, 0.6); |
| | | // border: 1px solid rgb(0, 92, 169); |
| | | border: 1px solid rgb(24, 79, 202); |
| | | } |
| | | |
| | | input:focus { |
| | | outline: none; |
| | | } |
| | | |
| | | input::-webkit-input-placeholder { |
| | | color: rgba(238, 238, 238, 0.7); |
| | | } |
| | | } |
| | | |
| | | .list { |
| | | height: calc(100% - 48px); |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | .pages { |
| | | height: 40px; |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .state-box { |
| | | width: 20px; |
| | | height: 20px; |
| | | line-height: 20px; |
| | | text-align: center; |
| | | margin: 0 auto; |
| | | border-radius: 50%; |
| | | background-color: #adadad; |
| | | } |
| | | |
| | | .online { |
| | | background-color: #4ccc7d; |
| | | } |
| | | } |
| | | |
| | | :deep(.el-table td.el-table__cell div) { |
| | | overflow: hidden; |
| | | white-space: nowrap; |
| | | text-overflow: ellipsis; |
| | | } |
| | | } |
| | | |
| | | .track-box { |
| | | height: calc(100% - 50px); |
| | | |
| | | .back-btn { |
| | | position: relative; |
| | | height: 42px; |
| | | line-height: 42px; |
| | | text-align: center; |
| | | color: #fff; |
| | | border-bottom: 1px solid #fff; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .back-btn::before { |
| | | content: '\e6ea'; |
| | | font-family: element-icons; |
| | | height: 28px; |
| | | line-height: 28px; |
| | | color: #fff; |
| | | position: absolute; |
| | | top: 4px; |
| | | left: 8px; |
| | | } |
| | | |
| | | .back-btn:hover::before { |
| | | color: #fff; |
| | | } |
| | | |
| | | ul { |
| | | margin: 0; |
| | | padding: 0; |
| | | } |
| | | |
| | | li { |
| | | margin: 0; |
| | | padding: 0 4px; |
| | | list-style: none; |
| | | height: 42px; |
| | | line-height: 42px; |
| | | display: flex; |
| | | color: #fff; |
| | | border-bottom: 1px solid #fff; |
| | | |
| | | & > div { |
| | | text-align: center; |
| | | } |
| | | |
| | | & > div:first-child { |
| | | flex: 2; |
| | | } |
| | | |
| | | & > div:last-child { |
| | | flex: 6; |
| | | |
| | | & > div { |
| | | width: 100% !important; |
| | | } |
| | | } |
| | | } |
| | | |
| | | li:last-child { |
| | | text-align: center; |
| | | position: relative; |
| | | |
| | | .el-button { |
| | | position: absolute; |
| | | top: 0; |
| | | left: 0; |
| | | right: 0; |
| | | bottom: 0; |
| | | margin: auto; |
| | | padding: 0 !important; |
| | | width: 68px; |
| | | height: 32px; |
| | | line-height: 32px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | .search-content { |
| | | position: absolute; |
| | | position: fixed; |
| | | z-index: 99; |
| | | left: 760px; |
| | | top: 40px; |
| | | width: 460px; |
| | | height: 36px; |
| | | |
| | | input { |
| | | flex: 1; |
| | | width: 400px; |
| | | height: 100%; |
| | | font-size: 18px; |
| | | text-indent: 1em; |
| | | color: #ffffff; |
| | | background-color: rgba(24, 79, 202, 0.75); |
| | | border: 1px solid rgb(0, 92, 169); |
| | | border-radius: 20px 0 0 20px; |
| | | vertical-align: top; |
| | | } |
| | | |
| | | input:focus { |
| | | outline: none; |
| | | } |
| | | |
| | | input::-webkit-input-placeholder { |
| | | color: rgba(238, 238, 238, 0.7); |
| | | } |
| | | |
| | | .clear { |
| | | position: absolute; |
| | | top: 0; |
| | | right: 70px; |
| | | cursor: pointer; |
| | | |
| | | img { |
| | | width: 16px; |
| | | height: 16px; |
| | | margin-top: 10px; |
| | | } |
| | | } |
| | | |
| | | button { |
| | | font-size: 24px; |
| | | font-weight: 700; |
| | | width: 60px; |
| | | height: 100%; |
| | | background-color: $table-body-tr-n-color; |
| | | color: #fff; |
| | | border: 1px solid rgb(0, 92, 169); |
| | | cursor: pointer; |
| | | border-radius: 0 20px 20px 0; |
| | | } |
| | | |
| | | button:active { |
| | | background-color: $table-body-tr-2n-color; |
| | | border: 1px solid rgb(0, 92, 169); |
| | | } |
| | | } |
| | | |
| | | .searchExtensively-val-box { |
| | | display: flex; |
| | | flex-direction: column; |
| | | position: absolute; |
| | | top: 80px; |
| | | left: 760px; |
| | | width: 380px; |
| | | max-height: 160px; |
| | | text-align: left; |
| | | color: #fff; |
| | | background: $el-dialog-bg-color; |
| | | z-index: 1111; |
| | | border-radius: 10px; |
| | | overflow: hidden; |
| | | |
| | | & > div { |
| | | height: 100%; |
| | | overflow-y: auto; |
| | | |
| | | div { |
| | | padding: 0 10px; |
| | | line-height: 36px; |
| | | cursor: pointer; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |