Merge branch 'master' of http://s16s652780.51mypc.cn:49896/r/srs-police-affairs
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-12-27 14:19:19 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-01-10 11:50:32 |
| | | * @LastEditTime: 2023-01-10 16:34:03 |
| | | * @FilePath: \srs-police-affairs\src\api\home\index.js |
| | | * @Description: |
| | | * |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 派出所责任区小区-获取三级区域数据 |
| | | export const getPoliceStationTree = (type, id) => { |
| | | return request({ |
| | | url: `/api/policeStationInfo/policeStationInfo/getPoliceStationTree`, |
| | | method: 'get', |
| | | params: { |
| | | type, |
| | | id |
| | | } |
| | | }) |
| | | } |
| | |
| | | |
| | | if (process.env.NODE_ENV == 'development') { |
| | | // 开发 |
| | | defaultApi = prodEnv.VUE_APP_INTRANET |
| | | defaultApi = prodEnv.VUE_APP_OUTER_NET |
| | | searchAllApi = prodEnv.VUE_APP_OUTER_NET_SEARCH |
| | | videoApi = prodEnv.VUE_APP_OUTER_NET_VIDEO |
| | | } else { |
| | |
| | | </div>--> |
| | | </div> |
| | | |
| | | <div class="plan-control" v-show="dialogVisible"> |
| | | <div class="row-box"> |
| | | <div class="plan-control" v-show="dialogVisible&&(isHavePolice||isHaveArrow||isHaveLine)"> |
| | | <div class="row-box" v-show="isHavePolice"> |
| | | <div class="category">警力资源:</div> |
| | | <div class="category-value"> |
| | | <el-switch |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="row-box"> |
| | | <div class="category">作战标绘</div> |
| | | <div class="row-box" v-show="isHaveArrow"> |
| | | <div class="category">作战标绘:</div> |
| | | <div class="category-value"> |
| | | <el-switch |
| | | v-model="arrowBtnSwitch" |
| | |
| | | ></el-switch> |
| | | </div> |
| | | </div> |
| | | <div class="row-box"> |
| | | <div class="row-box" v-show="isHaveLine"> |
| | | <div class="category">巡逻路线:</div> |
| | | <div class="category-value"> |
| | | <el-switch |
| | |
| | | currentClickIndex: '', |
| | | policeSwitch: true, |
| | | arrowBtnSwitch: true, |
| | | polylineBtnSwitch: true, |
| | | polylineBtnSwitch: false, |
| | | analyseInput: 100, |
| | | activityList: [], |
| | | activityDetails: {}, |
| | |
| | | searchExtensivelyValue: '', |
| | | searchExtensivelyValBoxShow: false, |
| | | searchExtensivelyArray: [], |
| | | isHavePoliceCar: false, |
| | | isHavePoliceMan: false, |
| | | isHaveArrow: false, |
| | | isHaveLine: false, |
| | | } |
| | | }, |
| | | created () { |
| | |
| | | type: 'VectorLayer' |
| | | }) |
| | | getSecurityPoliceList(securityId).then(res => { |
| | | this.isHavePoliceMan = res.data.data.some(item => { |
| | | return item.type == 3 |
| | | }) |
| | | res.data.data.forEach(item => { |
| | | if (item.type == 1) { |
| | | let positionNewArr = this.convertPolylineOrPolygonPositionDate(item.position, item.type) |
| | |
| | | type: 'VectorLayer' |
| | | }) |
| | | getSecurityCarList(securityId).then(res => { |
| | | this.isHavePoliceCar = res.data.data.some(item => { |
| | | return item.type == 3 |
| | | }) |
| | | this.isHaveLine = res.data.data.some(item => { |
| | | return item.type == 1 |
| | | }) |
| | | res.data.data.forEach(item => { |
| | | if (item.type == 1 && polylineShow) { |
| | | let positionNewArr = this.convertPolylineOrPolygonPositionDate(item.position, item.type) |
| | |
| | | this.removeAllArrow() |
| | | if (!arrowShow) return |
| | | getSecurityPlotList(securityId).then(res => { |
| | | this.isHaveArrow = res.data.data.some(item => { |
| | | return item |
| | | }) |
| | | res.data.data.forEach(item => { |
| | | let position = item.position.slice(11, item.position.length - 1).replace(/,/g, ';').replace(/ /g, ',') |
| | | let chooseArrow = null |
| | |
| | | }, |
| | | }, |
| | | |
| | | computed: { |
| | | isHavePolice () { |
| | | return this.isHavePoliceCar || this.isHavePoliceMan |
| | | } |
| | | |
| | | }, |
| | | |
| | | destroyed () { |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'activeLayer', |
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:17 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-01-10 16:13:51 |
| | | * @LastEditTime: 2023-01-10 16:36:57 |
| | | * @FilePath: \srs-police-affairs\src\views\home\index.vue |
| | | * @Description: 小区-栋-层-房屋 |
| | | * |
| | |
| | | > |
| | | <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> |
| | |
| | | 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> |
| | |
| | | > |
| | | <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> |
| | |
| | | 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> |
| | |
| | | import { getHistoricalTrack } from '@/api/police/index.js' |
| | | import { getCarList } from '@/api/police/index.js' |
| | | import { getSearchExtensively } from '@/api/dept/index.js' |
| | | import { getDevices } from '@/api/video/index.js' |
| | | import flvjs from 'flv.js' |
| | | |
| | | |
| | | let tc = null |
| | |
| | | }) |
| | | }, |
| | | |
| | | siteClick (e) { |
| | | this.dialogTitle = e.overlay.attrParams.name |
| | | this.dialogVisible = true |
| | | async play (row) { |
| | | if (this.flvPlayer != null) { |
| | | this.flvPlayer.pause() |
| | | this.flvPlayer.unload() |
| | | this.flvPlayer.detachMediaElement() |
| | | this.flvPlayer.destroy() |
| | | this.flvPlayer = null |
| | | } |
| | | |
| | | if (this.$refs.videoElement && this.$refs.videoElement != null) { |
| | | this.$refs.videoElement.currentTime = 0 |
| | | this.$refs.videoElement.play() |
| | | this.dialogTitle = row.name |
| | | this.dialogVisible = true |
| | | let flvUrl = '' |
| | | await this.getDevices(row.deviceId, row.channelId).then(res => { |
| | | flvUrl = res |
| | | }) |
| | | if (flvjs.isSupported() && flvUrl != 'nodata') { |
| | | 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 (id, channelId) { |
| | | let flvAddress = '' |
| | | await getDevices(id, channelId).then(res => { |
| | | if ('data' in res.data) { |
| | | flvAddress = res.data.data.flv |
| | | } else { |
| | | flvAddress = 'nodata' |
| | | } |
| | | }) |
| | | return flvAddress |
| | | }, |
| | | |
| | | // siteClick (e) { |
| | | // this.dialogTitle = e.overlay.attrParams.name |
| | | // this.dialogVisible = true |
| | | |
| | | // if (this.$refs.videoElement && this.$refs.videoElement != null) { |
| | | // this.$refs.videoElement.currentTime = 0 |
| | | // this.$refs.videoElement.play() |
| | | // } |
| | | // }, |
| | | |
| | | phoneSiteClick (e) { |
| | | this.phoneTitle = e.overlay.attrParams.name |
| | |
| | | this.searchExtensivelyValue = '' |
| | | this.searchExtensivelyChange() |
| | | }, |
| | | |
| | | |
| | | }, |
| | | |
| | | destroyed () { |