Commit c88b0a8bd61546651c71734f299028acf692901b
Committed by
GitHub
Merge branch '648540858:wvp-28181-2.0' into wvp-28181-2.0
Showing
59 changed files
with
2224 additions
and
1573 deletions
Too many changes to show.
To preserve performance only 59 of 77 files are displayed.
README.md
| ... | ... | @@ -128,6 +128,8 @@ https://gitee.com/pan648540858/wvp-GB28181-pro.git |
| 128 | 128 | QQ群: 901799015, ZLM使用文档[https://github.com/ZLMediaKit/ZLMediaKit](https://github.com/ZLMediaKit/ZLMediaKit) |
| 129 | 129 | QQ私信一般不回, 精力有限.欢迎大家在群里讨论.觉得项目对你有帮助,欢迎star和提交pr。 |
| 130 | 130 | |
| 131 | +# 授权协议 | |
| 132 | +本项目自有代码使用宽松的MIT协议,在保留版权信息的情况下可以自由应用于各自商用、非商业的项目。 但是本项目也零碎的使用了一些其他的开源代码,在商用的情况下请自行替代或剔除; 由于使用本项目而产生的商业纠纷或侵权行为一概与本项目及开发者无关,请自行承担法律风险。 在使用本项目代码时,也应该在授权协议中同时表明本项目依赖的第三方库的协议 | |
| 131 | 133 | |
| 132 | 134 | # 致谢 |
| 133 | 135 | 感谢作者[夏楚](https://github.com/xia-chu) 提供这么棒的开源流媒体服务框架,并在开发过程中给予支持与帮助。 | ... | ... |
pom.xml
src/main/java/com/genersoft/iot/vmp/common/VideoManagerConstants.java
| ... | ... | @@ -87,9 +87,12 @@ public class VideoManagerConstants { |
| 87 | 87 | // 移动位置订阅通知 |
| 88 | 88 | public static final String VM_MSG_SUBSCRIBE_MOBILE_POSITION = "mobileposition"; |
| 89 | 89 | |
| 90 | - // 报警订阅的通知 | |
| 90 | + // 报警订阅的通知(收到报警向redis发出通知) | |
| 91 | 91 | public static final String VM_MSG_SUBSCRIBE_ALARM = "alarm"; |
| 92 | 92 | |
| 93 | + // 报警通知的发送 (收到redis发出的通知,转发给其他平台) | |
| 94 | + public static final String VM_MSG_SUBSCRIBE_ALARM_RECEIVE= "alarm_receive"; | |
| 95 | + | |
| 93 | 96 | // 设备状态订阅的通知 |
| 94 | 97 | public static final String VM_MSG_SUBSCRIBE_DEVICE_STATUS = "device"; |
| 95 | 98 | ... | ... |
src/main/java/com/genersoft/iot/vmp/conf/RedisConfig.java
| 1 | 1 | package com.genersoft.iot.vmp.conf; |
| 2 | 2 | |
| 3 | 3 | import com.genersoft.iot.vmp.common.VideoManagerConstants; |
| 4 | +import com.genersoft.iot.vmp.service.impl.RedisAlarmMsgListener; | |
| 4 | 5 | import com.genersoft.iot.vmp.service.impl.RedisGPSMsgListener; |
| 5 | 6 | import org.apache.commons.lang3.StringUtils; |
| 6 | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -48,6 +49,9 @@ public class RedisConfig extends CachingConfigurerSupport { |
| 48 | 49 | @Autowired |
| 49 | 50 | private RedisGPSMsgListener redisGPSMsgListener; |
| 50 | 51 | |
| 52 | + @Autowired | |
| 53 | + private RedisAlarmMsgListener redisAlarmMsgListener; | |
| 54 | + | |
| 51 | 55 | @Bean |
| 52 | 56 | public JedisPool jedisPool() { |
| 53 | 57 | if (StringUtils.isBlank(password)) { |
| ... | ... | @@ -93,6 +97,7 @@ public class RedisConfig extends CachingConfigurerSupport { |
| 93 | 97 | RedisMessageListenerContainer container = new RedisMessageListenerContainer(); |
| 94 | 98 | container.setConnectionFactory(connectionFactory); |
| 95 | 99 | container.addMessageListener(redisGPSMsgListener, new PatternTopic(VideoManagerConstants.VM_MSG_GPS)); |
| 100 | + container.addMessageListener(redisAlarmMsgListener, new PatternTopic(VideoManagerConstants.VM_MSG_SUBSCRIBE_ALARM_RECEIVE)); | |
| 96 | 101 | return container; |
| 97 | 102 | } |
| 98 | 103 | ... | ... |
src/main/java/com/genersoft/iot/vmp/conf/SipConfig.java
src/main/java/com/genersoft/iot/vmp/gb28181/bean/AlarmChannelMessage.java
0 → 100644
| 1 | +package com.genersoft.iot.vmp.gb28181.bean; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * 通过redis分发报警消息 | |
| 5 | + */ | |
| 6 | +public class AlarmChannelMessage { | |
| 7 | + /** | |
| 8 | + * 国标编号 | |
| 9 | + */ | |
| 10 | + private String gbId; | |
| 11 | + | |
| 12 | + /** | |
| 13 | + * 报警编号 | |
| 14 | + */ | |
| 15 | + private int alarmSn; | |
| 16 | + | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * 报警描述 | |
| 20 | + */ | |
| 21 | + private String alarmDescription; | |
| 22 | + | |
| 23 | + public String getGbId() { | |
| 24 | + return gbId; | |
| 25 | + } | |
| 26 | + | |
| 27 | + public void setGbId(String gbId) { | |
| 28 | + this.gbId = gbId; | |
| 29 | + } | |
| 30 | + | |
| 31 | + public int getAlarmSn() { | |
| 32 | + return alarmSn; | |
| 33 | + } | |
| 34 | + | |
| 35 | + public void setAlarmSn(int alarmSn) { | |
| 36 | + this.alarmSn = alarmSn; | |
| 37 | + } | |
| 38 | + | |
| 39 | + public String getAlarmDescription() { | |
| 40 | + return alarmDescription; | |
| 41 | + } | |
| 42 | + | |
| 43 | + public void setAlarmDescription(String alarmDescription) { | |
| 44 | + this.alarmDescription = alarmDescription; | |
| 45 | + } | |
| 46 | +} | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceAlarm.java
| ... | ... | @@ -50,7 +50,30 @@ public class DeviceAlarm { |
| 50 | 50 | private double latitude; |
| 51 | 51 | |
| 52 | 52 | /** |
| 53 | - * 报警类型 | |
| 53 | + * 报警类型, | |
| 54 | + * 报警方式为2时,不携带 AlarmType为默认的报警设备报警, | |
| 55 | + * 携带 AlarmType取值及对应报警类型如下: | |
| 56 | + * 1-视频丢失报警; | |
| 57 | + * 2-设备防拆报警; | |
| 58 | + * 3-存储设备磁盘满报警; | |
| 59 | + * 4-设备高温报警; | |
| 60 | + * 5-设备低温报警。 | |
| 61 | + * 报警方式为5时,取值如下: | |
| 62 | + * 1-人工视频报警; | |
| 63 | + * 2-运动目标检测报警; | |
| 64 | + * 3-遗留物检测报警; | |
| 65 | + * 4-物体移除检测报警; | |
| 66 | + * 5-绊线检测报警; | |
| 67 | + * 6-入侵检测报警; | |
| 68 | + * 7-逆行检测报警; | |
| 69 | + * 8-徘徊检测报警; | |
| 70 | + * 9-流量统计报警; | |
| 71 | + * 10-密度检测报警; | |
| 72 | + * 11-视频异常检测报警; | |
| 73 | + * 12-快速移动报警。 | |
| 74 | + * 报警方式为6时,取值下: | |
| 75 | + * 1-存储设备磁盘故障报警; | |
| 76 | + * 2-存储设备风扇故障报警。 | |
| 54 | 77 | */ |
| 55 | 78 | private String alarmType; |
| 56 | 79 | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/bean/DeviceChannel.java
src/main/java/com/genersoft/iot/vmp/gb28181/bean/SubscribeInfo.java
src/main/java/com/genersoft/iot/vmp/gb28181/event/offline/KeepaliveTimeoutListenerForPlatform.java
| ... | ... | @@ -52,7 +52,6 @@ public class KeepaliveTimeoutListenerForPlatform extends RedisKeyExpirationEvent |
| 52 | 52 | public void onMessage(Message message, byte[] pattern) { |
| 53 | 53 | // 获取失效的key |
| 54 | 54 | String expiredKey = message.toString(); |
| 55 | - logger.debug(expiredKey); | |
| 56 | 55 | // 平台心跳到期,需要重发, 判断是否已经多次未收到心跳回复, 多次未收到,则重新发起注册, 注册尝试多次未得到回复,则认为平台离线 |
| 57 | 56 | String PLATFORM_KEEPLIVEKEY_PREFIX = VideoManagerConstants.PLATFORM_KEEPALIVE_PREFIX + userSetting.getServerId() + "_"; |
| 58 | 57 | String PLATFORM_REGISTER_PREFIX = VideoManagerConstants.PLATFORM_REGISTER_PREFIX + userSetting.getServerId() + "_"; | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/event/offline/OfflineEventListener.java
| ... | ... | @@ -57,10 +57,8 @@ public class OfflineEventListener implements ApplicationListener<OfflineEvent> { |
| 57 | 57 | |
| 58 | 58 | @Override |
| 59 | 59 | public void onApplicationEvent(OfflineEvent event) { |
| 60 | - | |
| 61 | - if (logger.isDebugEnabled()) { | |
| 62 | - logger.debug("设备离线事件触发,deviceId:" + event.getDeviceId() + ",from:" + event.getFrom()); | |
| 63 | - } | |
| 60 | + | |
| 61 | + logger.info("设备离线事件触发,deviceId:" + event.getDeviceId() + ",from:" + event.getFrom()); | |
| 64 | 62 | |
| 65 | 63 | String key = VideoManagerConstants.KEEPLIVEKEY_PREFIX + userSetting.getServerId() + "_" + event.getDeviceId(); |
| 66 | 64 | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/event/online/OnlineEventListener.java
| ... | ... | @@ -59,10 +59,8 @@ public class OnlineEventListener implements ApplicationListener<OnlineEvent> { |
| 59 | 59 | |
| 60 | 60 | @Override |
| 61 | 61 | public void onApplicationEvent(OnlineEvent event) { |
| 62 | - | |
| 63 | - if (logger.isDebugEnabled()) { | |
| 64 | - logger.debug("设备上线事件触发,deviceId:" + event.getDevice().getDeviceId() + ",from:" + event.getFrom()); | |
| 65 | - } | |
| 62 | + | |
| 63 | + logger.info("设备上线事件触发,deviceId:" + event.getDevice().getDeviceId() + ",from:" + event.getFrom()); | |
| 66 | 64 | Device device = event.getDevice(); |
| 67 | 65 | if (device == null) return; |
| 68 | 66 | String key = VideoManagerConstants.KEEPLIVEKEY_PREFIX + userSetting.getServerId() + "_" + event.getDevice().getDeviceId(); | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/event/record/RecordEndEventListener.java
| ... | ... | @@ -31,10 +31,8 @@ public class RecordEndEventListener implements ApplicationListener<RecordEndEven |
| 31 | 31 | private Map<String, RecordEndEventHandler> handlerMap = new HashMap<>(); |
| 32 | 32 | @Override |
| 33 | 33 | public void onApplicationEvent(RecordEndEvent event) { |
| 34 | - if (logger.isDebugEnabled()) { | |
| 35 | - logger.debug("录像查询完成事件触发,deviceId:{}, channelId: {}, 录像数量{}条", event.getRecordInfo().getDeviceId(), | |
| 36 | - event.getRecordInfo().getChannelId(), event.getRecordInfo().getSumNum() ); | |
| 37 | - } | |
| 34 | + logger.info("录像查询完成事件触发,deviceId:{}, channelId: {}, 录像数量{}条", event.getRecordInfo().getDeviceId(), | |
| 35 | + event.getRecordInfo().getChannelId(), event.getRecordInfo().getSumNum() ); | |
| 38 | 36 | if (handlerMap.size() > 0) { |
| 39 | 37 | for (RecordEndEventHandler recordEndEventHandler : handlerMap.values()) { |
| 40 | 38 | recordEndEventHandler.handler(event.getRecordInfo()); | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/event/subscribe/catalog/CatalogEventLister.java
| ... | ... | @@ -64,7 +64,7 @@ public class CatalogEventLister implements ApplicationListener<CatalogEvent> { |
| 64 | 64 | subscribe = subscribeHolder.getCatalogSubscribe(event.getPlatformId()); |
| 65 | 65 | |
| 66 | 66 | if (subscribe == null) { |
| 67 | - logger.debug("发送订阅消息时发现订阅信息已经不存在"); | |
| 67 | + logger.info("发送订阅消息时发现订阅信息已经不存在"); | |
| 68 | 68 | return; |
| 69 | 69 | } |
| 70 | 70 | }else { | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommander.java
| 1 | 1 | package com.genersoft.iot.vmp.gb28181.transmit.cmd; |
| 2 | 2 | |
| 3 | 3 | import com.genersoft.iot.vmp.common.StreamInfo; |
| 4 | -import com.genersoft.iot.vmp.gb28181.bean.Device; | |
| 5 | -import com.genersoft.iot.vmp.gb28181.bean.InviteStreamCallback; | |
| 4 | +import com.genersoft.iot.vmp.gb28181.bean.*; | |
| 6 | 5 | import com.genersoft.iot.vmp.gb28181.event.SipSubscribe; |
| 7 | 6 | import com.genersoft.iot.vmp.media.zlm.ZLMHttpHookSubscribe; |
| 8 | 7 | import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem; |
| ... | ... | @@ -336,4 +335,13 @@ public interface ISIPCommander { |
| 336 | 335 | * @param cmdString 前端控制指令串 |
| 337 | 336 | */ |
| 338 | 337 | boolean dragZoomCmd(Device device, String channelId, String cmdString); |
| 338 | + | |
| 339 | + | |
| 340 | + /** | |
| 341 | + * 向设备发送报警NOTIFY消息, 用于互联结构下,此时将设备当成一个平级平台看待 | |
| 342 | + * @param device 设备 | |
| 343 | + * @param deviceAlarm 报警信息信息 | |
| 344 | + * @return | |
| 345 | + */ | |
| 346 | + boolean sendAlarmMessage(Device device, DeviceAlarm deviceAlarm); | |
| 339 | 347 | } | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommanderForPlatform.java
| 1 | 1 | package com.genersoft.iot.vmp.gb28181.transmit.cmd; |
| 2 | 2 | |
| 3 | -import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; | |
| 4 | -import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; | |
| 5 | -import com.genersoft.iot.vmp.gb28181.bean.RecordInfo; | |
| 6 | -import com.genersoft.iot.vmp.gb28181.bean.SubscribeInfo; | |
| 3 | +import com.genersoft.iot.vmp.gb28181.bean.*; | |
| 7 | 4 | import com.genersoft.iot.vmp.gb28181.event.SipSubscribe; |
| 8 | 5 | import com.genersoft.iot.vmp.service.bean.GPSMsgInfo; |
| 9 | 6 | |
| ... | ... | @@ -76,6 +73,14 @@ public interface ISIPCommanderForPlatform { |
| 76 | 73 | boolean sendNotifyMobilePosition(ParentPlatform parentPlatform, GPSMsgInfo gpsMsgInfo, SubscribeInfo subscribeInfo); |
| 77 | 74 | |
| 78 | 75 | /** |
| 76 | + * 向上级回复报警消息 | |
| 77 | + * @param parentPlatform 平台信息 | |
| 78 | + * @param deviceAlarm 报警信息信息 | |
| 79 | + * @return | |
| 80 | + */ | |
| 81 | + boolean sendAlarmMessage(ParentPlatform parentPlatform, DeviceAlarm deviceAlarm); | |
| 82 | + | |
| 83 | + /** | |
| 79 | 84 | * 回复catalog事件-增加/更新 |
| 80 | 85 | * @param parentPlatform |
| 81 | 86 | * @param deviceChannels | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
| ... | ... | @@ -5,10 +5,7 @@ import com.genersoft.iot.vmp.common.StreamInfo; |
| 5 | 5 | import com.genersoft.iot.vmp.conf.DynamicTask; |
| 6 | 6 | import com.genersoft.iot.vmp.conf.SipConfig; |
| 7 | 7 | import com.genersoft.iot.vmp.conf.UserSetting; |
| 8 | -import com.genersoft.iot.vmp.gb28181.bean.Device; | |
| 9 | -import com.genersoft.iot.vmp.gb28181.bean.InviteStreamCallback; | |
| 10 | -import com.genersoft.iot.vmp.gb28181.bean.InviteStreamInfo; | |
| 11 | -import com.genersoft.iot.vmp.gb28181.bean.SsrcTransaction; | |
| 8 | +import com.genersoft.iot.vmp.gb28181.bean.*; | |
| 12 | 9 | import com.genersoft.iot.vmp.gb28181.event.SipSubscribe; |
| 13 | 10 | import com.genersoft.iot.vmp.gb28181.session.VideoStreamSessionManager; |
| 14 | 11 | import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommander; |
| ... | ... | @@ -23,6 +20,7 @@ import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| 23 | 20 | import com.genersoft.iot.vmp.storager.IVideoManagerStorage; |
| 24 | 21 | import gov.nist.javax.sip.SipProviderImpl; |
| 25 | 22 | import gov.nist.javax.sip.SipStackImpl; |
| 23 | +import gov.nist.javax.sip.message.MessageFactoryImpl; | |
| 26 | 24 | import gov.nist.javax.sip.message.SIPRequest; |
| 27 | 25 | import gov.nist.javax.sip.stack.SIPDialog; |
| 28 | 26 | import org.slf4j.Logger; |
| ... | ... | @@ -35,10 +33,7 @@ import org.springframework.util.StringUtils; |
| 35 | 33 | |
| 36 | 34 | import javax.sip.*; |
| 37 | 35 | import javax.sip.address.SipURI; |
| 38 | -import javax.sip.header.CallIdHeader; | |
| 39 | -import javax.sip.header.ContentTypeHeader; | |
| 40 | -import javax.sip.header.ExpiresHeader; | |
| 41 | -import javax.sip.header.ViaHeader; | |
| 36 | +import javax.sip.header.*; | |
| 42 | 37 | import javax.sip.message.Request; |
| 43 | 38 | import java.lang.reflect.Field; |
| 44 | 39 | import java.text.ParseException; |
| ... | ... | @@ -1777,4 +1772,101 @@ public class SIPCommander implements ISIPCommander { |
| 1777 | 1772 | e.printStackTrace(); |
| 1778 | 1773 | } |
| 1779 | 1774 | } |
| 1775 | + | |
| 1776 | + @Override | |
| 1777 | + public boolean sendAlarmMessage(Device device, DeviceAlarm deviceAlarm) { | |
| 1778 | + if (device == null) { | |
| 1779 | + return false; | |
| 1780 | + } | |
| 1781 | + logger.info("[发送 报警通知] {}/{}->{},{}", device.getDeviceId(), deviceAlarm.getChannelId(), | |
| 1782 | + deviceAlarm.getLongitude(), deviceAlarm.getLatitude()); | |
| 1783 | + try { | |
| 1784 | + String characterSet = device.getCharset(); | |
| 1785 | + StringBuffer deviceStatusXml = new StringBuffer(600); | |
| 1786 | + deviceStatusXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n"); | |
| 1787 | + deviceStatusXml.append("<Notify>\r\n"); | |
| 1788 | + deviceStatusXml.append("<CmdType>Alarm</CmdType>\r\n"); | |
| 1789 | + deviceStatusXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); | |
| 1790 | + deviceStatusXml.append("<DeviceID>" + deviceAlarm.getChannelId() + "</DeviceID>\r\n"); | |
| 1791 | + deviceStatusXml.append("<AlarmPriority>" + deviceAlarm.getAlarmPriority() + "</AlarmPriority>\r\n"); | |
| 1792 | + deviceStatusXml.append("<AlarmMethod>" + deviceAlarm.getAlarmMethod() + "</AlarmMethod>\r\n"); | |
| 1793 | + deviceStatusXml.append("<AlarmTime>" + deviceAlarm.getAlarmTime() + "</AlarmTime>\r\n"); | |
| 1794 | + deviceStatusXml.append("<AlarmDescription>" + deviceAlarm.getAlarmDescription() + "</AlarmDescription>\r\n"); | |
| 1795 | + deviceStatusXml.append("<Longitude>" + deviceAlarm.getLongitude() + "</Longitude>\r\n"); | |
| 1796 | + deviceStatusXml.append("<Latitude>" + deviceAlarm.getLatitude() + "</Latitude>\r\n"); | |
| 1797 | + deviceStatusXml.append("<info>\r\n"); | |
| 1798 | + deviceStatusXml.append("<AlarmType>" + deviceAlarm.getAlarmType() + "</AlarmType>\r\n"); | |
| 1799 | + deviceStatusXml.append("</info>\r\n"); | |
| 1800 | + deviceStatusXml.append("</Notify>\r\n"); | |
| 1801 | + | |
| 1802 | + CallIdHeader callIdHeader = device.getTransport().equals("TCP") ? tcpSipProvider.getNewCallId() | |
| 1803 | + : udpSipProvider.getNewCallId(); | |
| 1804 | + String tm = Long.toString(System.currentTimeMillis()); | |
| 1805 | + Request request = headerProvider.createMessageRequest(device, deviceStatusXml.toString(), "z9hG4bK-ViaPtz-" + tm, "FromPtz" + tm, null, callIdHeader); | |
| 1806 | + transmitRequest(device, request); | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + } catch (SipException | ParseException e) { | |
| 1810 | + e.printStackTrace(); | |
| 1811 | + return false; | |
| 1812 | + } catch (InvalidArgumentException e) { | |
| 1813 | + throw new RuntimeException(e); | |
| 1814 | + } | |
| 1815 | + return true; | |
| 1816 | + } | |
| 1817 | + | |
| 1818 | + private void sendNotify(Device device, String catalogXmlContent, | |
| 1819 | + SubscribeInfo subscribeInfo, SipSubscribe.Event errorEvent, SipSubscribe.Event okEvent ) | |
| 1820 | + throws NoSuchFieldException, IllegalAccessException, SipException, ParseException { | |
| 1821 | + MessageFactoryImpl messageFactory = (MessageFactoryImpl) sipFactory.createMessageFactory(); | |
| 1822 | + String characterSet = device.getCharset(); | |
| 1823 | + // 设置编码, 防止中文乱码 | |
| 1824 | + messageFactory.setDefaultContentEncodingCharset(characterSet); | |
| 1825 | + Dialog dialog = subscribeInfo.getDialog(); | |
| 1826 | + if (dialog == null || !dialog.getState().equals(DialogState.CONFIRMED)) return; | |
| 1827 | + SIPRequest notifyRequest = (SIPRequest)dialog.createRequest(Request.NOTIFY); | |
| 1828 | + ContentTypeHeader contentTypeHeader = sipFactory.createHeaderFactory().createContentTypeHeader("Application", "MANSCDP+xml"); | |
| 1829 | + notifyRequest.setContent(catalogXmlContent, contentTypeHeader); | |
| 1830 | + | |
| 1831 | + SubscriptionStateHeader subscriptionState = sipFactory.createHeaderFactory() | |
| 1832 | + .createSubscriptionStateHeader(SubscriptionStateHeader.ACTIVE); | |
| 1833 | + notifyRequest.addHeader(subscriptionState); | |
| 1834 | + | |
| 1835 | + EventHeader event = sipFactory.createHeaderFactory().createEventHeader(subscribeInfo.getEventType()); | |
| 1836 | + if (subscribeInfo.getEventId() != null) { | |
| 1837 | + event.setEventId(subscribeInfo.getEventId()); | |
| 1838 | + } | |
| 1839 | + notifyRequest.addHeader(event); | |
| 1840 | + | |
| 1841 | + SipURI sipURI = (SipURI) notifyRequest.getRequestURI(); | |
| 1842 | + if (subscribeInfo.getTransaction() != null) { | |
| 1843 | + SIPRequest request = (SIPRequest) subscribeInfo.getTransaction().getRequest(); | |
| 1844 | + sipURI.setHost(request.getRemoteAddress().getHostAddress()); | |
| 1845 | + sipURI.setPort(request.getRemotePort()); | |
| 1846 | + }else { | |
| 1847 | + sipURI.setHost(device.getIp()); | |
| 1848 | + sipURI.setPort(device.getPort()); | |
| 1849 | + } | |
| 1850 | + | |
| 1851 | + ClientTransaction transaction = null; | |
| 1852 | + if ("TCP".equals(device.getTransport())) { | |
| 1853 | + transaction = tcpSipProvider.getNewClientTransaction(notifyRequest); | |
| 1854 | + } else if ("UDP".equals(device.getTransport())) { | |
| 1855 | + transaction = udpSipProvider.getNewClientTransaction(notifyRequest); | |
| 1856 | + } | |
| 1857 | + // 添加错误订阅 | |
| 1858 | + if (errorEvent != null) { | |
| 1859 | + sipSubscribe.addErrorSubscribe(subscribeInfo.getCallId(), errorEvent); | |
| 1860 | + } | |
| 1861 | + // 添加订阅 | |
| 1862 | + if (okEvent != null) { | |
| 1863 | + sipSubscribe.addOkSubscribe(subscribeInfo.getCallId(), okEvent); | |
| 1864 | + } | |
| 1865 | + if (transaction == null) { | |
| 1866 | + logger.error("平台{}的Transport错误:{}",device.getDeviceId(), device.getTransport()); | |
| 1867 | + return; | |
| 1868 | + } | |
| 1869 | + dialog.sendRequest(transaction); | |
| 1870 | + | |
| 1871 | + } | |
| 1780 | 1872 | } | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
| ... | ... | @@ -436,6 +436,48 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 436 | 436 | } |
| 437 | 437 | |
| 438 | 438 | @Override |
| 439 | + public boolean sendAlarmMessage(ParentPlatform parentPlatform, DeviceAlarm deviceAlarm) { | |
| 440 | + if (parentPlatform == null) { | |
| 441 | + return false; | |
| 442 | + } | |
| 443 | + logger.info("[发送 报警订阅] {}/{}->{},{}", parentPlatform.getServerGBId(), deviceAlarm.getChannelId(), | |
| 444 | + deviceAlarm.getLongitude(), deviceAlarm.getLatitude()); | |
| 445 | + try { | |
| 446 | + String characterSet = parentPlatform.getCharacterSet(); | |
| 447 | + StringBuffer deviceStatusXml = new StringBuffer(600); | |
| 448 | + deviceStatusXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n"); | |
| 449 | + deviceStatusXml.append("<Notify>\r\n"); | |
| 450 | + deviceStatusXml.append("<CmdType>Alarm</CmdType>\r\n"); | |
| 451 | + deviceStatusXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); | |
| 452 | + deviceStatusXml.append("<DeviceID>" + deviceAlarm.getChannelId() + "</DeviceID>\r\n"); | |
| 453 | + deviceStatusXml.append("<AlarmPriority>" + deviceAlarm.getAlarmPriority() + "</AlarmPriority>\r\n"); | |
| 454 | + deviceStatusXml.append("<AlarmMethod>" + deviceAlarm.getAlarmMethod() + "</AlarmMethod>\r\n"); | |
| 455 | + deviceStatusXml.append("<AlarmTime>" + deviceAlarm.getAlarmTime() + "</AlarmTime>\r\n"); | |
| 456 | + deviceStatusXml.append("<AlarmDescription>" + deviceAlarm.getAlarmDescription() + "</AlarmDescription>\r\n"); | |
| 457 | + deviceStatusXml.append("<Longitude>" + deviceAlarm.getLongitude() + "</Longitude>\r\n"); | |
| 458 | + deviceStatusXml.append("<Latitude>" + deviceAlarm.getLatitude() + "</Latitude>\r\n"); | |
| 459 | + deviceStatusXml.append("<info>\r\n"); | |
| 460 | + deviceStatusXml.append("<AlarmType>" + deviceAlarm.getAlarmType() + "</AlarmType>\r\n"); | |
| 461 | + deviceStatusXml.append("</info>\r\n"); | |
| 462 | + deviceStatusXml.append("</Notify>\r\n"); | |
| 463 | + | |
| 464 | + CallIdHeader callIdHeader = parentPlatform.getTransport().equals("TCP") ? tcpSipProvider.getNewCallId() | |
| 465 | + : udpSipProvider.getNewCallId(); | |
| 466 | + | |
| 467 | + String tm = Long.toString(System.currentTimeMillis()); | |
| 468 | + Request request = headerProviderPlarformProvider.createMessageRequest(parentPlatform, deviceStatusXml.toString(), "FromPtz" + tm, callIdHeader); | |
| 469 | + transmitRequest(parentPlatform, request); | |
| 470 | + | |
| 471 | + } catch (SipException | ParseException e) { | |
| 472 | + e.printStackTrace(); | |
| 473 | + return false; | |
| 474 | + } catch (InvalidArgumentException e) { | |
| 475 | + throw new RuntimeException(e); | |
| 476 | + } | |
| 477 | + return true; | |
| 478 | + } | |
| 479 | + | |
| 480 | + @Override | |
| 439 | 481 | public boolean sendNotifyForCatalogAddOrUpdate(String type, ParentPlatform parentPlatform, List<DeviceChannel> deviceChannels, SubscribeInfo subscribeInfo, Integer index) { |
| 440 | 482 | if (parentPlatform == null || deviceChannels == null || deviceChannels.size() == 0 || subscribeInfo == null) { |
| 441 | 483 | return false; |
| ... | ... | @@ -495,11 +537,16 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 495 | 537 | event.setEventId(subscribeInfo.getEventId()); |
| 496 | 538 | } |
| 497 | 539 | notifyRequest.addHeader(event); |
| 498 | - | |
| 499 | 540 | SipURI sipURI = (SipURI) notifyRequest.getRequestURI(); |
| 500 | - SIPRequest request = (SIPRequest) subscribeInfo.getTransaction().getRequest(); | |
| 501 | - sipURI.setHost(request.getRemoteAddress().getHostAddress()); | |
| 502 | - sipURI.setPort(request.getRemotePort()); | |
| 541 | + if (subscribeInfo.getTransaction() != null) { | |
| 542 | + SIPRequest request = (SIPRequest) subscribeInfo.getTransaction().getRequest(); | |
| 543 | + sipURI.setHost(request.getRemoteAddress().getHostAddress()); | |
| 544 | + sipURI.setPort(request.getRemotePort()); | |
| 545 | + }else { | |
| 546 | + sipURI.setHost(parentPlatform.getServerIP()); | |
| 547 | + sipURI.setPort(parentPlatform.getServerPort()); | |
| 548 | + } | |
| 549 | + | |
| 503 | 550 | ClientTransaction transaction = null; |
| 504 | 551 | if ("TCP".equals(parentPlatform.getTransport())) { |
| 505 | 552 | transaction = tcpSipProvider.getNewClientTransaction(notifyRequest); | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java
| ... | ... | @@ -13,6 +13,7 @@ import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; |
| 13 | 13 | import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; |
| 14 | 14 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.ISIPRequestProcessor; |
| 15 | 15 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent; |
| 16 | +import com.genersoft.iot.vmp.gb28181.utils.Coordtransform; | |
| 16 | 17 | import com.genersoft.iot.vmp.gb28181.utils.NumericUtil; |
| 17 | 18 | import com.genersoft.iot.vmp.gb28181.utils.SipUtils; |
| 18 | 19 | import com.genersoft.iot.vmp.gb28181.utils.XmlUtil; |
| ... | ... | @@ -149,11 +150,12 @@ public class NotifyRequestProcessor extends SIPRequestProcessorParent implements |
| 149 | 150 | logger.info("[收到 移动位置订阅]:{}/{}->{}.{}", mobilePosition.getDeviceId(), mobilePosition.getChannelId(), |
| 150 | 151 | mobilePosition.getLongitude(), mobilePosition.getLatitude()); |
| 151 | 152 | mobilePosition.setReportSource("Mobile Position"); |
| 152 | - BaiduPoint bp = GpsUtil.Wgs84ToBd09(String.valueOf(mobilePosition.getLongitude()), String.valueOf(mobilePosition.getLatitude())); | |
| 153 | - logger.info("百度坐标:" + bp.getBdLng() + ", " + bp.getBdLat()); | |
| 154 | - mobilePosition.setGeodeticSystem("BD-09"); | |
| 155 | - mobilePosition.setCnLng(bp.getBdLng()); | |
| 156 | - mobilePosition.setCnLat(bp.getBdLat()); | |
| 153 | + // 默认来源坐标系为WGS-84处理 | |
| 154 | + Double[] gcj02Point = Coordtransform.WGS84ToGCJ02(mobilePosition.getLongitude(), mobilePosition.getLatitude()); | |
| 155 | + logger.info("GCJ02坐标:" + gcj02Point[0] + ", " + gcj02Point[1]); | |
| 156 | + mobilePosition.setGeodeticSystem("GCJ-02"); | |
| 157 | + mobilePosition.setCnLng(gcj02Point[0] + ""); | |
| 158 | + mobilePosition.setCnLat(gcj02Point[1] + ""); | |
| 157 | 159 | if (!userSetting.getSavePositionHistory()) { |
| 158 | 160 | storager.clearMobilePositionsByDeviceId(deviceId); |
| 159 | 161 | } |
| ... | ... | @@ -223,12 +225,12 @@ public class NotifyRequestProcessor extends SIPRequestProcessorParent implements |
| 223 | 225 | mobilePosition.setLongitude(deviceAlarm.getLongitude()); |
| 224 | 226 | mobilePosition.setLatitude(deviceAlarm.getLatitude()); |
| 225 | 227 | mobilePosition.setReportSource("GPS Alarm"); |
| 226 | - BaiduPoint bp = new BaiduPoint(); | |
| 227 | - bp = GpsUtil.Wgs84ToBd09(String.valueOf(mobilePosition.getLongitude()), String.valueOf(mobilePosition.getLatitude())); | |
| 228 | - logger.info("百度坐标:" + bp.getBdLng() + ", " + bp.getBdLat()); | |
| 229 | - mobilePosition.setGeodeticSystem("BD-09"); | |
| 230 | - mobilePosition.setCnLng(bp.getBdLng()); | |
| 231 | - mobilePosition.setCnLat(bp.getBdLat()); | |
| 228 | + // 默认来源坐标系为WGS-84处理 | |
| 229 | + Double[] gcj02Point = Coordtransform.WGS84ToGCJ02(mobilePosition.getLongitude(), mobilePosition.getLatitude()); | |
| 230 | + logger.info("GCJ02坐标:" + gcj02Point[0] + ", " + gcj02Point[1]); | |
| 231 | + mobilePosition.setGeodeticSystem("GCJ-02"); | |
| 232 | + mobilePosition.setCnLng(gcj02Point[0] + ""); | |
| 233 | + mobilePosition.setCnLat(gcj02Point[1] + ""); | |
| 232 | 234 | if (!userSetting.getSavePositionHistory()) { |
| 233 | 235 | storager.clearMobilePositionsByDeviceId(deviceId); |
| 234 | 236 | } | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/AlarmNotifyMessageHandler.java
| 1 | 1 | package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.notify.cmd; |
| 2 | 2 | |
| 3 | +import com.alibaba.fastjson.JSON; | |
| 3 | 4 | import com.genersoft.iot.vmp.conf.SipConfig; |
| 4 | 5 | import com.genersoft.iot.vmp.conf.UserSetting; |
| 5 | 6 | import com.genersoft.iot.vmp.gb28181.bean.*; |
| ... | ... | @@ -8,8 +9,10 @@ import com.genersoft.iot.vmp.gb28181.event.EventPublisher; |
| 8 | 9 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent; |
| 9 | 10 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.IMessageHandler; |
| 10 | 11 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.notify.NotifyMessageHandler; |
| 12 | +import com.genersoft.iot.vmp.gb28181.utils.Coordtransform; | |
| 11 | 13 | import com.genersoft.iot.vmp.gb28181.utils.NumericUtil; |
| 12 | 14 | import com.genersoft.iot.vmp.service.IDeviceAlarmService; |
| 15 | +import com.genersoft.iot.vmp.storager.IRedisCatchStorage; | |
| 13 | 16 | import com.genersoft.iot.vmp.storager.IVideoManagerStorage; |
| 14 | 17 | import com.genersoft.iot.vmp.utils.GpsUtil; |
| 15 | 18 | import org.dom4j.Element; |
| ... | ... | @@ -20,7 +23,12 @@ import org.springframework.beans.factory.annotation.Autowired; |
| 20 | 23 | import org.springframework.stereotype.Component; |
| 21 | 24 | import org.springframework.util.StringUtils; |
| 22 | 25 | |
| 26 | +import javax.sip.InvalidArgumentException; | |
| 23 | 27 | import javax.sip.RequestEvent; |
| 28 | +import javax.sip.SipException; | |
| 29 | +import javax.sip.message.Response; | |
| 30 | + | |
| 31 | +import java.text.ParseException; | |
| 24 | 32 | |
| 25 | 33 | import static com.genersoft.iot.vmp.gb28181.utils.XmlUtil.*; |
| 26 | 34 | |
| ... | ... | @@ -46,6 +54,9 @@ public class AlarmNotifyMessageHandler extends SIPRequestProcessorParent impleme |
| 46 | 54 | private IVideoManagerStorage storager; |
| 47 | 55 | |
| 48 | 56 | @Autowired |
| 57 | + private IRedisCatchStorage redisCatchStorage; | |
| 58 | + | |
| 59 | + @Autowired | |
| 49 | 60 | private IDeviceAlarmService deviceAlarmService; |
| 50 | 61 | |
| 51 | 62 | @Autowired |
| ... | ... | @@ -58,11 +69,22 @@ public class AlarmNotifyMessageHandler extends SIPRequestProcessorParent impleme |
| 58 | 69 | |
| 59 | 70 | @Override |
| 60 | 71 | public void handForDevice(RequestEvent evt, Device device, Element rootElement) { |
| 61 | - if (!sipConfig.isAlarm()) { | |
| 62 | - return; | |
| 72 | + logger.info("收到来自设备[{}]的报警通知", device.getDeviceId()); | |
| 73 | + // 回复200 OK | |
| 74 | + try { | |
| 75 | + responseAck(evt, Response.OK); | |
| 76 | + } catch (SipException e) { | |
| 77 | + throw new RuntimeException(e); | |
| 78 | + } catch (InvalidArgumentException e) { | |
| 79 | + throw new RuntimeException(e); | |
| 80 | + } catch (ParseException e) { | |
| 81 | + throw new RuntimeException(e); | |
| 63 | 82 | } |
| 83 | + | |
| 64 | 84 | Element deviceIdElement = rootElement.element("DeviceID"); |
| 65 | 85 | String channelId = deviceIdElement.getText().toString(); |
| 86 | + | |
| 87 | + | |
| 66 | 88 | DeviceAlarm deviceAlarm = new DeviceAlarm(); |
| 67 | 89 | deviceAlarm.setDeviceId(device.getDeviceId()); |
| 68 | 90 | deviceAlarm.setChannelId(channelId); |
| ... | ... | @@ -93,12 +115,12 @@ public class AlarmNotifyMessageHandler extends SIPRequestProcessorParent impleme |
| 93 | 115 | mobilePosition.setLongitude(deviceAlarm.getLongitude()); |
| 94 | 116 | mobilePosition.setLatitude(deviceAlarm.getLatitude()); |
| 95 | 117 | mobilePosition.setReportSource("GPS Alarm"); |
| 96 | - BaiduPoint bp = new BaiduPoint(); | |
| 97 | - bp = GpsUtil.Wgs84ToBd09(String.valueOf(mobilePosition.getLongitude()), String.valueOf(mobilePosition.getLatitude())); | |
| 98 | - logger.info("百度坐标:" + bp.getBdLng() + ", " + bp.getBdLat()); | |
| 99 | - mobilePosition.setGeodeticSystem("BD-09"); | |
| 100 | - mobilePosition.setCnLng(bp.getBdLng()); | |
| 101 | - mobilePosition.setCnLat(bp.getBdLat()); | |
| 118 | + // 默认来源坐标系为WGS-84处理 | |
| 119 | + Double[] gcj02Point = Coordtransform.WGS84ToGCJ02(mobilePosition.getLongitude(), mobilePosition.getLatitude()); | |
| 120 | + logger.info("GCJ02坐标:" + gcj02Point[0] + ", " + gcj02Point[1]); | |
| 121 | + mobilePosition.setGeodeticSystem("GCJ-02"); | |
| 122 | + mobilePosition.setCnLng(gcj02Point[0] + ""); | |
| 123 | + mobilePosition.setCnLat(gcj02Point[1] + ""); | |
| 102 | 124 | if (!userSetting.getSavePositionHistory()) { |
| 103 | 125 | storager.clearMobilePositionsByDeviceId(device.getDeviceId()); |
| 104 | 126 | } |
| ... | ... | @@ -110,9 +132,24 @@ public class AlarmNotifyMessageHandler extends SIPRequestProcessorParent impleme |
| 110 | 132 | deviceAlarm.setAlarmType(getText(rootElement.element("Info"), "AlarmType")); |
| 111 | 133 | } |
| 112 | 134 | } |
| 135 | + | |
| 136 | + if (channelId.equals(sipConfig.getId())) { | |
| 137 | + // 发送给平台的报警信息。 发送redis通知 | |
| 138 | + AlarmChannelMessage alarmChannelMessage = new AlarmChannelMessage(); | |
| 139 | + alarmChannelMessage.setAlarmSn(Integer.parseInt(deviceAlarm.getAlarmMethod())); | |
| 140 | + alarmChannelMessage.setAlarmDescription(deviceAlarm.getAlarmDescription()); | |
| 141 | + alarmChannelMessage.setGbId(channelId); | |
| 142 | + redisCatchStorage.sendAlarmMsg(alarmChannelMessage); | |
| 143 | + | |
| 144 | + return; | |
| 145 | + } | |
| 146 | + | |
| 113 | 147 | logger.debug("存储报警信息、报警分类"); |
| 114 | 148 | // 存储报警信息、报警分类 |
| 115 | - deviceAlarmService.add(deviceAlarm); | |
| 149 | + if (sipConfig.isAlarm()) { | |
| 150 | + deviceAlarmService.add(deviceAlarm); | |
| 151 | + } | |
| 152 | + | |
| 116 | 153 | |
| 117 | 154 | if (offLineDetector.isOnline(device.getDeviceId())) { |
| 118 | 155 | publisher.deviceAlarmEventPublish(deviceAlarm); |
| ... | ... | @@ -120,7 +157,59 @@ public class AlarmNotifyMessageHandler extends SIPRequestProcessorParent impleme |
| 120 | 157 | } |
| 121 | 158 | |
| 122 | 159 | @Override |
| 123 | - public void handForPlatform(RequestEvent evt, ParentPlatform parentPlatform, Element element) { | |
| 160 | + public void handForPlatform(RequestEvent evt, ParentPlatform parentPlatform, Element rootElement) { | |
| 161 | + logger.info("收到来自平台[{}]的报警通知", parentPlatform.getServerGBId()); | |
| 162 | + // 回复200 OK | |
| 163 | + try { | |
| 164 | + responseAck(evt, Response.OK); | |
| 165 | + } catch (SipException e) { | |
| 166 | + throw new RuntimeException(e); | |
| 167 | + } catch (InvalidArgumentException e) { | |
| 168 | + throw new RuntimeException(e); | |
| 169 | + } catch (ParseException e) { | |
| 170 | + throw new RuntimeException(e); | |
| 171 | + } | |
| 172 | + Element deviceIdElement = rootElement.element("DeviceID"); | |
| 173 | + String channelId = deviceIdElement.getText().toString(); | |
| 174 | + | |
| 175 | + | |
| 176 | + DeviceAlarm deviceAlarm = new DeviceAlarm(); | |
| 177 | + deviceAlarm.setDeviceId(parentPlatform.getServerGBId()); | |
| 178 | + deviceAlarm.setChannelId(channelId); | |
| 179 | + deviceAlarm.setAlarmPriority(getText(rootElement, "AlarmPriority")); | |
| 180 | + deviceAlarm.setAlarmMethod(getText(rootElement, "AlarmMethod")); | |
| 181 | + deviceAlarm.setAlarmTime(getText(rootElement, "AlarmTime")); | |
| 182 | + if (getText(rootElement, "AlarmDescription") == null) { | |
| 183 | + deviceAlarm.setAlarmDescription(""); | |
| 184 | + } else { | |
| 185 | + deviceAlarm.setAlarmDescription(getText(rootElement, "AlarmDescription")); | |
| 186 | + } | |
| 187 | + if (NumericUtil.isDouble(getText(rootElement, "Longitude"))) { | |
| 188 | + deviceAlarm.setLongitude(Double.parseDouble(getText(rootElement, "Longitude"))); | |
| 189 | + } else { | |
| 190 | + deviceAlarm.setLongitude(0.00); | |
| 191 | + } | |
| 192 | + if (NumericUtil.isDouble(getText(rootElement, "Latitude"))) { | |
| 193 | + deviceAlarm.setLatitude(Double.parseDouble(getText(rootElement, "Latitude"))); | |
| 194 | + } else { | |
| 195 | + deviceAlarm.setLatitude(0.00); | |
| 196 | + } | |
| 197 | + | |
| 198 | + if (!StringUtils.isEmpty(deviceAlarm.getAlarmMethod())) { | |
| 199 | + | |
| 200 | + if (deviceAlarm.getAlarmMethod().equals("5")) { | |
| 201 | + deviceAlarm.setAlarmType(getText(rootElement.element("Info"), "AlarmType")); | |
| 202 | + } | |
| 203 | + } | |
| 124 | 204 | |
| 205 | + if (channelId.equals(parentPlatform.getDeviceGBId())) { | |
| 206 | + // 发送给平台的报警信息。 发送redis通知 | |
| 207 | + AlarmChannelMessage alarmChannelMessage = new AlarmChannelMessage(); | |
| 208 | + alarmChannelMessage.setAlarmSn(Integer.parseInt(deviceAlarm.getAlarmMethod())); | |
| 209 | + alarmChannelMessage.setAlarmDescription(deviceAlarm.getAlarmDescription()); | |
| 210 | + alarmChannelMessage.setGbId(channelId); | |
| 211 | + redisCatchStorage.sendAlarmMsg(alarmChannelMessage); | |
| 212 | + return; | |
| 213 | + } | |
| 125 | 214 | } |
| 126 | 215 | } | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/MobilePositionNotifyMessageHandler.java
| ... | ... | @@ -8,6 +8,7 @@ import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; |
| 8 | 8 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent; |
| 9 | 9 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.IMessageHandler; |
| 10 | 10 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.notify.NotifyMessageHandler; |
| 11 | +import com.genersoft.iot.vmp.gb28181.utils.Coordtransform; | |
| 11 | 12 | import com.genersoft.iot.vmp.gb28181.utils.NumericUtil; |
| 12 | 13 | import com.genersoft.iot.vmp.storager.IVideoManagerStorage; |
| 13 | 14 | import com.genersoft.iot.vmp.utils.GpsUtil; |
| ... | ... | @@ -79,12 +80,12 @@ public class MobilePositionNotifyMessageHandler extends SIPRequestProcessorParen |
| 79 | 80 | mobilePosition.setAltitude(0.0); |
| 80 | 81 | } |
| 81 | 82 | mobilePosition.setReportSource("Mobile Position"); |
| 82 | - BaiduPoint bp = new BaiduPoint(); | |
| 83 | - bp = GpsUtil.Wgs84ToBd09(String.valueOf(mobilePosition.getLongitude()), String.valueOf(mobilePosition.getLatitude())); | |
| 84 | - logger.info("百度坐标:" + bp.getBdLng() + ", " + bp.getBdLat()); | |
| 85 | - mobilePosition.setGeodeticSystem("BD-09"); | |
| 86 | - mobilePosition.setCnLng(bp.getBdLng()); | |
| 87 | - mobilePosition.setCnLat(bp.getBdLat()); | |
| 83 | + // 默认来源坐标系为WGS-84处理 | |
| 84 | + Double[] gcj02Point = Coordtransform.WGS84ToGCJ02(mobilePosition.getLongitude(), mobilePosition.getLatitude()); | |
| 85 | + logger.info("GCJ02坐标:" + gcj02Point[0] + ", " + gcj02Point[1]); | |
| 86 | + mobilePosition.setGeodeticSystem("GCJ-02"); | |
| 87 | + mobilePosition.setCnLng(gcj02Point[0] + ""); | |
| 88 | + mobilePosition.setCnLat(gcj02Point[1] + ""); | |
| 88 | 89 | if (!userSetting.getSavePositionHistory()) { |
| 89 | 90 | storager.clearMobilePositionsByDeviceId(device.getDeviceId()); |
| 90 | 91 | } | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/CatalogResponseMessageHandler.java
| ... | ... | @@ -12,6 +12,7 @@ import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; |
| 12 | 12 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent; |
| 13 | 13 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.IMessageHandler; |
| 14 | 14 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.response.ResponseMessageHandler; |
| 15 | +import com.genersoft.iot.vmp.gb28181.utils.Coordtransform; | |
| 15 | 16 | import com.genersoft.iot.vmp.gb28181.utils.NumericUtil; |
| 16 | 17 | import com.genersoft.iot.vmp.gb28181.utils.XmlUtil; |
| 17 | 18 | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| ... | ... | @@ -199,12 +200,12 @@ public class CatalogResponseMessageHandler extends SIPRequestProcessorParent imp |
| 199 | 200 | mobilePosition.setAltitude(0.0); |
| 200 | 201 | } |
| 201 | 202 | mobilePosition.setReportSource("Mobile Position"); |
| 202 | - BaiduPoint bp = new BaiduPoint(); | |
| 203 | - bp = GpsUtil.Wgs84ToBd09(String.valueOf(mobilePosition.getLongitude()), String.valueOf(mobilePosition.getLatitude())); | |
| 204 | - logger.info("百度坐标:" + bp.getBdLng() + ", " + bp.getBdLat()); | |
| 205 | - mobilePosition.setGeodeticSystem("BD-09"); | |
| 206 | - mobilePosition.setCnLng(bp.getBdLng()); | |
| 207 | - mobilePosition.setCnLat(bp.getBdLat()); | |
| 203 | + // 默认来源坐标系为WGS-84处理 | |
| 204 | + Double[] gcj02Point = Coordtransform.WGS84ToGCJ02(mobilePosition.getLongitude(), mobilePosition.getLatitude()); | |
| 205 | + logger.info("GCJ02坐标:" + gcj02Point[0] + ", " + gcj02Point[1]); | |
| 206 | + mobilePosition.setGeodeticSystem("GCJ-02"); | |
| 207 | + mobilePosition.setCnLng(gcj02Point[0] + ""); | |
| 208 | + mobilePosition.setCnLat(gcj02Point[1] + ""); | |
| 208 | 209 | if (!userSetting.getSavePositionHistory()) { |
| 209 | 210 | storager.clearMobilePositionsByDeviceId(deviceId); |
| 210 | 211 | } | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/MobilePositionResponseMessageHandler.java
| ... | ... | @@ -8,6 +8,7 @@ import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; |
| 8 | 8 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.SIPRequestProcessorParent; |
| 9 | 9 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.IMessageHandler; |
| 10 | 10 | import com.genersoft.iot.vmp.gb28181.transmit.event.request.impl.message.response.ResponseMessageHandler; |
| 11 | +import com.genersoft.iot.vmp.gb28181.utils.Coordtransform; | |
| 11 | 12 | import com.genersoft.iot.vmp.gb28181.utils.NumericUtil; |
| 12 | 13 | import com.genersoft.iot.vmp.storager.IVideoManagerStorage; |
| 13 | 14 | import com.genersoft.iot.vmp.utils.GpsUtil; |
| ... | ... | @@ -79,12 +80,12 @@ public class MobilePositionResponseMessageHandler extends SIPRequestProcessorPar |
| 79 | 80 | mobilePosition.setAltitude(0.0); |
| 80 | 81 | } |
| 81 | 82 | mobilePosition.setReportSource("Mobile Position"); |
| 82 | - BaiduPoint bp = new BaiduPoint(); | |
| 83 | - bp = GpsUtil.Wgs84ToBd09(String.valueOf(mobilePosition.getLongitude()), String.valueOf(mobilePosition.getLatitude())); | |
| 84 | - logger.info("百度坐标:" + bp.getBdLng() + ", " + bp.getBdLat()); | |
| 85 | - mobilePosition.setGeodeticSystem("BD-09"); | |
| 86 | - mobilePosition.setCnLng(bp.getBdLng()); | |
| 87 | - mobilePosition.setCnLat(bp.getBdLat()); | |
| 83 | + // 默认来源坐标系为WGS-84处理 | |
| 84 | + Double[] gcj02Point = Coordtransform.WGS84ToGCJ02(mobilePosition.getLongitude(), mobilePosition.getLatitude()); | |
| 85 | + logger.info("GCJ02坐标:" + gcj02Point[0] + ", " + gcj02Point[1]); | |
| 86 | + mobilePosition.setGeodeticSystem("GCJ-02"); | |
| 87 | + mobilePosition.setCnLng(gcj02Point[0] + ""); | |
| 88 | + mobilePosition.setCnLat(gcj02Point[1] + ""); | |
| 88 | 89 | if (!userSetting.getSavePositionHistory()) { |
| 89 | 90 | storager.clearMobilePositionsByDeviceId(device.getDeviceId()); |
| 90 | 91 | } | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/utils/Coordtransform.java
0 → 100644
| 1 | +package com.genersoft.iot.vmp.gb28181.utils; | |
| 2 | + | |
| 3 | +/** | |
| 4 | + * 坐标转换 | |
| 5 | + * 一个提供了百度坐标(BD09)、国测局坐标(火星坐标,GCJ02)、和WGS84坐标系之间的转换的工具类 | |
| 6 | + * 参考https://github.com/wandergis/coordtransform 写的Java版本 | |
| 7 | + * @author Xinconan | |
| 8 | + * @date 2016-03-18 | |
| 9 | + * @url https://github.com/xinconan/coordtransform | |
| 10 | + */ | |
| 11 | +public class Coordtransform { | |
| 12 | + | |
| 13 | + private static double x_PI = 3.14159265358979324 * 3000.0 / 180.0; | |
| 14 | + private static double PI = 3.1415926535897932384626; | |
| 15 | + private static double a = 6378245.0; | |
| 16 | + private static double ee = 0.00669342162296594323; | |
| 17 | + | |
| 18 | + /** | |
| 19 | + * 百度坐标系 (BD-09) 与 火星坐标系 (GCJ-02)的转换 | |
| 20 | + * 即 百度 转 谷歌、高德 | |
| 21 | + * @param bd_lon | |
| 22 | + * @param bd_lat | |
| 23 | + * @return Double[lon,lat] | |
| 24 | + */ | |
| 25 | + public static Double[] BD09ToGCJ02(Double bd_lon,Double bd_lat){ | |
| 26 | + double x = bd_lon - 0.0065; | |
| 27 | + double y = bd_lat - 0.006; | |
| 28 | + double z = Math.sqrt(x * x + y * y) - 0.00002 * Math.sin(y * x_PI); | |
| 29 | + double theta = Math.atan2(y, x) - 0.000003 * Math.cos(x * x_PI); | |
| 30 | + Double[] arr = new Double[2]; | |
| 31 | + arr[0] = z * Math.cos(theta); | |
| 32 | + arr[1] = z * Math.sin(theta); | |
| 33 | + return arr; | |
| 34 | + } | |
| 35 | + | |
| 36 | + /** | |
| 37 | + * 火星坐标系 (GCJ-02) 与百度坐标系 (BD-09) 的转换 | |
| 38 | + * 即谷歌、高德 转 百度 | |
| 39 | + * @param gcj_lon | |
| 40 | + * @param gcj_lat | |
| 41 | + * @return Double[lon,lat] | |
| 42 | + */ | |
| 43 | + public static Double[] GCJ02ToBD09(Double gcj_lon,Double gcj_lat){ | |
| 44 | + double z = Math.sqrt(gcj_lon * gcj_lon + gcj_lat * gcj_lat) + 0.00002 * Math.sin(gcj_lat * x_PI); | |
| 45 | + double theta = Math.atan2(gcj_lat, gcj_lon) + 0.000003 * Math.cos(gcj_lon * x_PI); | |
| 46 | + Double[] arr = new Double[2]; | |
| 47 | + arr[0] = z * Math.cos(theta) + 0.0065; | |
| 48 | + arr[1] = z * Math.sin(theta) + 0.006; | |
| 49 | + return arr; | |
| 50 | + } | |
| 51 | + | |
| 52 | + /** | |
| 53 | + * WGS84转GCJ02 | |
| 54 | + * @param wgs_lon | |
| 55 | + * @param wgs_lat | |
| 56 | + * @return Double[lon,lat] | |
| 57 | + */ | |
| 58 | + public static Double[] WGS84ToGCJ02(Double wgs_lon,Double wgs_lat){ | |
| 59 | + if(outOfChina(wgs_lon, wgs_lat)){ | |
| 60 | + return new Double[]{wgs_lon,wgs_lat}; | |
| 61 | + } | |
| 62 | + double dlat = transformlat(wgs_lon - 105.0, wgs_lat - 35.0); | |
| 63 | + double dlng = transformlng(wgs_lon - 105.0, wgs_lat - 35.0); | |
| 64 | + double radlat = wgs_lat / 180.0 * PI; | |
| 65 | + double magic = Math.sin(radlat); | |
| 66 | + magic = 1 - ee * magic * magic; | |
| 67 | + double sqrtmagic = Math.sqrt(magic); | |
| 68 | + dlat = (dlat * 180.0) / ((a * (1 - ee)) / (magic * sqrtmagic) * PI); | |
| 69 | + dlng = (dlng * 180.0) / (a / sqrtmagic * Math.cos(radlat) * PI); | |
| 70 | + Double[] arr = new Double[2]; | |
| 71 | + arr[0] = wgs_lon + dlng; | |
| 72 | + arr[1] = wgs_lat + dlat; | |
| 73 | + return arr; | |
| 74 | + } | |
| 75 | + | |
| 76 | + /** | |
| 77 | + * GCJ02转WGS84 | |
| 78 | + * @param gcj_lon | |
| 79 | + * @param gcj_lat | |
| 80 | + * @return Double[lon,lat] | |
| 81 | + */ | |
| 82 | + public static Double[] GCJ02ToWGS84(Double gcj_lon,Double gcj_lat){ | |
| 83 | + if(outOfChina(gcj_lon, gcj_lat)){ | |
| 84 | + return new Double[]{gcj_lon,gcj_lat}; | |
| 85 | + } | |
| 86 | + double dlat = transformlat(gcj_lon - 105.0, gcj_lat - 35.0); | |
| 87 | + double dlng = transformlng(gcj_lon - 105.0, gcj_lat - 35.0); | |
| 88 | + double radlat = gcj_lat / 180.0 * PI; | |
| 89 | + double magic = Math.sin(radlat); | |
| 90 | + magic = 1 - ee * magic * magic; | |
| 91 | + double sqrtmagic = Math.sqrt(magic); | |
| 92 | + dlat = (dlat * 180.0) / ((a * (1 - ee)) / (magic * sqrtmagic) * PI); | |
| 93 | + dlng = (dlng * 180.0) / (a / sqrtmagic * Math.cos(radlat) * PI); | |
| 94 | + double mglat = gcj_lat + dlat; | |
| 95 | + double mglng = gcj_lon + dlng; | |
| 96 | + return new Double[]{gcj_lon * 2 - mglng, gcj_lat * 2 - mglat}; | |
| 97 | + } | |
| 98 | + | |
| 99 | + private static Double transformlat(double lng, double lat) { | |
| 100 | + double ret = -100.0 + 2.0 * lng + 3.0 * lat + 0.2 * lat * lat + 0.1 * lng * lat + 0.2 * Math.sqrt(Math.abs(lng)); | |
| 101 | + ret += (20.0 * Math.sin(6.0 * lng * PI) + 20.0 * Math.sin(2.0 * lng * PI)) * 2.0 / 3.0; | |
| 102 | + ret += (20.0 * Math.sin(lat * PI) + 40.0 * Math.sin(lat / 3.0 * PI)) * 2.0 / 3.0; | |
| 103 | + ret += (160.0 * Math.sin(lat / 12.0 * PI) + 320 * Math.sin(lat * PI / 30.0)) * 2.0 / 3.0; | |
| 104 | + return ret; | |
| 105 | + } | |
| 106 | + | |
| 107 | + private static Double transformlng(double lng,double lat) { | |
| 108 | + double ret = 300.0 + lng + 2.0 * lat + 0.1 * lng * lng + 0.1 * lng * lat + 0.1 * Math.sqrt(Math.abs(lng)); | |
| 109 | + ret += (20.0 * Math.sin(6.0 * lng * PI) + 20.0 * Math.sin(2.0 * lng * PI)) * 2.0 / 3.0; | |
| 110 | + ret += (20.0 * Math.sin(lng * PI) + 40.0 * Math.sin(lng / 3.0 * PI)) * 2.0 / 3.0; | |
| 111 | + ret += (150.0 * Math.sin(lng / 12.0 * PI) + 300.0 * Math.sin(lng / 30.0 * PI)) * 2.0 / 3.0; | |
| 112 | + return ret; | |
| 113 | + } | |
| 114 | + | |
| 115 | + /** | |
| 116 | + * outOfChina | |
| 117 | + * @描述: 判断是否在国内,不在国内则不做偏移 | |
| 118 | + * @param lng | |
| 119 | + * @param lat | |
| 120 | + * @return {boolean} | |
| 121 | + */ | |
| 122 | + private static boolean outOfChina(Double lng,Double lat) { | |
| 123 | + return (lng < 72.004 || lng > 137.8347) || ((lat < 0.8293 || lat > 55.8271) || false); | |
| 124 | + }; | |
| 125 | + | |
| 126 | +} | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/utils/SipUtils.java
| ... | ... | @@ -25,6 +25,7 @@ public class SipUtils { |
| 25 | 25 | * */ |
| 26 | 26 | public static String getChannelIdFromHeader(Request request) { |
| 27 | 27 | Header subject = request.getHeader("subject"); |
| 28 | + if (subject == null) return null; | |
| 28 | 29 | return ((Subject) subject).getSubject().split(":")[0]; |
| 29 | 30 | } |
| 30 | 31 | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java
| ... | ... | @@ -211,6 +211,14 @@ public class XmlUtil { |
| 211 | 211 | deviceChannel.setParental(Integer.parseInt(XmlUtil.getText(itemDevice, "Parental"))); |
| 212 | 212 | } |
| 213 | 213 | deviceChannel.setParentId(XmlUtil.getText(itemDevice, "ParentID")); |
| 214 | + String parentId = XmlUtil.getText(itemDevice, "ParentID"); | |
| 215 | + if (parentId != null && parentId.contains("/")) { | |
| 216 | + String lastParentId = parentId.substring(parentId.lastIndexOf("/") + 1); | |
| 217 | + deviceChannel.setParentId(lastParentId); | |
| 218 | + }else { | |
| 219 | + deviceChannel.setParentId(parentId); | |
| 220 | + } | |
| 221 | + | |
| 214 | 222 | if (XmlUtil.getText(itemDevice, "SafetyWay") == null |
| 215 | 223 | || XmlUtil.getText(itemDevice, "SafetyWay") == "") { |
| 216 | 224 | deviceChannel.setSafetyWay(0); | ... | ... |
src/main/java/com/genersoft/iot/vmp/service/impl/RedisAlarmMsgListener.java
0 → 100644
| 1 | +package com.genersoft.iot.vmp.service.impl; | |
| 2 | + | |
| 3 | +import com.alibaba.fastjson.JSON; | |
| 4 | +import com.genersoft.iot.vmp.gb28181.bean.*; | |
| 5 | +import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommander; | |
| 6 | +import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform; | |
| 7 | +import com.genersoft.iot.vmp.service.bean.GPSMsgInfo; | |
| 8 | +import com.genersoft.iot.vmp.storager.IRedisCatchStorage; | |
| 9 | +import com.genersoft.iot.vmp.storager.IVideoManagerStorage; | |
| 10 | +import com.genersoft.iot.vmp.vmanager.bean.WVPResult; | |
| 11 | +import org.slf4j.Logger; | |
| 12 | +import org.slf4j.LoggerFactory; | |
| 13 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 14 | +import org.springframework.data.redis.connection.Message; | |
| 15 | +import org.springframework.data.redis.connection.MessageListener; | |
| 16 | +import org.springframework.http.HttpStatus; | |
| 17 | +import org.springframework.http.ResponseEntity; | |
| 18 | +import org.springframework.stereotype.Component; | |
| 19 | + | |
| 20 | +import java.text.SimpleDateFormat; | |
| 21 | + | |
| 22 | +@Component | |
| 23 | +public class RedisAlarmMsgListener implements MessageListener { | |
| 24 | + | |
| 25 | + private final static Logger logger = LoggerFactory.getLogger(RedisAlarmMsgListener.class); | |
| 26 | + | |
| 27 | + @Autowired | |
| 28 | + private ISIPCommander commander; | |
| 29 | + | |
| 30 | + @Autowired | |
| 31 | + private ISIPCommanderForPlatform commanderForPlatform; | |
| 32 | + | |
| 33 | + @Autowired | |
| 34 | + private IVideoManagerStorage storage; | |
| 35 | + | |
| 36 | + private final SimpleDateFormat formatForGB = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); | |
| 37 | + | |
| 38 | + @Override | |
| 39 | + public void onMessage(Message message, byte[] bytes) { | |
| 40 | + logger.info("收到来自REDIS的ALARM通知: {}", new String(message.getBody())); | |
| 41 | + AlarmChannelMessage alarmChannelMessage = JSON.parseObject(message.getBody(), AlarmChannelMessage.class); | |
| 42 | + if (alarmChannelMessage == null) { | |
| 43 | + logger.warn("[REDIS的ALARM通知]消息解析失败"); | |
| 44 | + return; | |
| 45 | + } | |
| 46 | + String gbId = alarmChannelMessage.getGbId(); | |
| 47 | + Device device = storage.queryVideoDevice(gbId); | |
| 48 | + ParentPlatform platform = storage.queryParentPlatByServerGBId(gbId); | |
| 49 | + | |
| 50 | + DeviceAlarm deviceAlarm = new DeviceAlarm(); | |
| 51 | + deviceAlarm.setChannelId(gbId); | |
| 52 | + deviceAlarm.setAlarmDescription(alarmChannelMessage.getAlarmDescription()); | |
| 53 | + deviceAlarm.setAlarmMethod("" + alarmChannelMessage.getAlarmSn()); | |
| 54 | + deviceAlarm.setAlarmPriority("1"); | |
| 55 | + deviceAlarm.setAlarmTime(formatForGB.format(System.currentTimeMillis())); | |
| 56 | + deviceAlarm.setAlarmType("1"); | |
| 57 | + deviceAlarm.setLongitude(0); | |
| 58 | + deviceAlarm.setLatitude(0); | |
| 59 | + | |
| 60 | + | |
| 61 | + if (device != null && platform == null) { | |
| 62 | + commander.sendAlarmMessage(device, deviceAlarm); | |
| 63 | + }else if (device == null && platform != null){ | |
| 64 | + commanderForPlatform.sendAlarmMessage(platform, deviceAlarm); | |
| 65 | + }else { | |
| 66 | + logger.warn("无法确定" + gbId + "是平台还是设备"); | |
| 67 | + } | |
| 68 | + } | |
| 69 | +} | ... | ... |
src/main/java/com/genersoft/iot/vmp/storager/IRedisCatchStorage.java
| ... | ... | @@ -140,6 +140,12 @@ public interface IRedisCatchStorage { |
| 140 | 140 | void sendStreamChangeMsg(String type, JSONObject jsonObject); |
| 141 | 141 | |
| 142 | 142 | /** |
| 143 | + * 发送报警消息 | |
| 144 | + * @param msg 消息内容 | |
| 145 | + */ | |
| 146 | + void sendAlarmMsg(AlarmChannelMessage msg); | |
| 147 | + | |
| 148 | + /** | |
| 143 | 149 | * 添加流信息到redis |
| 144 | 150 | * @param mediaServerItem |
| 145 | 151 | * @param app | ... | ... |
src/main/java/com/genersoft/iot/vmp/storager/IVideoManagerStorage.java
| ... | ... | @@ -5,7 +5,6 @@ import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem; |
| 5 | 5 | import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem; |
| 6 | 6 | import com.genersoft.iot.vmp.service.bean.GPSMsgInfo; |
| 7 | 7 | import com.genersoft.iot.vmp.storager.dao.dto.ChannelSourceInfo; |
| 8 | -import com.genersoft.iot.vmp.vmanager.bean.DeviceChannelTree; | |
| 9 | 8 | import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce; |
| 10 | 9 | import com.github.pagehelper.PageInfo; |
| 11 | 10 | |
| ... | ... | @@ -94,12 +93,6 @@ public interface IVideoManagerStorage { |
| 94 | 93 | |
| 95 | 94 | public List<DeviceChannel> queryChannelsByDeviceIdWithStartAndLimit(String deviceId, String query, Boolean hasSubChannel, Boolean online, int start, int limit); |
| 96 | 95 | |
| 97 | - /** | |
| 98 | - * 获取某个设备的通道树 | |
| 99 | - * @param deviceId 设备ID | |
| 100 | - * @return | |
| 101 | - */ | |
| 102 | - List<DeviceChannelTree> tree(String deviceId); | |
| 103 | 96 | |
| 104 | 97 | /** |
| 105 | 98 | * 获取某个设备的通道列表 |
| ... | ... | @@ -180,7 +173,7 @@ public interface IVideoManagerStorage { |
| 180 | 173 | * @param count |
| 181 | 174 | * @return |
| 182 | 175 | */ |
| 183 | - PageInfo querySubChannels(String deviceId, String channelId, String query, Boolean hasSubChannel, String online, int page, int count); | |
| 176 | + PageInfo querySubChannels(String deviceId, String channelId, String query, Boolean hasSubChannel, Boolean online, int page, int count); | |
| 184 | 177 | |
| 185 | 178 | |
| 186 | 179 | /** |
| ... | ... | @@ -285,7 +278,7 @@ public interface IVideoManagerStorage { |
| 285 | 278 | * @param startTime |
| 286 | 279 | * @param endTime |
| 287 | 280 | */ |
| 288 | - public List<MobilePosition> queryMobilePositions(String deviceId, String startTime, String endTime); | |
| 281 | + public List<MobilePosition> queryMobilePositions(String deviceId, String channelId, String startTime, String endTime); | |
| 289 | 282 | |
| 290 | 283 | /** |
| 291 | 284 | * 查询最新移动位置 | ... | ... |
src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceChannelMapper.java
| ... | ... | @@ -2,7 +2,6 @@ package com.genersoft.iot.vmp.storager.dao; |
| 2 | 2 | |
| 3 | 3 | import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; |
| 4 | 4 | import com.genersoft.iot.vmp.gb28181.bean.DeviceChannelInPlatform; |
| 5 | -import com.genersoft.iot.vmp.vmanager.bean.DeviceChannelTree; | |
| 6 | 5 | import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce; |
| 7 | 6 | import org.apache.ibatis.annotations.*; |
| 8 | 7 | import org.springframework.stereotype.Repository; |
| ... | ... | @@ -236,21 +235,6 @@ public interface DeviceChannelMapper { |
| 236 | 235 | @Select("SELECT * FROM device_channel WHERE deviceId=#{deviceId} AND status=1") |
| 237 | 236 | List<DeviceChannel> queryOnlineChannelsByDeviceId(String deviceId); |
| 238 | 237 | |
| 239 | - @Select(" SELECT\n" + | |
| 240 | - " id,\n" + | |
| 241 | - " channelId,\n" + | |
| 242 | - " deviceId,\n" + | |
| 243 | - " parentId,\n" + | |
| 244 | - " status,\n" + | |
| 245 | - " name as title,\n" + | |
| 246 | - " channelId as \"value\",\n" + | |
| 247 | - " channelId as \"key\",\n" + | |
| 248 | - " longitude,\n" + | |
| 249 | - " latitude\n" + | |
| 250 | - " from device_channel\n" + | |
| 251 | - " where deviceId = #{deviceId}") | |
| 252 | - List<DeviceChannelTree> tree(String deviceId); | |
| 253 | - | |
| 254 | 238 | @Delete(value = {" <script>" + |
| 255 | 239 | "DELETE " + |
| 256 | 240 | "from " + | ... | ... |
src/main/java/com/genersoft/iot/vmp/storager/dao/DeviceMobilePositionMapper.java
| ... | ... | @@ -16,12 +16,12 @@ public interface DeviceMobilePositionMapper { |
| 16 | 16 | |
| 17 | 17 | @Select(value = {" <script>" + |
| 18 | 18 | "SELECT * FROM device_mobile_position" + |
| 19 | - " WHERE deviceId = #{deviceId} " + | |
| 19 | + " WHERE deviceId = #{deviceId} and channelId = #{channelId} " + | |
| 20 | 20 | "<if test=\"startTime != null\"> AND time>=#{startTime}</if>" + |
| 21 | 21 | "<if test=\"endTime != null\"> AND time<=#{endTime}</if>" + |
| 22 | 22 | " ORDER BY time ASC" + |
| 23 | 23 | " </script>"}) |
| 24 | - List<MobilePosition> queryPositionByDeviceIdAndTime(String deviceId, String startTime, String endTime); | |
| 24 | + List<MobilePosition> queryPositionByDeviceIdAndTime(String deviceId, String channelId, String startTime, String endTime); | |
| 25 | 25 | |
| 26 | 26 | @Select("SELECT * FROM device_mobile_position WHERE deviceId = #{deviceId}" + |
| 27 | 27 | " ORDER BY time DESC LIMIT 1") | ... | ... |
src/main/java/com/genersoft/iot/vmp/storager/impl/RedisCatchStorageImpl.java
| ... | ... | @@ -639,4 +639,10 @@ public class RedisCatchStorageImpl implements IRedisCatchStorage { |
| 639 | 639 | redis.convertAndSend(key, (JSONObject)JSON.toJSON(msg)); |
| 640 | 640 | } |
| 641 | 641 | |
| 642 | + @Override | |
| 643 | + public void sendAlarmMsg(AlarmChannelMessage msg) { | |
| 644 | + String key = VideoManagerConstants.VM_MSG_SUBSCRIBE_ALARM; | |
| 645 | + logger.info("[redis 报警通知] {}: {}", key, JSON.toJSON(msg)); | |
| 646 | + redis.convertAndSend(key, (JSONObject)JSON.toJSON(msg)); | |
| 647 | + } | |
| 642 | 648 | } | ... | ... |
src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStorageImpl.java
| ... | ... | @@ -13,8 +13,6 @@ import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| 13 | 13 | import com.genersoft.iot.vmp.storager.IVideoManagerStorage; |
| 14 | 14 | import com.genersoft.iot.vmp.storager.dao.*; |
| 15 | 15 | import com.genersoft.iot.vmp.storager.dao.dto.ChannelSourceInfo; |
| 16 | -import com.genersoft.iot.vmp.utils.node.ForestNodeMerger; | |
| 17 | -import com.genersoft.iot.vmp.vmanager.bean.DeviceChannelTree; | |
| 18 | 16 | import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce; |
| 19 | 17 | import com.github.pagehelper.PageHelper; |
| 20 | 18 | import com.github.pagehelper.PageInfo; |
| ... | ... | @@ -354,10 +352,6 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { |
| 354 | 352 | return deviceChannelMapper.queryChannelsByDeviceIdWithStartAndLimit(deviceId, null, query, hasSubChannel, online, start, limit); |
| 355 | 353 | } |
| 356 | 354 | |
| 357 | - @Override | |
| 358 | - public List<DeviceChannelTree> tree(String deviceId) { | |
| 359 | - return ForestNodeMerger.merge(deviceChannelMapper.tree(deviceId)); | |
| 360 | - } | |
| 361 | 355 | |
| 362 | 356 | @Override |
| 363 | 357 | public List<DeviceChannel> queryChannelsByDeviceId(String deviceId) { |
| ... | ... | @@ -365,9 +359,9 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { |
| 365 | 359 | } |
| 366 | 360 | |
| 367 | 361 | @Override |
| 368 | - public PageInfo<DeviceChannel> querySubChannels(String deviceId, String parentChannelId, String query, Boolean hasSubChannel, String online, int page, int count) { | |
| 362 | + public PageInfo<DeviceChannel> querySubChannels(String deviceId, String parentChannelId, String query, Boolean hasSubChannel, Boolean online, int page, int count) { | |
| 369 | 363 | PageHelper.startPage(page, count); |
| 370 | - List<DeviceChannel> all = deviceChannelMapper.queryChannels(deviceId, parentChannelId, null, null, null); | |
| 364 | + List<DeviceChannel> all = deviceChannelMapper.queryChannels(deviceId, parentChannelId, query, hasSubChannel, online); | |
| 371 | 365 | return new PageInfo<>(all); |
| 372 | 366 | } |
| 373 | 367 | |
| ... | ... | @@ -504,8 +498,8 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage { |
| 504 | 498 | * @param endTime |
| 505 | 499 | */ |
| 506 | 500 | @Override |
| 507 | - public synchronized List<MobilePosition> queryMobilePositions(String deviceId, String startTime, String endTime) { | |
| 508 | - return deviceMobilePositionMapper.queryPositionByDeviceIdAndTime(deviceId, startTime, endTime); | |
| 501 | + public synchronized List<MobilePosition> queryMobilePositions(String deviceId, String channelId, String startTime, String endTime) { | |
| 502 | + return deviceMobilePositionMapper.queryPositionByDeviceIdAndTime(deviceId, channelId, startTime, endTime); | |
| 509 | 503 | } |
| 510 | 504 | |
| 511 | 505 | @Override | ... | ... |
src/main/java/com/genersoft/iot/vmp/utils/node/BaseNode.java deleted
100644 → 0
| 1 | -package com.genersoft.iot.vmp.utils.node; | |
| 2 | - | |
| 3 | -import com.fasterxml.jackson.annotation.JsonInclude; | |
| 4 | - | |
| 5 | -import java.util.ArrayList; | |
| 6 | -import java.util.List; | |
| 7 | - | |
| 8 | -/** | |
| 9 | - * 节点基类 | |
| 10 | - * | |
| 11 | - */ | |
| 12 | -public class BaseNode<T> implements INode<T> { | |
| 13 | - | |
| 14 | - private static final long serialVersionUID = 1L; | |
| 15 | - | |
| 16 | - /** | |
| 17 | - * 主键ID | |
| 18 | - */ | |
| 19 | - protected String channelId; | |
| 20 | - | |
| 21 | - /** | |
| 22 | - * 父节点ID | |
| 23 | - */ | |
| 24 | - protected String parentId; | |
| 25 | - | |
| 26 | - /** | |
| 27 | - * 子孙节点 | |
| 28 | - */ | |
| 29 | - @JsonInclude(JsonInclude.Include.NON_EMPTY) | |
| 30 | - protected List<T> children = new ArrayList<T>(); | |
| 31 | - | |
| 32 | - /** | |
| 33 | - * 是否有子孙节点 | |
| 34 | - */ | |
| 35 | - @JsonInclude(JsonInclude.Include.NON_EMPTY) | |
| 36 | - private Boolean hasChildren; | |
| 37 | - | |
| 38 | - /** | |
| 39 | - * 是否有子孙节点 | |
| 40 | - * | |
| 41 | - * @return Boolean | |
| 42 | - */ | |
| 43 | - @Override | |
| 44 | - public Boolean getHasChildren() { | |
| 45 | - if (children.size() > 0) { | |
| 46 | - return true; | |
| 47 | - } else { | |
| 48 | - return this.hasChildren; | |
| 49 | - } | |
| 50 | - } | |
| 51 | - | |
| 52 | - @Override | |
| 53 | - public String getChannelId() { | |
| 54 | - return channelId; | |
| 55 | - } | |
| 56 | - | |
| 57 | - @Override | |
| 58 | - public String getParentId() { | |
| 59 | - return parentId; | |
| 60 | - } | |
| 61 | - | |
| 62 | - @Override | |
| 63 | - public List<T> getChildren() { | |
| 64 | - return children; | |
| 65 | - } | |
| 66 | - | |
| 67 | - public void setChildren(List<T> children) { | |
| 68 | - this.children = children; | |
| 69 | - } | |
| 70 | - | |
| 71 | - public void setHasChildren(Boolean hasChildren) { | |
| 72 | - this.hasChildren = hasChildren; | |
| 73 | - } | |
| 74 | -} |
src/main/java/com/genersoft/iot/vmp/utils/node/ForestNode.java deleted
100644 → 0
| 1 | -package com.genersoft.iot.vmp.utils.node; | |
| 2 | - | |
| 3 | - | |
| 4 | - | |
| 5 | -/** | |
| 6 | - * 森林节点类 | |
| 7 | - * | |
| 8 | - */ | |
| 9 | -public class ForestNode extends BaseNode<ForestNode> { | |
| 10 | - | |
| 11 | - private static final long serialVersionUID = 1L; | |
| 12 | - | |
| 13 | - /** | |
| 14 | - * 节点内容 | |
| 15 | - */ | |
| 16 | - private Object content; | |
| 17 | - | |
| 18 | - public ForestNode(String id, String parentId, Object content) { | |
| 19 | - this.channelId = id; | |
| 20 | - this.parentId = parentId; | |
| 21 | - this.content = content; | |
| 22 | - } | |
| 23 | - | |
| 24 | - public Object getContent() { | |
| 25 | - return content; | |
| 26 | - } | |
| 27 | - | |
| 28 | - public void setContent(Object content) { | |
| 29 | - this.content = content; | |
| 30 | - } | |
| 31 | -} |
src/main/java/com/genersoft/iot/vmp/utils/node/ForestNodeManager.java deleted
100644 → 0
| 1 | -package com.genersoft.iot.vmp.utils.node; | |
| 2 | - | |
| 3 | -import com.google.common.collect.ImmutableMap; | |
| 4 | -import com.google.common.collect.Maps; | |
| 5 | - | |
| 6 | -import java.util.ArrayList; | |
| 7 | -import java.util.List; | |
| 8 | -import java.util.Map; | |
| 9 | - | |
| 10 | -/** | |
| 11 | - * 森林管理类 | |
| 12 | - * | |
| 13 | - * @author smallchill | |
| 14 | - */ | |
| 15 | -public class ForestNodeManager<T extends INode<T>> { | |
| 16 | - | |
| 17 | - /** | |
| 18 | - * 森林的所有节点 | |
| 19 | - */ | |
| 20 | - private final ImmutableMap<String, T> nodeMap; | |
| 21 | - | |
| 22 | - /** | |
| 23 | - * 森林的父节点ID | |
| 24 | - */ | |
| 25 | - private final Map<String, Object> parentIdMap = Maps.newHashMap(); | |
| 26 | - | |
| 27 | - public ForestNodeManager(List<T> nodes) { | |
| 28 | - nodeMap = Maps.uniqueIndex(nodes, INode::getChannelId); | |
| 29 | - } | |
| 30 | - | |
| 31 | - /** | |
| 32 | - * 根据节点ID获取一个节点 | |
| 33 | - * | |
| 34 | - * @param id 节点ID | |
| 35 | - * @return 对应的节点对象 | |
| 36 | - */ | |
| 37 | - public INode<T> getTreeNodeAt(String id) { | |
| 38 | - if (nodeMap.containsKey(id)) { | |
| 39 | - return nodeMap.get(id); | |
| 40 | - } | |
| 41 | - return null; | |
| 42 | - } | |
| 43 | - | |
| 44 | - /** | |
| 45 | - * 增加父节点ID | |
| 46 | - * | |
| 47 | - * @param parentId 父节点ID | |
| 48 | - */ | |
| 49 | - public void addParentId(String parentId) { | |
| 50 | - parentIdMap.put(parentId, ""); | |
| 51 | - } | |
| 52 | - | |
| 53 | - /** | |
| 54 | - * 获取树的根节点(一个森林对应多颗树) | |
| 55 | - * | |
| 56 | - * @return 树的根节点集合 | |
| 57 | - */ | |
| 58 | - public List<T> getRoot() { | |
| 59 | - List<T> roots = new ArrayList<>(); | |
| 60 | - nodeMap.forEach((key, node) -> { | |
| 61 | - if (node.getParentId() == null || parentIdMap.containsKey(node.getChannelId())) { | |
| 62 | - roots.add(node); | |
| 63 | - } | |
| 64 | - }); | |
| 65 | - return roots; | |
| 66 | - } | |
| 67 | - | |
| 68 | -} |
src/main/java/com/genersoft/iot/vmp/utils/node/ForestNodeMerger.java deleted
100644 → 0
| 1 | -package com.genersoft.iot.vmp.utils.node; | |
| 2 | - | |
| 3 | -import com.genersoft.iot.vmp.utils.CollectionUtil; | |
| 4 | - | |
| 5 | -import java.util.List; | |
| 6 | - | |
| 7 | -/** | |
| 8 | - * 森林节点归并类 | |
| 9 | - * | |
| 10 | - */ | |
| 11 | -public class ForestNodeMerger { | |
| 12 | - | |
| 13 | - /** | |
| 14 | - * 将节点数组归并为一个森林(多棵树)(填充节点的children域) | |
| 15 | - * 时间复杂度为O(n^2) | |
| 16 | - * | |
| 17 | - * @param items 节点域 | |
| 18 | - * @return 多棵树的根节点集合 | |
| 19 | - */ | |
| 20 | - public static <T extends INode<T>> List<T> merge(List<T> items) { | |
| 21 | - ForestNodeManager<T> forestNodeManager = new ForestNodeManager<>(items); | |
| 22 | - items.forEach(forestNode -> { | |
| 23 | - if (forestNode.getParentId() != null) { | |
| 24 | - INode<T> node = forestNodeManager.getTreeNodeAt(forestNode.getParentId()); | |
| 25 | - if (node != null) { | |
| 26 | - node.getChildren().add(forestNode); | |
| 27 | - } else { | |
| 28 | - forestNodeManager.addParentId(forestNode.getChannelId()); | |
| 29 | - } | |
| 30 | - } | |
| 31 | - }); | |
| 32 | - return forestNodeManager.getRoot(); | |
| 33 | - } | |
| 34 | - | |
| 35 | - public static <T extends INode<T>> List<T> merge(List<T> items, String[] parentIds) { | |
| 36 | - ForestNodeManager<T> forestNodeManager = new ForestNodeManager<>(items); | |
| 37 | - items.forEach(forestNode -> { | |
| 38 | - if (forestNode.getParentId() != null) { | |
| 39 | - INode<T> node = forestNodeManager.getTreeNodeAt(forestNode.getParentId()); | |
| 40 | - if (CollectionUtil.contains(parentIds, forestNode.getChannelId())){ | |
| 41 | - forestNodeManager.addParentId(forestNode.getChannelId()); | |
| 42 | - } else { | |
| 43 | - if (node != null){ | |
| 44 | - node.getChildren().add(forestNode); | |
| 45 | - } | |
| 46 | - } | |
| 47 | - } | |
| 48 | - }); | |
| 49 | - return forestNodeManager.getRoot(); | |
| 50 | - } | |
| 51 | -} |
src/main/java/com/genersoft/iot/vmp/utils/node/INode.java deleted
100644 → 0
| 1 | -package com.genersoft.iot.vmp.utils.node; | |
| 2 | - | |
| 3 | -import java.io.Serializable; | |
| 4 | -import java.util.List; | |
| 5 | - | |
| 6 | -/** | |
| 7 | - * | |
| 8 | - * 节点 | |
| 9 | - */ | |
| 10 | -public interface INode<T> extends Serializable { | |
| 11 | - | |
| 12 | - /** | |
| 13 | - * 主键 | |
| 14 | - * | |
| 15 | - * @return String | |
| 16 | - */ | |
| 17 | - String getChannelId(); | |
| 18 | - | |
| 19 | - /** | |
| 20 | - * 父主键 | |
| 21 | - * | |
| 22 | - * @return String | |
| 23 | - */ | |
| 24 | - String getParentId(); | |
| 25 | - | |
| 26 | - /** | |
| 27 | - * 子孙节点 | |
| 28 | - * | |
| 29 | - * @return List<T> | |
| 30 | - */ | |
| 31 | - List<T> getChildren(); | |
| 32 | - | |
| 33 | - /** | |
| 34 | - * 是否有子孙节点 | |
| 35 | - * | |
| 36 | - * @return Boolean | |
| 37 | - */ | |
| 38 | - default Boolean getHasChildren() { | |
| 39 | - return false; | |
| 40 | - } | |
| 41 | - | |
| 42 | -} |
src/main/java/com/genersoft/iot/vmp/utils/node/TreeNode.java deleted
100644 → 0
| 1 | -package com.genersoft.iot.vmp.utils.node; | |
| 2 | - | |
| 3 | - | |
| 4 | - | |
| 5 | -/** | |
| 6 | - * 树型节点类 | |
| 7 | - * | |
| 8 | - */ | |
| 9 | -public class TreeNode extends BaseNode<TreeNode> { | |
| 10 | - | |
| 11 | - private static final long serialVersionUID = 1L; | |
| 12 | - | |
| 13 | - private String title; | |
| 14 | - | |
| 15 | - private String key; | |
| 16 | - | |
| 17 | - private String value; | |
| 18 | - | |
| 19 | - public String getTitle() { | |
| 20 | - return title; | |
| 21 | - } | |
| 22 | - | |
| 23 | - public void setTitle(String title) { | |
| 24 | - this.title = title; | |
| 25 | - } | |
| 26 | - | |
| 27 | - public String getKey() { | |
| 28 | - return key; | |
| 29 | - } | |
| 30 | - | |
| 31 | - public void setKey(String key) { | |
| 32 | - this.key = key; | |
| 33 | - } | |
| 34 | - | |
| 35 | - public String getValue() { | |
| 36 | - return value; | |
| 37 | - } | |
| 38 | - | |
| 39 | - public void setValue(String value) { | |
| 40 | - this.value = value; | |
| 41 | - } | |
| 42 | -} |
src/main/java/com/genersoft/iot/vmp/vmanager/bean/DeviceChannelTree.java deleted
100644 → 0
| 1 | -package com.genersoft.iot.vmp.vmanager.bean; | |
| 2 | - | |
| 3 | -import com.fasterxml.jackson.annotation.JsonInclude; | |
| 4 | -import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; | |
| 5 | -import com.genersoft.iot.vmp.utils.node.INode; | |
| 6 | -import io.swagger.annotations.ApiModel; | |
| 7 | - | |
| 8 | -import java.util.ArrayList; | |
| 9 | -import java.util.List; | |
| 10 | - | |
| 11 | -@ApiModel(value = "DeviceChannelTree对象", description = "DeviceChannelTree对象") | |
| 12 | -public class DeviceChannelTree extends DeviceChannel implements INode<DeviceChannelTree> { | |
| 13 | - private static final long serialVersionUID = 1L; | |
| 14 | - | |
| 15 | - /** | |
| 16 | - * 主键ID | |
| 17 | - */ | |
| 18 | - private int id; | |
| 19 | - | |
| 20 | - /** | |
| 21 | - * 父节点ID | |
| 22 | - */ | |
| 23 | - private String parentId; | |
| 24 | - | |
| 25 | - private String parentName; | |
| 26 | - | |
| 27 | - private String title; | |
| 28 | - | |
| 29 | - private String key; | |
| 30 | - | |
| 31 | - private String value; | |
| 32 | - | |
| 33 | - /** | |
| 34 | - * 子孙节点 | |
| 35 | - */ | |
| 36 | - @JsonInclude(JsonInclude.Include.NON_EMPTY) | |
| 37 | - private List<DeviceChannelTree> children; | |
| 38 | - | |
| 39 | - /** | |
| 40 | - * 是否有子孙节点 | |
| 41 | - */ | |
| 42 | - @JsonInclude(JsonInclude.Include.NON_EMPTY) | |
| 43 | - private Boolean hasChildren; | |
| 44 | - | |
| 45 | - @Override | |
| 46 | - public List<DeviceChannelTree> getChildren() { | |
| 47 | - if (this.children == null) { | |
| 48 | - this.children = new ArrayList<>(); | |
| 49 | - } | |
| 50 | - return this.children; | |
| 51 | - } | |
| 52 | - | |
| 53 | - @Override | |
| 54 | - public Boolean getHasChildren() { | |
| 55 | - if (children.size() > 0) { | |
| 56 | - return true; | |
| 57 | - } else { | |
| 58 | - return this.hasChildren; | |
| 59 | - } | |
| 60 | - } | |
| 61 | - | |
| 62 | - @Override | |
| 63 | - public int getId() { | |
| 64 | - return id; | |
| 65 | - } | |
| 66 | - | |
| 67 | - @Override | |
| 68 | - public void setId(int id) { | |
| 69 | - this.id = id; | |
| 70 | - } | |
| 71 | - | |
| 72 | - @Override | |
| 73 | - public String getParentId() { | |
| 74 | - return parentId; | |
| 75 | - } | |
| 76 | - | |
| 77 | - @Override | |
| 78 | - public void setParentId(String parentId) { | |
| 79 | - this.parentId = parentId; | |
| 80 | - } | |
| 81 | - | |
| 82 | - public String getParentName() { | |
| 83 | - return parentName; | |
| 84 | - } | |
| 85 | - | |
| 86 | - public void setParentName(String parentName) { | |
| 87 | - this.parentName = parentName; | |
| 88 | - } | |
| 89 | - | |
| 90 | - public String getTitle() { | |
| 91 | - return title; | |
| 92 | - } | |
| 93 | - | |
| 94 | - public void setTitle(String title) { | |
| 95 | - this.title = title; | |
| 96 | - } | |
| 97 | - | |
| 98 | - public String getKey() { | |
| 99 | - return key; | |
| 100 | - } | |
| 101 | - | |
| 102 | - public void setKey(String key) { | |
| 103 | - this.key = key; | |
| 104 | - } | |
| 105 | - | |
| 106 | - public String getValue() { | |
| 107 | - return value; | |
| 108 | - } | |
| 109 | - | |
| 110 | - public void setValue(String value) { | |
| 111 | - this.value = value; | |
| 112 | - } | |
| 113 | - | |
| 114 | - public void setChildren(List<DeviceChannelTree> children) { | |
| 115 | - this.children = children; | |
| 116 | - } | |
| 117 | - | |
| 118 | - public void setHasChildren(Boolean hasChildren) { | |
| 119 | - this.hasChildren = hasChildren; | |
| 120 | - } | |
| 121 | -} |
src/main/java/com/genersoft/iot/vmp/vmanager/bean/DeviceChannelTreeNode.java deleted
100644 → 0
| 1 | -package com.genersoft.iot.vmp.vmanager.bean; | |
| 2 | - | |
| 3 | -import com.genersoft.iot.vmp.utils.node.TreeNode; | |
| 4 | - | |
| 5 | -public class DeviceChannelTreeNode extends TreeNode { | |
| 6 | - | |
| 7 | - private Integer status; | |
| 8 | - | |
| 9 | - private String deviceId; | |
| 10 | - | |
| 11 | - private String channelId; | |
| 12 | - | |
| 13 | - private Double lng; | |
| 14 | - | |
| 15 | - private Double lat; | |
| 16 | - | |
| 17 | - public Integer getStatus() { | |
| 18 | - return status; | |
| 19 | - } | |
| 20 | - | |
| 21 | - public void setStatus(Integer status) { | |
| 22 | - this.status = status; | |
| 23 | - } | |
| 24 | - | |
| 25 | - public String getDeviceId() { | |
| 26 | - return deviceId; | |
| 27 | - } | |
| 28 | - | |
| 29 | - public void setDeviceId(String deviceId) { | |
| 30 | - this.deviceId = deviceId; | |
| 31 | - } | |
| 32 | - | |
| 33 | - public String getChannelId() { | |
| 34 | - return channelId; | |
| 35 | - } | |
| 36 | - | |
| 37 | - public void setChannelId(String channelId) { | |
| 38 | - this.channelId = channelId; | |
| 39 | - } | |
| 40 | - | |
| 41 | - public Double getLng() { | |
| 42 | - return lng; | |
| 43 | - } | |
| 44 | - | |
| 45 | - public void setLng(Double lng) { | |
| 46 | - this.lng = lng; | |
| 47 | - } | |
| 48 | - | |
| 49 | - public Double getLat() { | |
| 50 | - return lat; | |
| 51 | - } | |
| 52 | - | |
| 53 | - public void setLat(Double lat) { | |
| 54 | - this.lat = lat; | |
| 55 | - } | |
| 56 | -} |
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/MobilePosition/MobilePositionController.java
| ... | ... | @@ -10,6 +10,7 @@ import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; |
| 10 | 10 | import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; |
| 11 | 11 | import com.genersoft.iot.vmp.service.IDeviceService; |
| 12 | 12 | import com.genersoft.iot.vmp.storager.IVideoManagerStorage; |
| 13 | +import com.genersoft.iot.vmp.vmanager.bean.WVPResult; | |
| 13 | 14 | import com.github.pagehelper.util.StringUtil; |
| 14 | 15 | |
| 15 | 16 | import io.swagger.annotations.Api; |
| ... | ... | @@ -65,10 +66,11 @@ public class MobilePositionController { |
| 65 | 66 | @ApiImplicitParam(name = "start", value = "开始时间", required = true, dataTypeClass = String.class), |
| 66 | 67 | @ApiImplicitParam(name = "end", value = "结束时间", required = true, dataTypeClass = String.class), |
| 67 | 68 | }) |
| 68 | - @GetMapping("/history/{deviceId}") | |
| 69 | - public ResponseEntity<List<MobilePosition>> positions(@PathVariable String deviceId, | |
| 70 | - @RequestParam(required = false) String start, | |
| 71 | - @RequestParam(required = false) String end) { | |
| 69 | + @GetMapping("/history/{deviceId}/{channelId}") | |
| 70 | + public ResponseEntity<WVPResult<List<MobilePosition>>> positions(@PathVariable String deviceId, | |
| 71 | + @PathVariable String channelId, | |
| 72 | + @RequestParam(required = false) String start, | |
| 73 | + @RequestParam(required = false) String end) { | |
| 72 | 74 | // if (logger.isDebugEnabled()) { |
| 73 | 75 | // logger.debug("查询设备" + deviceId + "的历史轨迹"); |
| 74 | 76 | // } |
| ... | ... | @@ -79,9 +81,11 @@ public class MobilePositionController { |
| 79 | 81 | if (StringUtil.isEmpty(end)) { |
| 80 | 82 | end = null; |
| 81 | 83 | } |
| 82 | - | |
| 83 | - List<MobilePosition> result = storager.queryMobilePositions(deviceId, start, end); | |
| 84 | - return new ResponseEntity<>(result, HttpStatus.OK); | |
| 84 | + WVPResult<List<MobilePosition>> wvpResult = new WVPResult<>(); | |
| 85 | + wvpResult.setCode(0); | |
| 86 | + List<MobilePosition> result = storager.queryMobilePositions(deviceId, channelId, start, end); | |
| 87 | + wvpResult.setData(result); | |
| 88 | + return new ResponseEntity<>(wvpResult, HttpStatus.OK); | |
| 85 | 89 | } |
| 86 | 90 | |
| 87 | 91 | /** | ... | ... |
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/alarm/AlarmController.java
| 1 | 1 | package com.genersoft.iot.vmp.vmanager.gb28181.alarm; |
| 2 | 2 | |
| 3 | +import com.genersoft.iot.vmp.gb28181.bean.Device; | |
| 3 | 4 | import com.genersoft.iot.vmp.gb28181.bean.DeviceAlarm; |
| 5 | +import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform; | |
| 6 | +import com.genersoft.iot.vmp.gb28181.bean.SubscribeInfo; | |
| 7 | +import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommander; | |
| 8 | +import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform; | |
| 4 | 9 | import com.genersoft.iot.vmp.service.IDeviceAlarmService; |
| 5 | 10 | import com.genersoft.iot.vmp.service.IGbStreamService; |
| 11 | +import com.genersoft.iot.vmp.storager.IVideoManagerStorage; | |
| 6 | 12 | import com.genersoft.iot.vmp.vmanager.bean.WVPResult; |
| 7 | 13 | import com.github.pagehelper.PageInfo; |
| 8 | 14 | import io.swagger.annotations.Api; |
| ... | ... | @@ -31,7 +37,17 @@ public class AlarmController { |
| 31 | 37 | @Autowired |
| 32 | 38 | private IDeviceAlarmService deviceAlarmService; |
| 33 | 39 | |
| 40 | + @Autowired | |
| 41 | + private ISIPCommander commander; | |
| 42 | + | |
| 43 | + @Autowired | |
| 44 | + private ISIPCommanderForPlatform commanderForPlatform; | |
| 45 | + | |
| 46 | + @Autowired | |
| 47 | + private IVideoManagerStorage storage; | |
| 48 | + | |
| 34 | 49 | private SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| 50 | + private SimpleDateFormat formatForGB = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss"); | |
| 35 | 51 | |
| 36 | 52 | /** |
| 37 | 53 | * 分页查询报警 |
| ... | ... | @@ -133,5 +149,51 @@ public class AlarmController { |
| 133 | 149 | return new ResponseEntity<WVPResult<String>>(wvpResult, HttpStatus.OK); |
| 134 | 150 | } |
| 135 | 151 | |
| 152 | + /** | |
| 153 | + * 测试向上级/设备发送模拟报警通知 | |
| 154 | + * | |
| 155 | + * @param deviceId 报警id | |
| 156 | + * @return | |
| 157 | + */ | |
| 158 | + @ApiOperation("测试向上级/设备发送模拟报警通知") | |
| 159 | + @GetMapping("/test/notify/alarm") | |
| 160 | + @ApiImplicitParams({ | |
| 161 | + @ApiImplicitParam(name="deviceId", value = "deviceId", required = true ,dataTypeClass = Integer.class) | |
| 162 | + }) | |
| 163 | + public ResponseEntity<WVPResult<String>> delete( | |
| 164 | + @RequestParam(required = false) String deviceId | |
| 165 | + ) { | |
| 166 | + if (StringUtils.isEmpty(deviceId)) { | |
| 167 | + return new ResponseEntity<>(HttpStatus.NOT_FOUND); | |
| 168 | + } | |
| 169 | + Device device = storage.queryVideoDevice(deviceId); | |
| 170 | + ParentPlatform platform = storage.queryParentPlatByServerGBId(deviceId); | |
| 171 | + DeviceAlarm deviceAlarm = new DeviceAlarm(); | |
| 172 | + deviceAlarm.setChannelId(deviceId); | |
| 173 | + deviceAlarm.setAlarmDescription("test"); | |
| 174 | + deviceAlarm.setAlarmMethod("1"); | |
| 175 | + deviceAlarm.setAlarmPriority("1"); | |
| 176 | + deviceAlarm.setAlarmTime(formatForGB.format(System.currentTimeMillis())); | |
| 177 | + deviceAlarm.setAlarmType("1"); | |
| 178 | + deviceAlarm.setLongitude(115.33333); | |
| 179 | + deviceAlarm.setLatitude(39.33333); | |
| 180 | + | |
| 181 | + if (device != null && platform == null) { | |
| 182 | + commander.sendAlarmMessage(device, deviceAlarm); | |
| 183 | + }else if (device == null && platform != null){ | |
| 184 | + commanderForPlatform.sendAlarmMessage(platform, deviceAlarm); | |
| 185 | + }else { | |
| 186 | + WVPResult wvpResult = new WVPResult(); | |
| 187 | + wvpResult.setCode(0); | |
| 188 | + wvpResult.setMsg("无法确定" + deviceId + "是平台还是设备"); | |
| 189 | + return new ResponseEntity<WVPResult<String>>(wvpResult, HttpStatus.OK); | |
| 190 | + } | |
| 191 | + | |
| 192 | + WVPResult wvpResult = new WVPResult(); | |
| 193 | + wvpResult.setCode(0); | |
| 194 | + wvpResult.setMsg("success"); | |
| 195 | + return new ResponseEntity<WVPResult<String>>(wvpResult, HttpStatus.OK); | |
| 196 | + } | |
| 197 | + | |
| 136 | 198 | |
| 137 | 199 | } | ... | ... |
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/device/DeviceQuery.java
| ... | ... | @@ -9,7 +9,6 @@ import com.genersoft.iot.vmp.gb28181.bean.SyncStatus; |
| 9 | 9 | import com.genersoft.iot.vmp.gb28181.event.DeviceOffLineDetector; |
| 10 | 10 | import com.genersoft.iot.vmp.gb28181.task.ISubscribeTask; |
| 11 | 11 | import com.genersoft.iot.vmp.gb28181.task.impl.CatalogSubscribeTask; |
| 12 | -import com.genersoft.iot.vmp.gb28181.task.impl.MobilePositionSubscribeHandlerTask; | |
| 13 | 12 | import com.genersoft.iot.vmp.gb28181.task.impl.MobilePositionSubscribeTask; |
| 14 | 13 | import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder; |
| 15 | 14 | import com.genersoft.iot.vmp.gb28181.transmit.callback.RequestMessage; |
| ... | ... | @@ -17,14 +16,12 @@ import com.genersoft.iot.vmp.gb28181.transmit.cmd.impl.SIPCommander; |
| 17 | 16 | import com.genersoft.iot.vmp.service.IDeviceService; |
| 18 | 17 | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| 19 | 18 | import com.genersoft.iot.vmp.storager.IVideoManagerStorage; |
| 20 | -import com.genersoft.iot.vmp.vmanager.bean.DeviceChannelTree; | |
| 21 | 19 | import com.genersoft.iot.vmp.vmanager.bean.WVPResult; |
| 22 | 20 | import com.github.pagehelper.PageInfo; |
| 23 | 21 | import io.swagger.annotations.Api; |
| 24 | 22 | import io.swagger.annotations.ApiImplicitParam; |
| 25 | 23 | import io.swagger.annotations.ApiImplicitParams; |
| 26 | 24 | import io.swagger.annotations.ApiOperation; |
| 27 | -import org.kxml2.wap.wv.WV; | |
| 28 | 25 | import org.slf4j.Logger; |
| 29 | 26 | import org.slf4j.LoggerFactory; |
| 30 | 27 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -235,7 +232,7 @@ public class DeviceQuery { |
| 235 | 232 | @ApiImplicitParam(name="page", value = "当前页", required = true, dataTypeClass = Integer.class), |
| 236 | 233 | @ApiImplicitParam(name="count", value = "每页条数", required = true, dataTypeClass = Integer.class), |
| 237 | 234 | @ApiImplicitParam(name="query", value = "查询内容", dataTypeClass = String.class), |
| 238 | - @ApiImplicitParam(name="online", value = "是否在线", dataTypeClass = String.class), | |
| 235 | + @ApiImplicitParam(name="online", value = "是否在线", dataTypeClass = Boolean.class), | |
| 239 | 236 | @ApiImplicitParam(name="channelType", value = "通道类型, 子目录", dataTypeClass = Boolean.class), |
| 240 | 237 | }) |
| 241 | 238 | @GetMapping("/sub_channels/{deviceId}/{channelId}/channels") |
| ... | ... | @@ -244,7 +241,7 @@ public class DeviceQuery { |
| 244 | 241 | int page, |
| 245 | 242 | int count, |
| 246 | 243 | @RequestParam(required = false) String query, |
| 247 | - @RequestParam(required = false) String online, | |
| 244 | + @RequestParam(required = false) Boolean online, | |
| 248 | 245 | @RequestParam(required = false) Boolean channelType){ |
| 249 | 246 | |
| 250 | 247 | // if (logger.isDebugEnabled()) { |
| ... | ... | @@ -450,11 +447,6 @@ public class DeviceQuery { |
| 450 | 447 | return result; |
| 451 | 448 | } |
| 452 | 449 | |
| 453 | - @GetMapping("/{deviceId}/tree") | |
| 454 | - @ApiOperation(value = "通道树形结构", notes = "通道树形结构") | |
| 455 | - public WVPResult<List<DeviceChannelTree>> tree(@PathVariable String deviceId) { | |
| 456 | - return WVPResult.Data(storager.tree(deviceId)); | |
| 457 | - } | |
| 458 | 450 | |
| 459 | 451 | @GetMapping("/{deviceId}/sync_status") |
| 460 | 452 | @ApiOperation(value = "获取通道同步进度", notes = "获取通道同步进度") | ... | ... |
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/record/GBRecordController.java
| ... | ... | @@ -63,7 +63,7 @@ public class GBRecordController { |
| 63 | 63 | public DeferredResult<ResponseEntity<RecordInfo>> recordinfo(@PathVariable String deviceId,@PathVariable String channelId, String startTime, String endTime){ |
| 64 | 64 | |
| 65 | 65 | if (logger.isDebugEnabled()) { |
| 66 | - logger.debug(String.format("录像信息查询 API调用,deviceId:%s ,startTime:%s, startTime:%s",deviceId, startTime, endTime)); | |
| 66 | + logger.debug(String.format("录像信息查询 API调用,deviceId:%s ,startTime:%s, endTime:%s",deviceId, startTime, endTime)); | |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | Device device = storager.queryVideoDevice(deviceId); | ... | ... |
web_src/index.html
| ... | ... | @@ -12,8 +12,26 @@ |
| 12 | 12 | <script type="text/javascript" src="./static/js/jessibuca/jessibuca.js"></script> |
| 13 | 13 | <script type="text/javascript" src="./static/js/EasyWasmPlayer.js"></script> |
| 14 | 14 | <script type="text/javascript" src="./static/js/ZLMRTCClient.js"></script> |
| 15 | - <script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=rk73w8dv1rkE4UdZsataG68VarhYQzrx&s=1"></script> | |
| 16 | 15 | <div id="app"></div> |
| 17 | 16 | <!-- built files will be auto injected --> |
| 17 | + <script> | |
| 18 | + // map组件全局参数, 注释此内容可以关闭地图功能 | |
| 19 | + window.mapParam = { | |
| 20 | + // 坐标系 GCJ-02 WGS-84, | |
| 21 | + coordinateSystem: "GCJ-02", | |
| 22 | + // 地图瓦片地址 | |
| 23 | + tilesUrl: "http://webrd0{1-4}.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scale=1&style=8", | |
| 24 | + // 瓦片大小 | |
| 25 | + tileSize: 256, | |
| 26 | + // 默认层级 | |
| 27 | + zoom:10, | |
| 28 | + // 默认地图中心点 | |
| 29 | + center:[116.41020, 39.915119], | |
| 30 | + // 地图最大层级 | |
| 31 | + maxZoom:18, | |
| 32 | + // 地图最小层级 | |
| 33 | + minZoom: 3 | |
| 34 | + } | |
| 35 | + </script> | |
| 18 | 36 | </body> |
| 19 | 37 | </html> | ... | ... |
web_src/package-lock.json
| ... | ... | @@ -14,9 +14,10 @@ |
| 14 | 14 | "element-ui": "^2.15.6", |
| 15 | 15 | "fingerprintjs2": "^2.1.2", |
| 16 | 16 | "moment": "^2.29.1", |
| 17 | + "ol": "^6.14.1", | |
| 17 | 18 | "postcss-pxtorem": "^5.1.1", |
| 19 | + "uuid": "^8.3.2", | |
| 18 | 20 | "vue": "^2.6.11", |
| 19 | - "vue-baidu-map": "^0.21.22", | |
| 20 | 21 | "vue-clipboard2": "^0.3.1", |
| 21 | 22 | "vue-clipboards": "^1.3.0", |
| 22 | 23 | "vue-contextmenujs": "^1.3.13", |
| ... | ... | @@ -57,7 +58,7 @@ |
| 57 | 58 | "vue-template-compiler": "^2.5.2", |
| 58 | 59 | "webpack": "^3.6.0", |
| 59 | 60 | "webpack-bundle-analyzer": "^2.9.0", |
| 60 | - "webpack-dev-server": "^2.11.5", | |
| 61 | + "webpack-dev-server": "^2.9.1", | |
| 61 | 62 | "webpack-merge": "^4.1.0" |
| 62 | 63 | }, |
| 63 | 64 | "engines": { |
| ... | ... | @@ -65,6 +66,50 @@ |
| 65 | 66 | "npm": ">= 3.0.0" |
| 66 | 67 | } |
| 67 | 68 | }, |
| 69 | + "node_modules/@mapbox/jsonlint-lines-primitives": { | |
| 70 | + "version": "2.0.2", | |
| 71 | + "resolved": "https://registry.npmmirror.com/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz", | |
| 72 | + "integrity": "sha512-rY0o9A5ECsTQRVhv7tL/OyDpGAoUB4tTvLiW1DSzQGq4bvTPhNw1VpSNjDJc5GFZ2XuyOtSWSVN05qOtcD71qQ==", | |
| 73 | + "engines": { | |
| 74 | + "node": ">= 0.6" | |
| 75 | + } | |
| 76 | + }, | |
| 77 | + "node_modules/@mapbox/mapbox-gl-style-spec": { | |
| 78 | + "version": "13.23.1", | |
| 79 | + "resolved": "https://registry.npmmirror.com/@mapbox/mapbox-gl-style-spec/-/mapbox-gl-style-spec-13.23.1.tgz", | |
| 80 | + "integrity": "sha512-C6wh8A/5EdsgzhL6y6yl464VCQNIxK0yjrpnvCvchcFe3sNK2RbBw/J9u3m+p8Y6S6MsGuSMt3AkGAXOKMYweQ==", | |
| 81 | + "dependencies": { | |
| 82 | + "@mapbox/jsonlint-lines-primitives": "~2.0.2", | |
| 83 | + "@mapbox/point-geometry": "^0.1.0", | |
| 84 | + "@mapbox/unitbezier": "^0.0.0", | |
| 85 | + "csscolorparser": "~1.0.2", | |
| 86 | + "json-stringify-pretty-compact": "^2.0.0", | |
| 87 | + "minimist": "^1.2.5", | |
| 88 | + "rw": "^1.3.3", | |
| 89 | + "sort-object": "^0.3.2" | |
| 90 | + }, | |
| 91 | + "bin": { | |
| 92 | + "gl-style-composite": "bin/gl-style-composite", | |
| 93 | + "gl-style-format": "bin/gl-style-format", | |
| 94 | + "gl-style-migrate": "bin/gl-style-migrate", | |
| 95 | + "gl-style-validate": "bin/gl-style-validate" | |
| 96 | + } | |
| 97 | + }, | |
| 98 | + "node_modules/@mapbox/point-geometry": { | |
| 99 | + "version": "0.1.0", | |
| 100 | + "resolved": "https://registry.npmmirror.com/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz", | |
| 101 | + "integrity": "sha512-6j56HdLTwWGO0fJPlrZtdU/B13q8Uwmo18Ck2GnGgN9PCFyKTZ3UbXeEdRFh18i9XQ92eH2VdtpJHpBD3aripQ==" | |
| 102 | + }, | |
| 103 | + "node_modules/@mapbox/unitbezier": { | |
| 104 | + "version": "0.0.0", | |
| 105 | + "resolved": "https://registry.npmmirror.com/@mapbox/unitbezier/-/unitbezier-0.0.0.tgz", | |
| 106 | + "integrity": "sha512-HPnRdYO0WjFjRTSwO3frz1wKaU649OBFPX3Zo/2WZvuRi6zMiRGui8SnPQiQABgqCf8YikDe5t3HViTVw1WUzA==" | |
| 107 | + }, | |
| 108 | + "node_modules/@petamoriken/float16": { | |
| 109 | + "version": "3.6.3", | |
| 110 | + "resolved": "https://registry.npmmirror.com/@petamoriken/float16/-/float16-3.6.3.tgz", | |
| 111 | + "integrity": "sha512-Yx6Z93kmz3JVPYoPPRFJXnt2/G4kfaxRROcZVVHsE4zOClJXvkOVidv/JfvP6hWn16lykbKYKVzUsId6mqXdGg==" | |
| 112 | + }, | |
| 68 | 113 | "node_modules/@types/q": { |
| 69 | 114 | "version": "1.5.4", |
| 70 | 115 | "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", |
| ... | ... | @@ -214,6 +259,7 @@ |
| 214 | 259 | "version": "1.0.10", |
| 215 | 260 | "resolved": "https://registry.npm.taobao.org/argparse/download/argparse-1.0.10.tgz", |
| 216 | 261 | "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", |
| 262 | + "dev": true, | |
| 217 | 263 | "dependencies": { |
| 218 | 264 | "sprintf-js": "~1.0.2" |
| 219 | 265 | } |
| ... | ... | @@ -1434,34 +1480,6 @@ |
| 1434 | 1480 | "integrity": "sha1-nyKcFb4nJFT/qXOs4NvueaGww28=", |
| 1435 | 1481 | "dev": true |
| 1436 | 1482 | }, |
| 1437 | - "node_modules/bmaplib.curveline": { | |
| 1438 | - "version": "1.0.0", | |
| 1439 | - "resolved": "https://registry.npmjs.org/bmaplib.curveline/-/bmaplib.curveline-1.0.0.tgz", | |
| 1440 | - "integrity": "sha512-9wcFMVhiYxNPqpvsLDAADn3qDhNzXp2mA6VyHSHg2XOAgSooC7ZiujdFhy0sp+0QYjTfJ/MjmLuNoUg2HHxH4Q==" | |
| 1441 | - }, | |
| 1442 | - "node_modules/bmaplib.heatmap": { | |
| 1443 | - "version": "1.0.4", | |
| 1444 | - "resolved": "https://registry.npmjs.org/bmaplib.heatmap/-/bmaplib.heatmap-1.0.4.tgz", | |
| 1445 | - "integrity": "sha512-rmhqUARBpUSJ9jXzUI2j7dIOqnc38bqubkx/8a349U2qtw/ulLUwyzRD535OrA8G7w5cz4aPKm6/rNvUAarg/Q==" | |
| 1446 | - }, | |
| 1447 | - "node_modules/bmaplib.lushu": { | |
| 1448 | - "version": "1.0.7", | |
| 1449 | - "resolved": "https://registry.npmjs.org/bmaplib.lushu/-/bmaplib.lushu-1.0.7.tgz", | |
| 1450 | - "integrity": "sha512-LVvgpESPii6xGxyjnQjq8u+ic4NjvhdCPV/RiSS/PGTUdZKeTDS7prSpleJLZH3ES0+oc0gYn8bw0LtPYUSz2w==" | |
| 1451 | - }, | |
| 1452 | - "node_modules/bmaplib.markerclusterer": { | |
| 1453 | - "version": "1.0.13", | |
| 1454 | - "resolved": "https://registry.npmjs.org/bmaplib.markerclusterer/-/bmaplib.markerclusterer-1.0.13.tgz", | |
| 1455 | - "integrity": "sha512-VrLyWSiuDEVNi0yUfwOhFQ6z1oEEHS4w36GNu3iASu6p52QIx9uAXMUkuSCHReNR0bj2Cp9SA1dSx5RpojXajQ==", | |
| 1456 | - "dependencies": { | |
| 1457 | - "bmaplib.texticonoverlay": "^1.0.2" | |
| 1458 | - } | |
| 1459 | - }, | |
| 1460 | - "node_modules/bmaplib.texticonoverlay": { | |
| 1461 | - "version": "1.0.2", | |
| 1462 | - "resolved": "https://registry.npmjs.org/bmaplib.texticonoverlay/-/bmaplib.texticonoverlay-1.0.2.tgz", | |
| 1463 | - "integrity": "sha512-4ZTWr4ZP3B6qEWput5Tut16CfZgII38YwM3bpyb4gFTQyORlKYryFp9WHWrwZZaHlOyYDAXG9SX0hka43jTADg==" | |
| 1464 | - }, | |
| 1465 | 1483 | "node_modules/bn.js": { |
| 1466 | 1484 | "version": "5.1.3", |
| 1467 | 1485 | "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-5.1.3.tgz", |
| ... | ... | @@ -2679,6 +2697,11 @@ |
| 2679 | 2697 | "node": ">=8.0.0" |
| 2680 | 2698 | } |
| 2681 | 2699 | }, |
| 2700 | + "node_modules/csscolorparser": { | |
| 2701 | + "version": "1.0.3", | |
| 2702 | + "resolved": "https://registry.npmmirror.com/csscolorparser/-/csscolorparser-1.0.3.tgz", | |
| 2703 | + "integrity": "sha512-umPSgYwZkdFoUrH5hIq5kf0wPSXiro51nPw0j2K/c83KflkPSTBGMz6NJvMB+07VlL0y7VPo6QJcDjcgKTTm3w==" | |
| 2704 | + }, | |
| 2682 | 2705 | "node_modules/cssesc": { |
| 2683 | 2706 | "version": "3.0.0", |
| 2684 | 2707 | "resolved": "https://registry.npm.taobao.org/cssesc/download/cssesc-3.0.0.tgz", |
| ... | ... | @@ -4880,6 +4903,28 @@ |
| 4880 | 4903 | "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=", |
| 4881 | 4904 | "dev": true |
| 4882 | 4905 | }, |
| 4906 | + "node_modules/geotiff": { | |
| 4907 | + "version": "2.0.5", | |
| 4908 | + "resolved": "https://registry.npmmirror.com/geotiff/-/geotiff-2.0.5.tgz", | |
| 4909 | + "integrity": "sha512-U5kVYm118YAmw2swiLu8rhfrYnDKOFI7VaMjuQwcq6Intuuid9Pyb4jjxYUxxkq8kOu2r7Am0Rmb52PObGp4pQ==", | |
| 4910 | + "dependencies": { | |
| 4911 | + "@petamoriken/float16": "^3.4.7", | |
| 4912 | + "lerc": "^3.0.0", | |
| 4913 | + "pako": "^2.0.4", | |
| 4914 | + "parse-headers": "^2.0.2", | |
| 4915 | + "quick-lru": "^6.1.0", | |
| 4916 | + "web-worker": "^1.2.0", | |
| 4917 | + "xml-utils": "^1.0.2" | |
| 4918 | + }, | |
| 4919 | + "engines": { | |
| 4920 | + "node": ">=10.19" | |
| 4921 | + } | |
| 4922 | + }, | |
| 4923 | + "node_modules/geotiff/node_modules/pako": { | |
| 4924 | + "version": "2.0.4", | |
| 4925 | + "resolved": "https://registry.npmmirror.com/pako/-/pako-2.0.4.tgz", | |
| 4926 | + "integrity": "sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg==" | |
| 4927 | + }, | |
| 4883 | 4928 | "node_modules/get-caller-file": { |
| 4884 | 4929 | "version": "1.0.3", |
| 4885 | 4930 | "resolved": "https://registry.npm.taobao.org/get-caller-file/download/get-caller-file-1.0.3.tgz", |
| ... | ... | @@ -5428,8 +5473,7 @@ |
| 5428 | 5473 | "node_modules/ieee754": { |
| 5429 | 5474 | "version": "1.1.13", |
| 5430 | 5475 | "resolved": "https://registry.npm.taobao.org/ieee754/download/ieee754-1.1.13.tgz", |
| 5431 | - "integrity": "sha1-7BaFWOlaoYH9h9N/VcMrvLZwi4Q=", | |
| 5432 | - "dev": true | |
| 5476 | + "integrity": "sha1-7BaFWOlaoYH9h9N/VcMrvLZwi4Q=" | |
| 5433 | 5477 | }, |
| 5434 | 5478 | "node_modules/iferr": { |
| 5435 | 5479 | "version": "0.1.5", |
| ... | ... | @@ -6042,6 +6086,11 @@ |
| 6042 | 6086 | "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", |
| 6043 | 6087 | "dev": true |
| 6044 | 6088 | }, |
| 6089 | + "node_modules/json-stringify-pretty-compact": { | |
| 6090 | + "version": "2.0.0", | |
| 6091 | + "resolved": "https://registry.npmmirror.com/json-stringify-pretty-compact/-/json-stringify-pretty-compact-2.0.0.tgz", | |
| 6092 | + "integrity": "sha512-WRitRfs6BGq4q8gTgOy4ek7iPFXjbra0H3PmDLKm2xnZ+Gh1HUhiKGgCZkSPNULlP7mvfu6FV/mOLhCarspADQ==" | |
| 6093 | + }, | |
| 6045 | 6094 | "node_modules/json3": { |
| 6046 | 6095 | "version": "3.3.3", |
| 6047 | 6096 | "resolved": "https://registry.npm.taobao.org/json3/download/json3-3.3.3.tgz", |
| ... | ... | @@ -6106,13 +6155,10 @@ |
| 6106 | 6155 | "node": ">=0.10.0" |
| 6107 | 6156 | } |
| 6108 | 6157 | }, |
| 6109 | - "node_modules/linkify-it": { | |
| 6110 | - "version": "2.2.0", | |
| 6111 | - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", | |
| 6112 | - "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", | |
| 6113 | - "dependencies": { | |
| 6114 | - "uc.micro": "^1.0.1" | |
| 6115 | - } | |
| 6158 | + "node_modules/lerc": { | |
| 6159 | + "version": "3.0.0", | |
| 6160 | + "resolved": "https://registry.npmmirror.com/lerc/-/lerc-3.0.0.tgz", | |
| 6161 | + "integrity": "sha512-Rm4J/WaHhRa93nCN2mwWDZFoRVF18G1f47C+kvQWyHGEZxFpTUi73p7lMVSAndyxGt6lJ2/CFbOcf9ra5p8aww==" | |
| 6116 | 6162 | }, |
| 6117 | 6163 | "node_modules/load-json-file": { |
| 6118 | 6164 | "version": "2.0.0", |
| ... | ... | @@ -6335,25 +6381,10 @@ |
| 6335 | 6381 | "node": ">=0.10.0" |
| 6336 | 6382 | } |
| 6337 | 6383 | }, |
| 6338 | - "node_modules/markdown-it": { | |
| 6339 | - "version": "8.4.2", | |
| 6340 | - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", | |
| 6341 | - "integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==", | |
| 6342 | - "dependencies": { | |
| 6343 | - "argparse": "^1.0.7", | |
| 6344 | - "entities": "~1.1.1", | |
| 6345 | - "linkify-it": "^2.0.0", | |
| 6346 | - "mdurl": "^1.0.1", | |
| 6347 | - "uc.micro": "^1.0.5" | |
| 6348 | - }, | |
| 6349 | - "bin": { | |
| 6350 | - "markdown-it": "bin/markdown-it.js" | |
| 6351 | - } | |
| 6352 | - }, | |
| 6353 | - "node_modules/markdown-it/node_modules/entities": { | |
| 6354 | - "version": "1.1.2", | |
| 6355 | - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", | |
| 6356 | - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" | |
| 6384 | + "node_modules/mapbox-to-css-font": { | |
| 6385 | + "version": "2.4.1", | |
| 6386 | + "resolved": "https://registry.npmmirror.com/mapbox-to-css-font/-/mapbox-to-css-font-2.4.1.tgz", | |
| 6387 | + "integrity": "sha512-QQ/iKiM43DM9+aujTL45Iz5o7gDeSFmy4LPl3HZmNcwCE++NxGazf+yFpY+wCb+YS23sDa1ghpo3zrNFOcHlow==" | |
| 6357 | 6388 | }, |
| 6358 | 6389 | "node_modules/math-expression-evaluator": { |
| 6359 | 6390 | "version": "1.3.8", |
| ... | ... | @@ -6378,11 +6409,6 @@ |
| 6378 | 6409 | "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==", |
| 6379 | 6410 | "dev": true |
| 6380 | 6411 | }, |
| 6381 | - "node_modules/mdurl": { | |
| 6382 | - "version": "1.0.1", | |
| 6383 | - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", | |
| 6384 | - "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=" | |
| 6385 | - }, | |
| 6386 | 6412 | "node_modules/media-typer": { |
| 6387 | 6413 | "version": "0.3.0", |
| 6388 | 6414 | "resolved": "https://registry.npm.taobao.org/media-typer/download/media-typer-0.3.0.tgz", |
| ... | ... | @@ -6783,8 +6809,7 @@ |
| 6783 | 6809 | "node_modules/minimist": { |
| 6784 | 6810 | "version": "1.2.5", |
| 6785 | 6811 | "resolved": "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz", |
| 6786 | - "integrity": "sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI=", | |
| 6787 | - "dev": true | |
| 6812 | + "integrity": "sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI=" | |
| 6788 | 6813 | }, |
| 6789 | 6814 | "node_modules/mississippi": { |
| 6790 | 6815 | "version": "2.0.0", |
| ... | ... | @@ -7246,6 +7271,27 @@ |
| 7246 | 7271 | "integrity": "sha1-Cb6jND1BhZ69RGKS0RydTbYZCE4=", |
| 7247 | 7272 | "dev": true |
| 7248 | 7273 | }, |
| 7274 | + "node_modules/ol": { | |
| 7275 | + "version": "6.14.1", | |
| 7276 | + "resolved": "https://registry.npmmirror.com/ol/-/ol-6.14.1.tgz", | |
| 7277 | + "integrity": "sha512-sIcUWkGud3Y2gT3TJubSHlkyMXiPVh1yxfCPHxmY8+qtm79bB9oRnei9xHVIbRRG0Ro6Ldp5E+BMVSvYCxSpaA==", | |
| 7278 | + "dependencies": { | |
| 7279 | + "geotiff": "^2.0.2", | |
| 7280 | + "ol-mapbox-style": "^7.1.1", | |
| 7281 | + "pbf": "3.2.1", | |
| 7282 | + "rbush": "^3.0.1" | |
| 7283 | + } | |
| 7284 | + }, | |
| 7285 | + "node_modules/ol-mapbox-style": { | |
| 7286 | + "version": "7.1.1", | |
| 7287 | + "resolved": "https://registry.npmmirror.com/ol-mapbox-style/-/ol-mapbox-style-7.1.1.tgz", | |
| 7288 | + "integrity": "sha512-GLTEYiH/Ec9Zn1eS4S/zXyR2sierVrUc+OLVP8Ra0FRyqRhoYbXdko0b7OIeSHWdtJfHssWYefDOGxfTRUUZ/A==", | |
| 7289 | + "dependencies": { | |
| 7290 | + "@mapbox/mapbox-gl-style-spec": "^13.20.1", | |
| 7291 | + "mapbox-to-css-font": "^2.4.1", | |
| 7292 | + "webfont-matcher": "^1.1.0" | |
| 7293 | + } | |
| 7294 | + }, | |
| 7249 | 7295 | "node_modules/on-finished": { |
| 7250 | 7296 | "version": "2.3.0", |
| 7251 | 7297 | "resolved": "https://registry.npm.taobao.org/on-finished/download/on-finished-2.3.0.tgz", |
| ... | ... | @@ -7512,6 +7558,11 @@ |
| 7512 | 7558 | "safe-buffer": "^5.1.1" |
| 7513 | 7559 | } |
| 7514 | 7560 | }, |
| 7561 | + "node_modules/parse-headers": { | |
| 7562 | + "version": "2.0.5", | |
| 7563 | + "resolved": "https://registry.npmmirror.com/parse-headers/-/parse-headers-2.0.5.tgz", | |
| 7564 | + "integrity": "sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA==" | |
| 7565 | + }, | |
| 7515 | 7566 | "node_modules/parse-json": { |
| 7516 | 7567 | "version": "4.0.0", |
| 7517 | 7568 | "resolved": "https://registry.npm.taobao.org/parse-json/download/parse-json-4.0.0.tgz?cache=0&sync_timestamp=1598130878813&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fparse-json%2Fdownload%2Fparse-json-4.0.0.tgz", |
| ... | ... | @@ -7612,6 +7663,18 @@ |
| 7612 | 7663 | "node": ">=4" |
| 7613 | 7664 | } |
| 7614 | 7665 | }, |
| 7666 | + "node_modules/pbf": { | |
| 7667 | + "version": "3.2.1", | |
| 7668 | + "resolved": "https://registry.npmmirror.com/pbf/-/pbf-3.2.1.tgz", | |
| 7669 | + "integrity": "sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==", | |
| 7670 | + "dependencies": { | |
| 7671 | + "ieee754": "^1.1.12", | |
| 7672 | + "resolve-protobuf-schema": "^2.1.0" | |
| 7673 | + }, | |
| 7674 | + "bin": { | |
| 7675 | + "pbf": "bin/pbf" | |
| 7676 | + } | |
| 7677 | + }, | |
| 7615 | 7678 | "node_modules/pbkdf2": { |
| 7616 | 7679 | "version": "3.1.1", |
| 7617 | 7680 | "resolved": "https://registry.npm.taobao.org/pbkdf2/download/pbkdf2-3.1.1.tgz", |
| ... | ... | @@ -10613,6 +10676,11 @@ |
| 10613 | 10676 | "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", |
| 10614 | 10677 | "dev": true |
| 10615 | 10678 | }, |
| 10679 | + "node_modules/protocol-buffers-schema": { | |
| 10680 | + "version": "3.6.0", | |
| 10681 | + "resolved": "https://registry.npmmirror.com/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz", | |
| 10682 | + "integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==" | |
| 10683 | + }, | |
| 10616 | 10684 | "node_modules/proxy-addr": { |
| 10617 | 10685 | "version": "2.0.6", |
| 10618 | 10686 | "resolved": "https://registry.npm.taobao.org/proxy-addr/download/proxy-addr-2.0.6.tgz", |
| ... | ... | @@ -10745,6 +10813,19 @@ |
| 10745 | 10813 | "integrity": "sha1-M0WUG0FTy50ILY7uTNogFqmu9/Y=", |
| 10746 | 10814 | "dev": true |
| 10747 | 10815 | }, |
| 10816 | + "node_modules/quick-lru": { | |
| 10817 | + "version": "6.1.1", | |
| 10818 | + "resolved": "https://registry.npmmirror.com/quick-lru/-/quick-lru-6.1.1.tgz", | |
| 10819 | + "integrity": "sha512-S27GBT+F0NTRiehtbrgaSE1idUAJ5bX8dPAQTdylEyNlrdcH5X4Lz7Edz3DYzecbsCluD5zO8ZNEe04z3D3u6Q==", | |
| 10820 | + "engines": { | |
| 10821 | + "node": ">=12" | |
| 10822 | + } | |
| 10823 | + }, | |
| 10824 | + "node_modules/quickselect": { | |
| 10825 | + "version": "2.0.0", | |
| 10826 | + "resolved": "https://registry.npmmirror.com/quickselect/-/quickselect-2.0.0.tgz", | |
| 10827 | + "integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==" | |
| 10828 | + }, | |
| 10748 | 10829 | "node_modules/randombytes": { |
| 10749 | 10830 | "version": "2.1.0", |
| 10750 | 10831 | "resolved": "https://registry.npm.taobao.org/randombytes/download/randombytes-2.1.0.tgz", |
| ... | ... | @@ -10788,6 +10869,14 @@ |
| 10788 | 10869 | "node": ">= 0.8" |
| 10789 | 10870 | } |
| 10790 | 10871 | }, |
| 10872 | + "node_modules/rbush": { | |
| 10873 | + "version": "3.0.1", | |
| 10874 | + "resolved": "https://registry.npmmirror.com/rbush/-/rbush-3.0.1.tgz", | |
| 10875 | + "integrity": "sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w==", | |
| 10876 | + "dependencies": { | |
| 10877 | + "quickselect": "^2.0.0" | |
| 10878 | + } | |
| 10879 | + }, | |
| 10791 | 10880 | "node_modules/read-cache": { |
| 10792 | 10881 | "version": "1.0.0", |
| 10793 | 10882 | "resolved": "https://registry.npm.taobao.org/read-cache/download/read-cache-1.0.0.tgz", |
| ... | ... | @@ -11225,6 +11314,14 @@ |
| 11225 | 11314 | "node": ">=4" |
| 11226 | 11315 | } |
| 11227 | 11316 | }, |
| 11317 | + "node_modules/resolve-protobuf-schema": { | |
| 11318 | + "version": "2.1.0", | |
| 11319 | + "resolved": "https://registry.npmmirror.com/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz", | |
| 11320 | + "integrity": "sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==", | |
| 11321 | + "dependencies": { | |
| 11322 | + "protocol-buffers-schema": "^3.3.1" | |
| 11323 | + } | |
| 11324 | + }, | |
| 11228 | 11325 | "node_modules/resolve-url": { |
| 11229 | 11326 | "version": "0.2.1", |
| 11230 | 11327 | "resolved": "https://registry.npm.taobao.org/resolve-url/download/resolve-url-0.2.1.tgz", |
| ... | ... | @@ -11309,6 +11406,11 @@ |
| 11309 | 11406 | "aproba": "^1.1.1" |
| 11310 | 11407 | } |
| 11311 | 11408 | }, |
| 11409 | + "node_modules/rw": { | |
| 11410 | + "version": "1.3.3", | |
| 11411 | + "resolved": "https://registry.npmmirror.com/rw/-/rw-1.3.3.tgz", | |
| 11412 | + "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==" | |
| 11413 | + }, | |
| 11312 | 11414 | "node_modules/safe-buffer": { |
| 11313 | 11415 | "version": "5.1.2", |
| 11314 | 11416 | "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz", |
| ... | ... | @@ -11779,6 +11881,32 @@ |
| 11779 | 11881 | "node": ">=0.8.0" |
| 11780 | 11882 | } |
| 11781 | 11883 | }, |
| 11884 | + "node_modules/sockjs/node_modules/uuid": { | |
| 11885 | + "version": "3.4.0", | |
| 11886 | + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-3.4.0.tgz", | |
| 11887 | + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", | |
| 11888 | + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", | |
| 11889 | + "dev": true, | |
| 11890 | + "bin": { | |
| 11891 | + "uuid": "bin/uuid" | |
| 11892 | + } | |
| 11893 | + }, | |
| 11894 | + "node_modules/sort-asc": { | |
| 11895 | + "version": "0.1.0", | |
| 11896 | + "resolved": "https://registry.npmmirror.com/sort-asc/-/sort-asc-0.1.0.tgz", | |
| 11897 | + "integrity": "sha512-jBgdDd+rQ+HkZF2/OHCmace5dvpos/aWQpcxuyRs9QUbPRnkEJmYVo81PIGpjIdpOcsnJ4rGjStfDHsbn+UVyw==", | |
| 11898 | + "engines": { | |
| 11899 | + "node": ">=0.10.0" | |
| 11900 | + } | |
| 11901 | + }, | |
| 11902 | + "node_modules/sort-desc": { | |
| 11903 | + "version": "0.1.1", | |
| 11904 | + "resolved": "https://registry.npmmirror.com/sort-desc/-/sort-desc-0.1.1.tgz", | |
| 11905 | + "integrity": "sha512-jfZacW5SKOP97BF5rX5kQfJmRVZP5/adDUTY8fCSPvNcXDVpUEe2pr/iKGlcyZzchRJZrswnp68fgk3qBXgkJw==", | |
| 11906 | + "engines": { | |
| 11907 | + "node": ">=0.10.0" | |
| 11908 | + } | |
| 11909 | + }, | |
| 11782 | 11910 | "node_modules/sort-keys": { |
| 11783 | 11911 | "version": "1.1.2", |
| 11784 | 11912 | "resolved": "https://registry.npm.taobao.org/sort-keys/download/sort-keys-1.1.2.tgz", |
| ... | ... | @@ -11791,6 +11919,18 @@ |
| 11791 | 11919 | "node": ">=0.10.0" |
| 11792 | 11920 | } |
| 11793 | 11921 | }, |
| 11922 | + "node_modules/sort-object": { | |
| 11923 | + "version": "0.3.2", | |
| 11924 | + "resolved": "https://registry.npmmirror.com/sort-object/-/sort-object-0.3.2.tgz", | |
| 11925 | + "integrity": "sha512-aAQiEdqFTTdsvUFxXm3umdo04J7MRljoVGbBlkH7BgNsMvVNAJyGj7C/wV1A8wHWAJj/YikeZbfuCKqhggNWGA==", | |
| 11926 | + "dependencies": { | |
| 11927 | + "sort-asc": "^0.1.0", | |
| 11928 | + "sort-desc": "^0.1.1" | |
| 11929 | + }, | |
| 11930 | + "engines": { | |
| 11931 | + "node": ">=0.10.0" | |
| 11932 | + } | |
| 11933 | + }, | |
| 11794 | 11934 | "node_modules/source-list-map": { |
| 11795 | 11935 | "version": "2.0.1", |
| 11796 | 11936 | "resolved": "https://registry.npm.taobao.org/source-list-map/download/source-list-map-2.0.1.tgz", |
| ... | ... | @@ -11983,7 +12123,8 @@ |
| 11983 | 12123 | "node_modules/sprintf-js": { |
| 11984 | 12124 | "version": "1.0.3", |
| 11985 | 12125 | "resolved": "https://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz", |
| 11986 | - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" | |
| 12126 | + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", | |
| 12127 | + "dev": true | |
| 11987 | 12128 | }, |
| 11988 | 12129 | "node_modules/ssri": { |
| 11989 | 12130 | "version": "5.3.0", |
| ... | ... | @@ -12479,11 +12620,6 @@ |
| 12479 | 12620 | "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", |
| 12480 | 12621 | "dev": true |
| 12481 | 12622 | }, |
| 12482 | - "node_modules/uc.micro": { | |
| 12483 | - "version": "1.0.6", | |
| 12484 | - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", | |
| 12485 | - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" | |
| 12486 | - }, | |
| 12487 | 12623 | "node_modules/uglify-js": { |
| 12488 | 12624 | "version": "3.4.10", |
| 12489 | 12625 | "resolved": "https://registry.npm.taobao.org/uglify-js/download/uglify-js-3.4.10.tgz?cache=0&sync_timestamp=1601823880483&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuglify-js%2Fdownload%2Fuglify-js-3.4.10.tgz", |
| ... | ... | @@ -12853,13 +12989,11 @@ |
| 12853 | 12989 | } |
| 12854 | 12990 | }, |
| 12855 | 12991 | "node_modules/uuid": { |
| 12856 | - "version": "3.4.0", | |
| 12857 | - "resolved": "https://registry.npm.taobao.org/uuid/download/uuid-3.4.0.tgz?cache=0&sync_timestamp=1601826530476&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuuid%2Fdownload%2Fuuid-3.4.0.tgz", | |
| 12858 | - "integrity": "sha1-sj5DWK+oogL+ehAK8fX4g/AgB+4=", | |
| 12859 | - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", | |
| 12860 | - "dev": true, | |
| 12992 | + "version": "8.3.2", | |
| 12993 | + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-8.3.2.tgz", | |
| 12994 | + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", | |
| 12861 | 12995 | "bin": { |
| 12862 | - "uuid": "bin/uuid" | |
| 12996 | + "uuid": "dist/bin/uuid" | |
| 12863 | 12997 | } |
| 12864 | 12998 | }, |
| 12865 | 12999 | "node_modules/validate-npm-package-license": { |
| ... | ... | @@ -12898,21 +13032,6 @@ |
| 12898 | 13032 | "resolved": "https://registry.npm.taobao.org/vue/download/vue-2.6.12.tgz?cache=0&sync_timestamp=1600441238751&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue%2Fdownload%2Fvue-2.6.12.tgz", |
| 12899 | 13033 | "integrity": "sha1-9evU+mvShpQD4pqJau1JBEVskSM=" |
| 12900 | 13034 | }, |
| 12901 | - "node_modules/vue-baidu-map": { | |
| 12902 | - "version": "0.21.22", | |
| 12903 | - "resolved": "https://registry.npmjs.org/vue-baidu-map/-/vue-baidu-map-0.21.22.tgz", | |
| 12904 | - "integrity": "sha512-WQMPCih4UTh0AZCKKH/OVOYnyAWjfRNeK6BIeoLmscyY5aF8zzlJhz/NOHLb3mdztIpB0Z6aohn4Jd9mfCSjQw==", | |
| 12905 | - "dependencies": { | |
| 12906 | - "bmaplib.curveline": "^1.0.0", | |
| 12907 | - "bmaplib.heatmap": "^1.0.4", | |
| 12908 | - "bmaplib.lushu": "^1.0.7", | |
| 12909 | - "bmaplib.markerclusterer": "^1.0.13", | |
| 12910 | - "markdown-it": "^8.4.0" | |
| 12911 | - }, | |
| 12912 | - "peerDependencies": { | |
| 12913 | - "vue": "^2.1.8" | |
| 12914 | - } | |
| 12915 | - }, | |
| 12916 | 13035 | "node_modules/vue-clipboard2": { |
| 12917 | 13036 | "version": "0.3.1", |
| 12918 | 13037 | "resolved": "https://registry.npm.taobao.org/vue-clipboard2/download/vue-clipboard2-0.3.1.tgz", |
| ... | ... | @@ -13299,6 +13418,16 @@ |
| 13299 | 13418 | "minimalistic-assert": "^1.0.0" |
| 13300 | 13419 | } |
| 13301 | 13420 | }, |
| 13421 | + "node_modules/web-worker": { | |
| 13422 | + "version": "1.2.0", | |
| 13423 | + "resolved": "https://registry.npmmirror.com/web-worker/-/web-worker-1.2.0.tgz", | |
| 13424 | + "integrity": "sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA==" | |
| 13425 | + }, | |
| 13426 | + "node_modules/webfont-matcher": { | |
| 13427 | + "version": "1.1.0", | |
| 13428 | + "resolved": "https://registry.npmmirror.com/webfont-matcher/-/webfont-matcher-1.1.0.tgz", | |
| 13429 | + "integrity": "sha512-ov8lMvF9wi4PD7fK2Axn9PQEpO9cYI0fIoGqErwd+wi8xacFFDmX114D5Q2Lw0Wlgmb+Qw/dKI2KTtimrJf85g==" | |
| 13430 | + }, | |
| 13302 | 13431 | "node_modules/webpack": { |
| 13303 | 13432 | "version": "3.12.0", |
| 13304 | 13433 | "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.12.0.tgz", |
| ... | ... | @@ -14116,6 +14245,11 @@ |
| 14116 | 14245 | "safe-buffer": "~5.1.0" |
| 14117 | 14246 | } |
| 14118 | 14247 | }, |
| 14248 | + "node_modules/xml-utils": { | |
| 14249 | + "version": "1.0.2", | |
| 14250 | + "resolved": "https://registry.npmmirror.com/xml-utils/-/xml-utils-1.0.2.tgz", | |
| 14251 | + "integrity": "sha512-rEn0FvKi+YGjv9omf22oAf+0d6Ly/sgJ/CUufU/nOzS7SRLmgwSujrewc03KojXxt+aPaTRpm593TgehtUBMSQ==" | |
| 14252 | + }, | |
| 14119 | 14253 | "node_modules/xtend": { |
| 14120 | 14254 | "version": "4.0.2", |
| 14121 | 14255 | "resolved": "https://registry.npm.taobao.org/xtend/download/xtend-4.0.2.tgz?cache=0&sync_timestamp=1596697437792&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fxtend%2Fdownload%2Fxtend-4.0.2.tgz", |
| ... | ... | @@ -14244,6 +14378,41 @@ |
| 14244 | 14378 | } |
| 14245 | 14379 | }, |
| 14246 | 14380 | "dependencies": { |
| 14381 | + "@mapbox/jsonlint-lines-primitives": { | |
| 14382 | + "version": "2.0.2", | |
| 14383 | + "resolved": "https://registry.npmmirror.com/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz", | |
| 14384 | + "integrity": "sha512-rY0o9A5ECsTQRVhv7tL/OyDpGAoUB4tTvLiW1DSzQGq4bvTPhNw1VpSNjDJc5GFZ2XuyOtSWSVN05qOtcD71qQ==" | |
| 14385 | + }, | |
| 14386 | + "@mapbox/mapbox-gl-style-spec": { | |
| 14387 | + "version": "13.23.1", | |
| 14388 | + "resolved": "https://registry.npmmirror.com/@mapbox/mapbox-gl-style-spec/-/mapbox-gl-style-spec-13.23.1.tgz", | |
| 14389 | + "integrity": "sha512-C6wh8A/5EdsgzhL6y6yl464VCQNIxK0yjrpnvCvchcFe3sNK2RbBw/J9u3m+p8Y6S6MsGuSMt3AkGAXOKMYweQ==", | |
| 14390 | + "requires": { | |
| 14391 | + "@mapbox/jsonlint-lines-primitives": "~2.0.2", | |
| 14392 | + "@mapbox/point-geometry": "^0.1.0", | |
| 14393 | + "@mapbox/unitbezier": "^0.0.0", | |
| 14394 | + "csscolorparser": "~1.0.2", | |
| 14395 | + "json-stringify-pretty-compact": "^2.0.0", | |
| 14396 | + "minimist": "^1.2.5", | |
| 14397 | + "rw": "^1.3.3", | |
| 14398 | + "sort-object": "^0.3.2" | |
| 14399 | + } | |
| 14400 | + }, | |
| 14401 | + "@mapbox/point-geometry": { | |
| 14402 | + "version": "0.1.0", | |
| 14403 | + "resolved": "https://registry.npmmirror.com/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz", | |
| 14404 | + "integrity": "sha512-6j56HdLTwWGO0fJPlrZtdU/B13q8Uwmo18Ck2GnGgN9PCFyKTZ3UbXeEdRFh18i9XQ92eH2VdtpJHpBD3aripQ==" | |
| 14405 | + }, | |
| 14406 | + "@mapbox/unitbezier": { | |
| 14407 | + "version": "0.0.0", | |
| 14408 | + "resolved": "https://registry.npmmirror.com/@mapbox/unitbezier/-/unitbezier-0.0.0.tgz", | |
| 14409 | + "integrity": "sha512-HPnRdYO0WjFjRTSwO3frz1wKaU649OBFPX3Zo/2WZvuRi6zMiRGui8SnPQiQABgqCf8YikDe5t3HViTVw1WUzA==" | |
| 14410 | + }, | |
| 14411 | + "@petamoriken/float16": { | |
| 14412 | + "version": "3.6.3", | |
| 14413 | + "resolved": "https://registry.npmmirror.com/@petamoriken/float16/-/float16-3.6.3.tgz", | |
| 14414 | + "integrity": "sha512-Yx6Z93kmz3JVPYoPPRFJXnt2/G4kfaxRROcZVVHsE4zOClJXvkOVidv/JfvP6hWn16lykbKYKVzUsId6mqXdGg==" | |
| 14415 | + }, | |
| 14247 | 14416 | "@types/q": { |
| 14248 | 14417 | "version": "1.5.4", |
| 14249 | 14418 | "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", |
| ... | ... | @@ -14360,6 +14529,7 @@ |
| 14360 | 14529 | "version": "1.0.10", |
| 14361 | 14530 | "resolved": "https://registry.npm.taobao.org/argparse/download/argparse-1.0.10.tgz", |
| 14362 | 14531 | "integrity": "sha1-vNZ5HqWuCXJeF+WtmIE0zUCz2RE=", |
| 14532 | + "dev": true, | |
| 14363 | 14533 | "requires": { |
| 14364 | 14534 | "sprintf-js": "~1.0.2" |
| 14365 | 14535 | } |
| ... | ... | @@ -15493,34 +15663,6 @@ |
| 15493 | 15663 | "integrity": "sha1-nyKcFb4nJFT/qXOs4NvueaGww28=", |
| 15494 | 15664 | "dev": true |
| 15495 | 15665 | }, |
| 15496 | - "bmaplib.curveline": { | |
| 15497 | - "version": "1.0.0", | |
| 15498 | - "resolved": "https://registry.npmjs.org/bmaplib.curveline/-/bmaplib.curveline-1.0.0.tgz", | |
| 15499 | - "integrity": "sha512-9wcFMVhiYxNPqpvsLDAADn3qDhNzXp2mA6VyHSHg2XOAgSooC7ZiujdFhy0sp+0QYjTfJ/MjmLuNoUg2HHxH4Q==" | |
| 15500 | - }, | |
| 15501 | - "bmaplib.heatmap": { | |
| 15502 | - "version": "1.0.4", | |
| 15503 | - "resolved": "https://registry.npmjs.org/bmaplib.heatmap/-/bmaplib.heatmap-1.0.4.tgz", | |
| 15504 | - "integrity": "sha512-rmhqUARBpUSJ9jXzUI2j7dIOqnc38bqubkx/8a349U2qtw/ulLUwyzRD535OrA8G7w5cz4aPKm6/rNvUAarg/Q==" | |
| 15505 | - }, | |
| 15506 | - "bmaplib.lushu": { | |
| 15507 | - "version": "1.0.7", | |
| 15508 | - "resolved": "https://registry.npmjs.org/bmaplib.lushu/-/bmaplib.lushu-1.0.7.tgz", | |
| 15509 | - "integrity": "sha512-LVvgpESPii6xGxyjnQjq8u+ic4NjvhdCPV/RiSS/PGTUdZKeTDS7prSpleJLZH3ES0+oc0gYn8bw0LtPYUSz2w==" | |
| 15510 | - }, | |
| 15511 | - "bmaplib.markerclusterer": { | |
| 15512 | - "version": "1.0.13", | |
| 15513 | - "resolved": "https://registry.npmjs.org/bmaplib.markerclusterer/-/bmaplib.markerclusterer-1.0.13.tgz", | |
| 15514 | - "integrity": "sha512-VrLyWSiuDEVNi0yUfwOhFQ6z1oEEHS4w36GNu3iASu6p52QIx9uAXMUkuSCHReNR0bj2Cp9SA1dSx5RpojXajQ==", | |
| 15515 | - "requires": { | |
| 15516 | - "bmaplib.texticonoverlay": "^1.0.2" | |
| 15517 | - } | |
| 15518 | - }, | |
| 15519 | - "bmaplib.texticonoverlay": { | |
| 15520 | - "version": "1.0.2", | |
| 15521 | - "resolved": "https://registry.npmjs.org/bmaplib.texticonoverlay/-/bmaplib.texticonoverlay-1.0.2.tgz", | |
| 15522 | - "integrity": "sha512-4ZTWr4ZP3B6qEWput5Tut16CfZgII38YwM3bpyb4gFTQyORlKYryFp9WHWrwZZaHlOyYDAXG9SX0hka43jTADg==" | |
| 15523 | - }, | |
| 15524 | 15666 | "bn.js": { |
| 15525 | 15667 | "version": "5.1.3", |
| 15526 | 15668 | "resolved": "https://registry.npm.taobao.org/bn.js/download/bn.js-5.1.3.tgz", |
| ... | ... | @@ -16579,6 +16721,11 @@ |
| 16579 | 16721 | "source-map": "^0.6.1" |
| 16580 | 16722 | } |
| 16581 | 16723 | }, |
| 16724 | + "csscolorparser": { | |
| 16725 | + "version": "1.0.3", | |
| 16726 | + "resolved": "https://registry.npmmirror.com/csscolorparser/-/csscolorparser-1.0.3.tgz", | |
| 16727 | + "integrity": "sha512-umPSgYwZkdFoUrH5hIq5kf0wPSXiro51nPw0j2K/c83KflkPSTBGMz6NJvMB+07VlL0y7VPo6QJcDjcgKTTm3w==" | |
| 16728 | + }, | |
| 16582 | 16729 | "cssesc": { |
| 16583 | 16730 | "version": "3.0.0", |
| 16584 | 16731 | "resolved": "https://registry.npm.taobao.org/cssesc/download/cssesc-3.0.0.tgz", |
| ... | ... | @@ -18425,6 +18572,27 @@ |
| 18425 | 18572 | "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=", |
| 18426 | 18573 | "dev": true |
| 18427 | 18574 | }, |
| 18575 | + "geotiff": { | |
| 18576 | + "version": "2.0.5", | |
| 18577 | + "resolved": "https://registry.npmmirror.com/geotiff/-/geotiff-2.0.5.tgz", | |
| 18578 | + "integrity": "sha512-U5kVYm118YAmw2swiLu8rhfrYnDKOFI7VaMjuQwcq6Intuuid9Pyb4jjxYUxxkq8kOu2r7Am0Rmb52PObGp4pQ==", | |
| 18579 | + "requires": { | |
| 18580 | + "@petamoriken/float16": "^3.4.7", | |
| 18581 | + "lerc": "^3.0.0", | |
| 18582 | + "pako": "^2.0.4", | |
| 18583 | + "parse-headers": "^2.0.2", | |
| 18584 | + "quick-lru": "^6.1.0", | |
| 18585 | + "web-worker": "^1.2.0", | |
| 18586 | + "xml-utils": "^1.0.2" | |
| 18587 | + }, | |
| 18588 | + "dependencies": { | |
| 18589 | + "pako": { | |
| 18590 | + "version": "2.0.4", | |
| 18591 | + "resolved": "https://registry.npmmirror.com/pako/-/pako-2.0.4.tgz", | |
| 18592 | + "integrity": "sha512-v8tweI900AUkZN6heMU/4Uy4cXRc2AYNRggVmTR+dEncawDJgCdLMximOVA2p4qO57WMynangsfGRb5WD6L1Bg==" | |
| 18593 | + } | |
| 18594 | + } | |
| 18595 | + }, | |
| 18428 | 18596 | "get-caller-file": { |
| 18429 | 18597 | "version": "1.0.3", |
| 18430 | 18598 | "resolved": "https://registry.npm.taobao.org/get-caller-file/download/get-caller-file-1.0.3.tgz", |
| ... | ... | @@ -18892,8 +19060,7 @@ |
| 18892 | 19060 | "ieee754": { |
| 18893 | 19061 | "version": "1.1.13", |
| 18894 | 19062 | "resolved": "https://registry.npm.taobao.org/ieee754/download/ieee754-1.1.13.tgz", |
| 18895 | - "integrity": "sha1-7BaFWOlaoYH9h9N/VcMrvLZwi4Q=", | |
| 18896 | - "dev": true | |
| 19063 | + "integrity": "sha1-7BaFWOlaoYH9h9N/VcMrvLZwi4Q=" | |
| 18897 | 19064 | }, |
| 18898 | 19065 | "iferr": { |
| 18899 | 19066 | "version": "0.1.5", |
| ... | ... | @@ -19367,6 +19534,11 @@ |
| 19367 | 19534 | "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=", |
| 19368 | 19535 | "dev": true |
| 19369 | 19536 | }, |
| 19537 | + "json-stringify-pretty-compact": { | |
| 19538 | + "version": "2.0.0", | |
| 19539 | + "resolved": "https://registry.npmmirror.com/json-stringify-pretty-compact/-/json-stringify-pretty-compact-2.0.0.tgz", | |
| 19540 | + "integrity": "sha512-WRitRfs6BGq4q8gTgOy4ek7iPFXjbra0H3PmDLKm2xnZ+Gh1HUhiKGgCZkSPNULlP7mvfu6FV/mOLhCarspADQ==" | |
| 19541 | + }, | |
| 19370 | 19542 | "json3": { |
| 19371 | 19543 | "version": "3.3.3", |
| 19372 | 19544 | "resolved": "https://registry.npm.taobao.org/json3/download/json3-3.3.3.tgz", |
| ... | ... | @@ -19419,13 +19591,10 @@ |
| 19419 | 19591 | "invert-kv": "^1.0.0" |
| 19420 | 19592 | } |
| 19421 | 19593 | }, |
| 19422 | - "linkify-it": { | |
| 19423 | - "version": "2.2.0", | |
| 19424 | - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-2.2.0.tgz", | |
| 19425 | - "integrity": "sha512-GnAl/knGn+i1U/wjBz3akz2stz+HrHLsxMwHQGofCDfPvlf+gDKN58UtfmUquTY4/MXeE2x7k19KQmeoZi94Iw==", | |
| 19426 | - "requires": { | |
| 19427 | - "uc.micro": "^1.0.1" | |
| 19428 | - } | |
| 19594 | + "lerc": { | |
| 19595 | + "version": "3.0.0", | |
| 19596 | + "resolved": "https://registry.npmmirror.com/lerc/-/lerc-3.0.0.tgz", | |
| 19597 | + "integrity": "sha512-Rm4J/WaHhRa93nCN2mwWDZFoRVF18G1f47C+kvQWyHGEZxFpTUi73p7lMVSAndyxGt6lJ2/CFbOcf9ra5p8aww==" | |
| 19429 | 19598 | }, |
| 19430 | 19599 | "load-json-file": { |
| 19431 | 19600 | "version": "2.0.0", |
| ... | ... | @@ -19604,24 +19773,10 @@ |
| 19604 | 19773 | "object-visit": "^1.0.0" |
| 19605 | 19774 | } |
| 19606 | 19775 | }, |
| 19607 | - "markdown-it": { | |
| 19608 | - "version": "8.4.2", | |
| 19609 | - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-8.4.2.tgz", | |
| 19610 | - "integrity": "sha512-GcRz3AWTqSUphY3vsUqQSFMbgR38a4Lh3GWlHRh/7MRwz8mcu9n2IO7HOh+bXHrR9kOPDl5RNCaEsrneb+xhHQ==", | |
| 19611 | - "requires": { | |
| 19612 | - "argparse": "^1.0.7", | |
| 19613 | - "entities": "~1.1.1", | |
| 19614 | - "linkify-it": "^2.0.0", | |
| 19615 | - "mdurl": "^1.0.1", | |
| 19616 | - "uc.micro": "^1.0.5" | |
| 19617 | - }, | |
| 19618 | - "dependencies": { | |
| 19619 | - "entities": { | |
| 19620 | - "version": "1.1.2", | |
| 19621 | - "resolved": "https://registry.npmjs.org/entities/-/entities-1.1.2.tgz", | |
| 19622 | - "integrity": "sha512-f2LZMYl1Fzu7YSBKg+RoROelpOaNrcGmE9AZubeDfrCEia483oW4MI4VyFd5VNHIgQ/7qm1I0wUHK1eJnn2y2w==" | |
| 19623 | - } | |
| 19624 | - } | |
| 19776 | + "mapbox-to-css-font": { | |
| 19777 | + "version": "2.4.1", | |
| 19778 | + "resolved": "https://registry.npmmirror.com/mapbox-to-css-font/-/mapbox-to-css-font-2.4.1.tgz", | |
| 19779 | + "integrity": "sha512-QQ/iKiM43DM9+aujTL45Iz5o7gDeSFmy4LPl3HZmNcwCE++NxGazf+yFpY+wCb+YS23sDa1ghpo3zrNFOcHlow==" | |
| 19625 | 19780 | }, |
| 19626 | 19781 | "math-expression-evaluator": { |
| 19627 | 19782 | "version": "1.3.8", |
| ... | ... | @@ -19646,11 +19801,6 @@ |
| 19646 | 19801 | "integrity": "sha512-iV3XNKw06j5Q7mi6h+9vbx23Tv7JkjEVgKHW4pimwyDGWm0OIQntJJ+u1C6mg6mK1EaTv42XQ7w76yuzH7M2cA==", |
| 19647 | 19802 | "dev": true |
| 19648 | 19803 | }, |
| 19649 | - "mdurl": { | |
| 19650 | - "version": "1.0.1", | |
| 19651 | - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", | |
| 19652 | - "integrity": "sha1-/oWy7HWlkDfyrf7BAP1sYBdhFS4=" | |
| 19653 | - }, | |
| 19654 | 19804 | "media-typer": { |
| 19655 | 19805 | "version": "0.3.0", |
| 19656 | 19806 | "resolved": "https://registry.npm.taobao.org/media-typer/download/media-typer-0.3.0.tgz", |
| ... | ... | @@ -19976,8 +20126,7 @@ |
| 19976 | 20126 | "minimist": { |
| 19977 | 20127 | "version": "1.2.5", |
| 19978 | 20128 | "resolved": "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz", |
| 19979 | - "integrity": "sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI=", | |
| 19980 | - "dev": true | |
| 20129 | + "integrity": "sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI=" | |
| 19981 | 20130 | }, |
| 19982 | 20131 | "mississippi": { |
| 19983 | 20132 | "version": "2.0.0", |
| ... | ... | @@ -20372,6 +20521,27 @@ |
| 20372 | 20521 | "integrity": "sha1-Cb6jND1BhZ69RGKS0RydTbYZCE4=", |
| 20373 | 20522 | "dev": true |
| 20374 | 20523 | }, |
| 20524 | + "ol": { | |
| 20525 | + "version": "6.14.1", | |
| 20526 | + "resolved": "https://registry.npmmirror.com/ol/-/ol-6.14.1.tgz", | |
| 20527 | + "integrity": "sha512-sIcUWkGud3Y2gT3TJubSHlkyMXiPVh1yxfCPHxmY8+qtm79bB9oRnei9xHVIbRRG0Ro6Ldp5E+BMVSvYCxSpaA==", | |
| 20528 | + "requires": { | |
| 20529 | + "geotiff": "^2.0.2", | |
| 20530 | + "ol-mapbox-style": "^7.1.1", | |
| 20531 | + "pbf": "3.2.1", | |
| 20532 | + "rbush": "^3.0.1" | |
| 20533 | + } | |
| 20534 | + }, | |
| 20535 | + "ol-mapbox-style": { | |
| 20536 | + "version": "7.1.1", | |
| 20537 | + "resolved": "https://registry.npmmirror.com/ol-mapbox-style/-/ol-mapbox-style-7.1.1.tgz", | |
| 20538 | + "integrity": "sha512-GLTEYiH/Ec9Zn1eS4S/zXyR2sierVrUc+OLVP8Ra0FRyqRhoYbXdko0b7OIeSHWdtJfHssWYefDOGxfTRUUZ/A==", | |
| 20539 | + "requires": { | |
| 20540 | + "@mapbox/mapbox-gl-style-spec": "^13.20.1", | |
| 20541 | + "mapbox-to-css-font": "^2.4.1", | |
| 20542 | + "webfont-matcher": "^1.1.0" | |
| 20543 | + } | |
| 20544 | + }, | |
| 20375 | 20545 | "on-finished": { |
| 20376 | 20546 | "version": "2.3.0", |
| 20377 | 20547 | "resolved": "https://registry.npm.taobao.org/on-finished/download/on-finished-2.3.0.tgz", |
| ... | ... | @@ -20589,6 +20759,11 @@ |
| 20589 | 20759 | "safe-buffer": "^5.1.1" |
| 20590 | 20760 | } |
| 20591 | 20761 | }, |
| 20762 | + "parse-headers": { | |
| 20763 | + "version": "2.0.5", | |
| 20764 | + "resolved": "https://registry.npmmirror.com/parse-headers/-/parse-headers-2.0.5.tgz", | |
| 20765 | + "integrity": "sha512-ft3iAoLOB/MlwbNXgzy43SWGP6sQki2jQvAyBg/zDFAgr9bfNWZIUj42Kw2eJIl8kEi4PbgE6U1Zau/HwI75HA==" | |
| 20766 | + }, | |
| 20592 | 20767 | "parse-json": { |
| 20593 | 20768 | "version": "4.0.0", |
| 20594 | 20769 | "resolved": "https://registry.npm.taobao.org/parse-json/download/parse-json-4.0.0.tgz?cache=0&sync_timestamp=1598130878813&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fparse-json%2Fdownload%2Fparse-json-4.0.0.tgz", |
| ... | ... | @@ -20668,6 +20843,15 @@ |
| 20668 | 20843 | "pify": "^3.0.0" |
| 20669 | 20844 | } |
| 20670 | 20845 | }, |
| 20846 | + "pbf": { | |
| 20847 | + "version": "3.2.1", | |
| 20848 | + "resolved": "https://registry.npmmirror.com/pbf/-/pbf-3.2.1.tgz", | |
| 20849 | + "integrity": "sha512-ClrV7pNOn7rtmoQVF4TS1vyU0WhYRnP92fzbfF75jAIwpnzdJXf8iTd4CMEqO4yUenH6NDqLiwjqlh6QgZzgLQ==", | |
| 20850 | + "requires": { | |
| 20851 | + "ieee754": "^1.1.12", | |
| 20852 | + "resolve-protobuf-schema": "^2.1.0" | |
| 20853 | + } | |
| 20854 | + }, | |
| 20671 | 20855 | "pbkdf2": { |
| 20672 | 20856 | "version": "3.1.1", |
| 20673 | 20857 | "resolved": "https://registry.npm.taobao.org/pbkdf2/download/pbkdf2-3.1.1.tgz", |
| ... | ... | @@ -23119,6 +23303,11 @@ |
| 23119 | 23303 | "integrity": "sha1-mEcocL8igTL8vdhoEputEsPAKeM=", |
| 23120 | 23304 | "dev": true |
| 23121 | 23305 | }, |
| 23306 | + "protocol-buffers-schema": { | |
| 23307 | + "version": "3.6.0", | |
| 23308 | + "resolved": "https://registry.npmmirror.com/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz", | |
| 23309 | + "integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==" | |
| 23310 | + }, | |
| 23122 | 23311 | "proxy-addr": { |
| 23123 | 23312 | "version": "2.0.6", |
| 23124 | 23313 | "resolved": "https://registry.npm.taobao.org/proxy-addr/download/proxy-addr-2.0.6.tgz", |
| ... | ... | @@ -23230,6 +23419,16 @@ |
| 23230 | 23419 | "integrity": "sha1-M0WUG0FTy50ILY7uTNogFqmu9/Y=", |
| 23231 | 23420 | "dev": true |
| 23232 | 23421 | }, |
| 23422 | + "quick-lru": { | |
| 23423 | + "version": "6.1.1", | |
| 23424 | + "resolved": "https://registry.npmmirror.com/quick-lru/-/quick-lru-6.1.1.tgz", | |
| 23425 | + "integrity": "sha512-S27GBT+F0NTRiehtbrgaSE1idUAJ5bX8dPAQTdylEyNlrdcH5X4Lz7Edz3DYzecbsCluD5zO8ZNEe04z3D3u6Q==" | |
| 23426 | + }, | |
| 23427 | + "quickselect": { | |
| 23428 | + "version": "2.0.0", | |
| 23429 | + "resolved": "https://registry.npmmirror.com/quickselect/-/quickselect-2.0.0.tgz", | |
| 23430 | + "integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==" | |
| 23431 | + }, | |
| 23233 | 23432 | "randombytes": { |
| 23234 | 23433 | "version": "2.1.0", |
| 23235 | 23434 | "resolved": "https://registry.npm.taobao.org/randombytes/download/randombytes-2.1.0.tgz", |
| ... | ... | @@ -23267,6 +23466,14 @@ |
| 23267 | 23466 | "unpipe": "1.0.0" |
| 23268 | 23467 | } |
| 23269 | 23468 | }, |
| 23469 | + "rbush": { | |
| 23470 | + "version": "3.0.1", | |
| 23471 | + "resolved": "https://registry.npmmirror.com/rbush/-/rbush-3.0.1.tgz", | |
| 23472 | + "integrity": "sha512-XRaVO0YecOpEuIvbhbpTrZgoiI6xBlz6hnlr6EHhd+0x9ase6EmeN+hdwwUaJvLcsFFQ8iWVF1GAK1yB0BWi0w==", | |
| 23473 | + "requires": { | |
| 23474 | + "quickselect": "^2.0.0" | |
| 23475 | + } | |
| 23476 | + }, | |
| 23270 | 23477 | "read-cache": { |
| 23271 | 23478 | "version": "1.0.0", |
| 23272 | 23479 | "resolved": "https://registry.npm.taobao.org/read-cache/download/read-cache-1.0.0.tgz", |
| ... | ... | @@ -23648,6 +23855,14 @@ |
| 23648 | 23855 | "integrity": "sha1-six699nWiBvItuZTM17rywoYh0g=", |
| 23649 | 23856 | "dev": true |
| 23650 | 23857 | }, |
| 23858 | + "resolve-protobuf-schema": { | |
| 23859 | + "version": "2.1.0", | |
| 23860 | + "resolved": "https://registry.npmmirror.com/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz", | |
| 23861 | + "integrity": "sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==", | |
| 23862 | + "requires": { | |
| 23863 | + "protocol-buffers-schema": "^3.3.1" | |
| 23864 | + } | |
| 23865 | + }, | |
| 23651 | 23866 | "resolve-url": { |
| 23652 | 23867 | "version": "0.2.1", |
| 23653 | 23868 | "resolved": "https://registry.npm.taobao.org/resolve-url/download/resolve-url-0.2.1.tgz", |
| ... | ... | @@ -23719,6 +23934,11 @@ |
| 23719 | 23934 | "aproba": "^1.1.1" |
| 23720 | 23935 | } |
| 23721 | 23936 | }, |
| 23937 | + "rw": { | |
| 23938 | + "version": "1.3.3", | |
| 23939 | + "resolved": "https://registry.npmmirror.com/rw/-/rw-1.3.3.tgz", | |
| 23940 | + "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==" | |
| 23941 | + }, | |
| 23722 | 23942 | "safe-buffer": { |
| 23723 | 23943 | "version": "5.1.2", |
| 23724 | 23944 | "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz", |
| ... | ... | @@ -24097,6 +24317,14 @@ |
| 24097 | 24317 | "requires": { |
| 24098 | 24318 | "faye-websocket": "^0.10.0", |
| 24099 | 24319 | "uuid": "^3.0.1" |
| 24320 | + }, | |
| 24321 | + "dependencies": { | |
| 24322 | + "uuid": { | |
| 24323 | + "version": "3.4.0", | |
| 24324 | + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-3.4.0.tgz", | |
| 24325 | + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", | |
| 24326 | + "dev": true | |
| 24327 | + } | |
| 24100 | 24328 | } |
| 24101 | 24329 | }, |
| 24102 | 24330 | "sockjs-client": { |
| ... | ... | @@ -24124,6 +24352,16 @@ |
| 24124 | 24352 | } |
| 24125 | 24353 | } |
| 24126 | 24354 | }, |
| 24355 | + "sort-asc": { | |
| 24356 | + "version": "0.1.0", | |
| 24357 | + "resolved": "https://registry.npmmirror.com/sort-asc/-/sort-asc-0.1.0.tgz", | |
| 24358 | + "integrity": "sha512-jBgdDd+rQ+HkZF2/OHCmace5dvpos/aWQpcxuyRs9QUbPRnkEJmYVo81PIGpjIdpOcsnJ4rGjStfDHsbn+UVyw==" | |
| 24359 | + }, | |
| 24360 | + "sort-desc": { | |
| 24361 | + "version": "0.1.1", | |
| 24362 | + "resolved": "https://registry.npmmirror.com/sort-desc/-/sort-desc-0.1.1.tgz", | |
| 24363 | + "integrity": "sha512-jfZacW5SKOP97BF5rX5kQfJmRVZP5/adDUTY8fCSPvNcXDVpUEe2pr/iKGlcyZzchRJZrswnp68fgk3qBXgkJw==" | |
| 24364 | + }, | |
| 24127 | 24365 | "sort-keys": { |
| 24128 | 24366 | "version": "1.1.2", |
| 24129 | 24367 | "resolved": "https://registry.npm.taobao.org/sort-keys/download/sort-keys-1.1.2.tgz", |
| ... | ... | @@ -24133,6 +24371,15 @@ |
| 24133 | 24371 | "is-plain-obj": "^1.0.0" |
| 24134 | 24372 | } |
| 24135 | 24373 | }, |
| 24374 | + "sort-object": { | |
| 24375 | + "version": "0.3.2", | |
| 24376 | + "resolved": "https://registry.npmmirror.com/sort-object/-/sort-object-0.3.2.tgz", | |
| 24377 | + "integrity": "sha512-aAQiEdqFTTdsvUFxXm3umdo04J7MRljoVGbBlkH7BgNsMvVNAJyGj7C/wV1A8wHWAJj/YikeZbfuCKqhggNWGA==", | |
| 24378 | + "requires": { | |
| 24379 | + "sort-asc": "^0.1.0", | |
| 24380 | + "sort-desc": "^0.1.1" | |
| 24381 | + } | |
| 24382 | + }, | |
| 24136 | 24383 | "source-list-map": { |
| 24137 | 24384 | "version": "2.0.1", |
| 24138 | 24385 | "resolved": "https://registry.npm.taobao.org/source-list-map/download/source-list-map-2.0.1.tgz", |
| ... | ... | @@ -24296,7 +24543,8 @@ |
| 24296 | 24543 | "sprintf-js": { |
| 24297 | 24544 | "version": "1.0.3", |
| 24298 | 24545 | "resolved": "https://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz", |
| 24299 | - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" | |
| 24546 | + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", | |
| 24547 | + "dev": true | |
| 24300 | 24548 | }, |
| 24301 | 24549 | "ssri": { |
| 24302 | 24550 | "version": "5.3.0", |
| ... | ... | @@ -24703,11 +24951,6 @@ |
| 24703 | 24951 | "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", |
| 24704 | 24952 | "dev": true |
| 24705 | 24953 | }, |
| 24706 | - "uc.micro": { | |
| 24707 | - "version": "1.0.6", | |
| 24708 | - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", | |
| 24709 | - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==" | |
| 24710 | - }, | |
| 24711 | 24954 | "uglify-js": { |
| 24712 | 24955 | "version": "3.4.10", |
| 24713 | 24956 | "resolved": "https://registry.npm.taobao.org/uglify-js/download/uglify-js-3.4.10.tgz?cache=0&sync_timestamp=1601823880483&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuglify-js%2Fdownload%2Fuglify-js-3.4.10.tgz", |
| ... | ... | @@ -25034,10 +25277,9 @@ |
| 25034 | 25277 | "dev": true |
| 25035 | 25278 | }, |
| 25036 | 25279 | "uuid": { |
| 25037 | - "version": "3.4.0", | |
| 25038 | - "resolved": "https://registry.npm.taobao.org/uuid/download/uuid-3.4.0.tgz?cache=0&sync_timestamp=1601826530476&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fuuid%2Fdownload%2Fuuid-3.4.0.tgz", | |
| 25039 | - "integrity": "sha1-sj5DWK+oogL+ehAK8fX4g/AgB+4=", | |
| 25040 | - "dev": true | |
| 25280 | + "version": "8.3.2", | |
| 25281 | + "resolved": "https://registry.npmmirror.com/uuid/-/uuid-8.3.2.tgz", | |
| 25282 | + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==" | |
| 25041 | 25283 | }, |
| 25042 | 25284 | "validate-npm-package-license": { |
| 25043 | 25285 | "version": "3.0.4", |
| ... | ... | @@ -25072,18 +25314,6 @@ |
| 25072 | 25314 | "resolved": "https://registry.npm.taobao.org/vue/download/vue-2.6.12.tgz?cache=0&sync_timestamp=1600441238751&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fvue%2Fdownload%2Fvue-2.6.12.tgz", |
| 25073 | 25315 | "integrity": "sha1-9evU+mvShpQD4pqJau1JBEVskSM=" |
| 25074 | 25316 | }, |
| 25075 | - "vue-baidu-map": { | |
| 25076 | - "version": "0.21.22", | |
| 25077 | - "resolved": "https://registry.npmjs.org/vue-baidu-map/-/vue-baidu-map-0.21.22.tgz", | |
| 25078 | - "integrity": "sha512-WQMPCih4UTh0AZCKKH/OVOYnyAWjfRNeK6BIeoLmscyY5aF8zzlJhz/NOHLb3mdztIpB0Z6aohn4Jd9mfCSjQw==", | |
| 25079 | - "requires": { | |
| 25080 | - "bmaplib.curveline": "^1.0.0", | |
| 25081 | - "bmaplib.heatmap": "^1.0.4", | |
| 25082 | - "bmaplib.lushu": "^1.0.7", | |
| 25083 | - "bmaplib.markerclusterer": "^1.0.13", | |
| 25084 | - "markdown-it": "^8.4.0" | |
| 25085 | - } | |
| 25086 | - }, | |
| 25087 | 25317 | "vue-clipboard2": { |
| 25088 | 25318 | "version": "0.3.1", |
| 25089 | 25319 | "resolved": "https://registry.npm.taobao.org/vue-clipboard2/download/vue-clipboard2-0.3.1.tgz", |
| ... | ... | @@ -25421,6 +25651,16 @@ |
| 25421 | 25651 | "minimalistic-assert": "^1.0.0" |
| 25422 | 25652 | } |
| 25423 | 25653 | }, |
| 25654 | + "web-worker": { | |
| 25655 | + "version": "1.2.0", | |
| 25656 | + "resolved": "https://registry.npmmirror.com/web-worker/-/web-worker-1.2.0.tgz", | |
| 25657 | + "integrity": "sha512-PgF341avzqyx60neE9DD+XS26MMNMoUQRz9NOZwW32nPQrF6p77f1htcnjBSEV8BGMKZ16choqUG4hyI0Hx7mA==" | |
| 25658 | + }, | |
| 25659 | + "webfont-matcher": { | |
| 25660 | + "version": "1.1.0", | |
| 25661 | + "resolved": "https://registry.npmmirror.com/webfont-matcher/-/webfont-matcher-1.1.0.tgz", | |
| 25662 | + "integrity": "sha512-ov8lMvF9wi4PD7fK2Axn9PQEpO9cYI0fIoGqErwd+wi8xacFFDmX114D5Q2Lw0Wlgmb+Qw/dKI2KTtimrJf85g==" | |
| 25663 | + }, | |
| 25424 | 25664 | "webpack": { |
| 25425 | 25665 | "version": "3.12.0", |
| 25426 | 25666 | "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.12.0.tgz", |
| ... | ... | @@ -26091,6 +26331,11 @@ |
| 26091 | 26331 | "safe-buffer": "~5.1.0" |
| 26092 | 26332 | } |
| 26093 | 26333 | }, |
| 26334 | + "xml-utils": { | |
| 26335 | + "version": "1.0.2", | |
| 26336 | + "resolved": "https://registry.npmmirror.com/xml-utils/-/xml-utils-1.0.2.tgz", | |
| 26337 | + "integrity": "sha512-rEn0FvKi+YGjv9omf22oAf+0d6Ly/sgJ/CUufU/nOzS7SRLmgwSujrewc03KojXxt+aPaTRpm593TgehtUBMSQ==" | |
| 26338 | + }, | |
| 26094 | 26339 | "xtend": { |
| 26095 | 26340 | "version": "4.0.2", |
| 26096 | 26341 | "resolved": "https://registry.npm.taobao.org/xtend/download/xtend-4.0.2.tgz?cache=0&sync_timestamp=1596697437792&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fxtend%2Fdownload%2Fxtend-4.0.2.tgz", | ... | ... |
web_src/package.json
| ... | ... | @@ -16,9 +16,10 @@ |
| 16 | 16 | "element-ui": "^2.15.6", |
| 17 | 17 | "fingerprintjs2": "^2.1.2", |
| 18 | 18 | "moment": "^2.29.1", |
| 19 | + "ol": "^6.14.1", | |
| 19 | 20 | "postcss-pxtorem": "^5.1.1", |
| 21 | + "uuid": "^8.3.2", | |
| 20 | 22 | "vue": "^2.6.11", |
| 21 | - "vue-baidu-map": "^0.21.22", | |
| 22 | 23 | "vue-clipboard2": "^0.3.1", |
| 23 | 24 | "vue-clipboards": "^1.3.0", |
| 24 | 25 | "vue-contextmenujs": "^1.3.13", | ... | ... |
web_src/src/App.vue
| ... | ... | @@ -81,4 +81,24 @@ body, |
| 81 | 81 | text-align: center; |
| 82 | 82 | padding-top: 0px !important; |
| 83 | 83 | } |
| 84 | + | |
| 85 | +/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/ | |
| 86 | +::-webkit-scrollbar { | |
| 87 | + width: 8px; | |
| 88 | + height: 8px; | |
| 89 | +} | |
| 90 | + | |
| 91 | +/*定义滚动条轨道 内阴影+圆角*/ | |
| 92 | +::-webkit-scrollbar-track { | |
| 93 | + border-radius: 4px; | |
| 94 | + background-color: #F5F5F5; | |
| 95 | +} | |
| 96 | + | |
| 97 | +/*定义滑块 内阴影+圆角*/ | |
| 98 | +::-webkit-scrollbar-thumb { | |
| 99 | + border-radius: 4px; | |
| 100 | + background-color: #c8c8c8; | |
| 101 | + box-shadow: inset 0 0 6px rgba(0, 0, 0, .1); | |
| 102 | + -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1); | |
| 103 | +} | |
| 84 | 104 | </style> | ... | ... |
web_src/src/api/deviceApi.js deleted
100644 → 0
| 1 | -import axios from 'axios'; | |
| 2 | - | |
| 3 | -export const tree = (deviceId) => { | |
| 4 | - return axios({ | |
| 5 | - url: `/api/device/query/${deviceId}/tree`, | |
| 6 | - method: 'get' | |
| 7 | - }) | |
| 8 | -} | |
| 9 | - | |
| 10 | -export const deviceList = (page, count) => { | |
| 11 | - return axios({ | |
| 12 | - method: 'get', | |
| 13 | - url:`/api/device/query/devices`, | |
| 14 | - params: { | |
| 15 | - page, | |
| 16 | - count | |
| 17 | - } | |
| 18 | - }) | |
| 19 | -} | |
| 20 | 0 | \ No newline at end of file |
web_src/src/components/DeviceList.vue
| ... | ... | @@ -194,7 +194,7 @@ export default { |
| 194 | 194 | this.$router.push(`/channelList/${row.deviceId}/0/15/1`); |
| 195 | 195 | }, |
| 196 | 196 | showDevicePosition: function (row) { |
| 197 | - this.$router.push(`/devicePosition/${row.deviceId}/0/15/1`); | |
| 197 | + this.$router.push(`/map?deviceId=${row.deviceId}`); | |
| 198 | 198 | }, |
| 199 | 199 | |
| 200 | 200 | //gb28181平台对接 | ... | ... |
web_src/src/components/channelTree.vue deleted
100644 → 0
| 1 | -<template> | |
| 2 | - <div> | |
| 3 | - <el-tree :data="channelList" :props="props" @node-click="sendDevicePush"> | |
| 4 | - <span slot-scope="{ node }"> | |
| 5 | - <span v-if="node.isLeaf"> | |
| 6 | - <i class="el-icon-video-camera" :style="{color:node.disabled==1?'#67C23A':'#F56C6C'}"></i> | |
| 7 | - </span> | |
| 8 | - <span v-else> | |
| 9 | - <i class="el-icon-folder"></i> | |
| 10 | - </span> | |
| 11 | - <span> | |
| 12 | - {{ node.label }} | |
| 13 | - </span> | |
| 14 | - </span> | |
| 15 | - </el-tree> | |
| 16 | - </div> | |
| 17 | -</template> | |
| 18 | -<script> | |
| 19 | -import ChannelTreeItem from "@/components/channelTreeItem" | |
| 20 | -import {tree} from '@/api/deviceApi' | |
| 21 | - | |
| 22 | -export default { | |
| 23 | - components: { | |
| 24 | - ChannelTreeItem, | |
| 25 | - }, | |
| 26 | - props:{ | |
| 27 | - device: { | |
| 28 | - type: Object, | |
| 29 | - required: true | |
| 30 | - } | |
| 31 | - }, | |
| 32 | - data() { | |
| 33 | - return { | |
| 34 | - loading: false, | |
| 35 | - channelList: [], | |
| 36 | - props: { | |
| 37 | - label: 'title', | |
| 38 | - children: 'children', | |
| 39 | - isLeaf: 'hasChildren', | |
| 40 | - disabled: 'status' | |
| 41 | - }, | |
| 42 | - } | |
| 43 | - }, | |
| 44 | - computed: { | |
| 45 | - | |
| 46 | - }, | |
| 47 | - mounted() { | |
| 48 | - this.leafs = [] | |
| 49 | - this.getTree() | |
| 50 | - }, | |
| 51 | - methods: { | |
| 52 | - getTree() { | |
| 53 | - this.loading = true | |
| 54 | - var that = this | |
| 55 | - tree(this.device.deviceId).then(function (res) { | |
| 56 | - console.log(res.data.data); | |
| 57 | - that.channelList = res.data.data; | |
| 58 | - that.loading = false; | |
| 59 | - }).catch(function (error) { | |
| 60 | - console.log(error); | |
| 61 | - that.loading = false; | |
| 62 | - }); | |
| 63 | - }, | |
| 64 | - sendDevicePush(c) { | |
| 65 | - if(c.hasChildren) return | |
| 66 | - this.$emit('sendDevicePush',c) | |
| 67 | - } | |
| 68 | - } | |
| 69 | -} | |
| 70 | -</script> | |
| 71 | 0 | \ No newline at end of file |
web_src/src/components/channelTreeItem.vue deleted
100644 → 0
| 1 | -<template> | |
| 2 | - <div> | |
| 3 | - <!-- <div :index="item.key" v-for="(item,i) in list" :key="i+'-'"> | |
| 4 | - <el-submenu v-if="item.hasChildren"> | |
| 5 | - <template slot="title"> | |
| 6 | - <i class="el-icon-video-camera"></i> | |
| 7 | - <span slot="title">{{item.title || item.deviceId}}</span> | |
| 8 | - </template> | |
| 9 | - <channel-list :list="item.children" @sendDevicePush="sendDevicePush"></channel-list> | |
| 10 | - </el-submenu> | |
| 11 | - <el-menu-item v-else :index="item.key" @click="sendDevicePush(item)"> | |
| 12 | - <template slot="title" > | |
| 13 | - <i class="el-icon-switch-button" :style="{color:item.status==1?'#67C23A':'#F56C6C'}"></i> | |
| 14 | - <span slot="title">{{item.title}}</span> | |
| 15 | - </template> | |
| 16 | - </el-menu-item> | |
| 17 | - </div> --> | |
| 18 | - <div > | |
| 19 | - <template v-if="!item.hasChildren"> | |
| 20 | - <el-menu-item :index="item.key" @click="sendDevicePush(item)"> | |
| 21 | - <i class="el-icon-video-camera" :style="{color:item.status==1?'#67C23A':'#F56C6C'}"></i> | |
| 22 | - {{item.title}} | |
| 23 | - </el-menu-item> | |
| 24 | - </template> | |
| 25 | - | |
| 26 | - <el-submenu v-else :index="item.key"> | |
| 27 | - <template slot="title" > | |
| 28 | - <i class="el-icon-location-outline"></i> | |
| 29 | - {{item.title}} | |
| 30 | - </template> | |
| 31 | - | |
| 32 | - <template v-for="child in item.children"> | |
| 33 | - <channel-item | |
| 34 | - v-if="child.hasChildren" | |
| 35 | - :item="child" | |
| 36 | - :key="child.key" | |
| 37 | - @sendDevicePush="sendDevicePush"/> | |
| 38 | - <el-menu-item v-else :key="child.key" :index="child.key" @click="sendDevicePush(child)"> | |
| 39 | - <i class="el-icon-video-camera" :style="{color:child.status==1?'#67C23A':'#F56C6C'}"></i> | |
| 40 | - {{child.title}} | |
| 41 | - </el-menu-item> | |
| 42 | - </template> | |
| 43 | - </el-submenu> | |
| 44 | - </div> | |
| 45 | - </div> | |
| 46 | -</template> | |
| 47 | -<script> | |
| 48 | -export default { | |
| 49 | - name:'ChannelItem', | |
| 50 | - props:{ | |
| 51 | - list:Array, | |
| 52 | - channelId: String, | |
| 53 | - item: { | |
| 54 | - type: Object, | |
| 55 | - required: true | |
| 56 | - } | |
| 57 | - }, | |
| 58 | - data () { | |
| 59 | - return { | |
| 60 | - | |
| 61 | - } | |
| 62 | - }, | |
| 63 | - watch: { | |
| 64 | - channelId(val) { | |
| 65 | - console.log(val); | |
| 66 | - } | |
| 67 | - }, | |
| 68 | - methods: { | |
| 69 | - sendDevicePush(c) { | |
| 70 | - this.$emit('sendDevicePush',c) | |
| 71 | - } | |
| 72 | - } | |
| 73 | -} | |
| 74 | -</script> |
web_src/src/components/common/DeviceTree.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div id="DeviceTree" style="width: 100%;height: 100%; background-color: #FFFFFF; overflow: auto"> | |
| 3 | + <el-container> | |
| 4 | + <el-header>设备列表</el-header> | |
| 5 | + <el-main style="background-color: #ffffff;"> | |
| 6 | + <div class="device-tree-main-box"> | |
| 7 | + <el-tree :props="defaultProps" :load="loadNode" lazy @node-click="handleNodeClick"@node-contextmenu="handleContextMenu" style="min-width: 100%; display:inline-block !important;"> | |
| 8 | + <span class="custom-tree-node" slot-scope="{ node, data }" style="width: 100%"> | |
| 9 | + <span v-if="node.data.type === 0 && node.data.online" title="在线设备" class="device-online iconfont icon-jiedianleizhukongzhongxin2"></span> | |
| 10 | + <span v-if="node.data.type === 0 && !node.data.online " title="离线设备" class="device-offline iconfont icon-jiedianleizhukongzhongxin2"></span> | |
| 11 | + <span v-if="node.data.type === 2 && node.data.online" title="目录" class="device-online iconfont icon-jiedianleilianjipingtai"></span> | |
| 12 | + <span v-if="node.data.type === 2 && !node.data.online" title="目录" class="device-offline iconfont icon-jiedianleilianjipingtai"></span> | |
| 13 | + <span v-if="node.data.type === 3 && node.data.online " title="在线通道" class="device-online iconfont icon-shebeileijiankongdian"></span> | |
| 14 | + <span v-if="node.data.type === 3 && !node.data.online" title="在线通道" class="device-offline iconfont icon-shebeileijiankongdian"></span> | |
| 15 | + <span v-if="node.data.type === 4 && node.data.online " title="在线通道-球机" class="device-online iconfont icon-shebeileiqiuji"></span> | |
| 16 | + <span v-if="node.data.type === 4 && !node.data.online" title="在线通道-球机" class="device-offline iconfont icon-shebeileiqiuji"></span> | |
| 17 | + <span v-if="node.data.type === 5 && node.data.online " title="在线通道-半球" class="device-online iconfont icon-shebeileibanqiu"></span> | |
| 18 | + <span v-if="node.data.type === 5 && !node.data.online" title="在线通道-半球" class="device-offline iconfont icon-shebeileibanqiu"></span> | |
| 19 | + <span v-if="node.data.type === 6 && node.data.online " title="在线通道-枪机" class="device-online iconfont icon-shebeileiqiangjitongdao"></span> | |
| 20 | + <span v-if="node.data.type === 6 && !node.data.online" title="在线通道-枪机" class="device-offline iconfont icon-shebeileiqiangjitongdao"></span> | |
| 21 | + <span v-if="node.data.online" style="padding-left: 1px" class="device-online">{{ node.label }}</span> | |
| 22 | + <span v-if="!node.data.online" style="padding-left: 1px" class="device-offline">{{ node.label }}</span> | |
| 23 | + <span> | |
| 24 | + <i v-if="node.data.hasGPS && node.data.online" style="color: #9d9d9d" class="device-online iconfont icon-dizhi"></i> | |
| 25 | + <i v-if="node.data.hasGPS && !node.data.online" style="color: #9d9d9d" class="device-offline iconfont icon-dizhi"></i> | |
| 26 | + </span> | |
| 27 | + </span> | |
| 28 | + </el-tree> | |
| 29 | + </div> | |
| 30 | + </el-main> | |
| 31 | + </el-container> | |
| 32 | + </div> | |
| 33 | +</template> | |
| 34 | + | |
| 35 | +<script> | |
| 36 | +import DeviceService from "../service/DeviceService.js"; | |
| 37 | + | |
| 38 | +export default { | |
| 39 | + name: 'DeviceTree', | |
| 40 | + data() { | |
| 41 | + return { | |
| 42 | + deviceService: new DeviceService(), | |
| 43 | + defaultProps: { | |
| 44 | + children: 'children', | |
| 45 | + label: 'name', | |
| 46 | + isLeaf: 'isLeaf' | |
| 47 | + } | |
| 48 | + }; | |
| 49 | + }, | |
| 50 | + props: ['clickEvent', 'contextMenuEvent'], | |
| 51 | + methods: { | |
| 52 | + handleNodeClick(data,node,element) { | |
| 53 | + console.log("点击事件") | |
| 54 | + console.log(data) | |
| 55 | + if(typeof (this.clickEvent) == "function") { | |
| 56 | + this.clickEvent(data.userData) | |
| 57 | + } | |
| 58 | + }, | |
| 59 | + handleContextMenu(event,data,node,element) { | |
| 60 | + console.log("右键点击事件") | |
| 61 | + if(typeof (this.contextMenuEvent) == "function") { | |
| 62 | + this.contextMenuEvent(event, data.userData) | |
| 63 | + } | |
| 64 | + }, | |
| 65 | + loadNode: function(node, resolve){ | |
| 66 | + if (node.level === 0) { | |
| 67 | + this.deviceService.getAllDeviceList((data)=>{ | |
| 68 | + console.log(data) | |
| 69 | + if (data.length > 0) { | |
| 70 | + let nodeList = [] | |
| 71 | + for (let i = 0; i < data.length; i++) { | |
| 72 | + console.log(data[i].name) | |
| 73 | + let node = { | |
| 74 | + name: data[i].name || data[i].deviceId, | |
| 75 | + isLeaf: false, | |
| 76 | + id: data[i].deviceId, | |
| 77 | + type: data[i].online, | |
| 78 | + online: data[i].online === 1, | |
| 79 | + userData: data[i] | |
| 80 | + } | |
| 81 | + nodeList.push(node); | |
| 82 | + } | |
| 83 | + resolve(nodeList) | |
| 84 | + }else { | |
| 85 | + resolve([]) | |
| 86 | + } | |
| 87 | + }, (error)=>{ | |
| 88 | + | |
| 89 | + }) | |
| 90 | + } | |
| 91 | + if (node.level === 1) { | |
| 92 | + this.deviceService.getAllChannel(true, node.data.id, (catalogData) => { | |
| 93 | + this.deviceService.getAllChannel(false, node.data.id, (channelData) => { | |
| 94 | + let data = catalogData.concat(channelData) | |
| 95 | + this.channelDataHandler(data, resolve) | |
| 96 | + }) | |
| 97 | + }) | |
| 98 | + }else if (node.level > 1){ | |
| 99 | + this.deviceService.getAllSubChannel(true, node.data.deviceId, node.data.id, (catalogData)=>{ | |
| 100 | + this.deviceService.getAllSubChannel(false, node.data.deviceId, node.data.id, (channelData)=>{ | |
| 101 | + let data = catalogData.concat(channelData) | |
| 102 | + this.channelDataHandler(data, resolve) | |
| 103 | + }) | |
| 104 | + }) | |
| 105 | + } | |
| 106 | + }, | |
| 107 | + channelDataHandler: function (data, resolve) { | |
| 108 | + if (data.length > 0) { | |
| 109 | + let nodeList = [] | |
| 110 | + for (let i = 0; i < data.length; i++) { | |
| 111 | + let type = 3; | |
| 112 | + if (data[i].subCount > 0) { | |
| 113 | + type = 2; | |
| 114 | + }else if (data[i].ptztype === 1 ) { // 1-球机;2-半球;3-固定枪机;4-遥控枪机 | |
| 115 | + type = 4; | |
| 116 | + }else if (data[i].ptztype === 2) { | |
| 117 | + type = 5; | |
| 118 | + }else if (data[i].ptztype === 3 || data[i].ptztype === 4) { | |
| 119 | + type = 6; | |
| 120 | + } | |
| 121 | + let node = { | |
| 122 | + name: data[i].name || data[i].channelId, | |
| 123 | + isLeaf: data[i].subCount === 0, | |
| 124 | + id: data[i].channelId, | |
| 125 | + deviceId: data[i].deviceId, | |
| 126 | + type: type, | |
| 127 | + online: data[i].status === 1, | |
| 128 | + hasGPS: data[i].longitude*data[i].latitude !== 0, | |
| 129 | + userData: data[i] | |
| 130 | + } | |
| 131 | + nodeList.push(node); | |
| 132 | + } | |
| 133 | + resolve(nodeList) | |
| 134 | + }else { | |
| 135 | + resolve([]) | |
| 136 | + } | |
| 137 | + } | |
| 138 | + }, | |
| 139 | + destroyed() { | |
| 140 | + // if (this.jessibuca) { | |
| 141 | + // this.jessibuca.destroy(); | |
| 142 | + // } | |
| 143 | + // this.playing = false; | |
| 144 | + // this.loaded = false; | |
| 145 | + // this.performance = ""; | |
| 146 | + }, | |
| 147 | +} | |
| 148 | +</script> | |
| 149 | + | |
| 150 | +<style> | |
| 151 | +.device-tree-main-box{ | |
| 152 | + text-align: left; | |
| 153 | +} | |
| 154 | +.device-online{ | |
| 155 | + color: #252525; | |
| 156 | +} | |
| 157 | +.device-offline{ | |
| 158 | + color: #727272; | |
| 159 | +} | |
| 160 | +</style> | ... | ... |
web_src/src/components/common/MapComponent.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div id="mapContainer" ref="mapContainer" style="width: 100%;height: 100%;"></div> | |
| 3 | +</template> | |
| 4 | + | |
| 5 | +<script> | |
| 6 | +import 'ol/ol.css'; | |
| 7 | +import Map from 'ol/Map'; | |
| 8 | +import OSM from 'ol/source/OSM'; | |
| 9 | +import XYZ from 'ol/source/XYZ'; | |
| 10 | +import VectorSource from 'ol/source/Vector'; | |
| 11 | +import Tile from 'ol/layer/Tile'; | |
| 12 | +import VectorLayer from 'ol/layer/Vector'; | |
| 13 | +import Style from 'ol/style/Style'; | |
| 14 | +import Icon from 'ol/style/Icon'; | |
| 15 | +import View from 'ol/View'; | |
| 16 | +import Feature from 'ol/Feature'; | |
| 17 | +import Overlay from 'ol/Overlay'; | |
| 18 | +import {Point, LineString} from 'ol/geom'; | |
| 19 | +import {get as getProj, fromLonLat} from 'ol/proj'; | |
| 20 | +import {ZoomSlider, Zoom} from 'ol/control'; | |
| 21 | +import {containsCoordinate} from 'ol/extent'; | |
| 22 | + | |
| 23 | +import {v4} from 'uuid' | |
| 24 | + | |
| 25 | +let olMap = null; | |
| 26 | + | |
| 27 | +export default { | |
| 28 | + name: 'MapComponent', | |
| 29 | + data() { | |
| 30 | + return { | |
| 31 | + | |
| 32 | + | |
| 33 | + }; | |
| 34 | + }, | |
| 35 | + created(){ | |
| 36 | + this.$nextTick(() => { | |
| 37 | + setTimeout(()=>{ | |
| 38 | + this.init() | |
| 39 | + }, 100) | |
| 40 | + }) | |
| 41 | + | |
| 42 | + }, | |
| 43 | + props: [], | |
| 44 | + mounted () { | |
| 45 | + | |
| 46 | + }, | |
| 47 | + methods: { | |
| 48 | + init(){ | |
| 49 | + | |
| 50 | + let center = fromLonLat([116.41020, 39.915119]); | |
| 51 | + if (mapParam.center) { | |
| 52 | + center = fromLonLat(mapParam.center); | |
| 53 | + } | |
| 54 | + const view = new View({ | |
| 55 | + center: center, | |
| 56 | + zoom: mapParam.zoom || 10, | |
| 57 | + projection: this.projection, | |
| 58 | + maxZoom: mapParam.maxZoom || 19, | |
| 59 | + minZoom: mapParam.minZoom || 1, | |
| 60 | + }); | |
| 61 | + let tileLayer = null; | |
| 62 | + if (mapParam.tilesUrl) { | |
| 63 | + tileLayer = new Tile({ | |
| 64 | + source: new XYZ({ | |
| 65 | + projection: getProj("EPSG:3857"), | |
| 66 | + wrapX: false, | |
| 67 | + tileSize: 256 || mapParam.tileSize, | |
| 68 | + url: mapParam.tilesUrl | |
| 69 | + }) | |
| 70 | + }) | |
| 71 | + }else { | |
| 72 | + tileLayer = new Tile({ | |
| 73 | + preload: 4, | |
| 74 | + source: new OSM(), | |
| 75 | + }) | |
| 76 | + } | |
| 77 | + olMap = new Map({ | |
| 78 | + target: this.$refs.mapContainer, // 容器ID | |
| 79 | + layers: [tileLayer], // 默认图层 | |
| 80 | + view: view, // 视图 | |
| 81 | + controls:[ // 控件 | |
| 82 | + // new ZoomSlider(), | |
| 83 | + new Zoom(), | |
| 84 | + ] , | |
| 85 | + }) | |
| 86 | + console.log(3222) | |
| 87 | + }, | |
| 88 | + setCenter(point){ | |
| 89 | + | |
| 90 | + }, | |
| 91 | + zoomIn(zoom){ | |
| 92 | + | |
| 93 | + }, | |
| 94 | + zoomOut(zoom){ | |
| 95 | + | |
| 96 | + }, | |
| 97 | + centerAndZoom(point,zoom,callback){ | |
| 98 | + var zoom_ = olMap.getView().getZoom(); | |
| 99 | + zoom = zoom|| zoom_; | |
| 100 | + var duration = 600; | |
| 101 | + olMap.getView().setCenter(fromLonLat(point)) | |
| 102 | + olMap.getView().animate({ | |
| 103 | + zoom: zoom , | |
| 104 | + duration: duration | |
| 105 | + }); | |
| 106 | + }, | |
| 107 | + panTo(point, zoom){ | |
| 108 | + let duration = 800; | |
| 109 | + | |
| 110 | + olMap.getView().cancelAnimations() | |
| 111 | + olMap.getView().animate({ | |
| 112 | + center: fromLonLat(point), | |
| 113 | + duration: duration | |
| 114 | + }); | |
| 115 | + if (!containsCoordinate(olMap.getView().calculateExtent(), fromLonLat(point))) { | |
| 116 | + olMap.getView().animate({ | |
| 117 | + zoom: olMap.getView().getZoom() - 1, | |
| 118 | + duration: duration / 2 | |
| 119 | + }, { | |
| 120 | + zoom: zoom || olMap.getView().getZoom(), | |
| 121 | + duration: duration / 2 | |
| 122 | + }); | |
| 123 | + } | |
| 124 | + | |
| 125 | + }, | |
| 126 | + fit(layer){ | |
| 127 | + let extent = layer.getSource().getExtent(); | |
| 128 | + if (extent) { | |
| 129 | + olMap.getView().fit(extent,{ | |
| 130 | + duration : 600, | |
| 131 | + padding: [100, 100, 100, 100] | |
| 132 | + }); | |
| 133 | + } | |
| 134 | + | |
| 135 | + | |
| 136 | + }, | |
| 137 | + openInfoBox(position, content, offset){ | |
| 138 | + let id = v4() | |
| 139 | + // let infoBox = document.createElement("div"); | |
| 140 | + // infoBox.innerHTML = content ; | |
| 141 | + // infoBox.setAttribute("infoBoxId", id) | |
| 142 | + let overlay = new Overlay({ | |
| 143 | + id:id, | |
| 144 | + autoPan:true, | |
| 145 | + autoPanAnimation:{ | |
| 146 | + duration: 250 | |
| 147 | + }, | |
| 148 | + element: content, | |
| 149 | + positioning:"bottom-center", | |
| 150 | + offset:offset, | |
| 151 | + // className:overlayStyle.className | |
| 152 | + }); | |
| 153 | + olMap.addOverlay(overlay); | |
| 154 | + overlay.setPosition(fromLonLat(position)); | |
| 155 | + return id; | |
| 156 | + }, | |
| 157 | + closeInfoBox(id){ | |
| 158 | + olMap.getOverlayById(id).setPosition(undefined) | |
| 159 | + // olMap.removeOverlay(olMap.getOverlayById(id)) | |
| 160 | + }, | |
| 161 | + /** | |
| 162 | + * 添加图层 | |
| 163 | + * @param data | |
| 164 | + * [ | |
| 165 | + * { | |
| 166 | + * | |
| 167 | + * position: [119.1212,45,122], | |
| 168 | + * image: { | |
| 169 | + * src:"/images/123.png", | |
| 170 | + * anchor: [0.5, 0.5] | |
| 171 | + * | |
| 172 | + * } | |
| 173 | + * } | |
| 174 | + * | |
| 175 | + * ] | |
| 176 | + */ | |
| 177 | + addLayer(data, clickEvent){ | |
| 178 | + let style = new Style(); | |
| 179 | + if (data.length > 0) { | |
| 180 | + let features = []; | |
| 181 | + for (let i = 0; i < data.length; i++) { | |
| 182 | + let feature = new Feature(new Point(fromLonLat(data[i].position))); | |
| 183 | + feature.customData = data[i].data; | |
| 184 | + let cloneStyle = style.clone() | |
| 185 | + cloneStyle.setImage(new Icon({ | |
| 186 | + anchor: data[i].image.anchor, | |
| 187 | + crossOrigin: 'Anonymous', | |
| 188 | + src: data[i].image.src, | |
| 189 | + })) | |
| 190 | + feature.setStyle(cloneStyle) | |
| 191 | + features.push(feature); | |
| 192 | + } | |
| 193 | + let source = new VectorSource(); | |
| 194 | + source.addFeatures(features); | |
| 195 | + let vectorLayer = new VectorLayer({ | |
| 196 | + source:source, | |
| 197 | + style:style, | |
| 198 | + renderMode:"image", | |
| 199 | + declutter: false | |
| 200 | + }) | |
| 201 | + olMap.addLayer(vectorLayer) | |
| 202 | + if (typeof clickEvent == "function") { | |
| 203 | + olMap.on("click", (event)=>{ | |
| 204 | + vectorLayer.getFeatures(event.pixel).then((features)=>{ | |
| 205 | + if (features.length > 0) { | |
| 206 | + let items = [] | |
| 207 | + for (let i = 0; i < features.length; i++) { | |
| 208 | + items.push(features[i].customData) | |
| 209 | + } | |
| 210 | + clickEvent(items) | |
| 211 | + } | |
| 212 | + }) | |
| 213 | + | |
| 214 | + | |
| 215 | + }) | |
| 216 | + } | |
| 217 | + | |
| 218 | + return vectorLayer; | |
| 219 | + } | |
| 220 | + }, | |
| 221 | + removeLayer(layer){ | |
| 222 | + olMap.removeLayer(layer) | |
| 223 | + }, | |
| 224 | + | |
| 225 | + addLineLayer(positions) { | |
| 226 | + if (positions.length > 0) { | |
| 227 | + let points = []; | |
| 228 | + for (let i = 0; i < positions.length; i++) { | |
| 229 | + points.push(fromLonLat(positions[i])); | |
| 230 | + } | |
| 231 | + let line = new LineString(points) | |
| 232 | + let lineFeature = new Feature(line); | |
| 233 | + | |
| 234 | + let source = new VectorSource(); | |
| 235 | + source.addFeature(lineFeature); | |
| 236 | + let vectorLayer = new VectorLayer({ | |
| 237 | + source: source, | |
| 238 | + }) | |
| 239 | + olMap.addLayer(vectorLayer) | |
| 240 | + return vectorLayer; | |
| 241 | + } | |
| 242 | + } | |
| 243 | + }, | |
| 244 | + destroyed() { | |
| 245 | + // if (this.jessibuca) { | |
| 246 | + // this.jessibuca.destroy(); | |
| 247 | + // } | |
| 248 | + // this.playing = false; | |
| 249 | + // this.loaded = false; | |
| 250 | + // this.performance = ""; | |
| 251 | + }, | |
| 252 | +} | |
| 253 | +</script> | |
| 254 | + | |
| 255 | +<style> | |
| 256 | + | |
| 257 | +</style> | ... | ... |
web_src/src/components/dialog/jessibuca.vue renamed to web_src/src/components/common/jessibuca.vue
| 1 | 1 | <template> |
| 2 | - <div :id="containerId" :ref="containerId" style="width: 100%;height: auto; background-color: #000" @dblclick="fullscreenSwich"> | |
| 2 | + <div id="container" ref="containerId" @dblclick="fullscreenSwich" style="width: 100%"> | |
| 3 | 3 | <div class="buttons-box" id="buttonsBox"> |
| 4 | 4 | <div class="buttons-box-left"> |
| 5 | 5 | <i v-if="!playing" class="iconfont icon-play jessibuca-btn" @click="playBtnClick"></i> |
| ... | ... | @@ -9,10 +9,11 @@ |
| 9 | 9 | <i v-if="!isNotMute" class="iconfont icon-audio-mute jessibuca-btn" @click="jessibuca.cancelMute()"></i> |
| 10 | 10 | </div> |
| 11 | 11 | <div class="buttons-box-right"> |
| 12 | - <span class="jessibuca-btn">{{kBps}} kb/s</span> | |
| 12 | + <span class="jessibuca-btn">{{ kBps }} kb/s</span> | |
| 13 | 13 | <!-- <i class="iconfont icon-file-record1 jessibuca-btn"></i>--> |
| 14 | 14 | <!-- <i class="iconfont icon-xiangqing2 jessibuca-btn" ></i>--> |
| 15 | - <i class="iconfont icon-camera1196054easyiconnet jessibuca-btn" @click="jessibuca.screenshot('截图','png',0.5)" style="font-size: 1rem !important"></i> | |
| 15 | + <i class="iconfont icon-camera1196054easyiconnet jessibuca-btn" @click="jessibuca.screenshot('截图','png',0.5)" | |
| 16 | + style="font-size: 1rem !important"></i> | |
| 16 | 17 | <i class="iconfont icon-shuaxin11 jessibuca-btn" @click="playBtnClick"></i> |
| 17 | 18 | <i v-if="!fullscreen" class="iconfont icon-weibiaoti10 jessibuca-btn" @click="fullscreenSwich"></i> |
| 18 | 19 | <i v-if="fullscreen" class="iconfont icon-weibiaoti11 jessibuca-btn" @click="fullscreenSwich"></i> |
| ... | ... | @@ -23,294 +24,286 @@ |
| 23 | 24 | |
| 24 | 25 | <script> |
| 25 | 26 | export default { |
| 26 | - name: 'jessibuca', | |
| 27 | - data() { | |
| 28 | - return { | |
| 29 | - jessibuca: null, | |
| 30 | - playing: false, | |
| 31 | - isNotMute: false, | |
| 32 | - quieting: false, | |
| 33 | - fullscreen: false, | |
| 34 | - loaded: false, // mute | |
| 35 | - speed: 0, | |
| 36 | - performance: "", // 工作情况 | |
| 37 | - kBps: 0, | |
| 38 | - btnDom: null, | |
| 39 | - videoInfo: null, | |
| 40 | - volume: 1, | |
| 41 | - rotate: 0, | |
| 42 | - vod: true, // 点播 | |
| 43 | - forceNoOffscreen: false, | |
| 44 | - }; | |
| 45 | - }, | |
| 46 | - props: ['containerId','videoUrl', 'error', 'hasAudio', 'height'], | |
| 47 | - mounted () { | |
| 48 | - window.onerror = (msg) => { | |
| 49 | - // console.error(msg) | |
| 50 | - }; | |
| 51 | - let paramUrl = decodeURIComponent(this.$route.params.url) | |
| 52 | - this.$nextTick(() =>{ | |
| 53 | - let dom = document.getElementById(this.containerId); | |
| 54 | - if (dom.parentNode.clientHeight == 0) { | |
| 55 | - dom.style.height = (9/16 ) * dom.clientWidth + "px" | |
| 56 | - } | |
| 57 | - dom.style.height = dom.parentNode.clientHeight + "px"; | |
| 58 | - dom.style.width = dom.parentNode.clientWidth + "px"; | |
| 59 | - | |
| 60 | - if (typeof (this.videoUrl) == "undefined") { | |
| 61 | - this.videoUrl = paramUrl; | |
| 62 | - } | |
| 63 | - this.btnDom = document.getElementById("buttonsBox"); | |
| 64 | - console.log("初始化时的地址为: " + this.videoUrl) | |
| 65 | - this.play(this.videoUrl) | |
| 66 | - }) | |
| 27 | + name: 'jessibuca', | |
| 28 | + data() { | |
| 29 | + return { | |
| 30 | + jessibuca: null, | |
| 31 | + playing: false, | |
| 32 | + isNotMute: false, | |
| 33 | + quieting: false, | |
| 34 | + fullscreen: false, | |
| 35 | + loaded: false, // mute | |
| 36 | + speed: 0, | |
| 37 | + performance: "", // 工作情况 | |
| 38 | + kBps: 0, | |
| 39 | + btnDom: null, | |
| 40 | + videoInfo: null, | |
| 41 | + volume: 1, | |
| 42 | + rotate: 0, | |
| 43 | + vod: true, // 点播 | |
| 44 | + forceNoOffscreen: false, | |
| 45 | + }; | |
| 46 | + }, | |
| 47 | + props: ['videoUrl', 'error', 'hasAudio', 'height'], | |
| 48 | + mounted() { | |
| 49 | + window.onerror = (msg) => { | |
| 50 | + // console.error(msg) | |
| 51 | + }; | |
| 52 | + let paramUrl = decodeURIComponent(this.$route.params.url) | |
| 53 | + this.$nextTick(() => { | |
| 54 | + this.updatePlayerDomSize() | |
| 55 | + window.onresize = () => { | |
| 56 | + this.updatePlayerDomSize() | |
| 57 | + } | |
| 58 | + if (typeof (this.videoUrl) == "undefined") { | |
| 59 | + this.videoUrl = paramUrl; | |
| 60 | + } | |
| 61 | + this.btnDom = document.getElementById("buttonsBox"); | |
| 62 | + console.log("初始化时的地址为: " + this.videoUrl) | |
| 63 | + this.play(this.videoUrl) | |
| 64 | + }) | |
| 65 | + }, | |
| 66 | + watch: { | |
| 67 | + videoUrl(newData, oldData) { | |
| 68 | + this.play(newData) | |
| 67 | 69 | }, |
| 68 | - watch:{ | |
| 69 | - videoUrl(newData, oldData){ | |
| 70 | - this.play(newData) | |
| 71 | - }, | |
| 72 | - immediate:true | |
| 70 | + immediate: true | |
| 71 | + }, | |
| 72 | + methods: { | |
| 73 | + updatePlayerDomSize() { | |
| 74 | + let dom = document.getElementById('container'); | |
| 75 | + const width = dom.parentNode.clientWidth | |
| 76 | + dom.style.width = width + 'px'; | |
| 77 | + dom.style.height = (9 / 16) * width + "px"; | |
| 73 | 78 | }, |
| 74 | - methods: { | |
| 75 | - create(){ | |
| 76 | - let options = {}; | |
| 77 | - console.log(this.$refs[this.containerId]) | |
| 78 | - console.log("hasAudio " + this.hasAudio) | |
| 79 | + create() { | |
| 80 | + let options = {}; | |
| 81 | + console.log(this.$refs.containerId) | |
| 82 | + console.log("hasAudio " + this.hasAudio) | |
| 79 | 83 | |
| 80 | - this.jessibuca = new window.Jessibuca(Object.assign( | |
| 81 | - { | |
| 82 | - container: this.$refs[this.containerId], | |
| 83 | - videoBuffer: 0.2, // 最大缓冲时长,单位秒 | |
| 84 | - isResize: true, | |
| 85 | - decoder:"static/js/jessibuca/decoder.js", | |
| 86 | - useMSE: false, | |
| 87 | - showBandwidth: false, | |
| 88 | - isFlv: true, | |
| 89 | - // text: "WVP-PRO", | |
| 90 | - // background: "static/images/zlm-logo.png", | |
| 91 | - loadingText: "加载中", | |
| 92 | - hasAudio: typeof (this.hasAudio) =="undefined"? true: this.hasAudio, | |
| 93 | - debug: false, | |
| 94 | - supportDblclickFullscreen: false, // 是否支持屏幕的双击事件,触发全屏,取消全屏事件。 | |
| 95 | - operateBtns: { | |
| 96 | - fullscreen: false, | |
| 97 | - screenshot: false, | |
| 98 | - play: false, | |
| 99 | - audio: false, | |
| 100 | - recorder: false, | |
| 101 | - }, | |
| 102 | - record: "record", | |
| 103 | - vod: this.vod, | |
| 104 | - forceNoOffscreen: this.forceNoOffscreen, | |
| 105 | - isNotMute: this.isNotMute, | |
| 106 | - }, | |
| 107 | - options | |
| 108 | - )); | |
| 109 | - | |
| 110 | - let _this = this; | |
| 111 | - this.jessibuca.on("load", function () { | |
| 112 | - console.log("on load init"); | |
| 113 | - }); | |
| 84 | + this.jessibuca = new window.Jessibuca(Object.assign( | |
| 85 | + { | |
| 86 | + container: this.$refs.containerId, | |
| 87 | + videoBuffer: 0.2, // 最大缓冲时长,单位秒 | |
| 88 | + isResize: true, | |
| 89 | + decoder: "static/js/jessibuca/decoder.js", | |
| 90 | + useMSE: false, | |
| 91 | + showBandwidth: false, | |
| 92 | + isFlv: true, | |
| 93 | + // text: "WVP-PRO", | |
| 94 | + // background: "static/images/zlm-logo.png", | |
| 95 | + loadingText: "加载中", | |
| 96 | + hasAudio: typeof (this.hasAudio) == "undefined" ? true : this.hasAudio, | |
| 97 | + debug: false, | |
| 98 | + supportDblclickFullscreen: false, // 是否支持屏幕的双击事件,触发全屏,取消全屏事件。 | |
| 99 | + operateBtns: { | |
| 100 | + fullscreen: false, | |
| 101 | + screenshot: false, | |
| 102 | + play: false, | |
| 103 | + audio: false, | |
| 104 | + recorder: false, | |
| 105 | + }, | |
| 106 | + record: "record", | |
| 107 | + vod: this.vod, | |
| 108 | + forceNoOffscreen: this.forceNoOffscreen, | |
| 109 | + isNotMute: this.isNotMute, | |
| 110 | + }, | |
| 111 | + options | |
| 112 | + )); | |
| 114 | 113 | |
| 115 | - this.jessibuca.on("log", function (msg) { | |
| 116 | - console.log("on log", msg); | |
| 117 | - }); | |
| 118 | - this.jessibuca.on("record", function (msg) { | |
| 119 | - console.log("on record:", msg); | |
| 120 | - }); | |
| 121 | - this.jessibuca.on("pause", function () { | |
| 122 | - _this.playing = false; | |
| 123 | - }); | |
| 124 | - this.jessibuca.on("play", function () { | |
| 125 | - _this.playing = true; | |
| 126 | - }); | |
| 127 | - this.jessibuca.on("fullscreen", function (msg) { | |
| 128 | - console.log("on fullscreen", msg); | |
| 129 | - _this.fullscreen = msg | |
| 130 | - }); | |
| 114 | + let _this = this; | |
| 115 | + this.jessibuca.on("load", function () { | |
| 116 | + console.log("on load init"); | |
| 117 | + }); | |
| 131 | 118 | |
| 132 | - this.jessibuca.on("mute", function (msg) { | |
| 133 | - console.log("on mute", msg); | |
| 134 | - _this.isNotMute = !msg; | |
| 135 | - }); | |
| 136 | - this.jessibuca.on("audioInfo", function (msg) { | |
| 137 | - // console.log("audioInfo", msg); | |
| 138 | - }); | |
| 119 | + this.jessibuca.on("log", function (msg) { | |
| 120 | + console.log("on log", msg); | |
| 121 | + }); | |
| 122 | + this.jessibuca.on("record", function (msg) { | |
| 123 | + console.log("on record:", msg); | |
| 124 | + }); | |
| 125 | + this.jessibuca.on("pause", function () { | |
| 126 | + _this.playing = false; | |
| 127 | + }); | |
| 128 | + this.jessibuca.on("play", function () { | |
| 129 | + _this.playing = true; | |
| 130 | + }); | |
| 131 | + this.jessibuca.on("fullscreen", function (msg) { | |
| 132 | + console.log("on fullscreen", msg); | |
| 133 | + _this.fullscreen = msg | |
| 134 | + }); | |
| 139 | 135 | |
| 140 | - this.jessibuca.on("videoInfo", function (msg) { | |
| 141 | - // this.videoInfo = msg; | |
| 142 | - console.log("videoInfo", msg); | |
| 136 | + this.jessibuca.on("mute", function (msg) { | |
| 137 | + console.log("on mute", msg); | |
| 138 | + _this.isNotMute = !msg; | |
| 139 | + }); | |
| 140 | + this.jessibuca.on("audioInfo", function (msg) { | |
| 141 | + // console.log("audioInfo", msg); | |
| 142 | + }); | |
| 143 | 143 | |
| 144 | - }); | |
| 144 | + this.jessibuca.on("videoInfo", function (msg) { | |
| 145 | + // this.videoInfo = msg; | |
| 146 | + console.log("videoInfo", msg); | |
| 145 | 147 | |
| 146 | - this.jessibuca.on("bps", function (bps) { | |
| 147 | - // console.log('bps', bps); | |
| 148 | + }); | |
| 148 | 149 | |
| 149 | - }); | |
| 150 | - let _ts = 0; | |
| 151 | - this.jessibuca.on("timeUpdate", function (ts) { | |
| 152 | - // console.log('timeUpdate,old,new,timestamp', _ts, ts, ts - _ts); | |
| 153 | - _ts = ts; | |
| 154 | - }); | |
| 150 | + this.jessibuca.on("bps", function (bps) { | |
| 151 | + // console.log('bps', bps); | |
| 155 | 152 | |
| 156 | - this.jessibuca.on("videoInfo", function (info) { | |
| 157 | - console.log("videoInfo", info); | |
| 158 | - }); | |
| 153 | + }); | |
| 154 | + let _ts = 0; | |
| 155 | + this.jessibuca.on("timeUpdate", function (ts) { | |
| 156 | + // console.log('timeUpdate,old,new,timestamp', _ts, ts, ts - _ts); | |
| 157 | + _ts = ts; | |
| 158 | + }); | |
| 159 | 159 | |
| 160 | - this.jessibuca.on("error", function (error) { | |
| 161 | - console.log("error", error); | |
| 162 | - }); | |
| 160 | + this.jessibuca.on("videoInfo", function (info) { | |
| 161 | + console.log("videoInfo", info); | |
| 162 | + }); | |
| 163 | 163 | |
| 164 | - this.jessibuca.on("timeout", function () { | |
| 165 | - console.log("timeout"); | |
| 166 | - }); | |
| 164 | + this.jessibuca.on("error", function (error) { | |
| 165 | + console.log("error", error); | |
| 166 | + }); | |
| 167 | 167 | |
| 168 | - this.jessibuca.on('start', function () { | |
| 169 | - console.log('start'); | |
| 170 | - }) | |
| 168 | + this.jessibuca.on("timeout", function () { | |
| 169 | + console.log("timeout"); | |
| 170 | + }); | |
| 171 | 171 | |
| 172 | - this.jessibuca.on("performance", function (performance) { | |
| 173 | - let show = "卡顿"; | |
| 174 | - if (performance === 2) { | |
| 175 | - show = "非常流畅"; | |
| 176 | - } else if (performance === 1) { | |
| 177 | - show = "流畅"; | |
| 178 | - } | |
| 179 | - _this.performance = show; | |
| 180 | - }); | |
| 181 | - this.jessibuca.on('buffer', function (buffer) { | |
| 182 | - // console.log('buffer', buffer); | |
| 183 | - }) | |
| 172 | + this.jessibuca.on('start', function () { | |
| 173 | + console.log('start'); | |
| 174 | + }) | |
| 184 | 175 | |
| 185 | - this.jessibuca.on('stats', function (stats) { | |
| 186 | - // console.log('stats', stats); | |
| 187 | - }) | |
| 176 | + this.jessibuca.on("performance", function (performance) { | |
| 177 | + let show = "卡顿"; | |
| 178 | + if (performance === 2) { | |
| 179 | + show = "非常流畅"; | |
| 180 | + } else if (performance === 1) { | |
| 181 | + show = "流畅"; | |
| 182 | + } | |
| 183 | + _this.performance = show; | |
| 184 | + }); | |
| 185 | + this.jessibuca.on('buffer', function (buffer) { | |
| 186 | + // console.log('buffer', buffer); | |
| 187 | + }) | |
| 188 | 188 | |
| 189 | - this.jessibuca.on('kBps', function (kBps) { | |
| 190 | - _this.kBps = Math.round(kBps); | |
| 191 | - }); | |
| 189 | + this.jessibuca.on('stats', function (stats) { | |
| 190 | + // console.log('stats', stats); | |
| 191 | + }) | |
| 192 | 192 | |
| 193 | - // 显示时间戳 PTS | |
| 194 | - this.jessibuca.on('videoFrame', function () { | |
| 193 | + this.jessibuca.on('kBps', function (kBps) { | |
| 194 | + _this.kBps = Math.round(kBps); | |
| 195 | + }); | |
| 195 | 196 | |
| 196 | - }) | |
| 197 | + // 显示时间戳 PTS | |
| 198 | + this.jessibuca.on('videoFrame', function () { | |
| 197 | 199 | |
| 198 | - // | |
| 199 | - this.jessibuca.on('metadata', function () { | |
| 200 | + }) | |
| 200 | 201 | |
| 201 | - }); | |
| 202 | - }, | |
| 203 | - resize(){ | |
| 204 | - if (this.jessibuca){ | |
| 205 | - this.jessibuca.resize() | |
| 206 | - this.$nextTick(() =>{ | |
| 207 | - let dom = document.getElementById(this.containerId); | |
| 208 | - if (dom.parentNode.clientHeight == 0) { | |
| 209 | - dom.style.height = (9/16 ) * dom.clientWidth + "px" | |
| 210 | - } | |
| 211 | - dom.style.height = dom.parentNode.clientHeight + "px"; | |
| 212 | - dom.style.width = dom.parentNode.clientWidth + "px"; | |
| 213 | - }) | |
| 214 | - } | |
| 215 | - }, | |
| 216 | - playBtnClick: function (event){ | |
| 217 | - this.play(this.videoUrl) | |
| 218 | - }, | |
| 219 | - play: function (url) { | |
| 220 | - console.log(url) | |
| 221 | - if (this.jessibuca) { | |
| 222 | - this.destroy(); | |
| 223 | - } | |
| 224 | - this.create(); | |
| 225 | - this.jessibuca.on("play", () => { | |
| 226 | - this.playing = true; | |
| 227 | - this.loaded = true; | |
| 228 | - this.quieting = this.jessibuca.quieting; | |
| 229 | - }); | |
| 230 | - if (this.jessibuca.hasLoaded()) { | |
| 231 | - this.jessibuca.play(url); | |
| 232 | - } else { | |
| 233 | - this.jessibuca.on("load", () => { | |
| 234 | - console.log("load 播放") | |
| 235 | - this.jessibuca.play(url); | |
| 236 | - }); | |
| 237 | - } | |
| 238 | - }, | |
| 239 | - pause: function () { | |
| 240 | - if (this.jessibuca) { | |
| 241 | - this.jessibuca.pause(); | |
| 242 | - } | |
| 243 | - this.playing = false; | |
| 244 | - this.err = ""; | |
| 245 | - this.performance = ""; | |
| 246 | - }, | |
| 247 | - destroy: function () { | |
| 248 | - if (this.jessibuca) { | |
| 249 | - this.jessibuca.destroy(); | |
| 250 | - } | |
| 251 | - if (document.getElementById("buttonsBox") == null) { | |
| 252 | - document.getElementById("container").appendChild(this.btnDom) | |
| 253 | - } | |
| 254 | - this.jessibuca = null; | |
| 255 | - this.playing = false; | |
| 256 | - this.err = ""; | |
| 257 | - this.performance = ""; | |
| 202 | + // | |
| 203 | + this.jessibuca.on('metadata', function () { | |
| 258 | 204 | |
| 259 | - }, | |
| 260 | - eventcallbacK: function(type, message) { | |
| 261 | - // console.log("player 事件回调") | |
| 262 | - // console.log(type) | |
| 263 | - // console.log(message) | |
| 264 | - }, | |
| 265 | - fullscreenSwich: function (){ | |
| 266 | - let isFull = this.isFullscreen() | |
| 267 | - this.jessibuca.setFullscreen(!isFull) | |
| 268 | - this.fullscreen = !isFull; | |
| 269 | - }, | |
| 270 | - isFullscreen: function (){ | |
| 271 | - return document.fullscreenElement || | |
| 272 | - document.msFullscreenElement || | |
| 273 | - document.mozFullScreenElement || | |
| 274 | - document.webkitFullscreenElement || false; | |
| 275 | - } | |
| 205 | + }); | |
| 206 | + }, | |
| 207 | + playBtnClick: function (event) { | |
| 208 | + this.play(this.videoUrl) | |
| 276 | 209 | }, |
| 277 | - destroyed() { | |
| 210 | + play: function (url) { | |
| 211 | + console.log(url) | |
| 212 | + if (this.jessibuca) { | |
| 213 | + this.destroy(); | |
| 214 | + } | |
| 215 | + this.create(); | |
| 216 | + this.jessibuca.on("play", () => { | |
| 217 | + this.playing = true; | |
| 218 | + this.loaded = true; | |
| 219 | + this.quieting = this.jessibuca.quieting; | |
| 220 | + }); | |
| 221 | + if (this.jessibuca.hasLoaded()) { | |
| 222 | + this.jessibuca.play(url); | |
| 223 | + } else { | |
| 224 | + this.jessibuca.on("load", () => { | |
| 225 | + console.log("load 播放") | |
| 226 | + this.jessibuca.play(url); | |
| 227 | + }); | |
| 228 | + } | |
| 229 | + }, | |
| 230 | + pause: function () { | |
| 231 | + if (this.jessibuca) { | |
| 232 | + this.jessibuca.pause(); | |
| 233 | + } | |
| 234 | + this.playing = false; | |
| 235 | + this.err = ""; | |
| 236 | + this.performance = ""; | |
| 237 | + }, | |
| 238 | + destroy: function () { | |
| 278 | 239 | if (this.jessibuca) { |
| 279 | 240 | this.jessibuca.destroy(); |
| 280 | 241 | } |
| 242 | + if (document.getElementById("buttonsBox") == null) { | |
| 243 | + document.getElementById("container").appendChild(this.btnDom) | |
| 244 | + } | |
| 245 | + this.jessibuca = null; | |
| 281 | 246 | this.playing = false; |
| 282 | - this.loaded = false; | |
| 247 | + this.err = ""; | |
| 283 | 248 | this.performance = ""; |
| 249 | + | |
| 250 | + }, | |
| 251 | + eventcallbacK: function (type, message) { | |
| 252 | + // console.log("player 事件回调") | |
| 253 | + // console.log(type) | |
| 254 | + // console.log(message) | |
| 284 | 255 | }, |
| 256 | + fullscreenSwich: function () { | |
| 257 | + let isFull = this.isFullscreen() | |
| 258 | + this.jessibuca.setFullscreen(!isFull) | |
| 259 | + this.fullscreen = !isFull; | |
| 260 | + }, | |
| 261 | + isFullscreen: function () { | |
| 262 | + return document.fullscreenElement || | |
| 263 | + document.msFullscreenElement || | |
| 264 | + document.mozFullScreenElement || | |
| 265 | + document.webkitFullscreenElement || false; | |
| 266 | + } | |
| 267 | + }, | |
| 268 | + destroyed() { | |
| 269 | + if (this.jessibuca) { | |
| 270 | + this.jessibuca.destroy(); | |
| 271 | + } | |
| 272 | + this.playing = false; | |
| 273 | + this.loaded = false; | |
| 274 | + this.performance = ""; | |
| 275 | + }, | |
| 285 | 276 | } |
| 286 | 277 | </script> |
| 287 | 278 | |
| 288 | 279 | <style> |
| 289 | - .buttons-box{ | |
| 290 | - width: 100%; | |
| 291 | - height: 28px; | |
| 292 | - background-color: rgba(43, 51, 63, 0.7); | |
| 293 | - position: absolute; | |
| 294 | - display: -webkit-box; | |
| 295 | - display: -ms-flexbox; | |
| 296 | - display: flex; | |
| 297 | - left: 0; | |
| 298 | - bottom: 0; | |
| 299 | - user-select: none; | |
| 300 | - z-index: 10; | |
| 301 | - } | |
| 302 | - .jessibuca-btn{ | |
| 303 | - width: 20px; | |
| 304 | - color: rgb(255, 255, 255); | |
| 305 | - line-height: 27px; | |
| 306 | - margin: 0px 10px; | |
| 307 | - padding: 0px 2px; | |
| 308 | - cursor: pointer; | |
| 309 | - text-align: center; | |
| 310 | - font-size: 0.8rem !important; | |
| 311 | - } | |
| 312 | - .buttons-box-right { | |
| 313 | - position: absolute; | |
| 314 | - right: 0; | |
| 315 | - } | |
| 280 | +.buttons-box { | |
| 281 | + width: 100%; | |
| 282 | + height: 28px; | |
| 283 | + background-color: rgba(43, 51, 63, 0.7); | |
| 284 | + position: absolute; | |
| 285 | + display: -webkit-box; | |
| 286 | + display: -ms-flexbox; | |
| 287 | + display: flex; | |
| 288 | + left: 0; | |
| 289 | + bottom: 0; | |
| 290 | + user-select: none; | |
| 291 | + z-index: 10; | |
| 292 | +} | |
| 293 | + | |
| 294 | +.jessibuca-btn { | |
| 295 | + width: 20px; | |
| 296 | + color: rgb(255, 255, 255); | |
| 297 | + line-height: 27px; | |
| 298 | + margin: 0px 10px; | |
| 299 | + padding: 0px 2px; | |
| 300 | + cursor: pointer; | |
| 301 | + text-align: center; | |
| 302 | + font-size: 0.8rem !important; | |
| 303 | +} | |
| 304 | + | |
| 305 | +.buttons-box-right { | |
| 306 | + position: absolute; | |
| 307 | + right: 0; | |
| 308 | +} | |
| 316 | 309 | </style> | ... | ... |
web_src/src/components/devicePosition.vue
| 1 | 1 | <template> |
| 2 | - <div id="devicePosition" style="height: 100%"> | |
| 3 | - <div style="background-color: #ffffff; position: relative; padding: 1rem 0.5rem 0.5rem 0.5rem; text-align: center;"> | |
| 4 | - <span style="font-size: 1rem; font-weight: 500">设备定位 ({{ parentChannelId == 0 ? deviceId : parentChannelId }})</span> | |
| 2 | + <div id="devicePosition" style="width: 100vw; height: 91vh;"> | |
| 3 | + <el-container v-if="onOff" style="height: 91vh;" v-loading="isLoging"> | |
| 4 | + <el-aside width="auto" style="background-color: #ffffff"> | |
| 5 | + <DeviceTree ref="deviceTree" :clickEvent="clickEvent" :contextMenuEvent="contextmenuEventHandler" ></DeviceTree> | |
| 6 | + </el-aside> | |
| 7 | + <el-main style="height: 91vh; padding: 0"> | |
| 8 | + <MapComponent ref="map"></MapComponent> | |
| 9 | + </el-main> | |
| 10 | + </el-container> | |
| 11 | + <div v-if="!onOff" style="width: 100%; height:100%; text-align: center; line-height: 5rem"> | |
| 12 | + <p>地图功能已关闭</p> | |
| 5 | 13 | </div> |
| 6 | - <div style="background-color: #ffffff; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left; font-size: 14px;"> | |
| 7 | - <el-button icon="el-icon-arrow-left" size="mini" style="margin-right: 1rem" type="primary" @click="showDevice">返回</el-button> | |
| 8 | - <!-- <span class="demonstration">从</span> --> | |
| 9 | - <el-date-picker v-model="searchFrom" type="datetime" placeholder="选择开始日期时间" default-time="00:00:00" size="mini" style="width: 11rem;" align="right" :picker-options="pickerOptions"></el-date-picker> | |
| 10 | - <el-date-picker v-model="searchTo" type="datetime" placeholder="选择结束日期时间" default-time="00:00:00" size="mini" style="width: 11rem;" align="right" :picker-options="pickerOptions"></el-date-picker> | |
| 11 | - <el-button-group> | |
| 12 | - <el-button icon="el-icon-search" size="mini" type="primary" @click="showHistoryPath">历史轨迹</el-button> | |
| 13 | - <el-button icon="el-icon-search" size="mini" style="margin-right: 1rem" type="primary" @click="showLatestPosition">最新位置</el-button> | |
| 14 | - </el-button-group> | |
| 15 | - <el-tag style="width: 5rem; text-align: center" size="medium">过期时间</el-tag> | |
| 16 | - <el-input-number size="mini" v-model="expired" :min="300" :controls="false" style="width: 4rem;"></el-input-number> | |
| 17 | - <el-tag style="width: 5rem; text-align: center" size="medium">上报周期</el-tag> | |
| 18 | - <el-input-number size="mini" v-model="interval" :min="1" :controls="false" style="width: 4rem;"></el-input-number> | |
| 19 | - <el-button-group> | |
| 20 | - <el-button icon="el-icon-search" size="mini" type="primary" @click="subscribeMobilePosition">位置订阅</el-button> | |
| 21 | - <el-button icon="el-icon-search" size="mini" type="primary" @click="unSubscribeMobilePosition">取消订阅</el-button> | |
| 22 | - </el-button-group> | |
| 23 | - <el-checkbox size="mini" style="margin-right: 1rem; float: right" v-model="autoList" @change="autoListChange" >自动刷新</el-checkbox> | |
| 24 | - </div> | |
| 25 | - <div class="mapContainer" style="background-color: #ffffff; position: relative; padding: 1rem 0.5rem 0.5rem 0.5rem; text-align: center; height: calc(100% - 10rem);"> | |
| 26 | - <div class="baidumap" id="allmap"></div> | |
| 14 | + <div ref="infobox" v-if="channel != null " > | |
| 15 | + <div v-if="channel != null" class="infobox-content"> | |
| 16 | + <el-descriptions class="margin-top" :title="channel.name" :column="1" :colon="true" size="mini" :labelStyle="labelStyle" > | |
| 17 | + <el-descriptions-item label="生产厂商">{{channel.manufacture}}</el-descriptions-item> | |
| 18 | + <el-descriptions-item label="型号">{{channel.model}}</el-descriptions-item> | |
| 19 | + <el-descriptions-item label="设备归属" >{{channel.owner}}</el-descriptions-item> | |
| 20 | + <el-descriptions-item label="行政区域" >{{channel.civilCode}}</el-descriptions-item> | |
| 21 | + <el-descriptions-item label="安装地址" >{{channel.address == null?'未知': channel.address}}</el-descriptions-item> | |
| 22 | + <el-descriptions-item label="云台类型" >{{channel.ptztypeText}}</el-descriptions-item> | |
| 23 | + <el-descriptions-item label="经纬度" >{{channel.longitude}},{{channel.latitude}}</el-descriptions-item> | |
| 24 | + <el-descriptions-item label="状态"> | |
| 25 | + <el-tag size="small" v-if="channel.status === 1">在线</el-tag> | |
| 26 | + <el-tag size="small" type="info" v-if="channel.status === 0">离线</el-tag> | |
| 27 | + </el-descriptions-item> | |
| 28 | + </el-descriptions> | |
| 29 | + <div style="padding-top: 10px"> | |
| 30 | + <el-button type="primary" size="small" title="播放" icon="el-icon-video-play" @click="play(channel)"></el-button> | |
| 31 | + <el-button type="primary" size="small" title="编辑位置" icon="el-icon-edit" @click="edit(channel)"></el-button> | |
| 32 | + <el-button type="primary" size="small" title="轨迹查询" icon="el-icon-map-location" @click="getTrace(channel)"></el-button> | |
| 33 | + </div> | |
| 34 | + <span class="infobox-close el-icon-close" @click="closeInfoBox()"></span> | |
| 35 | + </div> | |
| 27 | 36 | </div> |
| 37 | + <devicePlayer ref="devicePlayer" ></devicePlayer> | |
| 38 | + <queryTrace ref="queryTrace" ></queryTrace> | |
| 28 | 39 | </div> |
| 29 | 40 | </template> |
| 30 | 41 | |
| 31 | 42 | <script> |
| 32 | -import uiHeader from "../layout/UiHeader.vue"; | |
| 33 | -import geoTools from "./GeoConvertTools.js"; | |
| 43 | +import MapComponent from "./common/MapComponent.vue"; | |
| 44 | +import DeviceService from "./service/DeviceService"; | |
| 45 | +import DeviceTree from "./common/DeviceTree"; | |
| 46 | +import channelMapInfobox from "./dialog/channelMapInfobox"; | |
| 47 | +import devicePlayer from './dialog/devicePlayer.vue' | |
| 48 | +import queryTrace from './dialog/queryTrace.vue' | |
| 49 | + | |
| 34 | 50 | export default { |
| 35 | - name: "devicePosition", | |
| 36 | - components: { | |
| 37 | - uiHeader, | |
| 51 | + name: "devicePosition", | |
| 52 | + components: { | |
| 53 | + MapComponent, | |
| 54 | + DeviceTree, | |
| 55 | + channelMapInfobox, | |
| 56 | + devicePlayer, | |
| 57 | + queryTrace, | |
| 58 | + }, | |
| 59 | + data() { | |
| 60 | + return { | |
| 61 | + onOff: typeof window.mapParam !== "undefined", | |
| 62 | + deviceService: new DeviceService(), | |
| 63 | + layer: null, | |
| 64 | + lineLayer: null, | |
| 65 | + channel: null, | |
| 66 | + infoBoxId: null, | |
| 67 | + labelStyle: { | |
| 68 | + width: "56px" | |
| 69 | + }, | |
| 70 | + isLoging: false, | |
| 71 | + }; | |
| 72 | + }, | |
| 73 | + created() { | |
| 74 | + if (this.$route.query.deviceId) { | |
| 75 | + console.log(this.$route.query.deviceId) | |
| 76 | + // this.$refs.deviceTree.openByDeivceId(this.$route.query.deivceId) | |
| 77 | + setTimeout(()=>{ // 延迟以等待地图加载完成 TODO 后续修改为通过是实际这;状态加回调完成 | |
| 78 | + this.deviceService.getAllChannel(false, this.$route.query.deviceId, this.channelsHandler) | |
| 79 | + }, 1000) | |
| 80 | + | |
| 81 | + } | |
| 82 | + }, | |
| 83 | + destroyed() { | |
| 84 | + | |
| 85 | + }, | |
| 86 | + methods: { | |
| 87 | + clickEvent: function (data) { | |
| 88 | + if (data.channelId && data.subCount == 0) { | |
| 89 | + // 点击通道 | |
| 90 | + if (data.longitude * data.latitude === 0) { | |
| 91 | + this.$message.error('未获取到位置信息'); | |
| 92 | + } else { | |
| 93 | + if (this.layer != null) { | |
| 94 | + this.$refs.map.removeLayer(this.layer); | |
| 95 | + } | |
| 96 | + this.closeInfoBox() | |
| 97 | + this.layer = this.$refs.map.addLayer([{ | |
| 98 | + position: [data.longitude, data.latitude], | |
| 99 | + image: { | |
| 100 | + src: this.getImageByChannel(data), | |
| 101 | + anchor: [0.5, 1] | |
| 102 | + }, | |
| 103 | + data: data | |
| 104 | + }], this.featureClickEvent) | |
| 105 | + this.$refs.map.panTo([data.longitude, data.latitude], mapParam.maxZoom) | |
| 106 | + } | |
| 107 | + } | |
| 38 | 108 | }, |
| 39 | - data() { | |
| 40 | - return { | |
| 41 | - pickerOptions: { | |
| 42 | - shortcuts: [{ | |
| 43 | - text: '今天', | |
| 44 | - onClick(picker) { | |
| 45 | - picker.$emit('pick', new Date()); | |
| 46 | - } | |
| 47 | - }, { | |
| 48 | - text: '昨天', | |
| 49 | - onClick(picker) { | |
| 50 | - const date = new Date(); | |
| 51 | - date.setTime(date.getTime() - 3600 * 1000 * 24); | |
| 52 | - picker.$emit('pick', date); | |
| 53 | - } | |
| 54 | - }, { | |
| 55 | - text: '一周前', | |
| 56 | - onClick(picker) { | |
| 57 | - const date = new Date(); | |
| 58 | - date.setTime(date.getTime() - 3600 * 1000 * 24 * 7); | |
| 59 | - picker.$emit('pick', date); | |
| 60 | - } | |
| 61 | - }] | |
| 109 | + contextmenuEventHandler: function (event, data) { | |
| 110 | + if (data.channelId && data.subCount == 0) { | |
| 111 | + // 点击通道 | |
| 112 | + this.$contextmenu({ | |
| 113 | + items: [ | |
| 114 | + { | |
| 115 | + label: "播放", | |
| 116 | + icon: "el-icon-video-play", | |
| 117 | + disabled: false, | |
| 118 | + onClick: () => { | |
| 119 | + this.play(data); | |
| 120 | + } | |
| 62 | 121 | }, |
| 63 | - deviceId: this.$route.params.deviceId, | |
| 64 | - showHistoryPosition: false, //显示历史轨迹 | |
| 65 | - startTime: null, | |
| 66 | - endTime: null, | |
| 67 | - searchFrom: null, | |
| 68 | - searchTo: null, | |
| 69 | - expired: 600, | |
| 70 | - interval: 5, | |
| 71 | - mobilePositionList: [], | |
| 72 | - mapPointList: [], | |
| 73 | - parentChannelId: this.$route.params.parentChannelId, | |
| 74 | - updateLooper: 0, //数据刷新轮训标志 | |
| 75 | - total: 0, | |
| 76 | - beforeUrl: "/deviceList", | |
| 77 | - isLoging: false, | |
| 78 | - autoList: false, | |
| 79 | - }; | |
| 122 | + { | |
| 123 | + label: "编辑位置", | |
| 124 | + icon: "el-icon-edit", | |
| 125 | + disabled: false, | |
| 126 | + onClick: () => { | |
| 127 | + this.edit(data) | |
| 128 | + } | |
| 129 | + }, | |
| 130 | + { | |
| 131 | + label: "轨迹查询", | |
| 132 | + icon: "el-icon-map-location", | |
| 133 | + disabled: false, | |
| 134 | + onClick: () => { | |
| 135 | + this.getTrace(data) | |
| 136 | + } | |
| 137 | + } | |
| 138 | + ], | |
| 139 | + event, // 鼠标事件信息 | |
| 140 | + customClass: "custom-class", // 自定义菜单 class | |
| 141 | + zIndex: 3000, // 菜单样式 z-index | |
| 142 | + }); | |
| 143 | + } else { | |
| 144 | + this.deviceOrSubChannelMenu(event, data) | |
| 145 | + } | |
| 146 | + | |
| 80 | 147 | }, |
| 81 | - mounted() { | |
| 82 | - this.initData(); | |
| 83 | - this.initBaiduMap(); | |
| 84 | - if (this.autoList) { | |
| 85 | - this.updateLooper = setInterval(this.initData, 5000); | |
| 148 | + deviceOrSubChannelMenu: function (event, data) { | |
| 149 | + // 点击设备 | |
| 150 | + this.$contextmenu({ | |
| 151 | + items: [ | |
| 152 | + { | |
| 153 | + label: "定位", | |
| 154 | + icon: "el-icon-s-promotion", | |
| 155 | + disabled: false, | |
| 156 | + onClick: () => { | |
| 157 | + if (!data.channelId) { | |
| 158 | + this.deviceService.getAllChannel(false, data.deviceId, this.channelsHandler) | |
| 159 | + } | |
| 160 | + if (data.channelId && data.subCount > 0) { | |
| 161 | + // 点击子目录 | |
| 162 | + this.deviceService.getAllSubChannel(false, data.deviceId, data.channelId, this.channelsHandler) | |
| 163 | + } | |
| 164 | + } | |
| 165 | + } | |
| 166 | + ], | |
| 167 | + event, // 鼠标事件信息 | |
| 168 | + customClass: "custom-class", // 自定义菜单 class | |
| 169 | + zIndex: 3000, // 菜单样式 z-index | |
| 170 | + }); | |
| 171 | + | |
| 172 | + }, | |
| 173 | + channelsHandler: function (channels) { | |
| 174 | + console.log(2) | |
| 175 | + if (channels.length > 0) { | |
| 176 | + this.clean() | |
| 177 | + this.closeInfoBox() | |
| 178 | + let params = []; | |
| 179 | + for (let i = 0; i < channels.length; i++) { | |
| 180 | + if (channels[i].longitude * channels[i].latitude === 0) { | |
| 181 | + continue; | |
| 182 | + } | |
| 183 | + let item = { | |
| 184 | + position: [channels[i].longitude, channels[i].latitude], | |
| 185 | + image: { | |
| 186 | + src: this.getImageByChannel(channels[i]), | |
| 187 | + anchor: [0.5, 1] | |
| 188 | + }, | |
| 189 | + data: channels[i] | |
| 190 | + } | |
| 191 | + params.push(item); | |
| 86 | 192 | } |
| 193 | + console.log(3) | |
| 194 | + | |
| 195 | + this.layer = this.$refs.map.addLayer(params, this.featureClickEvent) | |
| 196 | + console.log(4) | |
| 197 | + if (params.length === 1) { | |
| 198 | + this.$refs.map.panTo([channels[0].longitude, channels[0].latitude], mapParam.maxZoom) | |
| 199 | + } else if (params.length > 1) { | |
| 200 | + this.$refs.map.fit(this.layer) | |
| 201 | + } else { | |
| 202 | + this.$message.error('未获取到位置信息'); | |
| 203 | + } | |
| 204 | + } else { | |
| 205 | + this.$message.error('未获取到位置信息'); | |
| 206 | + } | |
| 87 | 207 | }, |
| 88 | - destroyed() { | |
| 89 | - // this.$destroy("videojs"); | |
| 90 | - clearTimeout(this.updateLooper); | |
| 208 | + getImageByChannel: function (channel) { | |
| 209 | + let src = "static/images/gis/camera.png" | |
| 210 | + switch (channel.ptztype) { | |
| 211 | + case 1: | |
| 212 | + if (channel.status === 1) { | |
| 213 | + src = "static/images/gis/camera1.png" | |
| 214 | + } else { | |
| 215 | + src = "static/images/gis/camera1-offline.png" | |
| 216 | + } | |
| 217 | + break; | |
| 218 | + case 2: | |
| 219 | + if (channel.status === 1) { | |
| 220 | + src = "static/images/gis/camera2.png" | |
| 221 | + } else { | |
| 222 | + src = "static/images/gis/camera2-offline.png" | |
| 223 | + } | |
| 224 | + break; | |
| 225 | + case 3: | |
| 226 | + if (channel.status === 1) { | |
| 227 | + src = "static/images/gis/camera3.png" | |
| 228 | + } else { | |
| 229 | + src = "static/images/gis/camera3-offline.png" | |
| 230 | + } | |
| 231 | + break; | |
| 232 | + default: | |
| 233 | + if (channel.status === 1) { | |
| 234 | + src = "static/images/gis/camera.png" | |
| 235 | + } else { | |
| 236 | + src = "static/images/gis/camera-offline.png" | |
| 237 | + } | |
| 238 | + } | |
| 239 | + return src; | |
| 91 | 240 | }, |
| 92 | - methods: { | |
| 93 | - initData: function () { | |
| 94 | - // if (this.parentChannelId == "" || this.parentChannelId == 0) { | |
| 95 | - // this.getDeviceChannelList(); | |
| 96 | - // } else { | |
| 97 | - // this.showSubchannels(); | |
| 98 | - // } | |
| 99 | - }, | |
| 100 | - initParam: function () { | |
| 101 | - // this.deviceId = this.$route.params.deviceId; | |
| 102 | - // this.parentChannelId = this.$route.params.parentChannelId; | |
| 103 | - // this.currentPage = parseInt(this.$route.params.page); | |
| 104 | - // this.count = parseInt(this.$route.params.count); | |
| 105 | - // if (this.parentChannelId == "" || this.parentChannelId == 0) { | |
| 106 | - // this.beforeUrl = "/deviceList"; | |
| 107 | - // } | |
| 108 | - }, | |
| 109 | - initBaiduMap() { | |
| 110 | - this.map = new BMap.Map("allmap"); // 创建地图实例 | |
| 111 | - let points = []; | |
| 112 | - let point = new BMap.Point(116.231398, 39.567445); // 创建点坐标 | |
| 113 | - this.map.centerAndZoom(point, 5); // 初始化地图,设置中心点坐标和地图级别 | |
| 114 | - this.map.enableScrollWheelZoom(true); //开启鼠标滚轮缩放 | |
| 115 | - this.map.addControl(new BMap.NavigationControl()); | |
| 116 | - this.map.addControl(new BMap.ScaleControl()); | |
| 117 | - this.map.addControl(new BMap.OverviewMapControl()); | |
| 118 | - this.map.addControl(new BMap.MapTypeControl()); | |
| 119 | - //map.setMapStyle({ style: 'midnight' }) //地图风格 | |
| 120 | - }, | |
| 121 | - currentChange: function (val) { | |
| 122 | - // var url = `/${this.$router.currentRoute.name}/${this.deviceId}/${this.parentChannelId}/${this.count}/${val}`; | |
| 123 | - // console.log(url); | |
| 124 | - // this.$router.push(url).then(() => { | |
| 125 | - // this.initParam(); | |
| 126 | - // this.initData(); | |
| 127 | - // }); | |
| 128 | - }, | |
| 129 | - handleSizeChange: function (val) { | |
| 130 | - // var url = `/${this.$router.currentRoute.name}/${this.$router.params.deviceId}/${this.$router.params.parentChannelId}/${val}/1`; | |
| 131 | - // this.$router.push(url).then(() => { | |
| 132 | - // this.initParam(); | |
| 133 | - // this.initData(); | |
| 134 | - // }); | |
| 135 | - }, | |
| 136 | - showDevice: function () { | |
| 137 | - this.$router.push(this.beforeUrl).then(() => { | |
| 138 | - this.initParam(); | |
| 139 | - this.initData(); | |
| 140 | - }); | |
| 141 | - }, | |
| 142 | - autoListChange: function () { | |
| 143 | - if (this.autoList) { | |
| 144 | - this.updateLooper = setInterval(this.initData, 1500); | |
| 145 | - } else { | |
| 146 | - window.clearInterval(this.updateLooper); | |
| 147 | - } | |
| 148 | - }, | |
| 149 | - showHistoryPath: function () { | |
| 150 | - this.map.clearOverlays(); | |
| 151 | - this.mapPointList = []; | |
| 152 | - this.mobilePositionList = []; | |
| 153 | - if (!!this.searchFrom) { | |
| 154 | - this.startTime = this.toGBString(this.searchFrom); | |
| 155 | - console.log(this.startTime); | |
| 156 | - } else{ | |
| 157 | - this.startTime = null; | |
| 158 | - } | |
| 159 | - if (!!this.searchTo) { | |
| 160 | - this.endTime = this.toGBString(this.searchTo); | |
| 161 | - console.log(this.endTime); | |
| 162 | - } else { | |
| 163 | - this.endTime = null; | |
| 164 | - } | |
| 165 | - let self = this; | |
| 166 | - this.$axios({ | |
| 167 | - method: 'get', | |
| 168 | - url:`/api/position/history/${this.deviceId}`, | |
| 169 | - params: { | |
| 170 | - start: self.startTime, | |
| 171 | - end: self.endTime, | |
| 172 | - }, | |
| 173 | - }).then(function (res) { | |
| 174 | - self.total = res.data.length; | |
| 175 | - self.mobilePositionList = res.data; | |
| 176 | - console.log(self.mobilePositionList); | |
| 177 | - if (self.total == 0) { | |
| 178 | - self.$message({ | |
| 179 | - showClose: true, | |
| 180 | - message: '未找到符合条件的移动位置信息', | |
| 181 | - type: 'error' | |
| 182 | - }); | |
| 183 | - } else { | |
| 184 | - self.$nextTick(() => { | |
| 185 | - self.showMarkPoints(self); | |
| 186 | - }); | |
| 187 | - } | |
| 188 | - }).catch(function (error) { | |
| 189 | - console.log(error); | |
| 190 | - }); | |
| 191 | - }, | |
| 192 | - showLatestPosition: function() { | |
| 193 | - this.map.clearOverlays(); | |
| 194 | - this.mapPointList = []; | |
| 195 | - this.mobilePositionList = []; | |
| 196 | - let self = this; | |
| 197 | - this.$axios({ | |
| 198 | - method: 'get', | |
| 199 | - url:`/api/position/latest/${this.deviceId}` | |
| 200 | - }).then(function (res) { | |
| 201 | - console.log(res.data); | |
| 202 | - self.total = res.data.length; | |
| 203 | - self.mobilePositionList.push(res.data); | |
| 204 | - console.log(self.mobilePositionList); | |
| 205 | - if (self.total == 0) { | |
| 206 | - self.$message({ | |
| 207 | - showClose: true, | |
| 208 | - message: '未找到符合条件的移动位置信息', | |
| 209 | - type: 'error' | |
| 210 | - }); | |
| 211 | - } else { | |
| 212 | - self.$nextTick(() => { | |
| 213 | - self.showMarkPoints(self); | |
| 214 | - }); | |
| 215 | - } | |
| 216 | - }).catch(function (error) { | |
| 217 | - console.log(error); | |
| 218 | - }); | |
| 219 | - }, | |
| 220 | - subscribeMobilePosition: function() { | |
| 221 | - let self = this; | |
| 222 | - this.$axios({ | |
| 223 | - method: 'get', | |
| 224 | - url:`/api/position/subscribe/${this.deviceId}`, | |
| 225 | - params: { | |
| 226 | - expires: self.expired, | |
| 227 | - interval: self.interval, | |
| 228 | - }, | |
| 229 | - }).then(function (res) { | |
| 230 | - console.log(res.data); | |
| 231 | - }) | |
| 232 | - .catch(function (error) { | |
| 233 | - console.log(error); | |
| 234 | - }); | |
| 235 | - }, | |
| 236 | - unSubscribeMobilePosition: function() { | |
| 237 | - let self = this; | |
| 238 | - this.$axios({ | |
| 239 | - method: 'get', | |
| 240 | - url:`/api/position/subscribe/${this.deviceId}`, | |
| 241 | - params: { | |
| 242 | - expires: 0, | |
| 243 | - interval: self.interval, | |
| 244 | - }, | |
| 245 | - }) | |
| 246 | - .then(function (res) { | |
| 247 | - console.log(res.data); | |
| 248 | - }).catch(function (error) { | |
| 249 | - console.log(error); | |
| 250 | - }); | |
| 251 | - }, | |
| 252 | - toGBString: function (dateTime) { | |
| 253 | - return ( | |
| 254 | - dateTime.getFullYear() + | |
| 255 | - "-" + this.twoDigits(dateTime.getMonth() + 1) + | |
| 256 | - "-" + this.twoDigits(dateTime.getDate()) + | |
| 257 | - "T" + this.twoDigits(dateTime.getHours()) + | |
| 258 | - ":" + this.twoDigits(dateTime.getMinutes()) + | |
| 259 | - ":" + this.twoDigits(dateTime.getSeconds()) | |
| 260 | - ); | |
| 261 | - }, | |
| 262 | - twoDigits: function (num) { | |
| 263 | - if (num < 10) { | |
| 264 | - return "0" + num; | |
| 265 | - } else { | |
| 266 | - return "" + num; | |
| 267 | - } | |
| 268 | - }, | |
| 269 | - showMarkPoints: function(self) { | |
| 270 | - let that = self; | |
| 271 | - let npointJ = null; | |
| 272 | - let npointW = null; | |
| 273 | - let point = null; | |
| 274 | - for (let i = 0; i < self.mobilePositionList.length; i++) { | |
| 275 | - if (self.mobilePositionList[i].geodeticSystem == "BD-09") { | |
| 276 | - npointJ = self.mobilePositionList[i].cnLng; | |
| 277 | - npointW = self.mobilePositionList[i].cnLat; | |
| 278 | - point = new BMap.Point(npointJ, npointW); | |
| 279 | - } else { | |
| 280 | - npointJ = self.mobilePositionList[i].longitude; | |
| 281 | - npointW = self.mobilePositionList[i].latitude; | |
| 282 | - let bd2 = geoTools.GPSToBaidu(npointJ, npointW); | |
| 283 | - point = new BMap.Point(bd2.lat, bd2.lng); | |
| 284 | - } | |
| 285 | - self.mapPointList.push(point); | |
| 286 | - let marker = new BMap.Marker(point); // 创建标注 | |
| 287 | - self.map.addOverlay(marker); // 将标注添加到地图中 | |
| 288 | - //提示信息 可以解析 HTML标签以及CSS | |
| 289 | - let infoWindow = new BMap.InfoWindow(`<p style='text-align:left;font-weight:800'>设备: ${self.mobilePositionList[i].deviceId}</p> | |
| 290 | - <p style='text-align:left;font-weight:0'>时间: ${self.mobilePositionList[i].time}</p>`); | |
| 291 | - // 鼠标移上标注点要发生的事 | |
| 292 | - marker.addEventListener("mouseover", function () { | |
| 293 | - this.openInfoWindow(infoWindow); | |
| 294 | - }); | |
| 295 | - // 鼠标移开标注点要发生的事 | |
| 296 | - marker.addEventListener("mouseout", function () { | |
| 297 | - this.closeInfoWindow(infoWindow); | |
| 298 | - }); | |
| 299 | - // 鼠标点击标注点要发生的事情 | |
| 300 | - marker.addEventListener("click", function () { | |
| 301 | - alert("点击"); | |
| 302 | - }); | |
| 241 | + featureClickEvent: function (channels) { | |
| 242 | + this.closeInfoBox() | |
| 243 | + if (channels.length > 0) { | |
| 244 | + this.channel = channels[0] | |
| 245 | + } | |
| 246 | + this.$nextTick(() => { | |
| 247 | + this.infoBoxId = this.$refs.map.openInfoBox([this.channel.longitude, this.channel.latitude], this.$refs.infobox, [0, -50]) | |
| 248 | + }) | |
| 249 | + }, | |
| 250 | + closeInfoBox: function () { | |
| 251 | + if (this.infoBoxId != null) { | |
| 252 | + this.$refs.map.closeInfoBox(this.infoBoxId) | |
| 253 | + } | |
| 254 | + }, | |
| 255 | + play: function (channel) { | |
| 256 | + | |
| 257 | + let deviceId = channel.deviceId; | |
| 258 | + this.isLoging = true; | |
| 259 | + let channelId = channel.channelId; | |
| 260 | + console.log("通知设备推流1:" + deviceId + " : " + channelId); | |
| 261 | + let that = this; | |
| 262 | + this.$axios({ | |
| 263 | + method: 'get', | |
| 264 | + url: '/api/play/start/' + deviceId + '/' + channelId | |
| 265 | + }).then(function (res) { | |
| 266 | + that.isLoging = false; | |
| 267 | + if (res.data.code === 0) { | |
| 268 | + | |
| 269 | + that.$refs.devicePlayer.openDialog("media", deviceId, channelId, { | |
| 270 | + streamInfo: res.data.data, | |
| 271 | + hasAudio: channel.hasAudio | |
| 272 | + }); | |
| 273 | + | |
| 274 | + } else { | |
| 275 | + that.$message.error(res.data.msg); | |
| 276 | + } | |
| 277 | + }).catch(function (e) { | |
| 278 | + }); | |
| 279 | + }, | |
| 280 | + edit: function (data) { | |
| 281 | + this.$message.warning('暂不支持'); | |
| 282 | + }, | |
| 283 | + getTrace: function (data) { | |
| 284 | + // this.$message.warning('暂不支持'); | |
| 285 | + this.clean() | |
| 286 | + this.$refs.queryTrace.openDialog(data, (channelPositions) => { | |
| 287 | + console.log("getTrace") | |
| 288 | + console.log(channelPositions) | |
| 289 | + if (channelPositions.length === 0) { | |
| 290 | + this.$message.success('未查询到轨迹信息'); | |
| 291 | + } else { | |
| 292 | + let positions = []; | |
| 293 | + for (let i = 0; i < channelPositions.length; i++) { | |
| 294 | + if (channelPositions[i].cnLng * channelPositions[i].cnLat > 0) { | |
| 295 | + positions.push([channelPositions[i].cnLng, channelPositions[i].cnLat]) | |
| 303 | 296 | } |
| 304 | - let view = that.map.getViewport(eval(self.mapPointList)); | |
| 305 | - that.map.centerAndZoom(view.center, view.zoom); | |
| 306 | - }, | |
| 297 | + | |
| 298 | + } | |
| 299 | + if (positions.length === 0) { | |
| 300 | + this.$message.success('未查询到轨迹信息'); | |
| 301 | + return; | |
| 302 | + } | |
| 303 | + this.lineLayer = this.$refs.map.addLineLayer(positions) | |
| 304 | + this.$refs.map.fit(this.lineLayer) | |
| 305 | + } | |
| 306 | + }) | |
| 307 | 307 | }, |
| 308 | + clean: function (){ | |
| 309 | + if (this.lineLayer != null) { | |
| 310 | + this.$refs.map.removeLayer(this.lineLayer) | |
| 311 | + } | |
| 312 | + if (this.infoBoxId != null) { | |
| 313 | + this.$refs.map.closeInfoBox(this.infoBoxId) | |
| 314 | + } | |
| 315 | + if (this.layer != null) { | |
| 316 | + this.$refs.map.removeLayer(this.layer) | |
| 317 | + } | |
| 318 | + } | |
| 319 | + }, | |
| 320 | + | |
| 308 | 321 | }; |
| 309 | 322 | </script> |
| 310 | 323 | |
| 311 | 324 | <style> |
| 312 | -.videoList { | |
| 313 | - display: flex; | |
| 314 | - flex-wrap: wrap; | |
| 315 | - align-content: flex-start; | |
| 316 | -} | |
| 317 | - | |
| 318 | -.video-item { | |
| 319 | - position: relative; | |
| 320 | - width: 15rem; | |
| 321 | - height: 10rem; | |
| 322 | - margin-right: 1rem; | |
| 323 | - background-color: #000000; | |
| 325 | +.infobox-content{ | |
| 326 | + width: 260px; | |
| 327 | + background-color: #FFFFFF; | |
| 328 | + padding: 10px; | |
| 329 | + border-radius: 10px; | |
| 330 | + border: 1px solid #e2e2e2; | |
| 324 | 331 | } |
| 325 | 332 | |
| 326 | -.video-item-img { | |
| 333 | +.infobox-content::after { | |
| 327 | 334 | position: absolute; |
| 328 | - top: 0; | |
| 329 | - bottom: 0; | |
| 330 | - left: 0; | |
| 331 | - right: 0; | |
| 332 | - margin: auto; | |
| 333 | - width: 100%; | |
| 334 | - height: 100%; | |
| 335 | -} | |
| 336 | - | |
| 337 | -.video-item-img:after { | |
| 335 | + bottom: -11px; | |
| 336 | + left: 130px; | |
| 337 | + display: block; | |
| 338 | 338 | content: ""; |
| 339 | - display: inline-block; | |
| 340 | - position: absolute; | |
| 341 | - z-index: 2; | |
| 342 | - top: 0; | |
| 343 | - bottom: 0; | |
| 344 | - left: 0; | |
| 345 | - right: 0; | |
| 346 | - margin: auto; | |
| 347 | - width: 3rem; | |
| 348 | - height: 3rem; | |
| 349 | - background-image: url("../assets/loading.png"); | |
| 350 | - background-size: cover; | |
| 351 | - background-color: #000000; | |
| 339 | + width: 16px; | |
| 340 | + height: 16px; | |
| 341 | + background: url('~@static/images/arrow.png') no-repeat center; | |
| 352 | 342 | } |
| 353 | - | |
| 354 | -.video-item-title { | |
| 343 | +.infobox-close { | |
| 355 | 344 | position: absolute; |
| 356 | - bottom: 0; | |
| 345 | + right: 1rem; | |
| 346 | + top: 1rem; | |
| 357 | 347 | color: #000000; |
| 358 | - background-color: #ffffff; | |
| 359 | - line-height: 1.5rem; | |
| 360 | - padding: 0.3rem; | |
| 361 | - width: 14.4rem; | |
| 348 | + cursor:pointer | |
| 362 | 349 | } |
| 363 | - | |
| 364 | -.baidumap { | |
| 350 | +.el-descriptions__title { | |
| 351 | + font-size: 1rem; | |
| 352 | + font-weight: 700; | |
| 353 | + padding: 20px 20px 0px 23px; | |
| 354 | + text-align: center; | |
| 365 | 355 | width: 100%; |
| 366 | - height: 100%; | |
| 367 | - border: none; | |
| 368 | - position: absolute; | |
| 369 | - left: 0; | |
| 370 | - top: 0; | |
| 371 | - right: 0; | |
| 372 | - bottom: 0; | |
| 373 | - margin: auto; | |
| 374 | -} | |
| 375 | - | |
| 376 | -/* 去除百度地图版权那行字 和 百度logo */ | |
| 377 | -.baidumap > .BMap_cpyCtrl { | |
| 378 | - display: none !important; | |
| 379 | -} | |
| 380 | -.baidumap > .anchorBL { | |
| 381 | - display: none !important; | |
| 382 | 356 | } |
| 383 | 357 | </style> | ... | ... |
web_src/src/components/dialog/channelMapInfobox.vue
0 → 100644
| 1 | +<template> | |
| 2 | + <div id="channelMapInfobox" style="display: none"> | |
| 3 | + <div > | |
| 4 | + <el-descriptions class="margin-top" title="channel.name" :column="4" direction="vertical"> | |
| 5 | + <el-descriptions-item label="生产厂商">{{channel.manufacture}}</el-descriptions-item> | |
| 6 | + <el-descriptions-item label="型号">{{channel.model}}</el-descriptions-item> | |
| 7 | + <el-descriptions-item label="设备归属" >{{channel.owner}}</el-descriptions-item> | |
| 8 | + <el-descriptions-item label="行政区域" >{{channel.civilCode}}</el-descriptions-item> | |
| 9 | + <el-descriptions-item label="安装地址" >{{channel.address}}</el-descriptions-item> | |
| 10 | + <el-descriptions-item label="云台类型" >{{channel.ptztypeText}}</el-descriptions-item> | |
| 11 | + <el-descriptions-item label="经纬度" >{{channel.longitude}},{{channel.latitude}}</el-descriptions-item> | |
| 12 | + <el-descriptions-item label="状态"> | |
| 13 | + <el-tag size="small" v-if="channel.status === 1">在线</el-tag> | |
| 14 | + <el-tag size="small" v-if="channel.status === 0">离线</el-tag> | |
| 15 | + </el-descriptions-item> | |
| 16 | + </el-descriptions> | |
| 17 | + </div> | |
| 18 | + | |
| 19 | + <devicePlayer ref="devicePlayer" v-loading="isLoging"></devicePlayer> | |
| 20 | + </div> | |
| 21 | +</template> | |
| 22 | + | |
| 23 | +<script> | |
| 24 | +import devicePlayer from '../dialog/devicePlayer.vue' | |
| 25 | + | |
| 26 | +export default { | |
| 27 | + name: "channelMapInfobox", | |
| 28 | + props: ['channel'], | |
| 29 | + computed: {devicePlayer}, | |
| 30 | + created() {}, | |
| 31 | + data() { | |
| 32 | + return { | |
| 33 | + showDialog: false, | |
| 34 | + isLoging: false | |
| 35 | + }; | |
| 36 | + }, | |
| 37 | + methods: { | |
| 38 | + | |
| 39 | + play: function (){ | |
| 40 | + let deviceId = this.channel.deviceId; | |
| 41 | + this.isLoging = true; | |
| 42 | + let channelId = this.channel.channelId; | |
| 43 | + console.log("通知设备推流1:" + deviceId + " : " + channelId); | |
| 44 | + let that = this; | |
| 45 | + this.$axios({ | |
| 46 | + method: 'get', | |
| 47 | + url: '/api/play/start/' + deviceId + '/' + channelId | |
| 48 | + }).then(function (res) { | |
| 49 | + that.isLoging = false; | |
| 50 | + if (res.data.code === 0) { | |
| 51 | + that.$refs.devicePlayer.openDialog("media", deviceId, channelId, { | |
| 52 | + streamInfo: res.data.data, | |
| 53 | + hasAudio: this.channel.hasAudio | |
| 54 | + }); | |
| 55 | + } else { | |
| 56 | + that.$message.error(res.data.msg); | |
| 57 | + } | |
| 58 | + }).catch(function (e) { | |
| 59 | + }); | |
| 60 | + }, | |
| 61 | + close: function () { | |
| 62 | + }, | |
| 63 | + }, | |
| 64 | +}; | |
| 65 | +</script> | ... | ... |
web_src/src/components/dialog/devicePlayer.vue
| ... | ... | @@ -4,7 +4,7 @@ |
| 4 | 4 | <el-dialog title="视频播放" top="0" :close-on-click-modal="false" :visible.sync="showVideoDialog" @close="close()"> |
| 5 | 5 | <!-- <LivePlayer v-if="showVideoDialog" ref="videoPlayer" :videoUrl="videoUrl" :error="videoError" :message="videoError" :hasaudio="hasaudio" fluent autoplay live></LivePlayer> --> |
| 6 | 6 | <div style="width: 100%; height: 100%"> |
| 7 | - <player containerId="container" ref="videoPlayer" :visible.sync="showVideoDialog" :videoUrl="videoUrl" :error="videoError" :message="videoError" height="100px" :hasAudio="hasAudio" fluent autoplay live ></player> | |
| 7 | + <player ref="videoPlayer" :visible.sync="showVideoDialog" :videoUrl="videoUrl" :error="videoError" :message="videoError" height="100px" :hasAudio="hasAudio" fluent autoplay live ></player> | |
| 8 | 8 | </div> |
| 9 | 9 | <div id="shared" style="text-align: right; margin-top: 1rem;"> |
| 10 | 10 | <el-tabs v-model="tabActiveName" @tab-click="tabHandleClick"> |
| ... | ... | @@ -185,7 +185,7 @@ |
| 185 | 185 | // import player from '../dialog/rtcPlayer.vue' |
| 186 | 186 | // import LivePlayer from '@liveqing/liveplayer' |
| 187 | 187 | // import player from '../dialog/easyPlayer.vue' |
| 188 | -import player from '../dialog/jessibuca.vue' | |
| 188 | +import player from '../common/jessibuca.vue' | |
| 189 | 189 | import recordDownload from '../dialog/recordDownload.vue' |
| 190 | 190 | export default { |
| 191 | 191 | name: 'devicePlayer', | ... | ... |