九公司定位系统配置文件更新
parent
77615123da
commit
ece26192aa
|
@ -53,8 +53,8 @@
|
||||||
<carPositionCfdD v-if="type === 'carPosition'" :id="id" :type="type" :infoname="infoname"/>
|
<carPositionCfdD v-if="type === 'carPosition'" :id="id" :type="type" :infoname="infoname"/>
|
||||||
<!--曹妃甸东 八项作业 曹实业详细页面 end-->
|
<!--曹妃甸东 八项作业 曹实业详细页面 end-->
|
||||||
<peoplePositionNine v-if="type === 'peoplePositionNine'" :id="id" :type="type" :infoname="infoname"/>
|
<peoplePositionNine v-if="type === 'peoplePositionNine'" :id="id" :type="type" :infoname="infoname"/>
|
||||||
<peoplePositionOne v-if="type === 'peoplePositionOne' && corpInfoId !== '035958e685cf4850bc40151c5e0617a6'" :id="id" :type="type" />
|
<peoplePositionOne v-if="type === 'peoplePositionOne' && !(corpInfoId === '035958e685cf4850bc40151c5e0617a6' || corpInfoId === '21590a00ea5e462e9ee44dd332dddc26')" :id="id" :type="type" />
|
||||||
<peoplePositionYGS v-if="type === 'peoplePositionOne' && corpInfoId === '035958e685cf4850bc40151c5e0617a6'" :id="id" :type="type" :corp-id="corpInfoId" />
|
<peoplePositionYGS v-if="type === 'peoplePositionOne' && (corpInfoId === '035958e685cf4850bc40151c5e0617a6' || corpInfoId === '21590a00ea5e462e9ee44dd332dddc26')" :id="id" :type="type" :corp-id="corpInfoId" />
|
||||||
<!-- 重点工程 start -->
|
<!-- 重点工程 start -->
|
||||||
<outSourceInfo v-if="type === 'PROJECT'" :id="id" :type="type" />
|
<outSourceInfo v-if="type === 'PROJECT'" :id="id" :type="type" />
|
||||||
<outSourceVideoInfo v-if="type === 'VIDEO'" :id="id" :type="type" />
|
<outSourceVideoInfo v-if="type === 'VIDEO'" :id="id" :type="type" />
|
||||||
|
@ -111,7 +111,6 @@ import outSourceVideoInfo from './outSourceVideoInfo.vue'
|
||||||
import AlarmDevice from './alarmDevice'
|
import AlarmDevice from './alarmDevice'
|
||||||
import meteorologicalMonitoring from './meteorologicalMonitoring.vue'
|
import meteorologicalMonitoring from './meteorologicalMonitoring.vue'
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
AlarmDevice,
|
AlarmDevice,
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bbg-transparent">定位卡电量</td>
|
<td class="bbg-transparent">定位卡电量</td>
|
||||||
<td >{{ info?otherInfo.data[3].currentValBody.val:'' }}</td>
|
<td >{{ info?(otherInfo?otherInfo.data[3].currentValBody.val:'*'):'' }}</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="bbg-transparent">部门</td>
|
<td class="bbg-transparent">部门</td>
|
||||||
|
|
|
@ -1346,15 +1346,14 @@ export default {
|
||||||
url: '/mapapi/ware/upload/qhdgysh/merge_tile.json'
|
url: '/mapapi/ware/upload/qhdgysh/merge_tile.json'
|
||||||
})
|
})
|
||||||
viewer.scene.primitives.add(qhdgysh)
|
viewer.scene.primitives.add(qhdgysh)
|
||||||
var czkszhmt = new Cesium.Cesium3DTileset({ //沧州矿石 杂货码头
|
var czkszhmt = new Cesium.Cesium3DTileset({ // 沧州矿石 杂货码头
|
||||||
url: '/mapapi/ware/upload/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E8%A5%BF/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E8%A5%BF/merge_tile.json'
|
url: '/mapapi/ware/upload/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E8%A5%BF/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E8%A5%BF/merge_tile.json'
|
||||||
})
|
})
|
||||||
viewer.scene.primitives.add(czkszhmt)
|
viewer.scene.primitives.add(czkszhmt)
|
||||||
var czksksmt = new Cesium.Cesium3DTileset({//沧州矿石 矿石码头
|
var czksksmt = new Cesium.Cesium3DTileset({// 沧州矿石 矿石码头
|
||||||
url: '/mapapi/ware/upload/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E4%B8%9C/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E4%B8%9C/merge_tile.json'
|
url: '/mapapi/ware/upload/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E4%B8%9C/%E6%B2%A7%E5%B7%9E%E6%B8%AF%E4%B8%9C/merge_tile.json'
|
||||||
})
|
})
|
||||||
viewer.scene.primitives.add(czksksmt)
|
viewer.scene.primitives.add(czksksmt)
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
leftDownAction() {
|
leftDownAction() {
|
||||||
|
@ -2050,6 +2049,10 @@ export default {
|
||||||
this.clearMqttPoint('+/UwbBQ/')
|
this.clearMqttPoint('+/UwbBQ/')
|
||||||
this.removeTrajectory()
|
this.removeTrajectory()
|
||||||
}
|
}
|
||||||
|
if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '21590a00ea5e462e9ee44dd332dddc26' && urlType === 'peoplePosition') {
|
||||||
|
this.clearRYDWPoint('+/UwbBQ/')
|
||||||
|
this.removeTrajectory()
|
||||||
|
}
|
||||||
this.bottomOptionsList[pindex].list[index].check = false
|
this.bottomOptionsList[pindex].list[index].check = false
|
||||||
if (this.gangkouActive === '00004') {
|
if (this.gangkouActive === '00004') {
|
||||||
this.cfdBottomOptionsList[pindex].list[index].check = false
|
this.cfdBottomOptionsList[pindex].list[index].check = false
|
||||||
|
@ -2078,6 +2081,9 @@ export default {
|
||||||
}
|
}
|
||||||
if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '035958e685cf4850bc40151c5e0617a6' && urlType === 'peoplePosition') {
|
if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '035958e685cf4850bc40151c5e0617a6' && urlType === 'peoplePosition') {
|
||||||
!this.connecting ? this.createConnection(this.CORP_INFO_ID) : this.doSubscribe()
|
!this.connecting ? this.createConnection(this.CORP_INFO_ID) : this.doSubscribe()
|
||||||
|
} else if (this.gangkouActive === '00003' && this.CORP_INFO_ID === '21590a00ea5e462e9ee44dd332dddc26' && urlType === 'peoplePosition') {
|
||||||
|
// websocket实时获取人员定位
|
||||||
|
this.initRYDWWebsocket('21590a00ea5e462e9ee44dd332dddc26')
|
||||||
} else {
|
} else {
|
||||||
requestFN(
|
requestFN(
|
||||||
pointUrl,
|
pointUrl,
|
||||||
|
@ -2344,7 +2350,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查询当前点位是否在区域内
|
// 查询当前点位是否在区域内
|
||||||
isPointxyWithinTheArea(pointBox, x, y) {
|
isPointxyWithinTheArea(pointBox = {}, x, y) {
|
||||||
if (this.forEachIsPointInPolygon(pointBox.redList, x, y)) {
|
if (this.forEachIsPointInPolygon(pointBox.redList, x, y)) {
|
||||||
return '_1'
|
return '_1'
|
||||||
} else if (this.forEachIsPointInPolygon(pointBox.orangeList, x, y)) {
|
} else if (this.forEachIsPointInPolygon(pointBox.orangeList, x, y)) {
|
||||||
|
@ -2635,6 +2641,15 @@ export default {
|
||||||
delete this.mqttPoint[key]
|
delete this.mqttPoint[key]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
clearRYDWPoint(prefix) {
|
||||||
|
this.fwebsocket.close()
|
||||||
|
for (const mqttPointKey in this.mqttPoint) {
|
||||||
|
const key = prefix ? prefix + this.mqttPoint[mqttPointKey] : mqttPointKey
|
||||||
|
viewer.entities.removeById(this.mqttPoint[key])
|
||||||
|
this.onePerLocArr = this.onePerLocArr.filter(item => item.data_id !== this.mqttPoint[key])
|
||||||
|
delete this.mqttPoint[key]
|
||||||
|
}
|
||||||
|
},
|
||||||
// 删除人员定位点
|
// 删除人员定位点
|
||||||
clearCmtMqttPoint(prefix) {
|
clearCmtMqttPoint(prefix) {
|
||||||
for (const mqttPointKey in this.allOrientationPoint) {
|
for (const mqttPointKey in this.allOrientationPoint) {
|
||||||
|
@ -2806,6 +2821,51 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
// 九公司人员定位websocket
|
||||||
|
initRYDWWebsocket(CORP_INFO_ID) {
|
||||||
|
// eslint-disable-next-line no-unused-vars
|
||||||
|
const _this = this
|
||||||
|
if (window.WebSocket) {
|
||||||
|
const wsUrl = config.noDwSysUrl + '/ltLocation/DW_' + new Date().getTime() + '_98'
|
||||||
|
_this.fwebsocket = new WebSocket(encodeURI(wsUrl))
|
||||||
|
_this.fwebsocket.onmessage = function(message) {
|
||||||
|
console.info('接收消息')
|
||||||
|
const peopleList = JSON.parse(message.data).data.data
|
||||||
|
console.log(peopleList)
|
||||||
|
for (let i = 0; i < peopleList.length; i++) {
|
||||||
|
const item = peopleList[i]
|
||||||
|
if ((!item) || (item.ts === 1)) continue
|
||||||
|
// 将地图上剩余的点与最新的定位人员点进行对比 更新地图上已存在的点 新增地图上之前没有的点
|
||||||
|
const index = _this.onePerLocArr.findIndex(item1 => {
|
||||||
|
return item1.id.toString() === item.id.toString()
|
||||||
|
})
|
||||||
|
const x = item.lon
|
||||||
|
const y = item.lat
|
||||||
|
const pointColor = _this.isPointxyWithinTheArea(this.pointBox, x, y)
|
||||||
|
if (index !== -1) {
|
||||||
|
_this.onePerLocArr[index].x = x
|
||||||
|
_this.onePerLocArr[index].y = y
|
||||||
|
_this.onePerLocArr[index].icon_type = 'img4_0' + pointColor
|
||||||
|
ry_drag.getPosition(_this.onePerLocArr[index])
|
||||||
|
} else {
|
||||||
|
const perLoc = {
|
||||||
|
id: item.id,
|
||||||
|
x: x,
|
||||||
|
y: y,
|
||||||
|
icon_type: 'img4_0' + pointColor,
|
||||||
|
data_id: item.id,
|
||||||
|
point_type: '标记点peoplePositionOne',
|
||||||
|
label: '人员定位',
|
||||||
|
corpInfoId: CORP_INFO_ID
|
||||||
|
}
|
||||||
|
_this.onePerLocArr.push(perLoc)
|
||||||
|
ry_drag.addEntity(perLoc)
|
||||||
|
_this.mqttPoint[_this.subscription.topic.substring(0, _this.subscription.topic.lastIndexOf('+')) + item.id] = item.id
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
radomPer(mockData) {
|
radomPer(mockData) {
|
||||||
for (const item of mockData.data) {
|
for (const item of mockData.data) {
|
||||||
item.longitude += 0.0003 * Math.random()
|
item.longitude += 0.0003 * Math.random()
|
||||||
|
@ -3042,7 +3102,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 循环判断某个点是否在某些区域内。只要在任意一个区域内。则返回true
|
// 循环判断某个点是否在某些区域内。只要在任意一个区域内。则返回true
|
||||||
forEachIsPointInPolygon(polygonList, lng, lat) {
|
forEachIsPointInPolygon(polygonList = [], lng, lat) {
|
||||||
return polygonList.some(item => {
|
return polygonList.some(item => {
|
||||||
return this.isPointInPolygon(item.position, lng, lat)
|
return this.isPointInPolygon(item.position, lng, lat)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue