| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:17 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-01-12 17:14:12 |
| | | * @LastEditTime: 2023-01-13 11:23:58 |
| | | * @FilePath: \srs-police-affairs\src\views\police\index.vue |
| | | * @Description: 辖区管理 |
| | | * |
| | |
| | | </el-select> |
| | | </div> |
| | | |
| | | <div class="list-show" ref="tableBox" v-show="!detailFlag"> |
| | | <div class="search-box" ref="tableSearchBox"> |
| | | <div class="list-show" v-show="!detailFlag"> |
| | | <div class="search-box"> |
| | | 资源名称: |
| | | <input v-model="searchValue" @input="searchChange" type="text" placeholder="请输入搜索条件" /> |
| | | </div> |
| | | |
| | | <div class="list"> |
| | | <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' }" |
| | |
| | | <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="carDetail(scope.row)" type="text" size="small" |
| | | title="轨迹"> |
| | | <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="播放视频"> |
| | |
| | | </el-table-column> |
| | | </el-table> |
| | | |
| | | <div class="pages"> |
| | | <div class="pages" ref="tablePagination"> |
| | | <el-pagination background layout="prev, pager, next" :page-size="equimentPage.pageSize" |
| | | :page-count="equimentPage.count" :current-page="equimentPage.currentPage" |
| | | @current-change="handleCurrentChange"></el-pagination> |
| | |
| | | <div class="track-box" v-show="detailFlag"> |
| | | <div class="track-box-info"> |
| | | <div class="back-btn" @click="goBack" title="轨迹">详细资料及轨迹查询</div> |
| | | <ul v-show="navType == 0"> |
| | | <ul> |
| | | <li> |
| | | <div>车辆型号:</div> |
| | | <div>SC7103</div> |
| | | <div>通道编号:</div> |
| | | <div>{{ currentSelectEquipment.channelId ? currentSelectEquipment.channelId : '' }} |
| | | </div> |
| | | </li> |
| | | |
| | | <li> |
| | | <div>责任人:</div> |
| | | <div>高德光</div> |
| | | <div>设备编号:</div> |
| | | <div>{{ currentSelectEquipment.deviceId ? currentSelectEquipment.deviceId : '' }} |
| | | </div> |
| | | </li> |
| | | |
| | | <li> |
| | | <div>出场日期:</div> |
| | | <div>2019-12-02 00:00:00</div> |
| | | <div>通道名称:</div> |
| | | <div>{{ currentSelectEquipment.name ? currentSelectEquipment.name : '' }}</div> |
| | | </li> |
| | | |
| | | <li> |
| | | <div>厂商:</div> |
| | | <div>重庆长安铃木汽车有限公司</div> |
| | | <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> |
| | | |
| | | <ul v-show="navType == 1"> |
| | | <li> |
| | | <div>型号:</div> |
| | | <div>350m</div> |
| | | </li> |
| | | |
| | | <li> |
| | | <div>责任人:</div> |
| | | <div>高德光</div> |
| | | </li> |
| | | |
| | | <li> |
| | | <div>出场日期:</div> |
| | | <div>2019-12-02 00:00:00</div> |
| | | </li> |
| | | |
| | | <li> |
| | | <div>厂商:</div> |
| | | <div>摩托罗拉</div> |
| | | </li> |
| | | |
| | | <li> |
| | | <div>选择时间:</div> |
| | | <div class="datetime"> |
| | | <el-date-picker v-model="trackTime" type="datetimerange" range-separator="至" |
| | | start-placeholder="开始日期" size="mini" :editable="false" |
| | | end-placeholder="结束日期"></el-date-picker> |
| | | </div> |
| | |
| | | pageSize: 15, |
| | | count: 0, |
| | | currentPage: 1 |
| | | } |
| | | }, |
| | | |
| | | currentSelectEquipment: {} |
| | | } |
| | | }, |
| | | created () { |
| | | const that = this |
| | | |
| | | this.$nextTick(() => { |
| | | this.setTableHeight() |
| | | }) |
| | | |
| | | 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: { |
| | | // 搜索框改变事件 |
| | |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'phoneLayers', |
| | | layerName: 'policeMonitoringLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | |
| | | }) |
| | | } else if (this.navType == 1) { |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'phoneLayers', |
| | | layerName: 'policeMonitoringLayers', |
| | | type: "billboard", |
| | | params: { |
| | | ...item, |
| | |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'phoneLayers', |
| | | layerName: 'policeMonitoringLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | |
| | | }, |
| | | |
| | | // 表格行点击查看轨迹 |
| | | carDetail (row) { |
| | | equipmentTrack (row) { |
| | | this.detailFlag = true |
| | | |
| | | this.currentSelectEquipment = row |
| | | }, |
| | | |
| | | async play (row) { |
| | |
| | | |
| | | // 查看轨迹 |
| | | async lookTrack () { |
| | | global.viewer.scene.globe.depthTestAgainstTerrain = false |
| | | |
| | | if (this.trackTime.length == 0) { |
| | | this.$message({ message: "请选择开始时间", duration: 2000 }) |
| | | return |
| | |
| | | }) |
| | | |
| | | let positionsArr = [] |
| | | await this.getHistoricalTrack().then(res => { |
| | | 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: global.DC.Color.RED, |
| | | width: 6 |
| | | }) |
| | | |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'polylineLayer', |
| | | type: "billboard", |
| | |
| | | url: '/img/icon/orgin.png', |
| | | } |
| | | }) |
| | | |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'polylineLayer', |
| | | type: "billboard", |
| | |
| | | |
| | | tc.addTrack(track) |
| | | |
| | | |
| | | this.$EventBus.$emit('toPosition', { |
| | | siteJd: 114.928669, |
| | | siteWd: 25.850383, |
| | |
| | | }, |
| | | |
| | | setTableHeight () { |
| | | this.currentTableHeight = this.$refs.tableBox.offsetHeight - this.$refs.tableSearchBox.offsetHeight |
| | | this.currentTableHeight = this.$refs.tableBox.offsetHeight - this.$refs.tablePagination.offsetHeight |
| | | }, |
| | | |
| | | // 大小重置 |
| | |
| | | this.boxShow = val |
| | | }, |
| | | |
| | | async getHistoricalTrack (id) { |
| | | async getHistoricalTrack (params) { |
| | | let positionArr = [] |
| | | await getHistoricalTrack({ channelId: id }).then(res => { |
| | | |
| | | await getHistoricalTrack(params).then(res => { |
| | | positionArr = res.data.data |
| | | }) |
| | | |
| | | return positionArr |
| | | }, |
| | | |
| | |
| | | }) |
| | | |
| | | this.$EventBus.$emit('mapRemoveLayer', { |
| | | layerName: 'phoneLayers', |
| | | layerName: 'policeMonitoringLayers', |
| | | type: 'VectorLayer' |
| | | }) |
| | | |
| | |
| | | |
| | | .track-box { |
| | | height: calc(100% - 50px); |
| | | // background: rgba(20, 50, 123, 1); |
| | | |
| | | .track-box-info { |
| | | background: rgba(8, 56, 185, 0.5); |
| | | } |
| | | |
| | | .back-btn { |
| | | position: relative; |