| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-12-27 14:19:19 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-01-10 16:34:03 |
| | | * @LastEditTime: 2023-01-11 10:05:29 |
| | | * @FilePath: \srs-police-affairs\src\api\home\index.js |
| | | * @Description: |
| | | * |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // 获取设备分页数据 |
| | | export const getEquipmentPaging = (params) => { |
| | | return request({ |
| | | url: `/device/query/devices/36110000002009999000/channelsCar`, |
| | | method: 'get', |
| | | params: { |
| | | ...params |
| | | } |
| | | }) |
| | | } |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | const oneColor = ['#4caf50', '#2979ff', '#ffd600', '#0d47a1', '#b71c1c'] |
| | | const twoColor = ['#5470FE', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc'] |
| | | |
| | | let equipmentmyChart |
| | | let eventchangemychart |
| | | let timer |
| | | let equimentDataLength = 0 |
| | | |
| | | import carArr from '@/assets/data/equimentsDate/car.js' |
| | | import phoneArr from '@/assets/data/equimentsDate/phone.js' |
| | | import recorderArr from '@/assets/data/equimentsDate/recorder.js' |
| | | import { getSchedulingList } from '@/api/home/index.js' |
| | | import { fontSize } from '@/utils/fontSize.js' |
| | |
| | | }, |
| | | regionTotal: 0, |
| | | linetype: 0, |
| | | timetype: 0, |
| | | policeName: '全部', |
| | | phoneNewArr: [], |
| | | carNewArr: [], |
| | | recorderNewArr: [], |
| | | workingSaveArr: [], |
| | | faultSaveArr: [], |
| | | workingNewArr: [], |
| | | faultNewArr: [], |
| | | tableHeight: 0, |
| | | schedulingList: [], |
| | | |
| | |
| | | |
| | | this.defaultDate() |
| | | |
| | | this.workingSaveArr = this.workingSaveArr.concat(this.getEquimentChartStateData(phoneArr).workingArr).concat(this.getEquimentChartStateData(carArr).workingArr).concat(this.getEquimentChartStateData(recorderArr).workingArr) |
| | | this.faultSaveArr = this.faultSaveArr.concat(this.getEquimentChartStateData(phoneArr).faultArr).concat(this.getEquimentChartStateData(carArr).faultArr).concat(this.getEquimentChartStateData(recorderArr).faultArr) |
| | | this.getSchedulingList() |
| | | }, |
| | | |
| | |
| | | |
| | | // 现有设备统计 |
| | | getEquipment () { |
| | | const oneColor = ['#4caf50', '#2979ff', '#ffd600', '#0d47a1', '#b71c1c'] |
| | | const twoColor = ['#5470FE', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc'] |
| | | const typeData = { |
| | | carCount: '警车', |
| | | monitorCount: '摄像头', |
| | |
| | | phoneCount: '手持记录仪' |
| | | } |
| | | |
| | | const dataAll = getEquipment().then(res => { |
| | | let data = [] |
| | | let data = [] |
| | | this.regionTotal = 0 |
| | | |
| | | if (this.linetype == 0) { |
| | | data = res.data.map((item, index) => { |
| | | return { |
| | | type: item.type, |
| | | value: item.count, |
| | | working: item.online, |
| | | fault: item.offline, |
| | | label: twoColor[index] |
| | | } |
| | | }) |
| | | this.regionTotal = 2500 |
| | | equimentDataLength = 2 |
| | | |
| | | return data |
| | | } else { |
| | | let normalData = { value: 0, name: '正常', color: '#4caf50', label: { color: oneColor[0] } } |
| | | let faultData = { value: 0, name: '故障', color: '#ffd600', label: { color: oneColor[2] } } |
| | | |
| | | res.data.forEach(item => { |
| | | normalData.value += item.online |
| | | if (this.linetype == 0) { |
| | | return [{ |
| | | type: 0, |
| | | name: '车辆', |
| | | value: 500, |
| | | working: 400, |
| | | fault: 100, |
| | | label: twoColor[0] |
| | | }, { |
| | | type: 1, |
| | | name: '摄像头', |
| | | value: 2000, |
| | | working: 1800, |
| | | fault: 200, |
| | | label: twoColor[1] |
| | | }] |
| | | } else { |
| | | return [{ |
| | | online: true, |
| | | color: '#4caf50', |
| | | name: '正常', |
| | | value: 2200, |
| | | carCount: 400, |
| | | monitorCount: 1800, |
| | | }, { |
| | | online: false, |
| | | color: '#ffd600', |
| | | name: '故障', |
| | | value: 300, |
| | | carCount: 100, |
| | | monitorCount: 200, |
| | | }] |
| | | } |
| | | |
| | | for (let key in typeData) { |
| | | if (item.type == typeData[key]) { |
| | | normalData[key] = item.online |
| | | faultData[key] = item.offline |
| | | } |
| | | } |
| | | |
| | | faultData.value += item.offline |
| | | }) |
| | | // const dataAll = getEquipment().then(res => { |
| | | |
| | | return [normalData, faultData] |
| | | } |
| | | }) |
| | | // if (this.linetype == 0) { |
| | | // data = res.data.map((item, index) => { |
| | | |
| | | return dataAll |
| | | // this.regionTotal += item.count |
| | | |
| | | // return { |
| | | // name: item.type, |
| | | // value: item.count, |
| | | // working: item.online, |
| | | // fault: item.offline, |
| | | // label: twoColor[index] |
| | | // } |
| | | // }) |
| | | |
| | | // equimentDataLength = data.length |
| | | |
| | | // return data |
| | | // } else { |
| | | // let normalData = { value: 0, name: '正常', color: '#4caf50', label: { color: oneColor[0] } } |
| | | // let faultData = { value: 0, name: '故障', color: '#ffd600', label: { color: oneColor[2] } } |
| | | |
| | | // res.data.forEach(item => { |
| | | // this.regionTotal += item.count |
| | | |
| | | // normalData.value += item.online |
| | | |
| | | // for (let key in typeData) { |
| | | // if (item.type == typeData[key]) { |
| | | // normalData[key] = item.online |
| | | // faultData[key] = item.offline |
| | | // } |
| | | // } |
| | | |
| | | // faultData.value += item.offline |
| | | // }) |
| | | |
| | | // data = [normalData, faultData] |
| | | |
| | | // equimentDataLength = data.length |
| | | |
| | | // return data |
| | | // } |
| | | // }) |
| | | |
| | | // return dataAll |
| | | }, |
| | | |
| | | // 设备种类,设备状态切换 |
| | |
| | | equipmentmyChart.setOption(this.initEquipmentOptions(data), true) |
| | | }, |
| | | |
| | | // 现有设备饼图初始化 |
| | | async initEquipmentEcharts () { |
| | | var chartDom = document.getElementById('EquipmentEcharts') |
| | | equipmentmyChart = this.$echarts.init(chartDom) |
| | |
| | | this.equipmentEchartsCarousel() |
| | | }, |
| | | |
| | | // 现有设备options饼图数据 |
| | | initEquipmentOptions (dataArr) { |
| | | return { |
| | | tooltip: { |
| | |
| | | confine: true, |
| | | formatter: function (params) { |
| | | let tipHtml = `` |
| | | |
| | | if ('carCount' in params.data) { |
| | | tipHtml = `${params.marker} <strong style="color: ${params.color}">${params.data.name} ${params.data.value}台</strong><br /><strong style="margin-left:10px;color:#5c7bd9">占比:${params.percent}%</strong><br /><span style="color:#5470c6">警车:${params.data.carCount}台</span><br /><span style="margin-left:10px;color:#91cc75">监控:${params.data.monitorCount}台</span><br /><span style="color:#fac858">手台:${params.data.phoneCount}台</span><br /><span style="margin-left:10px;color:#ee6666">手持记录仪:${params.data.recorderCount}台</span>` |
| | | tipHtml = ` |
| | | ${params.marker} |
| | | <strong style="color: ${params.color}">${params.data.name} ${params.data.value}台</strong> |
| | | <br /> |
| | | <strong style="margin-left:10px;color:#5c7bd9">占比:${params.percent}%</strong> |
| | | <br /> |
| | | <span style="color:#5470c6">警车:${params.data.carCount}台</span> |
| | | <br /> |
| | | <span style="margin-left:10px;color:#91cc75">摄像头:${params.data.monitorCount}台</span> |
| | | ` |
| | | } else { |
| | | tipHtml = `${params.marker} <strong style="color: ${params.color}">${params.data.name} ${params.data.value}台</strong><br /><span style="color:#4caf50">正常:${params.data.working}台</span><br /><span style="color:#ccc">故障:${params.data.fault}台</span><br /><span style="margin-left:10px;color:#ccc">设备故障率:${Math.floor(params.data.fault / (params.data.working + params.data.fault) * 100)}%</span><br />` |
| | | } |
| | |
| | | } |
| | | }, |
| | | |
| | | // 饼图轮播 |
| | | equipmentEchartsCarousel () { |
| | | let dataLen = this.getEquimentChartData(this.policeName).length |
| | | let curIndex = 0 |
| | | if (timer) { |
| | | clearInterval(timer) |
| | |
| | | |
| | | timer = setInterval(() => { |
| | | equipmentmyChart.dispatchAction({ type: 'downplay', seriesIndex: 0, dataIndex: curIndex }) |
| | | curIndex = (curIndex + 1) % dataLen |
| | | curIndex = (curIndex + 1) % equimentDataLength |
| | | equipmentmyChart.dispatchAction({ |
| | | type: 'highlight', seriesIndex: 0, dataIndex: curIndex |
| | | }) |
| | |
| | | } |
| | | timer = setInterval(() => { |
| | | equipmentmyChart.dispatchAction({ type: 'downplay', seriesIndex: 0, dataIndex: curIndex }) |
| | | curIndex = (curIndex + 1) % dataLen |
| | | curIndex = (curIndex + 1) % equimentDataLength |
| | | equipmentmyChart.dispatchAction({ |
| | | type: 'highlight', seriesIndex: 0, dataIndex: curIndex |
| | | }) |
| | |
| | | // 现有设备的点击事件(显示弹窗表格) |
| | | clickEquimentChart () { |
| | | equipmentmyChart.on('click', params => { |
| | | // 设备类型,监控弹窗显示,其他弹窗显示,【记录仪列显示,警车列显示,手台列显示】,遍历数组 |
| | | this.$emit('showequimentdetail', params.name, false, true, [false, false, false], []) |
| | | if (params.name == '摄像头') { |
| | | this.$emit('showequimentdetail', params.name, true, false, [false, false, false], []) |
| | | } else if (params.name == '手台') { |
| | | this.$emit('showequimentdetail', params.name, false, true, [false, false, true], this.phoneNewArr) |
| | | } else if (params.name == '车辆') { |
| | | this.$emit('showequimentdetail', params.name, false, true, [false, true, false], this.carNewArr) |
| | | } else if (params.name == '执法记录仪') { |
| | | this.$emit('showequimentdetail', params.name, false, true, [true, false, false], this.recorderNewArr) |
| | | } else if (params.name == '正常') { |
| | | this.$emit('showequimentdetail', params.name, false, true, [false, false, false, true], this.workingNewArr) |
| | | } else if (params.name == '故障') { |
| | | this.$emit('showequimentdetail', params.name, false, true, [false, false, false, true], this.faultNewArr) |
| | | // 设备类型,摄像头弹窗显示,其他弹窗显示,【记录仪列显示,警车列显示,手台列显示】,遍历数组 |
| | | if (params.type) { |
| | | this.$emit('showequimentdetail', params.name, params.type, 'type') |
| | | } else { |
| | | this.$emit('showequimentdetail', params.name, params.online, 'online') |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | selectPoliceChangeEquimentData (police) { |
| | | // if (police != '全部') { |
| | | // let arr1 = [] |
| | | // let arr2 = [] |
| | | // underwayArr.some(item => { |
| | | // if (item.policeStationName == police) { |
| | | // arr1.push(item) |
| | | // } |
| | | // }) |
| | | // this.underwayArr = arr1 |
| | | // historyArr.some(item => { |
| | | // if (item.policeStationName == police) { |
| | | // arr2.push(item) |
| | | // } |
| | | // }) |
| | | // this.historyArr = arr2 |
| | | // } else { |
| | | // this.underwayArr = underwayArr |
| | | // this.historyArr = historyArr |
| | | // } |
| | | equipmentmyChart.setOption(this.initEquipmentOptions(this.getEquimentChartData(police)), true) |
| | | this.policeName = police |
| | | }, |
| | | |
| | | getEquimentDataCountandArr (data, policeStationName) { |
| | | let count = 0 |
| | | let arr = [] |
| | | let obj = {} |
| | | data.some(item => { |
| | | if (item.policeStation == policeStationName) { |
| | | count = Number(count) + 1 |
| | | arr.push(item) |
| | | } |
| | | }) |
| | | obj = { 'count': count, 'arr': arr } |
| | | return obj |
| | | }, |
| | | |
| | | getEquimentChartData (policeStationName) { |
| | | const oneColor = ['#4caf50', '#2979ff', '#ffd600', '#0d47a1', '#b71c1c'] |
| | | const twoColor = ['#5470FE', '#91cc75', '#fac858', '#ee6666', '#73c0de', '#3ba272', '#fc8452', '#9a60b4', '#ea7ccc'] |
| | | let dataArr = [] |
| | | let phoneCount = 0 |
| | | let carCount = 0 |
| | | let recorderCount = 0 |
| | | let monitorCount = 0 |
| | | // 设备种类 |
| | | this.phoneNewArr = [] |
| | | this.carNewArr = [] |
| | | this.recorderNewArr = [] |
| | | // 设备状态 |
| | | this.workingNewArr = [] |
| | | this.faultNewArr = [] |
| | | let phoneState = {} |
| | | let carState = {} |
| | | let recorderState = {} |
| | | let monitorState = { 'working': 7, 'fault': 3 } |
| | | |
| | | if (policeStationName == '全部') { |
| | | phoneCount = phoneArr.length |
| | | this.phoneNewArr = phoneArr |
| | | carCount = carArr.length |
| | | this.carNewArr = carArr |
| | | recorderCount = recorderArr.length |
| | | this.recorderNewArr = recorderArr |
| | | monitorCount = 10 |
| | | this.workingNewArr = this.workingSaveArr |
| | | this.faultNewArr = this.faultSaveArr |
| | | } else { |
| | | this.phoneNewArr = this.getEquimentDataCountandArr(phoneArr, policeStationName).arr |
| | | phoneCount = this.getEquimentDataCountandArr(phoneArr, policeStationName).count |
| | | this.carNewArr = this.getEquimentDataCountandArr(carArr, policeStationName).arr |
| | | carCount = this.getEquimentDataCountandArr(carArr, policeStationName).count |
| | | this.recorderNewArr = this.getEquimentDataCountandArr(recorderArr, policeStationName).arr |
| | | recorderCount = this.getEquimentDataCountandArr(recorderArr, policeStationName).count |
| | | monitorCount = 10 |
| | | this.workingNewArr = this.getEquimentDataCountandArr(this.workingSaveArr, policeStationName).arr |
| | | this.faultNewArr = this.getEquimentDataCountandArr(this.faultSaveArr, policeStationName).arr |
| | | } |
| | | phoneState = this.getEquimentChartStateData(this.phoneNewArr) |
| | | carState = this.getEquimentChartStateData(this.carNewArr) |
| | | recorderState = this.getEquimentChartStateData(this.recorderNewArr) |
| | | if (this.linetype == 0) { |
| | | dataArr = [ |
| | | { value: carCount, name: '车辆', working: carState.working, fault: carState.fault, label: { color: twoColor[0] } }, |
| | | { value: monitorCount, name: '摄像头', working: monitorState.working, fault: monitorState.fault, label: { color: twoColor[1] } }, |
| | | { value: recorderCount, name: '执法记录仪', working: recorderState.working, fault: recorderState.fault, label: { color: twoColor[2] } }, |
| | | { value: phoneCount, name: '手台', working: phoneState.working, fault: phoneState.fault, label: { color: twoColor[3] } }, |
| | | ] |
| | | this.regionTotal = phoneCount + monitorCount + carCount + recorderCount |
| | | } else { |
| | | let workingObj = this.getEquimentChartTypeData(phoneState, carState, recorderState, monitorState).workingObj |
| | | let faultObj = this.getEquimentChartTypeData(phoneState, carState, recorderState, monitorState).faultObj |
| | | dataArr = [ |
| | | { value: workingObj.total, name: '正常', carCount: workingObj.carCount, monitorCount: workingObj.monitorCount, recorderCount: workingObj.recorderCount, phoneCount: workingObj.phoneCount, color: '#4caf50', label: { color: oneColor[0] } }, |
| | | { value: faultObj.total, name: '故障', carCount: faultObj.carCount, monitorCount: faultObj.monitorCount, recorderCount: faultObj.recorderCount, phoneCount: faultObj.phoneCount, color: '#ffd600', label: { color: oneColor[2] } }, |
| | | ] |
| | | this.regionTotal = workingObj.total + faultObj.total |
| | | } |
| | | return dataArr |
| | | }, |
| | | |
| | | getEquimentChartStateData (newArr) { |
| | | let working = 0 |
| | | let fault = 0 |
| | | let workingArr = [] |
| | | let faultArr = [] |
| | | |
| | | newArr.forEach(item => { |
| | | for (let p in item) { |
| | | if (p.indexOf('ID') != -1) { |
| | | item['id'] = item[p] |
| | | } |
| | | } |
| | | if (item.state == '正常') { |
| | | working++ |
| | | workingArr.push(item) |
| | | } else if (item.state == '故障') { |
| | | fault++ |
| | | faultArr.push(item) |
| | | } |
| | | }) |
| | | return { 'working': working, 'fault': fault, 'workingArr': workingArr, 'faultArr': faultArr } |
| | | }, |
| | | |
| | | getEquimentChartTypeData (phoneState, carState, recorderState, monitorState) { |
| | | let workingObj = {} |
| | | let faultObj = {} |
| | | let maintainObj = {} |
| | | let disableObj = {} |
| | | let sealingObj = {} |
| | | |
| | | workingObj.phoneCount = phoneState.working |
| | | workingObj.carCount = carState.working |
| | | workingObj.recorderCount = recorderState.working |
| | | workingObj.monitorCount = monitorState.working |
| | | workingObj.total = monitorState.working + recorderState.working + carState.working + phoneState.working |
| | | |
| | | faultObj.phoneCount = phoneState.fault |
| | | faultObj.carCount = carState.fault |
| | | faultObj.recorderCount = recorderState.fault |
| | | faultObj.monitorCount = monitorState.fault |
| | | faultObj.total = monitorState.fault + recorderState.fault + carState.fault + phoneState.fault |
| | | |
| | | maintainObj.phoneCount = phoneState.maintain |
| | | maintainObj.carCount = carState.maintain |
| | | maintainObj.recorderCount = recorderState.maintain |
| | | maintainObj.monitorCount = monitorState.maintain |
| | | maintainObj.total = monitorState.maintain + recorderState.maintain + carState.maintain + phoneState.maintain |
| | | |
| | | disableObj.phoneCount = phoneState.disable |
| | | disableObj.carCount = carState.disable |
| | | disableObj.recorderCount = recorderState.disable |
| | | disableObj.monitorCount = monitorState.disable |
| | | disableObj.total = monitorState.disable + recorderState.disable + carState.disable + phoneState.disable |
| | | |
| | | sealingObj.phoneCount = phoneState.sealing |
| | | sealingObj.carCount = carState.sealing |
| | | sealingObj.recorderCount = recorderState.sealing |
| | | sealingObj.monitorCount = monitorState.sealing |
| | | sealingObj.total = monitorState.sealing + recorderState.sealing + carState.sealing + phoneState.sealing |
| | | |
| | | return { 'workingObj': workingObj, 'faultObj': faultObj, 'maintainObj': maintainObj, 'disableObj': disableObj, 'sealingObj': sealingObj } |
| | | }, |
| | | |
| | | // activityRowClick (row) { |
| | | // this.$EventBus.$emit('toPosition', { |
| | | // layerName: 'activityLayers', |
| | | // siteJd: Number(row.position[0]), |
| | | // siteWd: Number(row.position[1]) |
| | | // }) |
| | | // }, |
| | | |
| | | }, |
| | | |
| | | destroyed () { |
| | |
| | | * @Author: shuishen 1109946754@qq.com |
| | | * @Date: 2022-08-18 16:18:17 |
| | | * @LastEditors: shuishen 1109946754@qq.com |
| | | * @LastEditTime: 2023-01-10 16:36:57 |
| | | * @LastEditTime: 2023-01-11 10:29:01 |
| | | * @FilePath: \srs-police-affairs\src\views\home\index.vue |
| | | * @Description: 小区-栋-层-房屋 |
| | | * |
| | |
| | | |
| | | <right-container class="right-container" @showequimentdetail="showequimentdetail" |
| | | @selectPoliceChangeEventData="selectPoliceChangeEventData" @changeActivityType="changeActivityType" |
| | | @activityChange="activityChange" ref="rightContainer"></right-container> |
| | | ref="rightContainer"></right-container> |
| | | |
| | | <bottom-container class="bottom-container" ref="bottomContainer" |
| | | @changePoliceSituationHistoryType="changePoliceSituationHistoryType" |
| | |
| | | </div> |
| | | <div class="layers-control-btn panorama"> |
| | | <el-checkbox v-model="panoramaLayerShow" @change="panoramaChange">全景</el-checkbox> |
| | | </div> |
| | | <div class="layers-control-btn activity"> |
| | | <el-checkbox v-model="activityLayerShow" @change="activityChange">活动</el-checkbox> |
| | | </div> |
| | | <div class="layers-control-btn police-situation"> |
| | | <el-checkbox v-model="policeSituationLayerShow" @change="policeSituationChange">警情</el-checkbox> |
| | |
| | | :before-close="panoramaBeforeClose" :close-on-click-modal="true" class="panorama-details-box"> |
| | | <!-- <iframe src="http://vr.jxpskj.com/JXSFKZQJ/QJ/" style="width: 100%; height: 100%;" frameborder="0"></iframe>--> |
| | | <iframe :src="panoramaVrUrl" style="width: 100%; height: 100%;" frameborder="0" /> |
| | | </el-dialog> |
| | | |
| | | <el-dialog :title="activityTitle" :modal="true" :visible.sync="activityVisible" |
| | | :before-close="activityBeforeClose" :close-on-click-modal="true" class="activity-details-box"> |
| | | <div class="item"> |
| | | <div>活动名称:</div> |
| | | <div>{{ activityDetailArr.activityName }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>开始时间:</div> |
| | | <div>{{ activityDetailArr.startTime }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>结束时间:</div> |
| | | <div>{{ activityDetailArr.endTime }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>规模:</div> |
| | | <div>{{ activityDetailArr.scale }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>所属派出所:</div> |
| | | <div>{{ activityDetailArr.policeStationName }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>坐标:</div> |
| | | <div>{{ activityDetailArr.position }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>经度:</div> |
| | | <div>{{ activityDetailArr.lng }}</div> |
| | | </div> |
| | | <div class="item"> |
| | | <div>纬度:</div> |
| | | <div>{{ activityDetailArr.lat }}</div> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <el-dialog :title="phoneTitle" :modal="true" :visible.sync="phoneVisible" :before-close="phoneBeforeClose" |
| | |
| | | <el-dialog :title="equimentTitle" :modal="true" :visible.sync="equimentVisible" |
| | | :before-close="equimentBeforeClose" :close-on-click-modal="true" class="equiment-details-box"> |
| | | <div class="equiment-detail"> |
| | | <div class="monitor" v-if="monitorContent"> |
| | | <video src="/video/sp.mp4" autoplay controls width="100%" height="100%" ref="videoElement" |
| | | style="object-fit: fill"></video> |
| | | </div> |
| | | <div class="others" v-if="othersContent"> |
| | | <el-table :data="showArr.slice((currentPage - 1) * pagesize, currentPage * pagesize)" |
| | | style="width: 100%" |
| | | <div class="others"> |
| | | <el-table :data="equimentTableData" 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"> |
| | | <el-table-column prop="carID" label="车牌号" v-if="carArrShow"></el-table-column> |
| | | <el-table-column prop="carType" label="车型" v-if="carArrShow"></el-table-column> |
| | | <el-table-column prop="phoneID" label="手台号" v-if="phoneArrShow"></el-table-column> |
| | | <el-table-column prop="phoneType" label="手台机型" v-if="phoneArrShow"></el-table-column> |
| | | <el-table-column prop="recorderID" label="执法记录仪号" v-if="recorderArrShow"></el-table-column> |
| | | <el-table-column prop="recorderType" label="记录仪机型" v-if="recorderArrShow"></el-table-column> |
| | | <el-table-column prop="id" label="设备号" v-if="stateArrShow"></el-table-column> |
| | | <el-table-column prop="equimentType" label="设备类型" v-if="stateArrShow"></el-table-column> |
| | | <el-table-column prop="policeStation" label="所属派出所"></el-table-column> |
| | | <el-table-column prop="area" label="所属责任区"></el-table-column> |
| | | <el-table-column prop="state" 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 label="状态"> |
| | | <template slot-scope="scope"> |
| | | <span> |
| | | {{ scope.row.status == 0 ? '离线' : '在线' }} |
| | | </span> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作"> |
| | | <template slot-scope="scope"> |
| | | <el-button size="mini" type="danger">播放{{ scope }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | <div class="pages"> |
| | | <el-pagination background layout="prev, pager, next" :total="showArr.length" |
| | | <el-pagination background layout="prev, pager, next" :total="equimentPagingTotal" |
| | | :page-size="pagesize" pager-count="3" :current-page="currentPage" |
| | | @current-change="handleCurrentChange"></el-pagination> |
| | | </div> |
| | |
| | | |
| | | import { convertStringToList } from "@/utils/geometryStringTool" |
| | | |
| | | import { getActAsPoliceList } from "@/api/home/index.js" |
| | | import { getActAsPoliceList, getEquipmentPaging } from "@/api/home/index.js" |
| | | |
| | | export default { |
| | | data () { |
| | |
| | | phoneLayerShow: false, |
| | | monitoringLayerShow: false, |
| | | panoramaLayerShow: false, |
| | | activityLayerShow: false, |
| | | policeSituationLayerShow: false, |
| | | dialogTitle: '', |
| | | dialogVisible: false, |
| | | panoramaTitle: '', |
| | | panoramaVrUrl: '', |
| | | activityTitle: '', |
| | | equimentTitle: '', |
| | | keyPersonTitle: '', |
| | | landTitle: '', |
| | | panoramaVisible: false, |
| | | activityVisible: false, |
| | | equimentVisible: false, |
| | | keyPersonVisible: false, |
| | | policeSituationVisible: false, |
| | |
| | | areaChecked: '', |
| | | areaOptions: [], |
| | | housingOptions: [], |
| | | jurisdictionData: [{ |
| | | label: '车站派出所', |
| | | id: '2', |
| | | children: [{ |
| | | label: '责任区1', |
| | | id: '4', |
| | | }, { |
| | | label: '责任区2', |
| | | id: '5', |
| | | }] |
| | | }, |
| | | { |
| | | label: '沙溪派出所', |
| | | id: '3', |
| | | children: [{ |
| | | label: '责任区1', |
| | | id: '6', |
| | | }, { |
| | | label: '责任区2', |
| | | id: '7', |
| | | }] |
| | | }, |
| | | { |
| | | label: '北门派出所', |
| | | id: '8', |
| | | children: [{ |
| | | label: '责任区1', |
| | | id: '9', |
| | | }, { |
| | | label: '责任区2', |
| | | id: '10', |
| | | }] |
| | | }, |
| | | { |
| | | label: '灵溪派出所', |
| | | id: '11', |
| | | children: [{ |
| | | label: '责任区1', |
| | | id: '12', |
| | | }, { |
| | | label: '责任区2', |
| | | id: '13', |
| | | }] |
| | | }, |
| | | { |
| | | label: '江光派出所', |
| | | id: '14', |
| | | children: [{ |
| | | label: '责任区1', |
| | | id: '15', |
| | | }, { |
| | | label: '责任区2', |
| | | id: '16', |
| | | }] |
| | | }], |
| | | |
| | | defaultProps: { |
| | | children: 'children', |
| | | label: 'label' |
| | | }, |
| | | monitorContent: false, |
| | | othersContent: false, |
| | | showArr: [], |
| | | saveArr: [], |
| | | carArrShow: false, |
| | | phoneArrShow: false, |
| | | recorderArrShow: false, |
| | | stateArrShow: false, |
| | | |
| | | // 现有设备表格 |
| | | equimentTableData: [], |
| | | equimentCurrentSelect: {}, |
| | | currentPage: 1, |
| | | pagesize: 9, |
| | | equimentPagingTotal: 0, |
| | | |
| | | landDetailArr: [], |
| | | keyPersonDetailArr: [], |
| | | timetype: 0, |
| | |
| | | policeSituationHistoryType: 0, |
| | | policeSituationDetailArr: {}, |
| | | CJdata: {}, |
| | | activityDetailArr: {}, |
| | | |
| | | } |
| | | }, |
| | |
| | | this.$refs.leftContainer.selectPoliceChangeData(item.policeStationName) |
| | | this.$refs.rightContainer.selectPoliceChangeEquimentData(item.policeStationName) |
| | | this.$refs.rightContainer.selectPoliceChangeEventData(item.policeStationName) |
| | | this.activityChange() |
| | | this.$refs.bottomContainer.selectPoliceSituatiionArr(item.policeStationName) |
| | | this.policeSituationChange() |
| | | |
| | |
| | | } |
| | | }, |
| | | |
| | | activityChange () { |
| | | this.activitySelectChange() |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'activityLayers', |
| | | type: 'ClusterLayer' |
| | | }) |
| | | if (this.activityLayerShow == true) { |
| | | this.activityList.forEach(item => { |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'activityLayers', |
| | | type: "billboard", |
| | | layerType: 'ClusterLayer', |
| | | params: item, |
| | | incident: this.activitySiteClick |
| | | }) |
| | | }) |
| | | } else { |
| | | this.$EventBus.$emit('mapClearLayer', { |
| | | layerName: 'activityLayers', |
| | | type: 'ClusterLayer' |
| | | }) |
| | | } |
| | | }, |
| | | |
| | | activitySelectChange () { |
| | | let showArr = [] |
| | | if (this.policeStaionChecked && this.policeStaionChecked.policeStationName != '全部') { |
| | | let arr1 = [] |
| | | let arr2 = [] |
| | | underwayArr.some(item => { |
| | | if (item.policeStationName == this.policeStaionChecked.policeStationName) { |
| | | arr1.push(item) |
| | | } |
| | | }) |
| | | this.underwayArr = arr1 |
| | | historyArr.some(item => { |
| | | if (item.policeStationName == this.policeStaionChecked.policeStationName) { |
| | | arr2.push(item) |
| | | } |
| | | }) |
| | | this.historyArr = arr2 |
| | | |
| | | } else { |
| | | this.underwayArr = underwayArr |
| | | this.historyArr = historyArr |
| | | } |
| | | if (this.activityType == 0) { |
| | | showArr = this.underwayArr |
| | | } else { |
| | | showArr = this.historyArr |
| | | } |
| | | showArr.forEach((item, index) => { |
| | | item.name = `${index + 1}号活动` |
| | | item.lng = `${Number(item.position[0])}` |
| | | item.lat = `${Number(item.position[1])}` |
| | | item.alt = 100 |
| | | item.url = '/img/icon/activity.png' |
| | | }) |
| | | this.activityList = showArr |
| | | }, |
| | | |
| | | policeSituationChange () { |
| | | this.policeSituationSelectChange() |
| | | circleLayer.clear() |
| | |
| | | this.panoramaTitle = e.overlay.attrParams.name |
| | | this.panoramaVrUrl = e.overlay.attrParams.vrUrl |
| | | this.panoramaVisible = true |
| | | }, |
| | | |
| | | activitySiteClick (e) { |
| | | this.activityTitle = e.overlay.attrParams.name |
| | | this.activityVisible = true |
| | | this.activityDetailArr = e.overlay.attrParams |
| | | }, |
| | | |
| | | phoneSiteClick (e) { |
| | |
| | | this.$refs.RegionSelect.style.left = (bodyWidth - domWidth) / 2 + 'px' |
| | | }, |
| | | |
| | | jurisdictionNodeClick (nodeObj) { |
| | | this.currentPage = 1 |
| | | if (nodeObj.id == 1) { |
| | | this.showArr = this.saveArr |
| | | } else if (nodeObj.id == 2) { |
| | | let arr = [] |
| | | this.saveArr.some((item) => { |
| | | if (item.policeStation == '车站派出所') { |
| | | arr.push(item) |
| | | } |
| | | }) |
| | | this.showArr = arr |
| | | } else if (nodeObj.id == 3) { |
| | | let arr = [] |
| | | this.saveArr.some((item) => { |
| | | if (item.policeStation == '沙溪派出所') { |
| | | arr.push(item) |
| | | } |
| | | }) |
| | | this.showArr = arr |
| | | } else if (nodeObj.id == 4) { |
| | | let arr = [] |
| | | this.saveArr.some((item) => { |
| | | if (item.policeStation == '车站派出所' && item.area == "责任区1") { |
| | | arr.push(item) |
| | | } |
| | | }) |
| | | this.showArr = arr |
| | | } else if (nodeObj.id == 5) { |
| | | let arr = [] |
| | | this.saveArr.some((item) => { |
| | | if (item.policeStation == '车站派出所' && item.area == "责任区2") { |
| | | arr.push(item) |
| | | } |
| | | }) |
| | | this.showArr = arr |
| | | } else if (nodeObj.id == 6) { |
| | | let arr = [] |
| | | this.saveArr.some((item) => { |
| | | if (item.policeStation == '沙溪派出所' && item.area == "责任区1") { |
| | | arr.push(item) |
| | | } |
| | | }) |
| | | this.showArr = arr |
| | | } else if (nodeObj.id == 7) { |
| | | let arr = [] |
| | | this.saveArr.some((item) => { |
| | | if (item.policeStation == '沙溪派出所' && item.area == "责任区2") { |
| | | arr.push(item) |
| | | } |
| | | }) |
| | | this.showArr = arr |
| | | } else if (nodeObj.id == 8) { |
| | | let arr = [] |
| | | this.saveArr.some((item) => { |
| | | if (item.policeStation == '北门派出所') { |
| | | arr.push(item) |
| | | } |
| | | }) |
| | | this.showArr = arr |
| | | } else if (nodeObj.id == 9) { |
| | | let arr = [] |
| | | this.saveArr.some((item) => { |
| | | if (item.policeStation == '北门派出所' && item.area == "责任区1") { |
| | | arr.push(item) |
| | | } |
| | | }) |
| | | this.showArr = arr |
| | | } else if (nodeObj.id == 10) { |
| | | let arr = [] |
| | | this.saveArr.some((item) => { |
| | | if (item.policeStation == '北门派出所' && item.area == "责任区2") { |
| | | arr.push(item) |
| | | } |
| | | }) |
| | | this.showArr = arr |
| | | } else if (nodeObj.id == 11) { |
| | | let arr = [] |
| | | this.saveArr.some((item) => { |
| | | if (item.policeStation == '灵溪派出所') { |
| | | arr.push(item) |
| | | } |
| | | }) |
| | | this.showArr = arr |
| | | } else if (nodeObj.id == 12) { |
| | | let arr = [] |
| | | this.saveArr.some((item) => { |
| | | if (item.policeStation == '灵溪派出所' && item.area == "责任区1") { |
| | | arr.push(item) |
| | | } |
| | | }) |
| | | this.showArr = arr |
| | | } else if (nodeObj.id == 13) { |
| | | let arr = [] |
| | | this.saveArr.some((item) => { |
| | | if (item.policeStation == '灵溪派出所' && item.area == "责任区2") { |
| | | arr.push(item) |
| | | } |
| | | }) |
| | | this.showArr = arr |
| | | } else if (nodeObj.id == 14) { |
| | | let arr = [] |
| | | this.saveArr.some((item) => { |
| | | if (item.policeStation == '江光派出所') { |
| | | arr.push(item) |
| | | } |
| | | }) |
| | | this.showArr = arr |
| | | } else if (nodeObj.id == 15) { |
| | | let arr = [] |
| | | this.saveArr.some((item) => { |
| | | if (item.policeStation == '江光派出所' && item.area == "责任区1") { |
| | | arr.push(item) |
| | | } |
| | | }) |
| | | this.showArr = arr |
| | | } else if (nodeObj.id == 16) { |
| | | let arr = [] |
| | | this.saveArr.some((item) => { |
| | | if (item.policeStation == '江光派出所' && item.area == "责任区2") { |
| | | arr.push(item) |
| | | } |
| | | }) |
| | | this.showArr = arr |
| | | } |
| | | }, |
| | | |
| | | handleCurrentChange: function (currentPage) { |
| | | this.currentPage = currentPage |
| | | }, |
| | | |
| | | showpeopledetail (name) { |
| | | this.peopleTitle = name |
| | |
| | | this.landDetailArr = arr |
| | | }, |
| | | |
| | | showequimentdetail (name, monitor, others, booleans, arr) { |
| | | this.equimentVisible = true |
| | | // 获取设备分页数据 |
| | | getEquipmentPaging (params) { |
| | | this.equimentTableData = [] |
| | | this.equimentPagingTotal = 0 |
| | | |
| | | getEquipmentPaging({ page: this.currentPage, count: this.pagesize, ...params }).then(res => { |
| | | if (res.data.data.list.length > 0) { |
| | | this.equimentTableData = res.data.data.list |
| | | |
| | | this.equimentPagingTotal = res.data.data.total |
| | | } else { |
| | | this.equimentTableData = [] |
| | | |
| | | this.equimentPagingTotal = 0 |
| | | } |
| | | }) |
| | | }, |
| | | // 设备分页查询 |
| | | handleCurrentChange: function (currentPage) { |
| | | this.currentPage = currentPage |
| | | |
| | | this.getEquipmentPaging(this.equimentCurrentSelect) |
| | | }, |
| | | |
| | | // 显示现有列表表格数据 |
| | | async showequimentdetail (name, typeVale, type) { |
| | | this.equimentTitle = name |
| | | this.monitorContent = monitor |
| | | this.othersContent = others |
| | | this.recorderArrShow = booleans[0] |
| | | this.carArrShow = booleans[1] |
| | | this.phoneArrShow = booleans[2] |
| | | this.stateArrShow = booleans[3] |
| | | this.saveArr = arr |
| | | this.showArr = arr |
| | | // 动态改变树形控件数据 |
| | | if (this.policeStationCheckValue != '请选择派出所' && this.policeStationCheckValue != '全部') { |
| | | this.jurisdictionData = [this.searchName(this.policeStationCheckValue, treeData)] |
| | | let arr1 = [] |
| | | this.saveArr.some((item1) => { |
| | | if (item1.policeStation == this.policeStationCheckValue) { |
| | | arr1.push(item1) |
| | | } |
| | | }) |
| | | this.showArr = arr1 |
| | | } else { |
| | | this.jurisdictionData = treeData |
| | | |
| | | this.equimentCurrentSelect = { |
| | | type: typeVale |
| | | } |
| | | |
| | | await this.getEquipmentPaging({ type: typeVale }) |
| | | |
| | | this.equimentVisible = true |
| | | }, |
| | | |
| | | showkeypersondetail (name, arr) { |
| | |
| | | .equiment-detail { |
| | | height: 540px; |
| | | width: 100%; |
| | | |
| | | .monitor { |
| | | width: 100%; |
| | | height: 540px; |
| | | background-color: #fff; |
| | | } |
| | | |
| | | .others { |
| | | width: 100%; |