Merge branch 'dev-2024年1月8日' into 2024年1月24日测试

# Conflicts:
#	src/views/map/components/renyuanCmt.vue
#	src/views/map/index.vue
2024年1月24日测试
liujun 2024-01-30 09:41:44 +08:00
commit 70cae2001b
3 changed files with 83 additions and 211 deletions

View File

@ -165,6 +165,11 @@ export default {
}
},
mounted() {
// this.obtainPersonnelData()
// this.personPositioningStatistics()
// this.startPersonnelDataTimer() //
// this.obtainCarData()
// this.carPositioningStatistics()
},
destroyed() {
clearInterval(this.timer) //

View File

@ -15,6 +15,7 @@
<mk-gate-machine-cmt v-if="type === 'CAR00005'||type ==='PERSON00005' " :id="id" :type="type" :gangkou="gangkou" :infoname="infoname"/>
<zhong_da_info v-if="type === 'majordangersource'" :id="id" :type="type" :gangkou="gangkou"/>
<video-play v-if="type === 'video'" :id="id" :type="type" :gangkou="gangkou" request-url="/api/homemajor/getVideoInfo"/>
<video-play-cmt v-if="type === 'platcamera00005' || type === 'CAMERA00005'" :id="id" :type="type" :gangkou="gangkou"/>
<video-play-cfd v-if="type === 'CAMERA00004' || type === 'platcamera00004'" :id="id" :type="type" :gangkou="gangkou"/>
<video-play-cmt v-if="type === 'CAMERA00005' || type === 'platcamera00005'" :id="id" :type="type" :gangkou="gangkou"/>
<video-play-plat v-if="type === 'platcamera'" :id="id" :type="type" :gangkou="gangkou" :corp-info-id="corpInfoId"/>
@ -81,6 +82,7 @@ import blindboardOrder from './blindboardOrder.vue'
import breakgroundOrder from './breakgroundOrder.vue'
import hoistingOrder from './hoistingOrder.vue'
import videoPlay from './video_play.vue'
import videoPlayCmt from './video_play_cmt.vue'
import videoPlayCfd from './video_play_cfd.vue'
import videoPlayCmt from './video_play_cmt.vue'
import videoPlayPlat from './video_play_plat.vue'
@ -122,6 +124,7 @@ export default {
breakgroundOrder,
hoistingOrder,
videoPlay,
videoPlayCmt,
videoPlayCfd,
videoPlayCmt,
videoPlayPlat,

View File

@ -39,7 +39,7 @@
:corp-info-id="CORP_INFO_ID"
:gangkou="gangkouActive"/>
<menjin
v-if="gangkouActive && gangkouActive !== '00004' && gangkouActive !== '00002' && gangkouActive !== '00005' && bottomOptionsIndex === 0"
v-if="gangkouActive && gangkouActive !== '00004' && gangkouActive !== '00005' && gangkouActive !== '00002' && bottomOptionsIndex === 0"
:corp-info-id="CORP_INFO_ID"
:area="area"
:gangkou="gangkouActive"/>
@ -48,13 +48,13 @@
:corp-info-id="CORP_INFO_ID"
:area="area"
:gangkou="gangkouActive"/>
<menjin-cmt
v-if="gangkouActive && gangkouActive === '00005' && bottomOptionsIndex === 0"
<menjin-czks
v-if="gangkouActive && gangkouActive === '00002' && bottomOptionsIndex === 0"
:corp-info-id="CORP_INFO_ID"
:area="area"
:gangkou="gangkouActive"/>
<menjin-czks
v-if="gangkouActive && gangkouActive === '00002' && bottomOptionsIndex === 0"
<menjin-cmt
v-if="gangkouActive && gangkouActive === '00005' && bottomOptionsIndex === 0"
:corp-info-id="CORP_INFO_ID"
:area="area"
:gangkou="gangkouActive"/>
@ -191,7 +191,7 @@
>
<div v-if="bottomOptionsIndex !== ''" class="item">
<template v-for="(item1,index1) in item.list">
<template v-if="containAuthorizationShow(item1,item)">
<template v-if="containAuthorizationShow(item1)">
<template v-if="eliminateAuthorizationShow(item1)">
<div
:key="index1"
@ -250,6 +250,7 @@ import caofeidianIndex from './components/caofeidian_index.vue'
import czksIndex from './components/czks_index.vue'
import menjinCzks from './components/menjinCzks.vue'
import renyuanCzks from './components/renyuanCzks.vue'
import renyuanCmt from './components/renyuanCmt.vue'
import menjin from './components/menjin.vue'
import menjinCfd from './components/menjinCfd.vue'
import menjinCmt from './components/menjinCmt.vue'
@ -258,7 +259,6 @@ import anquan from './components/anquan.vue'
import anquanCfd from './components/anquanCfd.vue'
import qixiang from './components/qixiang.vue'
import renyuan from './components/renyuan.vue'
import renyuanCmt from './components/renyuanCmt.vue'
import bianjieruqin from './components/bianjieruqin.vue'
import renyuanCfd from './components/renyuanCfd.vue'
import zhongda from './components/zhongda.vue'
@ -280,9 +280,6 @@ let drag = null
let ry_drag = null
var tiandituTk = 'e8a16137fd226a62a23cc7ba5c9c78ce'
var subdomains = ['0', '1', '2', '3', '4', '5', '6', '7']
var PI = 3.1415926535897932384626
var a = 6378245.0 //
var ee = 0.00669342162296594323 // 椭球的偏心率。//判断是否在国内在中国国内的经纬度才需要做偏移
//
let czksPerLocArr = []
const Cesium = window.Cesium
@ -301,6 +298,7 @@ export default {
czksIndex,
menjinCzks,
renyuanCzks,
renyuanCmt,
// navigation,
gangkouIndex,
fengongsiIndex,
@ -313,7 +311,6 @@ export default {
anquan,
qixiang,
renyuan,
renyuanCmt,
renyuanCfd,
zhongda,
layoutDialog,
@ -516,16 +513,16 @@ export default {
containAuthorization: [],
eliminateAuthorization: []
},
{
label: '消防水源',
dialog_width: '600px',
check: false,
type: 'xfsy01',
img: require('../../assets/map/gangkou_index/buttom/ico7.png'),
checkImg: require('../../assets/map/gangkou_index/buttom/ico7_on.png'),
containAuthorization: [],
eliminateAuthorization: []
},
// {
// label: '',
// dialog_width: '600px',
// check: false,
// type: 'xfsy01',
// img: require('../../assets/map/gangkou_index/buttom/ico7.png'),
// checkImg: require('../../assets/map/gangkou_index/buttom/ico7_on.png'),
// containAuthorization: [],
// eliminateAuthorization: []
// },
{
label: '消防点位',
dialog_width: '600px',
@ -1154,58 +1151,58 @@ export default {
},
keepalive(token) {
//
// requestFN(
// '/map/loginOrKeepAlive',
// {
// }
// ).then((data) => {
//
// })
requestFN(
'/map/loginOrKeepAlive',
{
}
).then((data) => {
})
},
ysVideoInit() {
//
// var _this = this
// requestFN(
// '/map/loginOrKeepAlive',
// {
// }
// ).then((data) => {
// const token = data.token
// var nbsp = String.fromCharCode(160)
// var arr = []
// arr.length = 40
// const str = arr.fill(nbsp).join('')
// const voidPath = imosPlayer.getUniqueID()
// window.voidPath = voidPath
// document.title = document.title + str + new Date().getTime()
// _this.keepalive(token)
// setInterval(_this.keepalive, 30000, token)
//
// window.videoWindow = 0
// imosPlayer.setLinkPort('8093')
// imosPlayer
// .init({
// ip: '172.14.0.54',
// token: token,
// title: document.title,
// voidListenerPath: '\\' + voidPath
// })
// .then(async(resr) => {
// if (resr.ErrCode === 0) {
// // imosPlayer.setLiveNetLinkMode(liveNetProtocol, liveByMS)
// // imosPlayer.setReplayNetLinkMode(replayNetProtocol, replayByMS)
//
// // eslint-disable-next-line no-alert
// console.info('')
// } else {
// // eslint-disable-next-line no-alert
// console.info(resr.ErrMsg)
// }
// })
// .catch((err) => {
// console.error(err)
// })
// })
var _this = this
requestFN(
'/map/loginOrKeepAlive',
{
}
).then((data) => {
const token = data.token
var nbsp = String.fromCharCode(160)
var arr = []
arr.length = 40
const str = arr.fill(nbsp).join('')
const voidPath = imosPlayer.getUniqueID()
window.voidPath = voidPath
document.title = document.title + str + new Date().getTime()
_this.keepalive(token)
setInterval(_this.keepalive, 30000, token)
window.videoWindow = 0
imosPlayer.setLinkPort('8093')
imosPlayer
.init({
ip: '172.14.0.54',
token: token,
title: document.title,
voidListenerPath: '\\' + voidPath
})
.then(async(resr) => {
if (resr.ErrCode === 0) {
// imosPlayer.setLiveNetLinkMode(liveNetProtocol, liveByMS)
// imosPlayer.setReplayNetLinkMode(replayNetProtocol, replayByMS)
// eslint-disable-next-line no-alert
console.info('登录成功')
} else {
// eslint-disable-next-line no-alert
console.info(resr.ErrMsg)
}
})
.catch((err) => {
console.error(err)
})
})
},
// keepalive(token) {
// axios({
@ -1407,7 +1404,8 @@ export default {
this.dialog.infoname = infoname
return
}
if (this.gangkouActive === '00005' && point_id.substring(0, 1) !== '1' && point_type !== 'peoplePosition') {
if (this.gangkouActive === '00005' && point_id.substring(0, 1) !== '1') {
// if (this.gangkouActive === '00004' && point_type.indexOf('') !== -1 && point_id.substring(0, 1) === '0' || point_id.substring(0, 1) === '5') {
const { label, point_type, data_id, infoname,name, code } = pick.id._monitoItems.data
this.dialog.visible = true
this.dialog.title = label
@ -1419,19 +1417,6 @@ export default {
console.log(this.dialog)
return
}
if (this.gangkouActive === '00005' && point_type === 'peoplePosition') {
const { label, point_type, id, corpInfoId, name, infoname } = pick.id._monitoItems.data
console.log(pick.id._monitoItems.data)
this.dialog.visible = true
this.dialog.title = label
this.dialog.type = point_type+'00005'
console.log(this.dialog.type)
this.dialog.id = id
this.dialog.name = name
this.dialog.infoname = infoname
this.dialog.corpInfoId = corpInfoId
return
}
if (point_type.indexOf('标记点') !== -1) {
const { label, point_type, data_id, corpInfoId, dialog_width, infoname } = pick.id._monitoItems.data
this.dialog.visible = true
@ -1941,7 +1926,6 @@ export default {
},
bottomOptionsItemsClick(pindex, index, label, urlType, pointUrl, dialog_width) {
var _this = this
if (this.bottomOptionsList[pindex].list[index].check || this.gangkouActive === '00004' && this.cfdBottomOptionsList[pindex].list[index].check) {
//
//
@ -2050,7 +2034,6 @@ export default {
point.name = varList[i].MAP_POINT_NAME
point.infoname = varList[i].MAP_POINT_NAME
}
console.log(point)
points.push(point)
}
if (this.gangkouActive === '00004' && urlType === 'carPosition') {
@ -2072,13 +2055,6 @@ export default {
} else {
this.dragEntity(points, pindex, index)
}
// websocket
if (this.gangkouActive === '00005' && urlType === 'peoplePosition') {
if (!this.fwebsocket.url) {
this.cmtinitNinePerLocWebsocket()
}
}
_this.dragEntity(points, pindex, index)
}).catch((e) => {
console.log(e)
})
@ -2487,71 +2463,6 @@ export default {
}
}
},
// websocket
cmtinitNinePerLocWebsocket() {
const _this = this
console.info(config.perRealTimeLocUrl)
if (window.WebSocket) {
this.fwebsocket = new WebSocket(encodeURI('ws://' + config.cmtperRealTimeLocUrl)) // oladressmain.jsp
this.fwebsocket.onopen = () => {
console.info('人员定位监听成功')
}
this.fwebsocket.onerror = function() {
console.info('连接失败')
}
this.fwebsocket.onclose = function() {
console.info('onclose')
}
this.fwebsocket.onmessage = function(message) {
const mockData = JSON.parse(message.data)
console.log(mockData)
//
const ninePerLoc = _this.ninePerLocArr.filter(item => {
const index = mockData.findIndex(item1 => {
return item.id.toString() === item1.cardno.toString()
})
return index !== -1
})
//
for (const item of mockData) {
console.log(item)
const wgs84 = _this.gcj02towgs84(parseFloat(item.longitude), parseFloat(item.latitude))
item.longitude = wgs84[0]
item.latitude = wgs84[1]
const index = ninePerLoc.findIndex(item1 => {
return item1.id.toString() === item.cardno.toString()
})
const pointColor = _this.isPointxyWithinTheArea(_this.pointBox, item.longitude, item.latitude)
if (index !== -1) {
ninePerLoc[index].x = item.longitude
ninePerLoc[index].y = item.latitude
ninePerLoc[index].icon_type = 'img4_0' + pointColor
ry_drag.getPosition(ninePerLoc[index])
} else {
const perLoc = {
id: item.cardno,
name: item.name,
x: item.longitude,
y: item.latitude,
point_type: 'peoplePosition',
icon_type: 'img4_0' + pointColor
}
ninePerLoc.push(perLoc)
ry_drag.delEntity(perLoc)
ry_drag.addEntity(perLoc)
var qianzhui = 'person'
_this.allOrientationPoint[qianzhui + item.cardno] = item.cardno
// qianzhui
}
}
// ninePerLocArr
_this.ninePerLocArr = ninePerLoc
}
}
},
/* 一公司人员定位 mqtt务必使用4.2.1版本*/
// websocket
initNinePerLocWebsocket() {
@ -2860,7 +2771,6 @@ export default {
point.empNo = data.empNo || '' //
point.cardNo = data.cardNo || '' //
point.gangkou = this.gangkouActive
console.log(point)
return point
},
//
@ -2920,42 +2830,7 @@ export default {
}
})
},
gcj02towgs84(lng, lat) {
if (this.out_of_china(lng, lat)) {
return [lng, lat]
} else {
var dlat = this.transformlat(lng - 105.0, lat - 35.0)
var dlng = this.transformlng(lng - 105.0, lat - 35.0)
var radlat = lat / 180.0 * PI
var magic = Math.sin(radlat)
magic = 1 - ee * magic * magic
var sqrtmagic = Math.sqrt(magic)
dlat = (dlat * 180.0) / ((a * (1 - ee)) / (magic * sqrtmagic) * PI)
dlng = (dlng * 180.0) / (a / sqrtmagic * Math.cos(radlat) * PI)
const mglat = lat + dlat
const mglng = lng + dlng
return [lng * 2 - mglng, lat * 2 - mglat]
}
},
out_of_china(lng, lat) {
return (lng < 72.004 || lng > 137.8347 || (lat < 0.8293 || lat > 55.8271 || false))
},
//
transformlng(lng, lat) {
var ret = 300.0 + lng + 2.0 * lat + 0.1 * lng * lng + 0.1 * lng * lat + 0.1 * Math.sqrt(Math.abs(lng))
ret += ((20.0 * Math.sin(6.0 * lng * PI) + 20.0 * Math.sin(2.0 * lng * PI)) * 2.0) / 3.0
ret += ((20.0 * Math.sin(lng * PI) + 40.0 * Math.sin((lng / 3.0) * PI)) * 2.0) / 3.0
ret += ((150.0 * Math.sin((lng / 12.0) * PI) + 300.0 * Math.sin((lng / 30.0) * PI)) * 2.0) / 3.0
return ret
},
//
transformlat(lng, lat) {
var ret = -100.0 + 2.0 * lng + 3.0 * lat + 0.2 * lat * lat + 0.1 * lng * lat + 0.2 * Math.sqrt(Math.abs(lng))
ret += ((20.0 * Math.sin(6.0 * lng * PI) + 20.0 * Math.sin(2.0 * lng * PI)) * 2.0) / 3.0
ret += ((20.0 * Math.sin(lat * PI) + 40.0 * Math.sin((lat / 3.0) * PI)) * 2.0) / 3.0
ret += ((160.0 * Math.sin((lat / 12.0) * PI) + 320 * Math.sin((lat * PI) / 30.0)) * 2.0) / 3.0
return ret
},
//
localtionReload(pindex, index) {
var _this = this
@ -2990,21 +2865,10 @@ export default {
this.bottomOptionsIndex = ''
this.collapse = false
},
containAuthorizationShow(e, item) {
// create by liu jun (PS:[if])
if (item && item.list && item.list.length > 0) {
if (item.label === '消防管控') {
if (e.label === '消防救援队') {
return !(this.CORP_INFO_ID && this.CORP_INFO_ID !== '')
}
if (e.label !== '消防救援队') {
return (this.CORP_INFO_ID && this.CORP_INFO_ID !== '')
}
}
}
containAuthorizationShow({ containAuthorization }) {
const CORP_INFO_ID = this.CORP_INFO_ID
if (e.containAuthorization.length === 0) return true
if (e.containAuthorization.includes(CORP_INFO_ID)) {
if (containAuthorization.length === 0) return true
if (containAuthorization.includes(CORP_INFO_ID)) {
return true
} else {
return false
@ -3116,8 +2980,8 @@ export default {
}
this.bottomClickDisable = false
done()
},
},
}
}
}
</script>