Merge branch 'dev-2024年1月8日' into 2024年1月24日测试
# Conflicts: # src/views/map/components/renyuanCmt.vue # src/views/map/index.vue2024年1月24日测试
						commit
						70cae2001b
					
				|  | @ -165,6 +165,11 @@ export default { | ||||||
|     } |     } | ||||||
|   }, |   }, | ||||||
|   mounted() { |   mounted() { | ||||||
|  |     // this.obtainPersonnelData() | ||||||
|  |     // this.personPositioningStatistics() | ||||||
|  |     // this.startPersonnelDataTimer() // 定时获取 | ||||||
|  |     // this.obtainCarData() | ||||||
|  |     // this.carPositioningStatistics() | ||||||
|   }, |   }, | ||||||
|   destroyed() { |   destroyed() { | ||||||
|     clearInterval(this.timer) // 关闭定时器 |     clearInterval(this.timer) // 关闭定时器 | ||||||
|  |  | ||||||
|  | @ -15,6 +15,7 @@ | ||||||
|       <mk-gate-machine-cmt v-if="type === 'CAR00005'||type ==='PERSON00005' " :id="id" :type="type" :gangkou="gangkou" :infoname="infoname"/> |       <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"/> |       <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 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-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-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"/> |       <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 breakgroundOrder from './breakgroundOrder.vue' | ||||||
| import hoistingOrder from './hoistingOrder.vue' | import hoistingOrder from './hoistingOrder.vue' | ||||||
| import videoPlay from './video_play.vue' | import videoPlay from './video_play.vue' | ||||||
|  | import videoPlayCmt from './video_play_cmt.vue' | ||||||
| import videoPlayCfd from './video_play_cfd.vue' | import videoPlayCfd from './video_play_cfd.vue' | ||||||
| import videoPlayCmt from './video_play_cmt.vue' | import videoPlayCmt from './video_play_cmt.vue' | ||||||
| import videoPlayPlat from './video_play_plat.vue' | import videoPlayPlat from './video_play_plat.vue' | ||||||
|  | @ -122,6 +124,7 @@ export default { | ||||||
|     breakgroundOrder, |     breakgroundOrder, | ||||||
|     hoistingOrder, |     hoistingOrder, | ||||||
|     videoPlay, |     videoPlay, | ||||||
|  |     videoPlayCmt, | ||||||
|     videoPlayCfd, |     videoPlayCfd, | ||||||
|     videoPlayCmt, |     videoPlayCmt, | ||||||
|     videoPlayPlat, |     videoPlayPlat, | ||||||
|  |  | ||||||
|  | @ -39,7 +39,7 @@ | ||||||
|           :corp-info-id="CORP_INFO_ID" |           :corp-info-id="CORP_INFO_ID" | ||||||
|           :gangkou="gangkouActive"/> |           :gangkou="gangkouActive"/> | ||||||
|         <menjin |         <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" |           :corp-info-id="CORP_INFO_ID" | ||||||
|           :area="area" |           :area="area" | ||||||
|           :gangkou="gangkouActive"/> |           :gangkou="gangkouActive"/> | ||||||
|  | @ -48,13 +48,13 @@ | ||||||
|           :corp-info-id="CORP_INFO_ID" |           :corp-info-id="CORP_INFO_ID" | ||||||
|           :area="area" |           :area="area" | ||||||
|           :gangkou="gangkouActive"/> |           :gangkou="gangkouActive"/> | ||||||
|         <menjin-cmt |         <menjin-czks | ||||||
|           v-if="gangkouActive && gangkouActive === '00005' && bottomOptionsIndex === 0" |           v-if="gangkouActive && gangkouActive === '00002' && bottomOptionsIndex === 0" | ||||||
|           :corp-info-id="CORP_INFO_ID" |           :corp-info-id="CORP_INFO_ID" | ||||||
|           :area="area" |           :area="area" | ||||||
|           :gangkou="gangkouActive"/> |           :gangkou="gangkouActive"/> | ||||||
|         <menjin-czks |         <menjin-cmt | ||||||
|           v-if="gangkouActive && gangkouActive === '00002' && bottomOptionsIndex === 0" |           v-if="gangkouActive && gangkouActive === '00005' && bottomOptionsIndex === 0" | ||||||
|           :corp-info-id="CORP_INFO_ID" |           :corp-info-id="CORP_INFO_ID" | ||||||
|           :area="area" |           :area="area" | ||||||
|           :gangkou="gangkouActive"/> |           :gangkou="gangkouActive"/> | ||||||
|  | @ -191,7 +191,7 @@ | ||||||
|                 > |                 > | ||||||
|                   <div v-if="bottomOptionsIndex !== ''" class="item"> |                   <div v-if="bottomOptionsIndex !== ''" class="item"> | ||||||
|                     <template v-for="(item1,index1) in item.list"> |                     <template v-for="(item1,index1) in item.list"> | ||||||
|                       <template v-if="containAuthorizationShow(item1,item)"> |                       <template v-if="containAuthorizationShow(item1)"> | ||||||
|                         <template v-if="eliminateAuthorizationShow(item1)"> |                         <template v-if="eliminateAuthorizationShow(item1)"> | ||||||
|                           <div |                           <div | ||||||
|                             :key="index1" |                             :key="index1" | ||||||
|  | @ -250,6 +250,7 @@ import caofeidianIndex from './components/caofeidian_index.vue' | ||||||
| import czksIndex from './components/czks_index.vue' | import czksIndex from './components/czks_index.vue' | ||||||
| import menjinCzks from './components/menjinCzks.vue' | import menjinCzks from './components/menjinCzks.vue' | ||||||
| import renyuanCzks from './components/renyuanCzks.vue' | import renyuanCzks from './components/renyuanCzks.vue' | ||||||
|  | import renyuanCmt from './components/renyuanCmt.vue' | ||||||
| import menjin from './components/menjin.vue' | import menjin from './components/menjin.vue' | ||||||
| import menjinCfd from './components/menjinCfd.vue' | import menjinCfd from './components/menjinCfd.vue' | ||||||
| import menjinCmt from './components/menjinCmt.vue' | import menjinCmt from './components/menjinCmt.vue' | ||||||
|  | @ -258,7 +259,6 @@ import anquan from './components/anquan.vue' | ||||||
| import anquanCfd from './components/anquanCfd.vue' | import anquanCfd from './components/anquanCfd.vue' | ||||||
| import qixiang from './components/qixiang.vue' | import qixiang from './components/qixiang.vue' | ||||||
| import renyuan from './components/renyuan.vue' | import renyuan from './components/renyuan.vue' | ||||||
| import renyuanCmt from './components/renyuanCmt.vue' |  | ||||||
| import bianjieruqin from './components/bianjieruqin.vue' | import bianjieruqin from './components/bianjieruqin.vue' | ||||||
| import renyuanCfd from './components/renyuanCfd.vue' | import renyuanCfd from './components/renyuanCfd.vue' | ||||||
| import zhongda from './components/zhongda.vue' | import zhongda from './components/zhongda.vue' | ||||||
|  | @ -280,9 +280,6 @@ let drag = null | ||||||
| let ry_drag = null | let ry_drag = null | ||||||
| var tiandituTk = 'e8a16137fd226a62a23cc7ba5c9c78ce' | var tiandituTk = 'e8a16137fd226a62a23cc7ba5c9c78ce' | ||||||
| var subdomains = ['0', '1', '2', '3', '4', '5', '6', '7'] | var subdomains = ['0', '1', '2', '3', '4', '5', '6', '7'] | ||||||
| var PI = 3.1415926535897932384626 |  | ||||||
| var a = 6378245.0 // 卫星椭球坐标投影到平面地图坐标系的投影因子。 |  | ||||||
| var ee = 0.00669342162296594323 // 椭球的偏心率。//判断是否在国内,在中国国内的经纬度才需要做偏移 |  | ||||||
| // 沧州矿石人员定位数组 | // 沧州矿石人员定位数组 | ||||||
| let czksPerLocArr = [] | let czksPerLocArr = [] | ||||||
| const Cesium = window.Cesium | const Cesium = window.Cesium | ||||||
|  | @ -301,6 +298,7 @@ export default { | ||||||
|     czksIndex, |     czksIndex, | ||||||
|     menjinCzks, |     menjinCzks, | ||||||
|     renyuanCzks, |     renyuanCzks, | ||||||
|  |     renyuanCmt, | ||||||
|     // navigation, |     // navigation, | ||||||
|     gangkouIndex, |     gangkouIndex, | ||||||
|     fengongsiIndex, |     fengongsiIndex, | ||||||
|  | @ -313,7 +311,6 @@ export default { | ||||||
|     anquan, |     anquan, | ||||||
|     qixiang, |     qixiang, | ||||||
|     renyuan, |     renyuan, | ||||||
|     renyuanCmt, |  | ||||||
|     renyuanCfd, |     renyuanCfd, | ||||||
|     zhongda, |     zhongda, | ||||||
|     layoutDialog, |     layoutDialog, | ||||||
|  | @ -516,16 +513,16 @@ export default { | ||||||
|               containAuthorization: [], |               containAuthorization: [], | ||||||
|               eliminateAuthorization: [] |               eliminateAuthorization: [] | ||||||
|             }, |             }, | ||||||
|             { |             // { | ||||||
|               label: '消防水源', |             //   label: '消防水源', | ||||||
|               dialog_width: '600px', |             //   dialog_width: '600px', | ||||||
|               check: false, |             //   check: false, | ||||||
|               type: 'xfsy01', |             //   type: 'xfsy01', | ||||||
|               img: require('../../assets/map/gangkou_index/buttom/ico7.png'), |             //   img: require('../../assets/map/gangkou_index/buttom/ico7.png'), | ||||||
|               checkImg: require('../../assets/map/gangkou_index/buttom/ico7_on.png'), |             //   checkImg: require('../../assets/map/gangkou_index/buttom/ico7_on.png'), | ||||||
|               containAuthorization: [], |             //   containAuthorization: [], | ||||||
|               eliminateAuthorization: [] |             //   eliminateAuthorization: [] | ||||||
|             }, |             // }, | ||||||
|             { |             { | ||||||
|               label: '消防点位', |               label: '消防点位', | ||||||
|               dialog_width: '600px', |               dialog_width: '600px', | ||||||
|  | @ -1154,58 +1151,58 @@ export default { | ||||||
|     }, |     }, | ||||||
|     keepalive(token) { |     keepalive(token) { | ||||||
|       // 第二套方案 |       // 第二套方案 | ||||||
|       // requestFN( |       requestFN( | ||||||
|       //   '/map/loginOrKeepAlive', |         '/map/loginOrKeepAlive', | ||||||
|       //   { |         { | ||||||
|       //   } |         } | ||||||
|       // ).then((data) => { |       ).then((data) => { | ||||||
|       // | 
 | ||||||
|       // }) |       }) | ||||||
|     }, |     }, | ||||||
|     ysVideoInit() { |     ysVideoInit() { | ||||||
|       // 第二套方案 |       // 第二套方案 | ||||||
|       // var _this = this |       var _this = this | ||||||
|       // requestFN( |       requestFN( | ||||||
|       //   '/map/loginOrKeepAlive', |         '/map/loginOrKeepAlive', | ||||||
|       //   { |         { | ||||||
|       //   } |         } | ||||||
|       // ).then((data) => { |       ).then((data) => { | ||||||
|       //   const token = data.token |         const token = data.token | ||||||
|       //   var nbsp = String.fromCharCode(160) |         var nbsp = String.fromCharCode(160) | ||||||
|       //   var arr = [] |         var arr = [] | ||||||
|       //   arr.length = 40 |         arr.length = 40 | ||||||
|       //   const str = arr.fill(nbsp).join('') |         const str = arr.fill(nbsp).join('') | ||||||
|       //   const voidPath = imosPlayer.getUniqueID() |         const voidPath = imosPlayer.getUniqueID() | ||||||
|       //   window.voidPath = voidPath |         window.voidPath = voidPath | ||||||
|       //   document.title = document.title + str + new Date().getTime() |         document.title = document.title + str + new Date().getTime() | ||||||
|       //   _this.keepalive(token) |         _this.keepalive(token) | ||||||
|       //   setInterval(_this.keepalive, 30000, token) |         setInterval(_this.keepalive, 30000, token) | ||||||
|       // | 
 | ||||||
|       //   window.videoWindow = 0 |         window.videoWindow = 0 | ||||||
|       //   imosPlayer.setLinkPort('8093') |         imosPlayer.setLinkPort('8093') | ||||||
|       //   imosPlayer |         imosPlayer | ||||||
|       //     .init({ |           .init({ | ||||||
|       //       ip: '172.14.0.54', |             ip: '172.14.0.54', | ||||||
|       //       token: token, |             token: token, | ||||||
|       //       title: document.title, |             title: document.title, | ||||||
|       //       voidListenerPath: '\\' + voidPath |             voidListenerPath: '\\' + voidPath | ||||||
|       //     }) |           }) | ||||||
|       //     .then(async(resr) => { |           .then(async(resr) => { | ||||||
|       //       if (resr.ErrCode === 0) { |             if (resr.ErrCode === 0) { | ||||||
|       //         // imosPlayer.setLiveNetLinkMode(liveNetProtocol, liveByMS) |               // imosPlayer.setLiveNetLinkMode(liveNetProtocol, liveByMS) | ||||||
|       //         // imosPlayer.setReplayNetLinkMode(replayNetProtocol, replayByMS) |               // imosPlayer.setReplayNetLinkMode(replayNetProtocol, replayByMS) | ||||||
|       // | 
 | ||||||
|       //         // eslint-disable-next-line no-alert |               // eslint-disable-next-line no-alert | ||||||
|       //         console.info('登录成功') |               console.info('登录成功') | ||||||
|       //       } else { |             } else { | ||||||
|       //         // eslint-disable-next-line no-alert |               // eslint-disable-next-line no-alert | ||||||
|       //         console.info(resr.ErrMsg) |               console.info(resr.ErrMsg) | ||||||
|       //       } |             } | ||||||
|       //     }) |           }) | ||||||
|       //     .catch((err) => { |           .catch((err) => { | ||||||
|       //       console.error(err) |             console.error(err) | ||||||
|       //     }) |           }) | ||||||
|       // }) |       }) | ||||||
|     }, |     }, | ||||||
|     // keepalive(token) { |     // keepalive(token) { | ||||||
|     //   axios({ |     //   axios({ | ||||||
|  | @ -1407,7 +1404,8 @@ export default { | ||||||
|             this.dialog.infoname = infoname |             this.dialog.infoname = infoname | ||||||
|             return |             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 |             const { label, point_type, data_id, infoname,name, code } = pick.id._monitoItems.data | ||||||
|             this.dialog.visible = true |             this.dialog.visible = true | ||||||
|             this.dialog.title = label |             this.dialog.title = label | ||||||
|  | @ -1419,19 +1417,6 @@ export default { | ||||||
|             console.log(this.dialog) |             console.log(this.dialog) | ||||||
|             return |             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) { |           if (point_type.indexOf('标记点') !== -1) { | ||||||
|             const { label, point_type, data_id, corpInfoId, dialog_width, infoname } = pick.id._monitoItems.data |             const { label, point_type, data_id, corpInfoId, dialog_width, infoname } = pick.id._monitoItems.data | ||||||
|             this.dialog.visible = true |             this.dialog.visible = true | ||||||
|  | @ -1941,7 +1926,6 @@ export default { | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     bottomOptionsItemsClick(pindex, index, label, urlType, pointUrl, dialog_width) { |     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) { |       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.name = varList[i].MAP_POINT_NAME | ||||||
|                 point.infoname = varList[i].MAP_POINT_NAME |                 point.infoname = varList[i].MAP_POINT_NAME | ||||||
|               } |               } | ||||||
|               console.log(point) |  | ||||||
|               points.push(point) |               points.push(point) | ||||||
|             } |             } | ||||||
|             if (this.gangkouActive === '00004' && urlType === 'carPosition') { |             if (this.gangkouActive === '00004' && urlType === 'carPosition') { | ||||||
|  | @ -2072,13 +2055,6 @@ export default { | ||||||
|             } else { |             } else { | ||||||
|               this.dragEntity(points, pindex, index) |               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) => { |           }).catch((e) => { | ||||||
|             console.log(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)) // oladress在main.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版本*/ |     /* 一公司人员定位   mqtt务必使用4.2.1版本*/ | ||||||
|     // 九公司人员定位websocket |     // 九公司人员定位websocket | ||||||
|     initNinePerLocWebsocket() { |     initNinePerLocWebsocket() { | ||||||
|  | @ -2860,7 +2771,6 @@ export default { | ||||||
|       point.empNo = data.empNo || '' // 工号 |       point.empNo = data.empNo || '' // 工号 | ||||||
|       point.cardNo = data.cardNo || '' // 卡号 |       point.cardNo = data.cardNo || '' // 卡号 | ||||||
|       point.gangkou = this.gangkouActive |       point.gangkou = this.gangkouActive | ||||||
|       console.log(point) |  | ||||||
|       return 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) { |     localtionReload(pindex, index) { | ||||||
|       var _this = this |       var _this = this | ||||||
|  | @ -2990,21 +2865,10 @@ export default { | ||||||
|       this.bottomOptionsIndex = '' |       this.bottomOptionsIndex = '' | ||||||
|       this.collapse = false |       this.collapse = false | ||||||
|     }, |     }, | ||||||
|     containAuthorizationShow(e, item) { |     containAuthorizationShow({ containAuthorization }) { | ||||||
|       // 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 !== '') |  | ||||||
|           } |  | ||||||
|         } |  | ||||||
|       } |  | ||||||
|       const CORP_INFO_ID = this.CORP_INFO_ID |       const CORP_INFO_ID = this.CORP_INFO_ID | ||||||
|       if (e.containAuthorization.length === 0) return true |       if (containAuthorization.length === 0) return true | ||||||
|       if (e.containAuthorization.includes(CORP_INFO_ID)) { |       if (containAuthorization.includes(CORP_INFO_ID)) { | ||||||
|         return true |         return true | ||||||
|       } else { |       } else { | ||||||
|         return false |         return false | ||||||
|  | @ -3116,8 +2980,8 @@ export default { | ||||||
|       } |       } | ||||||
|       this.bottomClickDisable = false |       this.bottomClickDisable = false | ||||||
|       done() |       done() | ||||||
|     }, |     } | ||||||
|   }, |   } | ||||||
| } | } | ||||||
| </script> | </script> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue