| | |
| | | `treeType` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, |
| | | PRIMARY KEY (`id`) USING BTREE, |
| | | UNIQUE KEY `device_deviceId_uindex` (`deviceId`) USING BTREE |
| | | ) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; |
| | | ) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; |
| | | /*!40101 SET character_set_client = @saved_cs_client */; |
| | | |
| | | -- |
| | |
| | | `longitude` double DEFAULT NULL, |
| | | `latitude` double DEFAULT NULL, |
| | | `alarmType` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, |
| | | `createTime` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, |
| | | PRIMARY KEY (`id`) USING BTREE |
| | | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; |
| | | /*!40101 SET character_set_client = @saved_cs_client */; |
| | |
| | | `longitudeWgs84` double DEFAULT NULL, |
| | | `latitudeWgs84` double DEFAULT NULL, |
| | | `businessGroupId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, |
| | | `gpsTime` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, |
| | | PRIMARY KEY (`id`) USING BTREE, |
| | | UNIQUE KEY `device_channel_id_uindex` (`id`) USING BTREE, |
| | | UNIQUE KEY `device_channel_pk` (`channelId`,`deviceId`) USING BTREE |
| | | ) ENGINE=InnoDB AUTO_INCREMENT=19317 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; |
| | | ) ENGINE=InnoDB AUTO_INCREMENT=19324 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; |
| | | /*!40101 SET character_set_client = @saved_cs_client */; |
| | | |
| | | -- |
| | |
| | | `latitudeGcj02` double DEFAULT NULL, |
| | | `longitudeWgs84` double DEFAULT NULL, |
| | | `latitudeWgs84` double DEFAULT NULL, |
| | | `createTime` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, |
| | | PRIMARY KEY (`id`) USING BTREE |
| | | ) ENGINE=InnoDB AUTO_INCREMENT=1508 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; |
| | | ) ENGINE=InnoDB AUTO_INCREMENT=5649 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; |
| | | /*!40101 SET character_set_client = @saved_cs_client */; |
| | | |
| | | -- |
| | |
| | | `streamType` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, |
| | | `mediaServerId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, |
| | | `status` int DEFAULT NULL, |
| | | `createStamp` bigint DEFAULT NULL, |
| | | `createTime` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, |
| | | `gpsTime` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, |
| | | PRIMARY KEY (`gbStreamId`) USING BTREE, |
| | | UNIQUE KEY `app` (`app`,`stream`) USING BTREE, |
| | | UNIQUE KEY `gbId` (`gbId`) USING BTREE |
| | | ) ENGINE=InnoDB AUTO_INCREMENT=301679 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; |
| | | ) ENGINE=InnoDB AUTO_INCREMENT=301681 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; |
| | | /*!40101 SET character_set_client = @saved_cs_client */; |
| | | |
| | | -- |
| | |
| | | `username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, |
| | | `createTime` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, |
| | | PRIMARY KEY (`id`) USING BTREE |
| | | ) ENGINE=InnoDB AUTO_INCREMENT=22051 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; |
| | | ) ENGINE=InnoDB AUTO_INCREMENT=29943 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; |
| | | /*!40101 SET character_set_client = @saved_cs_client */; |
| | | |
| | | -- |
| | |
| | | `startOfflinePush` int DEFAULT '0', |
| | | `administrativeDivision` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, |
| | | `catalogGroup` int DEFAULT '1', |
| | | `createTime` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, |
| | | `updateTime` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, |
| | | PRIMARY KEY (`id`) USING BTREE, |
| | | UNIQUE KEY `parent_platform_id_uindex` (`id`) USING BTREE, |
| | | UNIQUE KEY `parent_platform_pk` (`serverGBId`) USING BTREE |
| | | ) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; |
| | | ) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; |
| | | /*!40101 SET character_set_client = @saved_cs_client */; |
| | | |
| | | -- |
| | |
| | | `enable_remove_none_reader` bit(1) NOT NULL, |
| | | `createTime` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, |
| | | `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, |
| | | `updateTime` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, |
| | | PRIMARY KEY (`id`) USING BTREE, |
| | | UNIQUE KEY `stream_proxy_pk` (`app`,`stream`) USING BTREE |
| | | ) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; |
| | | ) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; |
| | | /*!40101 SET character_set_client = @saved_cs_client */; |
| | | |
| | | -- |
| | |
| | | `totalReaderCount` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, |
| | | `originType` int DEFAULT NULL, |
| | | `originTypeStr` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, |
| | | `createStamp` bigint DEFAULT NULL, |
| | | `createTime` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, |
| | | `aliveSecond` int DEFAULT NULL, |
| | | `mediaServerId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, |
| | | `serverId` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, |
| | | `pushTime` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, |
| | | `updateTime` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, |
| | | PRIMARY KEY (`id`) USING BTREE, |
| | | UNIQUE KEY `stream_push_pk` (`app`,`stream`) USING BTREE |
| | | ) ENGINE=InnoDB AUTO_INCREMENT=305304 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; |
| | |
| | | /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; |
| | | /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; |
| | | |
| | | -- Dump completed on 2022-07-04 1:07:19 |
| | | -- Dump completed on 2022-07-06 9:43:54 |
| | |
| | | alter table stream_push |
| | | add serverId varchar(50) not null; |
| | | |
| | | alter table device |
| | | add geoCoordSys varchar(50) not null; |
| | | alter table device |
| | | add treeType varchar(50) not null; |
| | | update device set device.geoCoordSys='WGS84'; |
| | | update device set device.treeType='CivilCode'; |
| | | |
| | | alter table device_channel |
| | | add longitudeGcj02 double default null; |
| | | alter table device_channel |
| | |
| | | add latitudeWgs84 double default null; |
| | | alter table device_channel |
| | | add businessGroupId varchar(50) default null; |
| | | alter table device_channel |
| | | add gpsTime varchar(50) default null; |
| | | |
| | | |
| | | alter table device_mobile_position change cnLng longitudeGcj02 double default null; |
| | | alter table device_mobile_position change cnLat latitudeGcj02 double default null; |
| | | alter table device_mobile_position |
| | | change cnLng longitudeGcj02 double default null; |
| | | alter table device_mobile_position |
| | | change cnLat latitudeGcj02 double default null; |
| | | alter table device_mobile_position |
| | | add longitudeWgs84 double default null; |
| | | alter table device_mobile_position |
| | | add latitudeWgs84 double default null; |
| | | alter table device_mobile_position drop geodeticSystem; |
| | | alter table device_mobile_position |
| | | drop geodeticSystem; |
| | | alter table device_mobile_position |
| | | add createTime varchar(50) default null; |
| | | |
| | | alter table device_alarm |
| | | add createTime varchar(50) default null; |
| | | |
| | | alter table gb_stream |
| | | change createStamp createTime varchar(50) default null; |
| | | |
| | | alter table parent_platform |
| | | add createTime varchar(50) default null; |
| | | alter table parent_platform |
| | | add updateTime varchar(50) default null; |
| | | |
| | | alter table stream_proxy |
| | | add updateTime varchar(50) default null; |
| | | |
| | | alter table stream_push |
| | | add pushTime varchar(50) default null; |
| | | alter table stream_push |
| | | add updateTime varchar(50) default null; |
| | | alter table stream_push |
| | | change createStamp createTime varchar(50) default null; |
| | | |
| | | |
| | | |
| | |
| | | */
|
| | | private String alarmType;
|
| | |
|
| | | private String createTime;
|
| | |
|
| | |
|
| | | public String getId() {
|
| | | return id;
|
| | |
| | | public void setChannelId(String channelId) {
|
| | | this.channelId = channelId;
|
| | | }
|
| | |
|
| | | public String getCreateTime() {
|
| | | return createTime;
|
| | | }
|
| | |
|
| | | public void setCreateTime(String createTime) {
|
| | | this.createTime = createTime;
|
| | | }
|
| | | }
|
| | |
| | | */ |
| | | private String businessGroupId; |
| | | |
| | | /** |
| | | * GPS的更新时间 |
| | | */ |
| | | private String gpsTime; |
| | | |
| | | public int getId() { |
| | | return id; |
| | | } |
| | |
| | | public void setBusinessGroupId(String businessGroupId) { |
| | | this.businessGroupId = businessGroupId; |
| | | } |
| | | |
| | | public String getGpsTime() { |
| | | return gpsTime; |
| | | } |
| | | |
| | | public void setGpsTime(String gpsTime) { |
| | | this.gpsTime = gpsTime; |
| | | } |
| | | } |
| | |
| | | private double latitude; |
| | | private String streamType; |
| | | private boolean status; |
| | | /** |
| | | * GMT unix系统时间戳,单位秒 |
| | | */ |
| | | public Long createStamp; |
| | | |
| | | public String createTime; |
| | | |
| | | @Override |
| | | public Integer getGbStreamId() { |
| | |
| | | this.mediaServerId = mediaServerId; |
| | | } |
| | | |
| | | |
| | | public Long getCreateStamp() { |
| | | return createStamp; |
| | | public String getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateStamp(Long createStamp) { |
| | | this.createStamp = createStamp; |
| | | public void setCreateTime(String createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | } |
| | |
| | | */ |
| | | private double latitudeWgs84; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private String createTime; |
| | | |
| | | |
| | | public String getDeviceId() { |
| | | return deviceId; |
| | |
| | | public void setLatitudeWgs84(double latitudeWgs84) { |
| | | this.latitudeWgs84 = latitudeWgs84; |
| | | } |
| | | |
| | | public String getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(String createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | } |
| | |
| | | */ |
| | | private String administrativeDivision; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private String updateTime; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private String createTime; |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | |
| | | public void setAdministrativeDivision(String administrativeDivision) { |
| | | this.administrativeDivision = administrativeDivision; |
| | | } |
| | | |
| | | public String getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(String updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public String getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(String createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | } |
| | |
| | | Element rootElement = getRootElement(evt); |
| | | |
| | | MobilePosition mobilePosition = new MobilePosition(); |
| | | mobilePosition.setCreateTime(DateUtil.getNow()); |
| | | Element deviceIdElement = rootElement.element("DeviceID"); |
| | | String channelId = deviceIdElement.getTextTrim().toString(); |
| | | Device device = redisCatchStorage.getDevice(deviceId); |
| | |
| | | deviceChannel.setLatitudeWgs84(mobilePosition.getLatitudeWgs84()); |
| | | deviceChannel.setLongitudeGcj02(mobilePosition.getLongitudeGcj02()); |
| | | deviceChannel.setLatitudeGcj02(mobilePosition.getLatitudeGcj02()); |
| | | deviceChannel.setGpsTime(mobilePosition.getTime()); |
| | | storager.updateChannelPosition(deviceChannel); |
| | | // 发送redis消息。 通知位置信息的变化 |
| | | JSONObject jsonObject = new JSONObject(); |
| | |
| | | logger.info("[收到Notify-Alarm]:{}/{}", device.getDeviceId(), deviceAlarm.getChannelId()); |
| | | if ("4".equals(deviceAlarm.getAlarmMethod())) { |
| | | MobilePosition mobilePosition = new MobilePosition(); |
| | | mobilePosition.setCreateTime(DateUtil.getNow()); |
| | | mobilePosition.setDeviceId(deviceAlarm.getDeviceId()); |
| | | mobilePosition.setTime(deviceAlarm.getAlarmTime()); |
| | | mobilePosition.setLongitude(deviceAlarm.getLongitude()); |
| | |
| | | deviceChannel.setLatitudeWgs84(mobilePosition.getLatitudeWgs84()); |
| | | deviceChannel.setLongitudeGcj02(mobilePosition.getLongitudeGcj02()); |
| | | deviceChannel.setLatitudeGcj02(mobilePosition.getLatitudeGcj02()); |
| | | deviceChannel.setGpsTime(mobilePosition.getTime()); |
| | | storager.updateChannelPosition(deviceChannel); |
| | | } |
| | | // TODO: 需要实现存储报警信息、报警分类 |
| | |
| | | String channelId = deviceIdElement.getText().toString(); |
| | | |
| | | DeviceAlarm deviceAlarm = new DeviceAlarm(); |
| | | deviceAlarm.setCreateTime(DateUtil.getNow()); |
| | | deviceAlarm.setDeviceId(device.getDeviceId()); |
| | | deviceAlarm.setChannelId(channelId); |
| | | deviceAlarm.setAlarmPriority(getText(rootElement, "AlarmPriority")); |
| | |
| | | if (!StringUtils.isEmpty(deviceAlarm.getAlarmMethod())) { |
| | | if ( deviceAlarm.getAlarmMethod().contains(DeviceAlarmMethod.GPS.getVal() + "")) { |
| | | MobilePosition mobilePosition = new MobilePosition(); |
| | | mobilePosition.setCreateTime(DateUtil.getNow()); |
| | | mobilePosition.setDeviceId(deviceAlarm.getDeviceId()); |
| | | mobilePosition.setTime(deviceAlarm.getAlarmTime()); |
| | | mobilePosition.setLongitude(deviceAlarm.getLongitude()); |
| | |
| | | deviceChannel.setLatitudeWgs84(mobilePosition.getLatitudeWgs84()); |
| | | deviceChannel.setLongitudeGcj02(mobilePosition.getLongitudeGcj02()); |
| | | deviceChannel.setLatitudeGcj02(mobilePosition.getLatitudeGcj02()); |
| | | deviceChannel.setGpsTime(mobilePosition.getTime()); |
| | | storager.updateChannelPosition(deviceChannel); |
| | | } |
| | | } |
| | |
| | | |
| | | |
| | | DeviceAlarm deviceAlarm = new DeviceAlarm(); |
| | | deviceAlarm.setCreateTime(DateUtil.getNow()); |
| | | deviceAlarm.setDeviceId(parentPlatform.getServerGBId()); |
| | | deviceAlarm.setChannelId(channelId); |
| | | deviceAlarm.setAlarmPriority(getText(rootElement, "AlarmPriority")); |
| | |
| | | import com.genersoft.iot.vmp.gb28181.utils.Coordtransform; |
| | | import com.genersoft.iot.vmp.gb28181.utils.NumericUtil; |
| | | import com.genersoft.iot.vmp.storager.IVideoManagerStorage; |
| | | import com.genersoft.iot.vmp.utils.DateUtil; |
| | | import com.genersoft.iot.vmp.utils.GpsUtil; |
| | | import org.dom4j.DocumentException; |
| | | import org.dom4j.Element; |
| | |
| | | rootElement = getRootElement(evt, device.getCharset()); |
| | | |
| | | MobilePosition mobilePosition = new MobilePosition(); |
| | | mobilePosition.setCreateTime(DateUtil.getNow()); |
| | | if (!StringUtils.isEmpty(device.getName())) { |
| | | mobilePosition.setDeviceName(device.getName()); |
| | | } |
| | |
| | | deviceChannel.setLatitudeWgs84(mobilePosition.getLatitudeWgs84()); |
| | | deviceChannel.setLongitudeGcj02(mobilePosition.getLongitudeGcj02()); |
| | | deviceChannel.setLatitudeGcj02(mobilePosition.getLatitudeGcj02()); |
| | | deviceChannel.setGpsTime(mobilePosition.getTime()); |
| | | storager.updateChannelPosition(deviceChannel); |
| | | //回复 200 OK |
| | | responseAck(evt, Response.OK); |
| | |
| | | import com.genersoft.iot.vmp.gb28181.utils.Coordtransform; |
| | | import com.genersoft.iot.vmp.gb28181.utils.NumericUtil; |
| | | import com.genersoft.iot.vmp.storager.IVideoManagerStorage; |
| | | import com.genersoft.iot.vmp.utils.DateUtil; |
| | | import com.genersoft.iot.vmp.utils.GpsUtil; |
| | | import org.dom4j.DocumentException; |
| | | import org.dom4j.Element; |
| | |
| | | rootElement = getRootElement(evt, device.getCharset()); |
| | | |
| | | MobilePosition mobilePosition = new MobilePosition(); |
| | | mobilePosition.setCreateTime(DateUtil.getNow()); |
| | | if (!StringUtils.isEmpty(device.getName())) { |
| | | mobilePosition.setDeviceName(device.getName()); |
| | | } |
| | |
| | | deviceChannel.setLatitudeWgs84(mobilePosition.getLatitudeWgs84()); |
| | | deviceChannel.setLongitudeGcj02(mobilePosition.getLongitudeGcj02()); |
| | | deviceChannel.setLatitudeGcj02(mobilePosition.getLatitudeGcj02()); |
| | | deviceChannel.setGpsTime(mobilePosition.getTime()); |
| | | storager.updateChannelPosition(deviceChannel); |
| | | //回复 200 OK |
| | | responseAck(evt, Response.OK); |
| | |
| | | import com.alibaba.fastjson.JSONObject;
|
| | | import com.genersoft.iot.vmp.gb28181.bean.Device;
|
| | | import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
|
| | | import com.genersoft.iot.vmp.utils.DateUtil;
|
| | | import org.dom4j.Attribute;
|
| | | import org.dom4j.Document;
|
| | | import org.dom4j.DocumentException;
|
| | |
| | | } else {
|
| | | deviceChannel.setLatitude(0.00);
|
| | | }
|
| | | deviceChannel.setGpsTime(DateUtil.getNow());
|
| | | if (deviceChannel.getLongitude()*deviceChannel.getLatitude() > 0) {
|
| | | if ("WGS84".equals(device.getGeoCoordSys())) {
|
| | | deviceChannel.setLongitudeWgs84(deviceChannel.getLongitude());
|
| | |
| | | @PostMapping(value = "/on_stream_changed", produces = "application/json;charset=UTF-8")
|
| | | public ResponseEntity<String> onStreamChanged(@RequestBody MediaItem item){
|
| | |
|
| | | if (logger.isDebugEnabled()) {
|
| | | logger.debug("[ ZLM HOOK ]on_stream_changed API调用,参数:" + JSONObject.toJSONString(item));
|
| | | }
|
| | | logger.info("[ ZLM HOOK ]on_stream_changed API调用,参数:" + JSONObject.toJSONString(item));
|
| | | String mediaServerId = item.getMediaServerId();
|
| | | JSONObject json = (JSONObject) JSON.toJSON(item);
|
| | | ZLMHttpHookSubscribe.Event subscribe = this.subscribe.getSubscribe(ZLMHttpHookSubscribe.HookType.on_stream_changed, json);
|
| | |
| | |
|
| | | if (mediaServerItem != null){
|
| | | if (regist) {
|
| | | StreamPushItem streamPushItem = null;
|
| | | StreamInfo streamInfoByAppAndStream = mediaService.getStreamInfoByAppAndStream(mediaServerItem, app, streamId, tracks);
|
| | | item.setStreamInfo(streamInfoByAppAndStream);
|
| | |
|
| | |
| | | @PostMapping(value = "/on_stream_none_reader", produces = "application/json;charset=UTF-8")
|
| | | public ResponseEntity<String> onStreamNoneReader(@RequestBody JSONObject json){
|
| | |
|
| | | if (logger.isDebugEnabled()) {
|
| | | logger.debug("[ ZLM HOOK ]on_stream_none_reader API调用,参数:" + json.toString());
|
| | | }
|
| | | logger.info("[ ZLM HOOK ]on_stream_none_reader API调用,参数:" + json.toString());
|
| | | String mediaServerId = json.getString("mediaServerId");
|
| | | String streamId = json.getString("stream");
|
| | | String app = json.getString("app");
|
| | |
| | | import com.genersoft.iot.vmp.storager.dao.GbStreamMapper; |
| | | import com.genersoft.iot.vmp.storager.dao.PlatformGbStreamMapper; |
| | | import com.genersoft.iot.vmp.storager.dao.StreamPushMapper; |
| | | import com.genersoft.iot.vmp.utils.DateUtil; |
| | | import org.checkerframework.checker.units.qual.C; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | gbStreamMapper.update(transform); |
| | | streamPushMapper.del(gbStreamList.get(0).getApp(), gbStreamList.get(0).getStream()); |
| | | }else { |
| | | transform.setCreateStamp(System.currentTimeMillis()); |
| | | transform.setCreateTime(DateUtil.getNow()); |
| | | transform.setUpdateTime(DateUtil.getNow()); |
| | | gbStreamMapper.add(transform); |
| | | } |
| | | if (transform != null) { |
| | |
| | | package com.genersoft.iot.vmp.media.zlm.dto; |
| | | |
| | | import com.genersoft.iot.vmp.gb28181.bean.GbStream; |
| | | import com.genersoft.iot.vmp.utils.DateUtil; |
| | | import org.jetbrains.annotations.NotNull; |
| | | import org.springframework.util.unit.DataUnit; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | private String serverId; |
| | | |
| | | /** |
| | | * 推流时间 |
| | | */ |
| | | private String pushTime; |
| | | |
| | | /** |
| | | * 更新时间 |
| | | */ |
| | | private String updateTime; |
| | | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | private String createTime; |
| | | |
| | | public String getVhost() { |
| | | return vhost; |
| | | } |
| | |
| | | |
| | | @Override |
| | | public int compareTo(@NotNull StreamPushItem streamPushItem) { |
| | | return Long.valueOf(super.createStamp - streamPushItem.getCreateStamp().intValue()).intValue(); |
| | | return Long.valueOf(DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(super.createTime) |
| | | - DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(streamPushItem.getCreateTime())).intValue(); |
| | | } |
| | | |
| | | public static class MediaSchema { |
| | |
| | | public void setServerId(String serverId) { |
| | | this.serverId = serverId; |
| | | } |
| | | |
| | | |
| | | public String getPushTime() { |
| | | return pushTime; |
| | | } |
| | | |
| | | public void setPushTime(String pushTime) { |
| | | this.pushTime = pushTime; |
| | | } |
| | | |
| | | public String getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(String updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | @Override |
| | | public String getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | @Override |
| | | public void setCreateTime(String createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | } |
| | | |
| | |
| | | ParentPlatform platform = storage.queryParentPlatByServerGBId(gbId); |
| | | |
| | | DeviceAlarm deviceAlarm = new DeviceAlarm(); |
| | | deviceAlarm.setCreateTime(DateUtil.getNow()); |
| | | deviceAlarm.setChannelId(gbId); |
| | | deviceAlarm.setAlarmDescription(alarmChannelMessage.getAlarmDescription()); |
| | | deviceAlarm.setAlarmMethod("" + alarmChannelMessage.getAlarmSn()); |
| | |
| | | public boolean start(String app, String stream) { |
| | | boolean result = false; |
| | | StreamProxyItem streamProxy = videoManagerStorager.queryStreamProxy(app, stream); |
| | | if (!streamProxy.isEnable() && streamProxy != null) { |
| | | if (!streamProxy.isEnable() ) { |
| | | JSONObject jsonObject = addStreamProxyToZlm(streamProxy); |
| | | if (jsonObject == null) { |
| | | return false; |
| | | } |
| | | System.out.println(jsonObject); |
| | | if (jsonObject.getInteger("code") == 0) { |
| | | result = true; |
| | | streamProxy.setEnable(true); |
| | |
| | | StreamProxyItem streamProxyDto = videoManagerStorager.queryStreamProxy(app, stream); |
| | | if (streamProxyDto != null && streamProxyDto.isEnable()) { |
| | | JSONObject jsonObject = removeStreamProxyFromZlm(streamProxyDto); |
| | | if (jsonObject.getInteger("code") == 0) { |
| | | if (jsonObject != null && jsonObject.getInteger("code") == 0) { |
| | | streamProxyDto.setEnable(false); |
| | | result = videoManagerStorager.updateStreamProxy(streamProxyDto); |
| | | } |
| | |
| | | import com.genersoft.iot.vmp.service.IStreamPushService; |
| | | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| | | import com.genersoft.iot.vmp.storager.dao.*; |
| | | import com.genersoft.iot.vmp.utils.DateUtil; |
| | | import com.github.pagehelper.PageHelper; |
| | | import com.github.pagehelper.PageInfo; |
| | | import org.slf4j.Logger; |
| | |
| | | streamPushItem.setOriginType(item.getOriginType()); |
| | | streamPushItem.setOriginTypeStr(item.getOriginTypeStr()); |
| | | streamPushItem.setOriginUrl(item.getOriginUrl()); |
| | | streamPushItem.setCreateStamp(item.getCreateStamp() * 1000); |
| | | streamPushItem.setCreateTime(DateUtil.getNow()); |
| | | streamPushItem.setAliveSecond(item.getAliveSecond()); |
| | | streamPushItem.setStatus(true); |
| | | streamPushItem.setStreamType("push"); |
| | |
| | | public boolean saveToGB(GbStream stream) { |
| | | stream.setStreamType("push"); |
| | | stream.setStatus(true); |
| | | stream.setCreateStamp(System.currentTimeMillis()); |
| | | stream.setCreateTime(DateUtil.getNow()); |
| | | int add = gbStreamMapper.add(stream); |
| | | |
| | | // 查找开启了全部直播流共享的上级平台 |
| | |
| | | streamPushItem.setStreamType("push"); |
| | | streamPushItem.setStatus(true); |
| | | streamPushItem.setGbId("34020000004111" + gbId); |
| | | streamPushItem.setCreateStamp(System.currentTimeMillis()); |
| | | streamPushItem.setCreateTime(DateUtil.getNow()); |
| | | gbId ++; |
| | | } |
| | | int limitCount = 30; |
| | |
| | | import com.alibaba.excel.event.AnalysisEventListener; |
| | | import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem; |
| | | import com.genersoft.iot.vmp.service.IStreamPushService; |
| | | import com.genersoft.iot.vmp.utils.DateUtil; |
| | | import com.genersoft.iot.vmp.vmanager.bean.StreamPushExcelDto; |
| | | import com.google.common.collect.BiMap; |
| | | import com.google.common.collect.HashBiMap; |
| | |
| | | streamPushItem.setGbId(streamPushExcelDto.getGbId()); |
| | | streamPushItem.setStatus(false); |
| | | streamPushItem.setStreamType("push"); |
| | | streamPushItem.setCreateStamp(System.currentTimeMillis()); |
| | | streamPushItem.setCreateTime(DateUtil.getNow()); |
| | | streamPushItem.setMediaServerId(defaultMediaServerId); |
| | | streamPushItem.setName(streamPushExcelDto.getName()); |
| | | streamPushItem.setOriginType(2); |
| | |
| | | @Repository |
| | | public interface DeviceAlarmMapper { |
| | | |
| | | @Insert("INSERT INTO device_alarm (deviceId, channelId, alarmPriority, alarmMethod, alarmTime, alarmDescription, longitude, latitude, alarmType ) " + |
| | | "VALUES ('${deviceId}', '${channelId}', '${alarmPriority}', '${alarmMethod}', '${alarmTime}', '${alarmDescription}', ${longitude}, ${latitude}, '${alarmType}')") |
| | | @Insert("INSERT INTO device_alarm (deviceId, channelId, alarmPriority, alarmMethod, alarmTime, alarmDescription, longitude, latitude, alarmType , createTime ) " + |
| | | "VALUES ('${deviceId}', '${channelId}', '${alarmPriority}', '${alarmMethod}', '${alarmTime}', '${alarmDescription}', ${longitude}, ${latitude}, '${alarmType}', '${createTime}')") |
| | | int add(DeviceAlarm alarm); |
| | | |
| | | |
| | |
| | | @Insert("INSERT INTO device_channel (channelId, deviceId, name, manufacture, model, owner, civilCode, block, " + |
| | | "address, parental, parentId, safetyWay, registerWay, certNum, certifiable, errCode, secrecy, " + |
| | | "ipAddress, port, password, PTZType, status, streamId, longitude, latitude, longitudeGcj02, latitudeGcj02, " + |
| | | "longitudeWgs84, latitudeWgs84, createTime, updateTime, businessGroupId) " + |
| | | "longitudeWgs84, latitudeWgs84, createTime, updateTime, businessGroupId, gpsTime) " + |
| | | "VALUES ('${channelId}', '${deviceId}', '${name}', '${manufacture}', '${model}', '${owner}', '${civilCode}', '${block}'," + |
| | | "'${address}', ${parental}, '${parentId}', ${safetyWay}, ${registerWay}, '${certNum}', ${certifiable}, ${errCode}, '${secrecy}', " + |
| | | "'${ipAddress}', ${port}, '${password}', ${PTZType}, ${status}, '${streamId}', ${longitude}, ${latitude}, ${longitudeGcj02}, " + |
| | | "${latitudeGcj02}, ${longitudeWgs84}, ${latitudeWgs84},'${createTime}', '${updateTime}', '${businessGroupId}')") |
| | | "${latitudeGcj02}, ${longitudeWgs84}, ${latitudeWgs84},'${createTime}', '${updateTime}', '${businessGroupId}', '${gpsTime}')") |
| | | int add(DeviceChannel channel); |
| | | |
| | | @Update(value = {" <script>" + |
| | |
| | | "<if test='longitudeWgs84 != null'>, longitudeWgs84=${longitudeWgs84}</if>" + |
| | | "<if test='latitudeWgs84 != null'>, latitudeWgs84=${latitudeWgs84}</if>" + |
| | | "<if test='businessGroupId != null'>, businessGroupId=#{businessGroupId}</if>" + |
| | | "<if test='gpsTime != null'>, gpsTime=#{gpsTime}</if>" + |
| | | "WHERE deviceId='${deviceId}' AND channelId='${channelId}'"+ |
| | | " </script>"}) |
| | | int update(DeviceChannel channel); |
| | |
| | | "(channelId, deviceId, name, manufacture, model, owner, civilCode, block, subCount, " + |
| | | " address, parental, parentId, safetyWay, registerWay, certNum, certifiable, errCode, secrecy, " + |
| | | " ipAddress, port, password, PTZType, status, streamId, longitude, latitude, longitudeGcj02, latitudeGcj02, " + |
| | | " longitudeWgs84, latitudeWgs84, createTime, updateTime, businessGroupId) " + |
| | | " longitudeWgs84, latitudeWgs84, createTime, updateTime, businessGroupId, gpsTime) " + |
| | | "values " + |
| | | "<foreach collection='addChannels' index='index' item='item' separator=','> " + |
| | | "('${item.channelId}', '${item.deviceId}', '${item.name}', '${item.manufacture}', '${item.model}', " + |
| | |
| | | "'${item.ipAddress}', ${item.port}, '${item.password}', ${item.PTZType}, ${item.status}, " + |
| | | "'${item.streamId}', ${item.longitude}, ${item.latitude},${item.longitudeGcj02}, " + |
| | | "${item.latitudeGcj02},${item.longitudeWgs84}, ${item.latitudeWgs84},'${item.createTime}', '${item.updateTime}', " + |
| | | "'${item.businessGroupId}') " + |
| | | "'${item.businessGroupId}', '${item.gpsTime}') " + |
| | | "</foreach> " + |
| | | "ON DUPLICATE KEY UPDATE " + |
| | | "updateTime=VALUES(updateTime), " + |
| | |
| | | "latitudeGcj02=VALUES(latitudeGcj02), " + |
| | | "longitudeWgs84=VALUES(longitudeWgs84), " + |
| | | "latitudeWgs84=VALUES(latitudeWgs84), " + |
| | | "businessGroupId=VALUES(businessGroupId) " + |
| | | "businessGroupId=VALUES(businessGroupId), " + |
| | | "gpsTime=VALUES(gpsTime)" + |
| | | "</script>") |
| | | int batchAdd(List<DeviceChannel> addChannels); |
| | | |
| | |
| | | "<if test='item.longitudeWgs84 != null'>, longitudeWgs84=${item.longitudeWgs84}</if>" + |
| | | "<if test='item.latitudeWgs84 != null'>, latitudeWgs84=${item.latitudeWgs84}</if>" + |
| | | "<if test='item.businessGroupId != null'>, businessGroupId=#{item.businessGroupId}</if>" + |
| | | "<if test='item.gpsTime != null'>, gpsTime=#{item.gpsTime}</if>" + |
| | | "WHERE deviceId='${item.deviceId}' AND channelId='${item.channelId}'"+ |
| | | "</foreach>" + |
| | | "</script>"}) |
| | |
| | | "longitudeGcj02=${longitudeGcj02}," + |
| | | "latitudeGcj02=${latitudeGcj02}," + |
| | | "longitudeWgs84=${longitudeWgs84}," + |
| | | "latitudeWgs84=${latitudeWgs84} " + |
| | | "latitudeWgs84=${latitudeWgs84}, " + |
| | | "gpsTime='${gpsTime}' " + |
| | | "WHERE deviceId=#{deviceId} " + |
| | | " <if test='channelId != null' > AND channelId=#{channelId}</if>" + |
| | | " </script>"}) |
| | |
| | | @Mapper |
| | | public interface DeviceMobilePositionMapper { |
| | | |
| | | @Insert("INSERT INTO device_mobile_position (deviceId,channelId, deviceName, time, longitude, latitude, altitude, speed, direction, reportSource, longitudeGcj02, latitudeGcj02, longitudeWgs84, latitudeWgs84) " + |
| | | "VALUES ('${deviceId}','${channelId}', '${deviceName}', '${time}', ${longitude}, ${latitude}, ${altitude}, ${speed}, ${direction}, '${reportSource}', ${longitudeGcj02}, ${latitudeGcj02}, ${longitudeWgs84}, ${latitudeWgs84})") |
| | | @Insert("INSERT INTO device_mobile_position (deviceId,channelId, deviceName, time, longitude, latitude, altitude, speed, direction, reportSource, longitudeGcj02, latitudeGcj02, longitudeWgs84, latitudeWgs84, createTime) " + |
| | | "VALUES ('${deviceId}','${channelId}', '${deviceName}', '${time}', ${longitude}, ${latitude}, ${altitude}, ${speed}, ${direction}, '${reportSource}', ${longitudeGcj02}, ${latitudeGcj02}, ${longitudeWgs84}, ${latitudeWgs84}, '${createTime}')") |
| | | int insertNewPosition(MobilePosition mobilePosition); |
| | | |
| | | @Select(value = {" <script>" + |
| | |
| | | public interface GbStreamMapper { |
| | | |
| | | @Insert("REPLACE INTO gb_stream (app, stream, gbId, name, " + |
| | | "longitude, latitude, streamType, mediaServerId, status, createStamp) VALUES" + |
| | | "longitude, latitude, streamType, mediaServerId, status, createTime) VALUES" + |
| | | "('${app}', '${stream}', '${gbId}', '${name}', " + |
| | | "'${longitude}', '${latitude}', '${streamType}', " + |
| | | "'${mediaServerId}', ${status}, ${createStamp})") |
| | | "'${mediaServerId}', ${status}, '${createTime}')") |
| | | @Options(useGeneratedKeys = true, keyProperty = "gbStreamId", keyColumn = "gbStreamId") |
| | | int add(GbStream gbStream); |
| | | |
| | |
| | | @Insert("<script> " + |
| | | "INSERT IGNORE into gb_stream " + |
| | | "(app, stream, gbId, name, " + |
| | | "longitude, latitude, streamType, mediaServerId, status, createStamp)" + |
| | | "longitude, latitude, streamType, mediaServerId, status, createTime)" + |
| | | "values " + |
| | | "<foreach collection='subList' index='index' item='item' separator=','> " + |
| | | "('${item.app}', '${item.stream}', '${item.gbId}', '${item.name}', " + |
| | | "'${item.longitude}', '${item.latitude}', '${item.streamType}', " + |
| | | "'${item.mediaServerId}', ${item.status}, ${item.createStamp}) "+ |
| | | "'${item.mediaServerId}', ${item.status}, '${item.createTime}') "+ |
| | | "</foreach> " + |
| | | "</script>") |
| | | @Options(useGeneratedKeys = true, keyProperty = "gbStreamId", keyColumn = "gbStreamId") |
| | |
| | | |
| | | @Insert("INSERT INTO parent_platform (enable, name, serverGBId, serverGBDomain, serverIP, serverPort, deviceGBId, deviceIp, " + |
| | | " devicePort, username, password, expires, keepTimeout, transport, characterSet, ptz, rtcp, " + |
| | | " status, shareAllLiveStream, startOfflinePush, catalogId, administrativeDivision, catalogGroup) " + |
| | | " status, shareAllLiveStream, startOfflinePush, catalogId, administrativeDivision, catalogGroup, createTime, updateTime) " + |
| | | " VALUES (${enable}, '${name}', '${serverGBId}', '${serverGBDomain}', '${serverIP}', ${serverPort}, '${deviceGBId}', '${deviceIp}', " + |
| | | " '${devicePort}', '${username}', '${password}', '${expires}', '${keepTimeout}', '${transport}', '${characterSet}', ${ptz}, ${rtcp}, " + |
| | | " ${status}, ${shareAllLiveStream}, ${startOfflinePush}, #{catalogId}, #{administrativeDivision}, #{catalogGroup})") |
| | | " ${status}, ${shareAllLiveStream}, ${startOfflinePush}, #{catalogId}, #{administrativeDivision}, #{catalogGroup}, #{createTime}, #{updateTime})") |
| | | int addParentPlatform(ParentPlatform parentPlatform); |
| | | |
| | | @Update("UPDATE parent_platform " + |
| | |
| | | "startOfflinePush=${startOfflinePush}, " + |
| | | "catalogGroup=#{catalogGroup}, " + |
| | | "administrativeDivision=#{administrativeDivision}, " + |
| | | "createTime=#{createTime}, " + |
| | | "updateTime=#{updateTime}, " + |
| | | "catalogId=#{catalogId} " + |
| | | "WHERE id=#{id}") |
| | | int updateParentPlatform(ParentPlatform parentPlatform); |
| | |
| | | |
| | | @Update(value = {" <script>" + |
| | | "UPDATE parent_platform " + |
| | | "SET catalogId=#{catalogId}" + |
| | | "SET catalogId=#{catalogId}, updateTime=#{updateTime}" + |
| | | "WHERE serverGBId=#{platformId}"+ |
| | | "</script>"}) |
| | | int setDefaultCatalog(String platformId, String catalogId); |
| | | int setDefaultCatalog(String platformId, String catalogId, String updateTime); |
| | | |
| | | @Select("select 'channel' as name, count(pgc.platformId) count from platform_gb_channel pgc left join device_channel dc on dc.id = pgc.deviceChannelId where pgc.platformId=#{platformId} and dc.channelId =#{gbId} " + |
| | | "union " + |
| | |
| | | streamProxyItem.setStatus(true); |
| | | String now = DateUtil.getNow(); |
| | | streamProxyItem.setCreateTime(now); |
| | | streamProxyItem.setCreateStamp(System.currentTimeMillis()); |
| | | try { |
| | | if (streamProxyMapper.add(streamProxyItem) > 0) { |
| | | if (!StringUtils.isEmpty(streamProxyItem.getGbId())) { |
| | |
| | | |
| | | @Override |
| | | public int setDefaultCatalog(String platformId, String catalogId) { |
| | | return platformMapper.setDefaultCatalog(platformId, catalogId); |
| | | return platformMapper.setDefaultCatalog(platformId, catalogId, DateUtil.getNow()); |
| | | } |
| | | |
| | | @Override |
| | |
| | | if (deviceChannel.getChannelId().equals(deviceChannel.getDeviceId())) { |
| | | deviceChannel.setChannelId(null); |
| | | } |
| | | if (deviceChannel.getGpsTime() == null) { |
| | | deviceChannel.setGpsTime(DateUtil.getNow()); |
| | | } |
| | | |
| | | deviceChannelMapper.updatePosition(deviceChannel); |
| | | } |
| | | } |
| | |
| | | import oshi.software.os.OperatingSystem; |
| | | import oshi.util.FormatUtil; |
| | | |
| | | import java.text.DecimalFormat; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform; |
| | | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| | | import com.genersoft.iot.vmp.storager.IVideoManagerStorage; |
| | | import com.genersoft.iot.vmp.utils.DateUtil; |
| | | import com.genersoft.iot.vmp.vmanager.bean.WVPResult; |
| | | import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce; |
| | | import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.UpdateChannelParam; |
| | |
| | | wvpResult.setMsg("平台 " + parentPlatform.getServerGBId() + " 已存在"); |
| | | return new ResponseEntity<>(wvpResult, HttpStatus.OK); |
| | | } |
| | | parentPlatform.setCreateTime(DateUtil.getNow()); |
| | | parentPlatform.setUpdateTime(DateUtil.getNow()); |
| | | boolean updateResult = storager.updateParentPlatform(parentPlatform); |
| | | |
| | | if (updateResult) { |
| | |
| | | } |
| | | parentPlatform.setCharacterSet(parentPlatform.getCharacterSet().toUpperCase()); |
| | | ParentPlatform parentPlatformOld = storager.queryParentPlatByServerGBId(parentPlatform.getServerGBId()); |
| | | |
| | | parentPlatform.setUpdateTime(DateUtil.getNow()); |
| | | boolean updateResult = storager.updateParentPlatform(parentPlatform); |
| | | |
| | | if (updateResult) { |
| | |
| | | public Object start(String app, String stream){ |
| | | logger.info("启用代理: " + app + "/" + stream); |
| | | boolean result = streamProxyService.start(app, stream); |
| | | if (!result) { |
| | | logger.info("启用代理失败: " + app + "/" + stream); |
| | | } |
| | | return result?"success":"fail"; |
| | | } |
| | | |
| | |
| | | <el-divider direction="vertical"></el-divider> |
| | | <el-button size="medium" icon="el-icon-switch-button" type="text" v-if="scope.row.enable" @click="stop(scope.row)">停用</el-button> |
| | | <el-divider direction="vertical"></el-divider> |
| | | <el-button size="medium" icon="el-icon-check" type="text" :loading="startBtnLaoding" v-if="!scope.row.enable" @click="start(scope.row)">启用</el-button> |
| | | <el-button size="medium" icon="el-icon-check" type="text" :loading="scope.row.startBtnLoading" v-if="!scope.row.enable" @click="start(scope.row)">启用</el-button> |
| | | <el-divider v-if="!scope.row.enable" direction="vertical"></el-divider> |
| | | <el-button size="medium" icon="el-icon-delete" type="text" style="color: #f56c6c" @click="deleteStreamProxy(scope.row)">删除</el-button> |
| | | </template> |
| | |
| | | count:15, |
| | | total:0, |
| | | getListLoading: false, |
| | | startBtnLaoding: false |
| | | startBtnLoading: false |
| | | }; |
| | | }, |
| | | computed: { |
| | |
| | | } |
| | | }).then(function (res) { |
| | | that.total = res.data.total; |
| | | for (let i = 0; i < res.data.list.length; i++) { |
| | | res.data.list[i]["startBtnLoading"] = false; |
| | | } |
| | | that.streamProxyList = res.data.list; |
| | | that.getListLoading = false; |
| | | }).catch(function (error) { |
| | |
| | | start: function(row){ |
| | | let that = this; |
| | | this.getListLoading = true; |
| | | this.startBtnLaoding = true; |
| | | this.$set(row, 'startBtnLoading', true) |
| | | this.$axios({ |
| | | method: 'get', |
| | | url:`/api/proxy/start`, |
| | |
| | | } |
| | | }).then(function (res) { |
| | | that.getListLoading = false; |
| | | that.startBtnLaoding = false; |
| | | that.$set(row, 'startBtnLoading', false) |
| | | if (res.data == "success"){ |
| | | that.initData() |
| | | }else { |
| | |
| | | }).catch(function (error) { |
| | | console.log(error); |
| | | that.getListLoading = false; |
| | | that.startBtnLaoding = false; |
| | | that.$set(row, 'startBtnLoading', false) |
| | | }); |
| | | }, |
| | | stop: function(row){ |