九公司定位系统配置文件更新

20240528Test
liujun 2024-05-20 13:51:32 +08:00
parent a48f15c9c9
commit c9bf16eb53
4 changed files with 68 additions and 7 deletions

View File

@ -48,8 +48,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="035958e685cf4850bc40151c5e0617a6" /> <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" />

View File

@ -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>

View File

@ -1762,6 +1762,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
@ -1782,6 +1786,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,
@ -2042,7 +2049,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)) {
@ -2153,6 +2160,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]
}
},
// //
doSubscribe() { doSubscribe() {
const { topic, topic1, qos } = this.subscription const { topic, topic1, qos } = this.subscription
@ -2316,6 +2332,50 @@ 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
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()
@ -2551,7 +2611,7 @@ export default {
}) })
}, },
// //
isPointWithinTheArea(pointBox, point) { isPointWithinTheArea(pointBox = {}, point) {
if (this.forEachIsPointInPolygon(pointBox.redList, point.x, point.y)) { if (this.forEachIsPointInPolygon(pointBox.redList, point.x, point.y)) {
point.color = 'red' point.color = 'red'
} else if (this.forEachIsPointInPolygon(pointBox.orangeList, point.x, point.y)) { } else if (this.forEachIsPointInPolygon(pointBox.orangeList, point.x, point.y)) {
@ -2564,7 +2624,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)
}) })

View File

@ -9,5 +9,6 @@ const config = {
weburlWaiwang: 'https://qgqy.qhdsafety.com/', // 服务器外网地址 weburlWaiwang: 'https://qgqy.qhdsafety.com/', // 服务器外网地址
httpurlWaiwang: 'https://qgqy.qhdsafety.com/qa-prevention-gwj/', // , httpurlWaiwang: 'https://qgqy.qhdsafety.com/qa-prevention-gwj/', // ,
fileUrlWaiwang: 'https://qgqy.qhdsafety.com/file/', // 服务器外网 附件地址, fileUrlWaiwang: 'https://qgqy.qhdsafety.com/file/', // 服务器外网 附件地址,
publicKey: 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2zCyUYSD0pNrbtaYdvGfHfWoRV+fo/2N9O2PLLz/jZvMkigkq4eAq4JO+Ek0wDHI9WxP6iTSLYCHhIOs9CQTPvyldJFm8riZtQZlBTD8Plkb3rjrgwTqbBi3w3+HKYdkSvGFXJIdSOPbpXnj5BzN8vlVaybs24R/vpUzG9178lwIDAQAB' publicKey: 'MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2zCyUYSD0pNrbtaYdvGfHfWoRV+fo/2N9O2PLLz/jZvMkigkq4eAq4JO+Ek0wDHI9WxP6iTSLYCHhIOs9CQTPvyldJFm8riZtQZlBTD8Plkb3rjrgwTqbBi3w3+HKYdkSvGFXJIdSOPbpXnj5BzN8vlVaybs24R/vpUzG9178lwIDAQAB',
NoDwSysUrl: 'ws://192.168.151.27:9002' // 人员定位系统websocket地址
} }