| | |
| | | labelElement.on(global.DC.MouseEventType.CLICK, incident) |
| | | } else if (type == 'HeatPoint') { |
| | | layersObjcect[layerName].setPositions(params.positions) |
| | | console.log('----------HeatPoint------------', params.positions) |
| | | } |
| | | |
| | | }, |
| | |
| | | |
| | | export const computerCapacity = (data, type) => { |
| | | if (type == 'region') { |
| | | console.log('computerCapacity', data) |
| | | const pointArr = data.reduce((pre, cur) => { |
| | | cur.position && JSON.parse(cur.position).coordinates[0][0].forEach(item => { |
| | | console.log(item, 959) |
| | |
| | | console.log(scope, scaledPoly, 5555) |
| | | } else { |
| | | let pointArr = [] |
| | | |
| | | console.log('data', data) |
| | | data.forEach(item => { |
| | | if (item.longitude && item.latitude) { |
| | | pointArr.push(turf.point([item.longitude, item.latitude])) |
| | |
| | | |
| | | console.log(scope, 5555) |
| | | |
| | | const poly = turf.polygon([[[0, 29], [3.5, 29], [2.5, 32], [0, 29]]]) |
| | | // const poly = turf.polygon([[[0, 29], [3.5, 29], [2.5, 32], [0, 29]]]) |
| | | |
| | | global.viewer.flyToBounds(scope, |
| | | { heading: 0, pitch: -45, roll: 0 }, |
| | |
| | | |
| | | <polyline-plot ref="PolylinePlotPage" :showingSecurityId="showingSecurityId"></polyline-plot> |
| | | |
| | | <two-draw-btn-box v-if="currentPlotType == 1" ref="DRAWBTNBOX" :="dialogVisible" |
| | | <two-draw-btn-box v-if="currentPlotType == 1" ref="DRAWBTNBOX" :dialogVisible="dialogVisible" |
| | | :isShowActivityEditBox="isShowActivityEditBox" :showingSecurityId="showingSecurityId" |
| | | :policeSwitch="policeSwitch" :polylineBtnSwitch="polylineBtnSwitch" :arrowBtnSwitch="arrowBtnSwitch" |
| | | :policeIconId="policeIconId" :lineWidth="lineWidth" @setPoliceOption="setPoliceOption"></two-draw-btn-box> |
| | |
| | | this.currentPlotType = params.item.plotType |
| | | |
| | | this.closeActivityDetails() |
| | | |
| | | // 当前选中的ID |
| | | this.showingSecurityId = params.item.id |
| | | // 当前选中的详情 |
| | | this.activityDetails = params.item |
| | | |
| | | // 测试安保活动报错 |
| | | this.dialogVisible = true |
| | | |
| | | if (this.userInfo.dept_id == '1123598813738675201' || this.userInfo.dept_id == params.item.deptId) { |
| | |
| | | |
| | | // 加载当前活动区域 |
| | | if (params.item.activityArea && params.item.activityArea.length > 0) { |
| | | |
| | | let polyGonData = params.item.activityArea.slice(11, params.item.activityArea.length - 1) |
| | | polyGonData = polyGonData.replace(/,/g, ";") |
| | | polyGonData = polyGonData.replace(/ /g, ",") |
| | |
| | | this.getSecurityPlotList(params.id) |
| | | this.getSecurityPoliceList(params.id) |
| | | this.getSecurityCarList(params.id) |
| | | |
| | | }, |
| | | |
| | | // 获取树状警员列表 |
| | |
| | | </div> |
| | | |
| | | <div class="second-container" :class="{ 'spread': boxShow, 'take-back': !boxShow }"> |
| | | <el-tree :data="treeData" show-checkbox node-key="id" @check="treeCheckClick"></el-tree> |
| | | <el-tree :data="treeData" show-checkbox node-key="id" @check="treeCheckClick" |
| | | @check-change="treeCheckChange"></el-tree> |
| | | </div> |
| | | |
| | | <map-search-box></map-search-box> |
| | |
| | | |
| | | import publicIndex from './components/publicIndex.vue' |
| | | import { initMapPosition } from '@/utils/mapPositionInit' |
| | | import { computerCapacity } from "@/utils/turfPolygon.js" |
| | | |
| | | |
| | | let loading = null |
| | |
| | | this.getEquipmentAll({ type: "2-2" }, '') |
| | | //执法记录仪 |
| | | this.getEquipmentAll({ type: 3 }, '') |
| | | |
| | | }, |
| | | |
| | | mounted () { |
| | |
| | | this.showingSecurityId = item.id |
| | | |
| | | this.$refs.PublicIndexPage.reloadAll({ id: item.id, deptId: item.deptId, item }) |
| | | |
| | | |
| | | this.activityDeptId = item.deptId |
| | | |
| | |
| | | } |
| | | this.dataTreeCheckedNodes = e2.checkedNodes |
| | | this.eachDataTreeCheckedNodes(this.dataTreeCheckedNodes) |
| | | }, |
| | | |
| | | //树形控件选中状态改变事件 |
| | | treeCheckChange (e1, e2) { |
| | | if (e2 && !e1.children) { |
| | | let iconArr = [] |
| | | if (e1.label == '视频监控') { |
| | | iconArr = cameraList |
| | | } else if (e1.label == '警车') { |
| | | iconArr = carList |
| | | } else if (e1.label == '公网') { |
| | | iconArr = talkBackEquipmentPublicList |
| | | } else if (e1.label == '专网') { |
| | | iconArr = talkBackEquipmentList |
| | | } else if (e1.label == '执法记录仪') { |
| | | iconArr = policeCarmeraList |
| | | } |
| | | // 获取图标中心跳转 |
| | | computerCapacity(iconArr, 'icon') |
| | | |
| | | } |
| | | }, |
| | | |
| | | // 遍历树数据实时图标 |
| | |
| | | </ul> |
| | | |
| | | <!-- <vue-seamless-scroll v-if="policeSituationRealtimeArr.length > 0" :data="policeSituationRealtimeArr" |
| | | class="warp" :class-option="classOption"> --> |
| | | class="warp" :class-option="classOption"> --> |
| | | <div v-if="policeSituationRealtimeArr.length > 0" :data="policeSituationRealtimeArr" class="warp" |
| | | :class-option="classOption"> |
| | | <el-carousel indicator-position="none" direction="vertical" @change="changeAlarm"> |
| | |
| | | |
| | | // 获取实时接警记录 |
| | | getAnswerPolices () { |
| | | |
| | | getAnswerPolices({ deptId: this.policeStaionID != '' ? this.policeStaionID : this.userInfo.dept_id }).then(res => { |
| | | this.policeSituationRealtimeArr = [] |
| | | |
| | |
| | | |
| | | this.navClick(0) |
| | | this.setTableHeight() |
| | | console.log('mounted') |
| | | let list = [] |
| | | for (let i = 0; i < 10000; i++) { |
| | | let lng = 121.48339987478337 + Math.random() * 0.05 |
| | | let lat = 31.220954026657488 + Math.random() * 0.05 |
| | | list.push(new global.DC.Position(lng, lat)) |
| | | } |
| | | console.log(list, 2222222222) |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'policeInfoHeatLayer', |
| | | type: "HeatPoint", |
| | | layerType: 'HeatLayer', |
| | | params: { |
| | | positions: list |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | window.addEventListener('resize', this.setTableHeight) |
| | |
| | | getAnswerPolices () { |
| | | this.loading() |
| | | this.realPoliceInforData = [] |
| | | this.realEmptyText = "" |
| | | |
| | | this.realEmptyText = " " |
| | | getAnswerPolices({ deptId: this.userInfo.dept_id }).then(res => { |
| | | |
| | | if (res.data && res.data.length) { |
| | | this.realPoliceInforData = res.data.map((item, index) => { |
| | | const bjlxText = BjlxData.filter(i => item.BJLX == i.BJLX)[0].VALUE || '' |
| | | const bjlxText = BjlxData.filter(i => item.BJLX == i.BJLX)[0] ? BjlxData.filter(i => item.BJLX == i.BJLX)[0].VALUE : '' |
| | | |
| | | return { ...item, index: index + 1, lng: item.ZDDWXZB, lat: item.ZDDWYZB, BJLX: bjlxText } |
| | | }) |
| | | this.addPoliceInforSiteLayer(this.realPoliceInforData) |
| | | } else { |
| | | this.realPoliceInforData = [] |
| | | this.realEmptyText = "暂无实时警情信息" |
| | | } |
| | | |
| | | this.addPoliceInforSiteLayer(this.realPoliceInforData) |
| | | setTimeout(() => { |
| | | loading && loading.close() |
| | | }, 500) |
| | | }).catch(res => { |
| | | this.realEmptyText = "实时警情请求失败" |
| | | this.realEmptyText = "暂无实时警情信息" |
| | | setTimeout(() => { |
| | | loading && loading.close() |
| | | }, 500) |
| | |
| | | // }, 500) |
| | | }, |
| | | |
| | | // 获取历史接警记录 |
| | | // 获取历史接警记录(不分页) |
| | | getAlarmList (params) { |
| | | this.loading() |
| | | this.historyPoliceInforData = [] |
| | | this.historyEmptyText = "" |
| | | |
| | | getAlarmList({ ...params, size: this.pages.size, jjdwbh: this.userInfo.dept_id }).then(res => { |
| | | |
| | | if (res.data.data.records.length > 0) { |
| | | this.pages.total = res.data.data.pages |
| | | this.historyPoliceInforData = res.data.data.records.map((item, index) => { |
| | | const bjlxText = BjlxData.filter(i => item.BJLX == i.BJLX)[0].VALUE || '' |
| | | |
| | | getAlarmList({ ...params, size: this.pages.size, jjdwbh: this.userInfo.dept_id, type: 3 }).then(res => { |
| | | console.log('------------getAlarmList----------', res.data.data, 1122) |
| | | if (res.data.data.length > 0) { |
| | | // this.pages.total = res.data.data.pages |
| | | this.historyPoliceInforData = res.data.data.map((item, index) => { |
| | | const bjlxText = BjlxData.filter(i => item.BJLX == i.BJLX)[0] ? BjlxData.filter(i => item.BJLX == i.BJLX)[0].VALUE : '' |
| | | return { ...item, index: index + 1, lng: item.ZDDWXZB, lat: item.ZDDWYZB, BJLX: bjlxText } |
| | | }) |
| | | } else { |
| | | this.pages.total = 0 |
| | | // this.pages.total = 0 |
| | | this.historyPoliceInforData = [] |
| | | this.realEmptyText = "暂无历史警情信息" |
| | | } |
| | | |
| | | this.addPoliceInforSiteLayer(this.historyPoliceInforData) |
| | | setTimeout(() => { |
| | | loading && loading.close() |
| | | }, 500) |
| | | }).catch(res => { |
| | | setTimeout(() => { |
| | | loading && loading.close() |
| | | }, 500) |
| | |
| | | |
| | | addPoliceInforSiteLayer (data) { |
| | | this.clearLayer() |
| | | let policeInfoPositionList = [] |
| | | |
| | | data.forEach((item, index) => { |
| | | |
| | | if (item.lng && item.lng != undefined && item.lng != '') { |
| | | let center = new global.DC.Position(Number(item.lng), Number(item.lat)) |
| | | let point = new global.DC.PointPrimitive(center) |
| | | |
| | | policeInfoPositionList.push(center) |
| | | let num = 0 |
| | | |
| | | timer[index] = setInterval(() => { |
| | |
| | | |
| | | point.attrParams = item |
| | | point.on(global.DC.MouseEventType.CLICK, this.siteClick) |
| | | policeInforSiteLayer.addOverlay(point) |
| | | // policeInforSiteLayer.addOverlay(point) |
| | | } |
| | | }) |
| | | let list = [] |
| | | for (let i = 0; i < 10000; i++) { |
| | | let lng = 121.48339987478337 + Math.random() * 0.05 |
| | | let lat = 31.220954026657488 + Math.random() * 0.05 |
| | | list.push(new global.DC.Position(lng, lat)) |
| | | } |
| | | console.log('policeInfoPositionList', policeInfoPositionList) |
| | | this.$EventBus.$emit('layerPointAdd', { |
| | | layerName: 'policeInfoHeatLayer', |
| | | type: "HeatPoint", |
| | | layerType: 'HeatLayer', |
| | | params: { |
| | | positions: list |
| | | } |
| | | }) |
| | | }, |
| | |
| | | proxy: { |
| | | "/api": { |
| | | // target用于配置你允许访问数据的计算机名称,即是你的api接口的服务器地址 |
| | | target: "http://localhost:82", |
| | | // target: "http://192.168.0.100:82", |
| | | // target: "http://localhost:82", |
| | | target: "http://192.168.0.100:82", |
| | | // target: "http://17.20.10.3:82", |
| | | // target: "http://10.141.11.11:8081/api", |
| | | // ws: true, //启用webSocket6566 |