Merge branch '648540858:wvp-28181-2.0' into wvp-28181-2.0

This commit is contained in:
mk1990 2022-04-21 13:34:50 +08:00 committed by GitHub
commit c417adbc24
50 changed files with 3102 additions and 2697 deletions

View File

@ -134,10 +134,10 @@ QQ私信一般不回, 精力有限.欢迎大家在群里讨论.觉得项目对
感谢作者[dexter langhuihui](https://github.com/langhuihui) 开源这么好用的WEB播放器。 感谢作者[dexter langhuihui](https://github.com/langhuihui) 开源这么好用的WEB播放器。
感谢作者[Kyle](https://gitee.com/kkkkk5G) 开源了好用的前端页面 感谢作者[Kyle](https://gitee.com/kkkkk5G) 开源了好用的前端页面
感谢各位大佬的赞助以及对项目的指正与帮助。包括但不限于代码贡献、问题反馈、资金捐赠等各种方式的支持!以下排名不分先后: 感谢各位大佬的赞助以及对项目的指正与帮助。包括但不限于代码贡献、问题反馈、资金捐赠等各种方式的支持!以下排名不分先后:
[lawrencehj](https://github.com/lawrencehj) @陆丰-创奇科技 [swwhaha](https://github.com/swwheihei) [lawrencehj](https://github.com/lawrencehj) [Smallwhitepig](https://github.com/Smallwhitepig) [swwhaha](https://github.com/swwheihei)
[hotcoffie](https://github.com/hotcoffie) [xiaomu](https://github.com/nikmu) [TristingChen](https://github.com/TristingChen) [hotcoffie](https://github.com/hotcoffie) [xiaomu](https://github.com/nikmu) [TristingChen](https://github.com/TristingChen)
[chenparty](https://github.com/chenparty) [Hotleave](https://github.com/hotleave) [ydwxb](https://github.com/ydwxb) [chenparty](https://github.com/chenparty) [Hotleave](https://github.com/hotleave) [ydwxb](https://github.com/ydwxb)
[ydpd](https://github.com/ydpd) [szy833](https://github.com/szy833) [ydwxb](https://github.com/ydwxb) [ydpd](https://github.com/ydpd) [szy833](https://github.com/szy833) [ydwxb](https://github.com/ydwxb) [Albertzhu666](https://github.com/Albertzhu666)
ps: 刚增加了这个名单,肯定遗漏了一些大佬,欢迎大佬联系我添加。 ps: 刚增加了这个名单,肯定遗漏了一些大佬,欢迎大佬联系我添加。

View File

@ -11,7 +11,7 @@
<groupId>com.genersoft</groupId> <groupId>com.genersoft</groupId>
<artifactId>wvp-pro</artifactId> <artifactId>wvp-pro</artifactId>
<version>2.0.2</version> <version>2.1.1</version>
<name>web video platform</name> <name>web video platform</name>
<description>国标28181视频平台</description> <description>国标28181视频平台</description>

13
sql/clean.sql Normal file
View File

@ -0,0 +1,13 @@
delete from device;
delete from device_alarm;
delete from device_channel;
delete from device_mobile_position;
delete from gb_stream;
delete from log;
delete from media_server;
delete from parent_platform;
delete from platform_catalog;
delete from platform_gb_channel;
delete from platform_gb_stream;
delete from stream_proxy;
delete from stream_push;

View File

@ -1,13 +1,13 @@
-- MySQL dump 10.13 Distrib 8.0.28, for Linux (x86_64) -- MariaDB dump 10.19 Distrib 10.7.3-MariaDB, for Linux (x86_64)
-- --
-- Host: 127.0.0.1 Database: wvp -- Host: 127.0.0.1 Database: wvp3
-- ------------------------------------------------------ -- ------------------------------------------------------
-- Server version 8.0.28-0ubuntu0.20.04.3 -- Server version 8.0.0-dmr
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8mb4 */; /*!40101 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */; /*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@ -21,33 +21,34 @@
DROP TABLE IF EXISTS `device`; DROP TABLE IF EXISTS `device`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `device` ( CREATE TABLE `device` (
`id` int NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`deviceId` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, `deviceId` varchar(50) NOT NULL,
`name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `name` varchar(255) DEFAULT NULL,
`manufacturer` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `manufacturer` varchar(255) DEFAULT NULL,
`model` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `model` varchar(255) DEFAULT NULL,
`firmware` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `firmware` varchar(255) DEFAULT NULL,
`transport` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `transport` varchar(50) DEFAULT NULL,
`streamMode` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `streamMode` varchar(50) DEFAULT NULL,
`online` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `online` varchar(50) DEFAULT NULL,
`registerTime` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `registerTime` varchar(50) DEFAULT NULL,
`keepaliveTime` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `keepaliveTime` varchar(50) DEFAULT NULL,
`ip` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, `ip` varchar(50) NOT NULL,
`createTime` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, `createTime` varchar(50) NOT NULL,
`updateTime` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, `updateTime` varchar(50) NOT NULL,
`port` int NOT NULL, `port` int(11) NOT NULL,
`expires` int NOT NULL, `expires` int(11) NOT NULL,
`subscribeCycleForCatalog` int NOT NULL, `subscribeCycleForCatalog` int(11) NOT NULL,
`subscribeCycleForMobilePosition` int NOT NULL, `subscribeCycleForMobilePosition` int(11) NOT NULL,
`mobilePositionSubmissionInterval` int DEFAULT 5 NOT NULL, `mobilePositionSubmissionInterval` int(11) NOT NULL DEFAULT '5',
`subscribeCycleForAlarm` int NOT NULL, `subscribeCycleForAlarm` int(11) NOT NULL,
`hostAddress` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, `hostAddress` varchar(50) NOT NULL,
`charset` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, `charset` varchar(50) NOT NULL,
`ssrcCheck` int(11) DEFAULT '0',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `device_deviceId_uindex` (`deviceId`) UNIQUE KEY `device_deviceId_uindex` (`deviceId`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; ) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@ -65,20 +66,20 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `device_alarm`; DROP TABLE IF EXISTS `device_alarm`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `device_alarm` ( CREATE TABLE `device_alarm` (
`id` int NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`deviceId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `deviceId` varchar(50) NOT NULL,
`channelId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `channelId` varchar(50) NOT NULL,
`alarmPriority` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `alarmPriority` varchar(50) NOT NULL,
`alarmMethod` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `alarmMethod` varchar(50) DEFAULT NULL,
`alarmTime` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `alarmTime` varchar(50) NOT NULL,
`alarmDescription` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `alarmDescription` varchar(255) DEFAULT NULL,
`longitude` double DEFAULT NULL, `longitude` double DEFAULT NULL,
`latitude` double DEFAULT NULL, `latitude` double DEFAULT NULL,
`alarmType` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `alarmType` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@ -96,43 +97,43 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `device_channel`; DROP TABLE IF EXISTS `device_channel`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `device_channel` ( CREATE TABLE `device_channel` (
`id` int NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`channelId` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, `channelId` varchar(50) NOT NULL,
`name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `name` varchar(255) DEFAULT NULL,
`manufacture` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `manufacture` varchar(50) DEFAULT NULL,
`model` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `model` varchar(50) DEFAULT NULL,
`owner` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `owner` varchar(50) DEFAULT NULL,
`civilCode` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `civilCode` varchar(50) DEFAULT NULL,
`block` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `block` varchar(50) DEFAULT NULL,
`address` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `address` varchar(50) DEFAULT NULL,
`parentId` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `parentId` varchar(50) DEFAULT NULL,
`safetyWay` int DEFAULT NULL, `safetyWay` int(11) DEFAULT NULL,
`registerWay` int DEFAULT NULL, `registerWay` int(11) DEFAULT NULL,
`certNum` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `certNum` varchar(50) DEFAULT NULL,
`certifiable` int DEFAULT NULL, `certifiable` int(11) DEFAULT NULL,
`errCode` int DEFAULT NULL, `errCode` int(11) DEFAULT NULL,
`endTime` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `endTime` varchar(50) DEFAULT NULL,
`secrecy` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `secrecy` varchar(50) DEFAULT NULL,
`ipAddress` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `ipAddress` varchar(50) DEFAULT NULL,
`port` int DEFAULT NULL, `port` int(11) DEFAULT NULL,
`password` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `password` varchar(255) DEFAULT NULL,
`PTZType` int DEFAULT NULL, `PTZType` int(11) DEFAULT NULL,
`status` int DEFAULT NULL, `status` int(11) DEFAULT NULL,
`longitude` double DEFAULT NULL, `longitude` double DEFAULT NULL,
`latitude` double DEFAULT NULL, `latitude` double DEFAULT NULL,
`streamId` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `streamId` varchar(50) DEFAULT NULL,
`deviceId` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, `deviceId` varchar(50) NOT NULL,
`parental` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `parental` varchar(50) DEFAULT NULL,
`hasAudio` bit(1) DEFAULT NULL, `hasAudio` bit(1) DEFAULT NULL,
`createTime` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, `createTime` varchar(50) NOT NULL,
`updateTime` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, `updateTime` varchar(50) NOT NULL,
`subCount` int DEFAULT '0', `subCount` int(11) DEFAULT '0',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `device_channel_id_uindex` (`id`), UNIQUE KEY `device_channel_id_uindex` (`id`),
UNIQUE KEY `device_channel_pk` (`channelId`,`deviceId`) UNIQUE KEY `device_channel_pk` (`channelId`,`deviceId`)
) ENGINE=InnoDB AUTO_INCREMENT=46 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; ) ENGINE=InnoDB AUTO_INCREMENT=81657 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@ -150,24 +151,24 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `device_mobile_position`; DROP TABLE IF EXISTS `device_mobile_position`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `device_mobile_position` ( CREATE TABLE `device_mobile_position` (
`id` int NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`deviceId` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, `deviceId` varchar(50) NOT NULL,
`channelId` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, `channelId` varchar(50) NOT NULL,
`deviceName` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `deviceName` varchar(255) DEFAULT NULL,
`time` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, `time` varchar(50) NOT NULL,
`longitude` double NOT NULL, `longitude` double NOT NULL,
`latitude` double NOT NULL, `latitude` double NOT NULL,
`altitude` double DEFAULT NULL, `altitude` double DEFAULT NULL,
`speed` double DEFAULT NULL, `speed` double DEFAULT NULL,
`direction` double DEFAULT NULL, `direction` double DEFAULT NULL,
`reportSource` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `reportSource` varchar(50) DEFAULT NULL,
`geodeticSystem` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `geodeticSystem` varchar(50) DEFAULT NULL,
`cnLng` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `cnLng` varchar(50) DEFAULT NULL,
`cnLat` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `cnLat` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; ) ENGINE=InnoDB AUTO_INCREMENT=6108 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@ -185,23 +186,23 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `gb_stream`; DROP TABLE IF EXISTS `gb_stream`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `gb_stream` ( CREATE TABLE `gb_stream` (
`gbStreamId` int NOT NULL AUTO_INCREMENT, `gbStreamId` int(11) NOT NULL AUTO_INCREMENT,
`app` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `app` varchar(255) NOT NULL,
`stream` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `stream` varchar(255) NOT NULL,
`gbId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `gbId` varchar(50) NOT NULL,
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `name` varchar(255) DEFAULT NULL,
`longitude` double DEFAULT NULL, `longitude` double DEFAULT NULL,
`latitude` double DEFAULT NULL, `latitude` double DEFAULT NULL,
`streamType` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `streamType` varchar(50) DEFAULT NULL,
`mediaServerId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `mediaServerId` varchar(50) DEFAULT NULL,
`status` int DEFAULT NULL, `status` int(11) DEFAULT NULL,
`createStamp` bigint DEFAULT NULL, `createStamp` bigint(20) DEFAULT NULL,
PRIMARY KEY (`gbStreamId`) USING BTREE, PRIMARY KEY (`gbStreamId`) USING BTREE,
UNIQUE KEY `app` (`app`,`stream`) USING BTREE, UNIQUE KEY `app` (`app`,`stream`) USING BTREE,
UNIQUE KEY `gbId` (`gbId`) USING BTREE UNIQUE KEY `gbId` (`gbId`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=300766 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; ) ENGINE=InnoDB AUTO_INCREMENT=300769 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@ -219,19 +220,19 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `log`; DROP TABLE IF EXISTS `log`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `log` ( CREATE TABLE `log` (
`id` int NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `name` varchar(50) NOT NULL,
`type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `type` varchar(50) NOT NULL,
`uri` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `uri` varchar(200) NOT NULL,
`address` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `address` varchar(50) NOT NULL,
`result` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `result` varchar(50) NOT NULL,
`timing` bigint NOT NULL, `timing` bigint(20) NOT NULL,
`username` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `username` varchar(50) NOT NULL,
`createTime` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `createTime` varchar(50) NOT NULL,
PRIMARY KEY (`id`) USING BTREE PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=962 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; ) ENGINE=InnoDB AUTO_INCREMENT=1552 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@ -249,34 +250,34 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `media_server`; DROP TABLE IF EXISTS `media_server`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `media_server` ( CREATE TABLE `media_server` (
`id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `id` varchar(255) NOT NULL,
`ip` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `ip` varchar(50) NOT NULL,
`hookIp` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `hookIp` varchar(50) NOT NULL,
`sdpIp` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `sdpIp` varchar(50) NOT NULL,
`streamIp` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `streamIp` varchar(50) NOT NULL,
`httpPort` int NOT NULL, `httpPort` int(11) NOT NULL,
`httpSSlPort` int NOT NULL, `httpSSlPort` int(11) NOT NULL,
`rtmpPort` int NOT NULL, `rtmpPort` int(11) NOT NULL,
`rtmpSSlPort` int NOT NULL, `rtmpSSlPort` int(11) NOT NULL,
`rtpProxyPort` int NOT NULL, `rtpProxyPort` int(11) NOT NULL,
`rtspPort` int NOT NULL, `rtspPort` int(11) NOT NULL,
`rtspSSLPort` int NOT NULL, `rtspSSLPort` int(11) NOT NULL,
`autoConfig` int NOT NULL, `autoConfig` int(11) NOT NULL,
`secret` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `secret` varchar(50) NOT NULL,
`streamNoneReaderDelayMS` int NOT NULL, `streamNoneReaderDelayMS` int(11) NOT NULL,
`rtpEnable` int NOT NULL, `rtpEnable` int(11) NOT NULL,
`rtpPortRange` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `rtpPortRange` varchar(50) NOT NULL,
`sendRtpPortRange` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `sendRtpPortRange` varchar(50) NOT NULL,
`recordAssistPort` int NOT NULL, `recordAssistPort` int(11) NOT NULL,
`defaultServer` int NOT NULL, `defaultServer` int(11) NOT NULL,
`createTime` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `createTime` varchar(50) NOT NULL,
`updateTime` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `updateTime` varchar(50) NOT NULL,
`hookAliveInterval` int NOT NULL, `hookAliveInterval` int(11) NOT NULL,
PRIMARY KEY (`id`) USING BTREE, PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `media_server_i` (`ip`,`httpPort`) USING BTREE UNIQUE KEY `media_server_i` (`ip`,`httpPort`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@ -294,33 +295,36 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `parent_platform`; DROP TABLE IF EXISTS `parent_platform`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `parent_platform` ( CREATE TABLE `parent_platform` (
`id` int NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`enable` int DEFAULT NULL, `enable` int(11) DEFAULT NULL,
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `name` varchar(255) DEFAULT NULL,
`serverGBId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `serverGBId` varchar(50) NOT NULL,
`serverGBDomain` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `serverGBDomain` varchar(50) DEFAULT NULL,
`serverIP` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `serverIP` varchar(50) DEFAULT NULL,
`serverPort` int DEFAULT NULL, `serverPort` int(11) DEFAULT NULL,
`deviceGBId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `deviceGBId` varchar(50) NOT NULL,
`deviceIp` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `deviceIp` varchar(50) DEFAULT NULL,
`devicePort` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `devicePort` varchar(50) DEFAULT NULL,
`username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `username` varchar(255) DEFAULT NULL,
`password` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `password` varchar(50) DEFAULT NULL,
`expires` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `expires` varchar(50) DEFAULT NULL,
`keepTimeout` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `keepTimeout` varchar(50) DEFAULT NULL,
`transport` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `transport` varchar(50) DEFAULT NULL,
`characterSet` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `characterSet` varchar(50) DEFAULT NULL,
`catalogId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `catalogId` varchar(50) NOT NULL,
`ptz` int DEFAULT NULL, `ptz` int(11) DEFAULT NULL,
`rtcp` int DEFAULT NULL, `rtcp` int(11) DEFAULT NULL,
`status` bit(1) DEFAULT NULL, `status` bit(1) DEFAULT NULL,
`shareAllLiveStream` int DEFAULT NULL, `shareAllLiveStream` int(11) DEFAULT NULL,
`startOfflinePush` int(11) DEFAULT '0',
`administrativeDivision` varchar(50) NOT NULL,
`catalogGroup` int(11) DEFAULT '1',
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `parent_platform_id_uindex` (`id`), UNIQUE KEY `parent_platform_id_uindex` (`id`),
UNIQUE KEY `parent_platform_pk` (`serverGBId`) UNIQUE KEY `parent_platform_pk` (`serverGBId`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; ) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@ -338,14 +342,14 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `platform_catalog`; DROP TABLE IF EXISTS `platform_catalog`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `platform_catalog` ( CREATE TABLE `platform_catalog` (
`id` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `id` varchar(50) NOT NULL,
`platformId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `platformId` varchar(50) NOT NULL,
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `name` varchar(255) NOT NULL,
`parentId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL, `parentId` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@ -363,14 +367,14 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `platform_gb_channel`; DROP TABLE IF EXISTS `platform_gb_channel`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `platform_gb_channel` ( CREATE TABLE `platform_gb_channel` (
`id` int NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`platformId` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, `platformId` varchar(50) NOT NULL,
`catalogId` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, `catalogId` varchar(50) NOT NULL,
`deviceChannelId` int NOT NULL, `deviceChannelId` int(11) NOT NULL,
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; ) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@ -388,15 +392,15 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `platform_gb_stream`; DROP TABLE IF EXISTS `platform_gb_stream`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `platform_gb_stream` ( CREATE TABLE `platform_gb_stream` (
`platformId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `platformId` varchar(50) NOT NULL,
`catalogId` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `catalogId` varchar(50) NOT NULL,
`gbStreamId` int NOT NULL, `gbStreamId` int(11) NOT NULL,
`id` int NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `platform_gb_stream_pk` (`platformId`,`catalogId`,`gbStreamId`) UNIQUE KEY `platform_gb_stream_pk` (`platformId`,`catalogId`,`gbStreamId`)
) ENGINE=InnoDB AUTO_INCREMENT=301207 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; ) ENGINE=InnoDB AUTO_INCREMENT=301210 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@ -414,29 +418,29 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `stream_proxy`; DROP TABLE IF EXISTS `stream_proxy`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stream_proxy` ( CREATE TABLE `stream_proxy` (
`id` int NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, `type` varchar(50) NOT NULL,
`app` varchar(255) COLLATE utf8mb4_general_ci NOT NULL, `app` varchar(255) NOT NULL,
`stream` varchar(255) COLLATE utf8mb4_general_ci NOT NULL, `stream` varchar(255) NOT NULL,
`url` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `url` varchar(255) DEFAULT NULL,
`src_url` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `src_url` varchar(255) DEFAULT NULL,
`dst_url` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `dst_url` varchar(255) DEFAULT NULL,
`timeout_ms` int DEFAULT NULL, `timeout_ms` int(11) DEFAULT NULL,
`ffmpeg_cmd_key` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `ffmpeg_cmd_key` varchar(255) DEFAULT NULL,
`rtp_type` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `rtp_type` varchar(50) DEFAULT NULL,
`mediaServerId` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `mediaServerId` varchar(50) DEFAULT NULL,
`enable_hls` bit(1) DEFAULT NULL, `enable_hls` bit(1) DEFAULT NULL,
`enable_mp4` bit(1) DEFAULT NULL, `enable_mp4` bit(1) DEFAULT NULL,
`enable` bit(1) NOT NULL, `enable` bit(1) NOT NULL,
`status` bit(1) NOT NULL, `status` bit(1) NOT NULL,
`enable_remove_none_reader` bit(1) NOT NULL, `enable_remove_none_reader` bit(1) NOT NULL,
`createTime` varchar(50) COLLATE utf8mb4_general_ci NOT NULL, `createTime` varchar(50) NOT NULL,
`name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL, `name` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `stream_proxy_pk` (`app`,`stream`) UNIQUE KEY `stream_proxy_pk` (`app`,`stream`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@ -454,20 +458,20 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `stream_push`; DROP TABLE IF EXISTS `stream_push`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stream_push` ( CREATE TABLE `stream_push` (
`id` int NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`app` varchar(255) COLLATE utf8mb4_general_ci NOT NULL, `app` varchar(255) NOT NULL,
`stream` varchar(255) COLLATE utf8mb4_general_ci NOT NULL, `stream` varchar(255) NOT NULL,
`totalReaderCount` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `totalReaderCount` varchar(50) DEFAULT NULL,
`originType` int DEFAULT NULL, `originType` int(11) DEFAULT NULL,
`originTypeStr` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `originTypeStr` varchar(50) DEFAULT NULL,
`createStamp` bigint DEFAULT NULL, `createStamp` bigint(20) DEFAULT NULL,
`aliveSecond` int DEFAULT NULL, `aliveSecond` int(11) DEFAULT NULL,
`mediaServerId` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL, `mediaServerId` varchar(50) DEFAULT NULL,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
UNIQUE KEY `stream_push_pk` (`app`,`stream`) UNIQUE KEY `stream_push_pk` (`app`,`stream`)
) ENGINE=InnoDB AUTO_INCREMENT=300799 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci; ) ENGINE=InnoDB AUTO_INCREMENT=300838 DEFAULT CHARSET=utf8mb4;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@ -485,17 +489,17 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `user`; DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user` ( CREATE TABLE `user` (
`id` int NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `username` varchar(255) NOT NULL,
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `password` varchar(255) NOT NULL,
`roleId` int NOT NULL, `roleId` int(11) NOT NULL,
`createTime` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `createTime` varchar(50) NOT NULL,
`updateTime` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `updateTime` varchar(50) NOT NULL,
PRIMARY KEY (`id`) USING BTREE, PRIMARY KEY (`id`) USING BTREE,
UNIQUE KEY `user_username_uindex` (`username`) USING BTREE UNIQUE KEY `user_username_uindex` (`username`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@ -504,7 +508,8 @@ CREATE TABLE `user` (
LOCK TABLES `user` WRITE; LOCK TABLES `user` WRITE;
/*!40000 ALTER TABLE `user` DISABLE KEYS */; /*!40000 ALTER TABLE `user` DISABLE KEYS */;
INSERT INTO `user` VALUES (1,'admin','21232f297a57a5a743894a0e4a801fc3',1,'2021 - 04 - 13 14:14:57','2021 - 04 - 13 14:14:57'); INSERT INTO `user` VALUES
(1,'admin','21232f297a57a5a743894a0e4a801fc3',1,'2021 - 04 - 13 14:14:57','2021 - 04 - 13 14:14:57');
/*!40000 ALTER TABLE `user` ENABLE KEYS */; /*!40000 ALTER TABLE `user` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
@ -514,15 +519,15 @@ UNLOCK TABLES;
DROP TABLE IF EXISTS `user_role`; DROP TABLE IF EXISTS `user_role`;
/*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */; /*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_role` ( CREATE TABLE `user_role` (
`id` int NOT NULL AUTO_INCREMENT, `id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `name` varchar(50) NOT NULL,
`authority` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `authority` varchar(50) NOT NULL,
`createTime` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `createTime` varchar(50) NOT NULL,
`updateTime` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `updateTime` varchar(50) NOT NULL,
PRIMARY KEY (`id`) USING BTREE PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC; ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */; /*!40101 SET character_set_client = @saved_cs_client */;
-- --
@ -531,7 +536,8 @@ CREATE TABLE `user_role` (
LOCK TABLES `user_role` WRITE; LOCK TABLES `user_role` WRITE;
/*!40000 ALTER TABLE `user_role` DISABLE KEYS */; /*!40000 ALTER TABLE `user_role` DISABLE KEYS */;
INSERT INTO `user_role` VALUES (1,'admin','0','2021-04-13 14:14:57','2021-04-13 14:14:57'); INSERT INTO `user_role` VALUES
(1,'admin','0','2021-04-13 14:14:57','2021-04-13 14:14:57');
/*!40000 ALTER TABLE `user_role` ENABLE KEYS */; /*!40000 ALTER TABLE `user_role` ENABLE KEYS */;
UNLOCK TABLES; UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@ -544,4 +550,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2022-03-07 8:26:30 -- Dump completed on 2022-04-18 10:50:27

View File

@ -1,8 +1,12 @@
alter table device alter table parent_platform
add subscribeCycleForMobilePosition int null; add startOfflinePush int default 0 null;
alter table parent_platform
add administrativeDivision varchar(50) not null;
alter table parent_platform
add catalogGroup int default 1 null;
alter table device alter table device
add mobilePositionSubmissionInterval int default 5 null; add ssrcCheck int default 0 null;
alter table device
add subscribeCycleForAlarm int null;

View File

@ -129,6 +129,11 @@ public class Device {
*/ */
private int subscribeCycleForAlarm; private int subscribeCycleForAlarm;
/**
* 是否开启ssrc校验默认关闭开启可以防止串流
*/
private boolean ssrcCheck;
public String getDeviceId() { public String getDeviceId() {
return deviceId; return deviceId;
@ -321,4 +326,12 @@ public class Device {
public void setSubscribeCycleForAlarm(int subscribeCycleForAlarm) { public void setSubscribeCycleForAlarm(int subscribeCycleForAlarm) {
this.subscribeCycleForAlarm = subscribeCycleForAlarm; this.subscribeCycleForAlarm = subscribeCycleForAlarm;
} }
public boolean isSsrcCheck() {
return ssrcCheck;
}
public void setSsrcCheck(boolean ssrcCheck) {
this.ssrcCheck = ssrcCheck;
}
} }

View File

@ -169,6 +169,11 @@ public class DeviceChannel {
*/ */
private boolean hasAudio; private boolean hasAudio;
/**
* 标记通道的类型0->国标通道 1->直播流通道 2->业务分组/虚拟组织/行政区划
*/
private int channelType;
public int getId() { public int getId() {
return id; return id;
} }
@ -441,4 +446,12 @@ public class DeviceChannel {
public void setUpdateTime(String updateTime) { public void setUpdateTime(String updateTime) {
this.updateTime = updateTime; this.updateTime = updateTime;
} }
public int getChannelType() {
return channelType;
}
public void setChannelType(int channelType) {
this.channelType = channelType;
}
} }

View File

@ -129,6 +129,21 @@ public class ParentPlatform {
*/ */
private boolean mobilePositionSubscribe; private boolean mobilePositionSubscribe;
/**
* 点播未推流的设备时是否使用redis通知拉起
*/
private boolean startOfflinePush;
/**
* 目录分组-每次向上级发送通道信息时单个包携带的通道数量取值1,2,4,8
*/
private int catalogGroup;
/**
* 行政区划
*/
private String administrativeDivision;
public Integer getId() { public Integer getId() {
return id; return id;
} }
@ -329,4 +344,28 @@ public class ParentPlatform {
public void setMobilePositionSubscribe(boolean mobilePositionSubscribe) { public void setMobilePositionSubscribe(boolean mobilePositionSubscribe) {
this.mobilePositionSubscribe = mobilePositionSubscribe; this.mobilePositionSubscribe = mobilePositionSubscribe;
} }
public boolean isStartOfflinePush() {
return startOfflinePush;
}
public void setStartOfflinePush(boolean startOfflinePush) {
this.startOfflinePush = startOfflinePush;
}
public int getCatalogGroup() {
return catalogGroup;
}
public void setCatalogGroup(int catalogGroup) {
this.catalogGroup = catalogGroup;
}
public String getAdministrativeDivision() {
return administrativeDivision;
}
public void setAdministrativeDivision(String administrativeDivision) {
this.administrativeDivision = administrativeDivision;
}
} }

View File

@ -85,6 +85,12 @@ public class CatalogDataCatch {
return syncStatus; return syncStatus;
} }
public boolean isSyncRunning(String deviceId) {
CatalogData catalogData = data.get(deviceId);
if (catalogData == null) return false;
return !catalogData.getStatus().equals(CatalogData.CatalogDataStatus.end);
}
@Scheduled(fixedRate = 5 * 1000) //每5秒执行一次, 发现数据5秒未更新则移除数据并认为数据接收超时 @Scheduled(fixedRate = 5 * 1000) //每5秒执行一次, 发现数据5秒未更新则移除数据并认为数据接收超时
private void timerTask(){ private void timerTask(){
Set<String> keys = data.keySet(); Set<String> keys = data.keySet();

View File

@ -10,6 +10,8 @@ import org.springframework.scheduling.annotation.Async;
import javax.sip.Dialog; import javax.sip.Dialog;
import javax.sip.DialogState; import javax.sip.DialogState;
import javax.sip.ResponseEvent; import javax.sip.ResponseEvent;
import java.util.Timer;
import java.util.TimerTask;
/** /**
* 目录订阅任务 * 目录订阅任务
@ -20,6 +22,8 @@ public class CatalogSubscribeTask implements ISubscribeTask {
private final ISIPCommander sipCommander; private final ISIPCommander sipCommander;
private Dialog dialog; private Dialog dialog;
private Timer timer ;
public CatalogSubscribeTask(Device device, ISIPCommander sipCommander) { public CatalogSubscribeTask(Device device, ISIPCommander sipCommander) {
this.device = device; this.device = device;
this.sipCommander = sipCommander; this.sipCommander = sipCommander;
@ -27,6 +31,10 @@ public class CatalogSubscribeTask implements ISubscribeTask {
@Override @Override
public void run() { public void run() {
if (timer != null ) {
timer.cancel();
timer = null;
}
sipCommander.catalogSubscribe(device, dialog, eventResult -> { sipCommander.catalogSubscribe(device, dialog, eventResult -> {
if (eventResult.dialog != null || eventResult.dialog.getState().equals(DialogState.CONFIRMED)) { if (eventResult.dialog != null || eventResult.dialog.getState().equals(DialogState.CONFIRMED)) {
dialog = eventResult.dialog; dialog = eventResult.dialog;
@ -43,6 +51,13 @@ public class CatalogSubscribeTask implements ISubscribeTask {
dialog = null; dialog = null;
// 失败 // 失败
logger.warn("[目录订阅]失败,信令发送失败: {}-{} ", device.getDeviceId(), eventResult.msg); logger.warn("[目录订阅]失败,信令发送失败: {}-{} ", device.getDeviceId(), eventResult.msg);
timer = new Timer();
timer.schedule(new TimerTask() {
@Override
public void run() {
CatalogSubscribeTask.this.run();
}
}, 2000);
}); });
} }
@ -56,9 +71,13 @@ public class CatalogSubscribeTask implements ISubscribeTask {
* TERMINATED-> Terminated Dialog状态-终止 * TERMINATED-> Terminated Dialog状态-终止
*/ */
logger.info("取消目录订阅时dialog状态为{}", DialogState.CONFIRMED); logger.info("取消目录订阅时dialog状态为{}", DialogState.CONFIRMED);
if (timer != null ) {
timer.cancel();
timer = null;
}
if (dialog != null && dialog.getState().equals(DialogState.CONFIRMED)) { if (dialog != null && dialog.getState().equals(DialogState.CONFIRMED)) {
device.setSubscribeCycleForCatalog(0); device.setSubscribeCycleForCatalog(0);
sipCommander.mobilePositionSubscribe(device, dialog, eventResult -> { sipCommander.catalogSubscribe(device, dialog, eventResult -> {
ResponseEvent event = (ResponseEvent) eventResult.event; ResponseEvent event = (ResponseEvent) eventResult.event;
if (event.getResponse().getRawContent() != null) { if (event.getResponse().getRawContent() != null) {
// 成功 // 成功

View File

@ -29,7 +29,6 @@ public class MobilePositionSubscribeHandlerTask implements ISubscribeTask {
private String key; private String key;
public MobilePositionSubscribeHandlerTask(IRedisCatchStorage redisCatchStorage, ISIPCommanderForPlatform sipCommanderForPlatform, IVideoManagerStorage storager, String platformId, String sn, String key, SubscribeHolder subscribeInfo) { public MobilePositionSubscribeHandlerTask(IRedisCatchStorage redisCatchStorage, ISIPCommanderForPlatform sipCommanderForPlatform, IVideoManagerStorage storager, String platformId, String sn, String key, SubscribeHolder subscribeInfo) {
System.out.println("MobilePositionSubscribeHandlerTask 初始化");
this.redisCatchStorage = redisCatchStorage; this.redisCatchStorage = redisCatchStorage;
this.storager = storager; this.storager = storager;
this.platform = storager.queryParentPlatByServerGBId(platformId); this.platform = storager.queryParentPlatByServerGBId(platformId);

View File

@ -32,6 +32,7 @@ import javax.sip.header.*;
import javax.sip.message.Request; import javax.sip.message.Request;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.text.ParseException; import java.text.ParseException;
import java.util.ArrayList;
import java.util.HashSet; import java.util.HashSet;
import java.util.List; import java.util.List;
import java.util.UUID; import java.util.UUID;
@ -215,7 +216,11 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
return false; return false;
} }
try { try {
String catalogXml = getCatalogXml(channel, sn, parentPlatform, size); List<DeviceChannel> channels = new ArrayList<>();
if (channel != null) {
channels.add(channel);
}
String catalogXml = getCatalogXml(channels, sn, parentPlatform, size);
// callid // callid
CallIdHeader callIdHeader = parentPlatform.getTransport().equals("TCP") ? tcpSipProvider.getNewCallId() CallIdHeader callIdHeader = parentPlatform.getTransport().equals("TCP") ? tcpSipProvider.getNewCallId()
@ -239,7 +244,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
sendCatalogResponse(channels, parentPlatform, sn, fromTag, 0); sendCatalogResponse(channels, parentPlatform, sn, fromTag, 0);
return true; return true;
} }
private String getCatalogXml(DeviceChannel channel, String sn, ParentPlatform parentPlatform, int size) { private String getCatalogXml(List<DeviceChannel> channels, String sn, ParentPlatform parentPlatform, int size) {
String characterSet = parentPlatform.getCharacterSet(); String characterSet = parentPlatform.getCharacterSet();
StringBuffer catalogXml = new StringBuffer(600); StringBuffer catalogXml = new StringBuffer(600);
catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet +"\"?>\r\n"); catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet +"\"?>\r\n");
@ -248,34 +253,38 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
catalogXml.append("<SN>" +sn + "</SN>\r\n"); catalogXml.append("<SN>" +sn + "</SN>\r\n");
catalogXml.append("<DeviceID>" + parentPlatform.getDeviceGBId() + "</DeviceID>\r\n"); catalogXml.append("<DeviceID>" + parentPlatform.getDeviceGBId() + "</DeviceID>\r\n");
catalogXml.append("<SumNum>" + size + "</SumNum>\r\n"); catalogXml.append("<SumNum>" + size + "</SumNum>\r\n");
catalogXml.append("<DeviceList Num=\"1\">\r\n"); catalogXml.append("<DeviceList Num=\"" + channels.size() +"\">\r\n");
catalogXml.append("<Item>\r\n"); if (channels.size() > 0) {
if (channel != null) { for (DeviceChannel channel : channels) {
catalogXml.append("<DeviceID>" + channel.getChannelId() + "</DeviceID>\r\n"); catalogXml.append("<Item>\r\n");
catalogXml.append("<Name>" + channel.getName() + "</Name>\r\n"); catalogXml.append("<DeviceID>" + channel.getChannelId() + "</DeviceID>\r\n");
catalogXml.append("<Manufacturer>" + channel.getManufacture() + "</Manufacturer>\r\n"); catalogXml.append("<Name>" + channel.getName() + "</Name>\r\n");
catalogXml.append("<Model>" + channel.getModel() + "</Model>\r\n"); catalogXml.append("<Manufacturer>" + channel.getManufacture() + "</Manufacturer>\r\n");
catalogXml.append("<Owner>" + channel.getOwner() + "</Owner>\r\n"); catalogXml.append("<Parental>" + channel.getParental() + "</Parental>\r\n");
catalogXml.append("<CivilCode>" + channel.getCivilCode() + "</CivilCode>\r\n"); if (channel.getParentId() != null) {
catalogXml.append("<Address>" + channel.getAddress() + "</Address>\r\n"); catalogXml.append("<ParentID>" + channel.getParentId() + "</ParentID>\r\n");
catalogXml.append("<Parental>" + channel.getParental() + "</Parental>\r\n"); }
if (channel.getParentId() != null) { catalogXml.append("<RegisterWay>" + channel.getRegisterWay() + "</RegisterWay>\r\n");
catalogXml.append("<ParentID>" + channel.getParentId() + "</ParentID>\r\n"); catalogXml.append("<Status>" + (channel.getStatus() == 0?"OFF":"ON") + "</Status>\r\n");
catalogXml.append("<Secrecy>" + channel.getSecrecy() + "</Secrecy>\r\n");
if (channel.getChannelType() != 2) { // 业务分组/虚拟组织/行政区划 不设置以下字段
catalogXml.append("<Model>" + channel.getModel() + "</Model>\r\n");
catalogXml.append("<Owner>" + channel.getOwner() + "</Owner>\r\n");
catalogXml.append("<CivilCode>" + channel.getCivilCode() + "</CivilCode>\r\n");
catalogXml.append("<Address>" + channel.getAddress() + "</Address>\r\n");
catalogXml.append("<Longitude>" + channel.getLongitude() + "</Longitude>\r\n");
catalogXml.append("<Latitude>" + channel.getLatitude() + "</Latitude>\r\n");
catalogXml.append("<IPAddress>" + channel.getIpAddress() + "</IPAddress>\r\n");
catalogXml.append("<Port>" + channel.getPort() + "</Port>\r\n");
catalogXml.append("<Info>\r\n");
catalogXml.append("<PTZType>" + channel.getPTZType() + "</PTZType>\r\n");
catalogXml.append("</Info>\r\n");
}
catalogXml.append("</Item>\r\n");
} }
catalogXml.append("<Secrecy>" + channel.getSecrecy() + "</Secrecy>\r\n");
catalogXml.append("<RegisterWay>" + channel.getRegisterWay() + "</RegisterWay>\r\n");
catalogXml.append("<Status>" + (channel.getStatus() == 0?"OFF":"ON") + "</Status>\r\n");
catalogXml.append("<Longitude>" + channel.getLongitude() + "</Longitude>\r\n");
catalogXml.append("<Latitude>" + channel.getLatitude() + "</Latitude>\r\n");
catalogXml.append("<IPAddress>" + channel.getIpAddress() + "</IPAddress>\r\n");
catalogXml.append("<Port>" + channel.getPort() + "</Port>\r\n");
catalogXml.append("<Info>\r\n");
catalogXml.append("<PTZType>" + channel.getPTZType() + "</PTZType>\r\n");
catalogXml.append("</Info>\r\n");
} }
catalogXml.append("</Item>\r\n");
catalogXml.append("</DeviceList>\r\n"); catalogXml.append("</DeviceList>\r\n");
catalogXml.append("</Response>\r\n"); catalogXml.append("</Response>\r\n");
return catalogXml.toString(); return catalogXml.toString();
@ -286,15 +295,20 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
return; return;
} }
try { try {
DeviceChannel deviceChannel = channels.get(index); List<DeviceChannel> deviceChannels;
String catalogXml = getCatalogXml(deviceChannel, sn, parentPlatform, channels.size()); if (index + parentPlatform.getCatalogGroup() < channels.size()) {
deviceChannels = channels.subList(index, index + parentPlatform.getCatalogGroup());
}else {
deviceChannels = channels.subList(index, channels.size());
}
String catalogXml = getCatalogXml(deviceChannels, sn, parentPlatform, channels.size());
// callid // callid
CallIdHeader callIdHeader = parentPlatform.getTransport().equals("TCP") ? tcpSipProvider.getNewCallId() CallIdHeader callIdHeader = parentPlatform.getTransport().equals("TCP") ? tcpSipProvider.getNewCallId()
: udpSipProvider.getNewCallId(); : udpSipProvider.getNewCallId();
Request request = headerProviderPlarformProvider.createMessageRequest(parentPlatform, catalogXml, fromTag, callIdHeader); Request request = headerProviderPlarformProvider.createMessageRequest(parentPlatform, catalogXml, fromTag, callIdHeader);
transmitRequest(parentPlatform, request, null, eventResult -> { transmitRequest(parentPlatform, request, null, eventResult -> {
int indexNext = index + 1; int indexNext = index + parentPlatform.getCatalogGroup();
sendCatalogResponse(channels, parentPlatform, sn, fromTag, indexNext); sendCatalogResponse(channels, parentPlatform, sn, fromTag, indexNext);
}); });
} catch (SipException | ParseException | InvalidArgumentException e) { } catch (SipException | ParseException | InvalidArgumentException e) {
@ -432,13 +446,21 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
if (index >= deviceChannels.size()) { if (index >= deviceChannels.size()) {
return true; return true;
} }
List<DeviceChannel> channels;
if (index + parentPlatform.getCatalogGroup() < deviceChannels.size()) {
channels = deviceChannels.subList(index, index + parentPlatform.getCatalogGroup());
}else {
channels = deviceChannels.subList(index, deviceChannels.size());
}
try { try {
Integer finalIndex = index; Integer finalIndex = index;
String catalogXmlContent = getCatalogXmlContentForCatalogAddOrUpdate(parentPlatform, deviceChannels.get(index ), deviceChannels.size(), type, subscribeInfo); String catalogXmlContent = getCatalogXmlContentForCatalogAddOrUpdate(parentPlatform, channels,
deviceChannels.size(), type, subscribeInfo);
sendNotify(parentPlatform, catalogXmlContent, subscribeInfo, eventResult -> { sendNotify(parentPlatform, catalogXmlContent, subscribeInfo, eventResult -> {
logger.error("发送NOTIFY通知消息失败。错误{} {}", eventResult.statusCode, eventResult.msg); logger.error("发送NOTIFY通知消息失败。错误{} {}", eventResult.statusCode, eventResult.msg);
}, (eventResult -> { }, (eventResult -> {
sendNotifyForCatalogAddOrUpdate(type, parentPlatform, deviceChannels, subscribeInfo, finalIndex + 1); sendNotifyForCatalogAddOrUpdate(type, parentPlatform, deviceChannels, subscribeInfo,
finalIndex + parentPlatform.getCatalogGroup());
})); }));
} catch (SipException | ParseException e) { } catch (SipException | ParseException e) {
e.printStackTrace(); e.printStackTrace();
@ -500,11 +522,9 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
} }
private String getCatalogXmlContentForCatalogAddOrUpdate(ParentPlatform parentPlatform, DeviceChannel channel, int sumNum, String type, SubscribeInfo subscribeInfo) { private String getCatalogXmlContentForCatalogAddOrUpdate(ParentPlatform parentPlatform, List<DeviceChannel> channels, int sumNum, String type, SubscribeInfo subscribeInfo) {
StringBuffer catalogXml = new StringBuffer(600); StringBuffer catalogXml = new StringBuffer(600);
if (parentPlatform.getServerGBId().equals(channel.getParentId())) {
channel.setParentId(parentPlatform.getDeviceGBId());
}
String characterSet = parentPlatform.getCharacterSet(); String characterSet = parentPlatform.getCharacterSet();
catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n"); catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n");
catalogXml.append("<Notify>\r\n"); catalogXml.append("<Notify>\r\n");
@ -512,26 +532,35 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
catalogXml.append("<SN>" + (int) ((Math.random() * 9 + 1) * 100000) + "</SN>\r\n"); catalogXml.append("<SN>" + (int) ((Math.random() * 9 + 1) * 100000) + "</SN>\r\n");
catalogXml.append("<DeviceID>" + parentPlatform.getDeviceGBId() + "</DeviceID>\r\n"); catalogXml.append("<DeviceID>" + parentPlatform.getDeviceGBId() + "</DeviceID>\r\n");
catalogXml.append("<SumNum>1</SumNum>\r\n"); catalogXml.append("<SumNum>1</SumNum>\r\n");
catalogXml.append("<DeviceList Num=\"1\">\r\n"); catalogXml.append("<DeviceList Num=\"" + channels.size() + "\">\r\n");
catalogXml.append("<Item>\r\n"); if (channels.size() > 0) {
catalogXml.append("<DeviceID>" + channel.getChannelId() + "</DeviceID>\r\n"); for (DeviceChannel channel : channels) {
catalogXml.append("<Name>" + channel.getName() + "</Name>\r\n"); if (parentPlatform.getServerGBId().equals(channel.getParentId())) {
catalogXml.append("<Manufacturer>" + channel.getManufacture() + "</Manufacturer>\r\n"); channel.setParentId(parentPlatform.getDeviceGBId());
catalogXml.append("<Model>" + channel.getModel() + "</Model>\r\n"); }
catalogXml.append("<Owner>0</Owner>\r\n"); catalogXml.append("<Item>\r\n");
catalogXml.append("<CivilCode>CivilCode</CivilCode>\r\n"); catalogXml.append("<DeviceID>" + channel.getChannelId() + "</DeviceID>\r\n");
catalogXml.append("<Address>" + channel.getAddress() + "</Address>\r\n"); catalogXml.append("<Name>" + channel.getName() + "</Name>\r\n");
catalogXml.append("<Parental>" + channel.getParental() + "</Parental>\r\n"); catalogXml.append("<Manufacturer>" + channel.getManufacture() + "</Manufacturer>\r\n");
if (channel.getParentId() != null) { catalogXml.append("<Parental>" + channel.getParental() + "</Parental>\r\n");
catalogXml.append("<ParentID>" + channel.getParentId() + "</ParentID>\r\n"); if (channel.getParentId() != null) {
catalogXml.append("<ParentID>" + channel.getParentId() + "</ParentID>\r\n");
}
catalogXml.append("<Secrecy>" + channel.getSecrecy() + "</Secrecy>\r\n");
catalogXml.append("<RegisterWay>" + channel.getRegisterWay() + "</RegisterWay>\r\n");
catalogXml.append("<Status>" + (channel.getStatus() == 0 ? "OFF" : "ON") + "</Status>\r\n");
if (channel.getChannelType() == 2) { // 业务分组/虚拟组织/行政区划 不设置以下属性
catalogXml.append("<Model>" + channel.getModel() + "</Model>\r\n");
catalogXml.append("<Owner>0</Owner>\r\n");
catalogXml.append("<CivilCode>CivilCode</CivilCode>\r\n");
catalogXml.append("<Address>" + channel.getAddress() + "</Address>\r\n");
}
if (!"presence".equals(subscribeInfo.getEventType())) {
catalogXml.append("<Event>" + type + "</Event>\r\n");
}
catalogXml.append("</Item>\r\n");
}
} }
catalogXml.append("<Secrecy>" + channel.getSecrecy() + "</Secrecy>\r\n");
catalogXml.append("<RegisterWay>" + channel.getRegisterWay() + "</RegisterWay>\r\n");
catalogXml.append("<Status>" + (channel.getStatus() == 0 ? "OFF" : "ON") + "</Status>\r\n");
if (!"presence".equals(subscribeInfo.getEventType())) {
catalogXml.append("<Event>" + type + "</Event>\r\n");
}
catalogXml.append("</Item>\r\n");
catalogXml.append("</DeviceList>\r\n"); catalogXml.append("</DeviceList>\r\n");
catalogXml.append("</Notify>\r\n"); catalogXml.append("</Notify>\r\n");
return catalogXml.toString(); return catalogXml.toString();
@ -553,13 +582,20 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
if (index >= deviceChannels.size()) { if (index >= deviceChannels.size()) {
return true; return true;
} }
List<DeviceChannel> channels;
if (index + parentPlatform.getCatalogGroup() < deviceChannels.size()) {
channels = deviceChannels.subList(index, index + parentPlatform.getCatalogGroup());
}else {
channels = deviceChannels.subList(index, deviceChannels.size());
}
try { try {
Integer finalIndex = index; Integer finalIndex = index;
String catalogXmlContent = getCatalogXmlContentForCatalogOther(parentPlatform, deviceChannels.get(index), type); String catalogXmlContent = getCatalogXmlContentForCatalogOther(parentPlatform, channels, type);
sendNotify(parentPlatform, catalogXmlContent, subscribeInfo, eventResult -> { sendNotify(parentPlatform, catalogXmlContent, subscribeInfo, eventResult -> {
logger.error("发送NOTIFY通知消息失败。错误{} {}", eventResult.statusCode, eventResult.msg); logger.error("发送NOTIFY通知消息失败。错误{} {}", eventResult.statusCode, eventResult.msg);
}, (eventResult -> { }, (eventResult -> {
sendNotifyForCatalogOther(type, parentPlatform, deviceChannels, subscribeInfo, finalIndex + 1); sendNotifyForCatalogOther(type, parentPlatform, deviceChannels, subscribeInfo,
finalIndex + parentPlatform.getCatalogGroup());
})); }));
} catch (SipException e) { } catch (SipException e) {
e.printStackTrace(); e.printStackTrace();
@ -574,10 +610,8 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
return true; return true;
} }
private String getCatalogXmlContentForCatalogOther(ParentPlatform parentPlatform, DeviceChannel channel, String type) { private String getCatalogXmlContentForCatalogOther(ParentPlatform parentPlatform, List<DeviceChannel> channels, String type) {
if (parentPlatform.getServerGBId().equals(channel.getParentId())) {
channel.setParentId(parentPlatform.getDeviceGBId());
}
String characterSet = parentPlatform.getCharacterSet(); String characterSet = parentPlatform.getCharacterSet();
StringBuffer catalogXml = new StringBuffer(600); StringBuffer catalogXml = new StringBuffer(600);
catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n"); catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n");
@ -586,11 +620,18 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
catalogXml.append("<SN>" + (int) ((Math.random() * 9 + 1) * 100000) + "</SN>\r\n"); catalogXml.append("<SN>" + (int) ((Math.random() * 9 + 1) * 100000) + "</SN>\r\n");
catalogXml.append("<DeviceID>" + parentPlatform.getDeviceGBId() + "</DeviceID>\r\n"); catalogXml.append("<DeviceID>" + parentPlatform.getDeviceGBId() + "</DeviceID>\r\n");
catalogXml.append("<SumNum>1</SumNum>\r\n"); catalogXml.append("<SumNum>1</SumNum>\r\n");
catalogXml.append("<DeviceList Num=\"1\">\r\n"); catalogXml.append("<DeviceList Num=\" " + channels.size() + " \">\r\n");
catalogXml.append("<Item>\r\n"); if (channels.size() > 0) {
catalogXml.append("<DeviceID>" + channel.getChannelId() + "</DeviceID>\r\n"); for (DeviceChannel channel : channels) {
catalogXml.append("<Event>" + type + "</Event>\r\n"); if (parentPlatform.getServerGBId().equals(channel.getParentId())) {
catalogXml.append("</Item>\r\n"); channel.setParentId(parentPlatform.getDeviceGBId());
}
catalogXml.append("<Item>\r\n");
catalogXml.append("<DeviceID>" + channel.getChannelId() + "</DeviceID>\r\n");
catalogXml.append("<Event>" + type + "</Event>\r\n");
catalogXml.append("</Item>\r\n");
}
}
catalogXml.append("</DeviceList>\r\n"); catalogXml.append("</DeviceList>\r\n");
catalogXml.append("</Notify>\r\n"); catalogXml.append("</Notify>\r\n");
return catalogXml.toString(); return catalogXml.toString();

View File

@ -397,6 +397,10 @@ public class InviteRequestProcessor extends SIPRequestProcessorParent implements
logger.info("[ app={}, stream={} ]通道离线,启用流后开始推流",gbStream.getApp(), gbStream.getStream()); logger.info("[ app={}, stream={} ]通道离线,启用流后开始推流",gbStream.getApp(), gbStream.getStream());
responseAck(evt, Response.BAD_REQUEST, "channel [" + gbStream.getGbId() + "] offline"); responseAck(evt, Response.BAD_REQUEST, "channel [" + gbStream.getGbId() + "] offline");
}else if ("push".equals(gbStream.getStreamType())) { }else if ("push".equals(gbStream.getStreamType())) {
if (!platform.isStartOfflinePush()) {
responseAck(evt, Response.TEMPORARILY_UNAVAILABLE, "channel unavailable");
return;
}
// 发送redis消息以使设备上线 // 发送redis消息以使设备上线
logger.info("[ app={}, stream={} ]通道离线发送redis信息控制设备开始推流",gbStream.getApp(), gbStream.getStream()); logger.info("[ app={}, stream={} ]通道离线发送redis信息控制设备开始推流",gbStream.getApp(), gbStream.getStream());
MessageForPushChannel messageForPushChannel = new MessageForPushChannel(); MessageForPushChannel messageForPushChannel = new MessageForPushChannel();

View File

@ -3,7 +3,6 @@ package com.genersoft.iot.vmp.gb28181.transmit.event.request.impl;
import com.genersoft.iot.vmp.common.VideoManagerConstants; import com.genersoft.iot.vmp.common.VideoManagerConstants;
import com.genersoft.iot.vmp.conf.SipConfig; import com.genersoft.iot.vmp.conf.SipConfig;
import com.genersoft.iot.vmp.gb28181.auth.DigestServerAuthenticationHelper; import com.genersoft.iot.vmp.gb28181.auth.DigestServerAuthenticationHelper;
import com.genersoft.iot.vmp.gb28181.auth.RegisterLogicHandler;
import com.genersoft.iot.vmp.gb28181.bean.Device; import com.genersoft.iot.vmp.gb28181.bean.Device;
import com.genersoft.iot.vmp.gb28181.bean.WvpSipDate; import com.genersoft.iot.vmp.gb28181.bean.WvpSipDate;
import com.genersoft.iot.vmp.gb28181.event.EventPublisher; import com.genersoft.iot.vmp.gb28181.event.EventPublisher;
@ -42,166 +41,157 @@ import java.util.Locale;
@Component @Component
public class RegisterRequestProcessor extends SIPRequestProcessorParent implements InitializingBean, ISIPRequestProcessor { public class RegisterRequestProcessor extends SIPRequestProcessorParent implements InitializingBean, ISIPRequestProcessor {
private Logger logger = LoggerFactory.getLogger(RegisterRequestProcessor.class); private final Logger logger = LoggerFactory.getLogger(RegisterRequestProcessor.class);
public String method = "REGISTER"; public String method = "REGISTER";
@Autowired @Autowired
private SipConfig sipConfig; private SipConfig sipConfig;
@Autowired @Autowired
private RegisterLogicHandler handler; private IRedisCatchStorage redisCatchStorage;
@Autowired @Autowired
private IRedisCatchStorage redisCatchStorage; private IVideoManagerStorage storager;
@Autowired @Autowired
private IVideoManagerStorage storager; private EventPublisher publisher;
@Autowired @Autowired
private EventPublisher publisher; private SIPProcessorObserver sipProcessorObserver;
@Autowired @Override
private SIPProcessorObserver sipProcessorObserver; public void afterPropertiesSet() throws Exception {
// 添加消息处理的订阅
sipProcessorObserver.addRequestProcessor(method, this);
}
@Override /**
public void afterPropertiesSet() throws Exception { * 收到注册请求 处理
// 添加消息处理的订阅 *
sipProcessorObserver.addRequestProcessor(method, this); * @param evt
} */
@Override
public void process(RequestEvent evt) {
try {
RequestEventExt evtExt = (RequestEventExt) evt;
String requestAddress = evtExt.getRemoteIpAddress() + ":" + evtExt.getRemotePort();
logger.info("[{}] 收到注册请求,开始处理", requestAddress);
Request request = evt.getRequest();
ExpiresHeader expiresHeader = (ExpiresHeader) request.getHeader(Expires.NAME);
Response response = null;
boolean passwordCorrect = false;
// 注册标志 0未携带授权头或者密码错误 1注册成功 2注销成功
int registerFlag = 0;
FromHeader fromHeader = (FromHeader) request.getHeader(FromHeader.NAME);
AddressImpl address = (AddressImpl) fromHeader.getAddress();
SipUri uri = (SipUri) address.getURI();
String deviceId = uri.getUser();
/** AuthorizationHeader authHead = (AuthorizationHeader) request.getHeader(AuthorizationHeader.NAME);
* 收到注册请求 处理 if (authHead == null) {
* @param evt logger.info("[{}] 未携带授权头 回复401", requestAddress);
*/ response = getMessageFactory().createResponse(Response.UNAUTHORIZED, request);
@Override new DigestServerAuthenticationHelper().generateChallenge(getHeaderFactory(), response, sipConfig.getDomain());
public void process(RequestEvent evt) { sendResponse(evt, response);
try { return;
RequestEventExt evtExt = (RequestEventExt)evt; }
String requestAddress = evtExt.getRemoteIpAddress() + ":" + evtExt.getRemotePort();
logger.info("[{}] 收到注册请求,开始处理", requestAddress);
Request request = evt.getRequest();
ExpiresHeader expiresHeader = (ExpiresHeader) request.getHeader(Expires.NAME);
Response response = null;
boolean passwordCorrect = false;
// 注册标志 0未携带授权头或者密码错误 1注册成功 2注销成功
int registerFlag = 0;
FromHeader fromHeader = (FromHeader) request.getHeader(FromHeader.NAME);
AddressImpl address = (AddressImpl) fromHeader.getAddress();
SipUri uri = (SipUri) address.getURI();
String deviceId = uri.getUser();
Device deviceInRedis = redisCatchStorage.getDevice(deviceId);
Device device = storager.queryVideoDevice(deviceId);
if (deviceInRedis != null && device == null) {
// redis 存在脏数据
redisCatchStorage.clearCatchByDeviceId(deviceId);
}
AuthorizationHeader authorhead = (AuthorizationHeader) request.getHeader(AuthorizationHeader.NAME);
// 校验密码是否正确
if (authorhead != null) {
passwordCorrect = new DigestServerAuthenticationHelper().doAuthenticatePlainTextPassword(request,
sipConfig.getPassword());
}
if (StringUtils.isEmpty(sipConfig.getPassword())){
passwordCorrect = true;
}
// 未携带授权头或者密码错误 回复401 // 校验密码是否正确
if (authorhead == null ) { passwordCorrect = StringUtils.isEmpty(sipConfig.getPassword()) ||
new DigestServerAuthenticationHelper().doAuthenticatePlainTextPassword(request, sipConfig.getPassword());
// 未携带授权头或者密码错误 回复401
logger.info("[{}] 未携带授权头 回复401", requestAddress); if (!passwordCorrect) {
response = getMessageFactory().createResponse(Response.UNAUTHORIZED, request); // 注册失败
new DigestServerAuthenticationHelper().generateChallenge(getHeaderFactory(), response, sipConfig.getDomain()); response = getMessageFactory().createResponse(Response.FORBIDDEN, request);
}else { response.setReasonPhrase("wrong password");
if (!passwordCorrect){ logger.info("[{}] 密码/SIP服务器ID错误, 回复403", requestAddress);
// 注册失败 sendResponse(evt, response);
response = getMessageFactory().createResponse(Response.FORBIDDEN, request); return;
response.setReasonPhrase("wrong password"); }
logger.info("[{}] 密码/SIP服务器ID错误, 回复403", requestAddress);
}else {
// 携带授权头并且密码正确
response = getMessageFactory().createResponse(Response.OK, request);
// 添加date头
SIPDateHeader dateHeader = new SIPDateHeader();
// 使用自己修改的
WvpSipDate wvpSipDate = new WvpSipDate(Calendar.getInstance(Locale.ENGLISH).getTimeInMillis());
dateHeader.setDate(wvpSipDate);
response.addHeader(dateHeader);
Device deviceInRedis = redisCatchStorage.getDevice(deviceId);
Device device = storager.queryVideoDevice(deviceId);
if (deviceInRedis != null && device == null) {
// redis 存在脏数据
redisCatchStorage.clearCatchByDeviceId(deviceId);
}
// 携带授权头并且密码正确
response = getMessageFactory().createResponse(Response.OK, request);
// 添加date头
SIPDateHeader dateHeader = new SIPDateHeader();
// 使用自己修改的
WvpSipDate wvpSipDate = new WvpSipDate(Calendar.getInstance(Locale.ENGLISH).getTimeInMillis());
dateHeader.setDate(wvpSipDate);
response.addHeader(dateHeader);
if (expiresHeader == null) { if (expiresHeader == null) {
response = getMessageFactory().createResponse(Response.BAD_REQUEST, request); response = getMessageFactory().createResponse(Response.BAD_REQUEST, request);
ServerTransaction serverTransaction = getServerTransaction(evt); ServerTransaction serverTransaction = getServerTransaction(evt);
serverTransaction.sendResponse(response); serverTransaction.sendResponse(response);
if (serverTransaction.getDialog() != null) serverTransaction.getDialog().delete(); if (serverTransaction.getDialog() != null) serverTransaction.getDialog().delete();
return; return;
} }
// 添加Contact头 // 添加Contact头
response.addHeader(request.getHeader(ContactHeader.NAME)); response.addHeader(request.getHeader(ContactHeader.NAME));
// 添加Expires头 // 添加Expires头
response.addHeader(request.getExpires()); response.addHeader(request.getExpires());
// 获取到通信地址等信息 // 获取到通信地址等信息
ViaHeader viaHeader = (ViaHeader) request.getHeader(ViaHeader.NAME); ViaHeader viaHeader = (ViaHeader) request.getHeader(ViaHeader.NAME);
String received = viaHeader.getReceived(); String received = viaHeader.getReceived();
int rPort = viaHeader.getRPort(); int rPort = viaHeader.getRPort();
// 解析本地地址替代 // 解析本地地址替代
if (StringUtils.isEmpty(received) || rPort == -1) { if (StringUtils.isEmpty(received) || rPort == -1) {
received = viaHeader.getHost(); received = viaHeader.getHost();
rPort = viaHeader.getPort(); rPort = viaHeader.getPort();
} }
// if (device == null) {
device = new Device();
device.setStreamMode("UDP");
device.setCharset("GB2312");
device.setDeviceId(deviceId);
device.setFirsRegister(true);
} else {
device.setFirsRegister(device.getOnline() == 0);
}
device.setIp(received);
device.setPort(rPort);
device.setHostAddress(received.concat(":").concat(String.valueOf(rPort)));
if (expiresHeader.getExpires() == 0) {
// 注销成功
registerFlag = 2;
} else {
// 注册成功
device.setExpires(expiresHeader.getExpires());
registerFlag = 1;
// 判断TCP还是UDP
ViaHeader reqViaHeader = (ViaHeader) request.getHeader(ViaHeader.NAME);
String transport = reqViaHeader.getTransport();
device.setTransport("TCP".equals(transport) ? "TCP" : "UDP");
}
if (device == null) { sendResponse(evt, response);
device = new Device(); // 注册成功
device.setStreamMode("UDP"); // 保存到redis
device.setCharset("GB2312"); if (registerFlag == 1) {
device.setDeviceId(deviceId); logger.info("[{}] 注册成功! deviceId:" + deviceId, requestAddress);
device.setFirsRegister(true); publisher.onlineEventPublish(device, VideoManagerConstants.EVENT_ONLINE_REGISTER, expiresHeader.getExpires());
}else { } else if (registerFlag == 2) {
if (device.getOnline() == 0) { logger.info("[{}] 注销成功! deviceId:" + deviceId, requestAddress);
device.setFirsRegister(true); publisher.outlineEventPublish(deviceId, VideoManagerConstants.EVENT_OUTLINE_UNREGISTER);
} }
} } catch (SipException | InvalidArgumentException | NoSuchAlgorithmException | ParseException e) {
device.setIp(received); e.printStackTrace();
device.setPort(rPort); }
device.setHostAddress(received.concat(":").concat(String.valueOf(rPort)));
// 注销成功
if (expiresHeader.getExpires() == 0) {
registerFlag = 2;
}
// 注册成功
else {
device.setExpires(expiresHeader.getExpires());
registerFlag = 1;
// 判断TCP还是UDP
boolean isTcp = false;
ViaHeader reqViaHeader = (ViaHeader) request.getHeader(ViaHeader.NAME);
String transport = reqViaHeader.getTransport();
if (transport.equals("TCP")) {
isTcp = true;
}
device.setTransport(isTcp ? "TCP" : "UDP");
}
}
}
ServerTransaction serverTransaction = getServerTransaction(evt); }
serverTransaction.sendResponse(response);
if (serverTransaction.getDialog() != null) serverTransaction.getDialog().delete(); private void sendResponse(RequestEvent evt, Response response) throws InvalidArgumentException, SipException {
// 注册成功 ServerTransaction serverTransaction = getServerTransaction(evt);
// 保存到redis serverTransaction.sendResponse(response);
if (registerFlag == 1 ) { if (serverTransaction.getDialog() != null) serverTransaction.getDialog().delete();
logger.info("[{}] 注册成功! deviceId:" + device.getDeviceId(), requestAddress); }
publisher.onlineEventPublish(device, VideoManagerConstants.EVENT_ONLINE_REGISTER, expiresHeader.getExpires());
} else if (registerFlag == 2) {
logger.info("[{}] 注销成功! deviceId:" + device.getDeviceId(), requestAddress);
publisher.outlineEventPublish(device.getDeviceId(), VideoManagerConstants.EVENT_OUTLINE_UNREGISTER);
}
} catch (SipException | InvalidArgumentException | NoSuchAlgorithmException | ParseException e) {
e.printStackTrace();
}
}
} }

View File

@ -79,7 +79,7 @@ public class CatalogNotifyMessageHandler extends SIPRequestProcessorParent imple
deviceChannel.setParental(1); deviceChannel.setParental(1);
deviceChannel.setParentId(catalog.getParentId()); deviceChannel.setParentId(catalog.getParentId());
deviceChannel.setRegisterWay(1); deviceChannel.setRegisterWay(1);
deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0,6)); deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision());
deviceChannel.setModel("live"); deviceChannel.setModel("live");
deviceChannel.setOwner("wvp-pro"); deviceChannel.setOwner("wvp-pro");
deviceChannel.setSecrecy("0"); deviceChannel.setSecrecy("0");
@ -116,7 +116,7 @@ public class CatalogNotifyMessageHandler extends SIPRequestProcessorParent imple
deviceChannel.setStatus(1); deviceChannel.setStatus(1);
deviceChannel.setParentId(gbStream.getCatalogId()); deviceChannel.setParentId(gbStream.getCatalogId());
deviceChannel.setRegisterWay(1); deviceChannel.setRegisterWay(1);
deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0,6)); deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision());
deviceChannel.setModel("live"); deviceChannel.setModel("live");
deviceChannel.setOwner("wvp-pro"); deviceChannel.setOwner("wvp-pro");
deviceChannel.setParental(0); deviceChannel.setParental(0);

View File

@ -83,20 +83,17 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem
catalog.setParentId(parentPlatform.getDeviceGBId()); catalog.setParentId(parentPlatform.getDeviceGBId());
} }
DeviceChannel deviceChannel = new DeviceChannel(); DeviceChannel deviceChannel = new DeviceChannel();
// 通道的类型0->国标通道 1->直播流通道 2->业务分组/虚拟组织/行政区划
deviceChannel.setChannelType(2);
deviceChannel.setChannelId(catalog.getId()); deviceChannel.setChannelId(catalog.getId());
deviceChannel.setName(catalog.getName()); deviceChannel.setName(catalog.getName());
deviceChannel.setLongitude(0.0);
deviceChannel.setLatitude(0.0);
deviceChannel.setDeviceId(parentPlatform.getDeviceGBId()); deviceChannel.setDeviceId(parentPlatform.getDeviceGBId());
deviceChannel.setManufacture("wvp-pro"); deviceChannel.setManufacture("wvp-pro");
deviceChannel.setStatus(1); deviceChannel.setStatus(1);
deviceChannel.setParental(1); deviceChannel.setParental(1);
deviceChannel.setParentId(catalog.getParentId()); deviceChannel.setParentId(catalog.getParentId());
deviceChannel.setRegisterWay(1); deviceChannel.setRegisterWay(1);
deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0,6)); deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision());
deviceChannel.setModel("live");
deviceChannel.setOwner("wvp-pro");
deviceChannel.setSecrecy("0");
allChannels.add(deviceChannel); allChannels.add(deviceChannel);
} }
} }
@ -107,6 +104,8 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem
channel.setCatalogId(parentPlatform.getDeviceGBId()); channel.setCatalogId(parentPlatform.getDeviceGBId());
} }
DeviceChannel deviceChannel = storage.queryChannel(channel.getDeviceId(), channel.getChannelId()); DeviceChannel deviceChannel = storage.queryChannel(channel.getDeviceId(), channel.getChannelId());
// 通道的类型0->国标通道 1->直播流通道 2->业务分组/虚拟组织/行政区划
deviceChannel.setChannelType(0);
deviceChannel.setParental(0); deviceChannel.setParental(0);
deviceChannel.setParentId(channel.getCatalogId()); deviceChannel.setParentId(channel.getCatalogId());
deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0, 6)); deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0, 6));
@ -120,6 +119,8 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem
gbStream.setCatalogId(null); gbStream.setCatalogId(null);
} }
DeviceChannel deviceChannel = new DeviceChannel(); DeviceChannel deviceChannel = new DeviceChannel();
// 通道的类型0->国标通道 1->直播流通道 2->业务分组/虚拟组织/行政区划
deviceChannel.setChannelType(1);
deviceChannel.setChannelId(gbStream.getGbId()); deviceChannel.setChannelId(gbStream.getGbId());
deviceChannel.setName(gbStream.getName()); deviceChannel.setName(gbStream.getName());
deviceChannel.setLongitude(gbStream.getLongitude()); deviceChannel.setLongitude(gbStream.getLongitude());
@ -130,7 +131,7 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem
deviceChannel.setStatus(1); deviceChannel.setStatus(1);
deviceChannel.setParentId(gbStream.getCatalogId()); deviceChannel.setParentId(gbStream.getCatalogId());
deviceChannel.setRegisterWay(1); deviceChannel.setRegisterWay(1);
deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0,6)); deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision());
deviceChannel.setModel("live"); deviceChannel.setModel("live");
deviceChannel.setOwner("wvp-pro"); deviceChannel.setOwner("wvp-pro");
deviceChannel.setParental(0); deviceChannel.setParental(0);

View File

@ -118,8 +118,8 @@ public class CatalogResponseMessageHandler extends SIPRequestProcessorParent imp
channelList.add(deviceChannel); channelList.add(deviceChannel);
} }
int sn = Integer.parseInt(snElement.getText()); int sn = Integer.parseInt(snElement.getText());
logger.info("收到来自设备【{}】的通道: {}个,{}/{}", device.getDeviceId(), channelList.size(), catalogDataCatch.get(key) == null ? 0 :catalogDataCatch.get(key).size(), sumNum);
catalogDataCatch.put(device.getDeviceId(), sn, sumNum, device, channelList); catalogDataCatch.put(device.getDeviceId(), sn, sumNum, device, channelList);
logger.info("收到来自设备【{}】的通道: {}个,{}/{}", device.getDeviceId(), channelList.size(), catalogDataCatch.get(device.getDeviceId()) == null ? 0 :catalogDataCatch.get(device.getDeviceId()).size(), sumNum);
if (catalogDataCatch.get(device.getDeviceId()).size() == sumNum) { if (catalogDataCatch.get(device.getDeviceId()).size() == sumNum) {
// 数据已经完整接收 // 数据已经完整接收
boolean resetChannelsResult = storager.resetChannels(device.getDeviceId(), catalogDataCatch.get(device.getDeviceId())); boolean resetChannelsResult = storager.resetChannels(device.getDeviceId(), catalogDataCatch.get(device.getDeviceId()));
@ -223,6 +223,14 @@ public class CatalogResponseMessageHandler extends SIPRequestProcessorParent imp
} }
} }
public boolean isSyncRunning(String deviceId) {
if (catalogDataCatch.get(deviceId) == null) {
return false;
}else {
return catalogDataCatch.isSyncRunning(deviceId);
}
}
public void setChannelSyncReady(Device device, int sn) { public void setChannelSyncReady(Device device, int sn) {
catalogDataCatch.addReady(device, sn); catalogDataCatch.addReady(device, sn);
} }

View File

@ -20,8 +20,8 @@ import java.util.*;
/** /**
* 基于dom4j的工具包 * 基于dom4j的工具包
* *
* *
*/ */
public class XmlUtil { public class XmlUtil {
/** /**
@ -31,9 +31,9 @@ public class XmlUtil {
/** /**
* 解析XML为Document对象 * 解析XML为Document对象
* *
* @param xml 被解析的XMl * @param xml 被解析的XMl
* *
* @return Document * @return Document
*/ */
public static Element parseXml(String xml) { public static Element parseXml(String xml) {
@ -51,7 +51,7 @@ public class XmlUtil {
/** /**
* 获取element对象的text的值 * 获取element对象的text的值
* *
* @param em 节点的对象 * @param em 节点的对象
* @param tag 节点的tag * @param tag 节点的tag
* @return 节点 * @return 节点
@ -62,12 +62,12 @@ public class XmlUtil {
} }
Element e = em.element(tag); Element e = em.element(tag);
// //
return null == e ? null : e.getText(); return null == e ? null : e.getText().trim();
} }
/** /**
* 递归解析xml节点适用于 多节点数据 * 递归解析xml节点适用于 多节点数据
* *
* @param node node * @param node node
* @param nodeName nodeName * @param nodeName nodeName
* @return List<Map<String, Object>> * @return List<Map<String, Object>>
@ -106,7 +106,7 @@ public class XmlUtil {
/** /**
* xml转json * xml转json
* *
* @param element * @param element
* @param json * @param json
*/ */

View File

@ -81,7 +81,7 @@ public class ZLMRTPServerFactory {
return result; return result;
} }
public int createRTPServer(MediaServerItem mediaServerItem, String streamId) { public int createRTPServer(MediaServerItem mediaServerItem, String streamId, int ssrc) {
int result = -1; int result = -1;
// 查询此rtp server 是否已经存在 // 查询此rtp server 是否已经存在
JSONObject rtpInfo = zlmresTfulUtils.getRtpInfo(mediaServerItem, streamId); JSONObject rtpInfo = zlmresTfulUtils.getRtpInfo(mediaServerItem, streamId);
@ -94,6 +94,7 @@ public class ZLMRTPServerFactory {
param.put("enable_tcp", 1); param.put("enable_tcp", 1);
param.put("stream_id", streamId); param.put("stream_id", streamId);
param.put("port", 0); param.put("port", 0);
param.put("ssrc", ssrc);
JSONObject openRtpServerResultJson = zlmresTfulUtils.openRtpServer(mediaServerItem, param); JSONObject openRtpServerResultJson = zlmresTfulUtils.openRtpServer(mediaServerItem, param);
if (openRtpServerResultJson != null) { if (openRtpServerResultJson != null) {

View File

@ -43,6 +43,13 @@ public interface IDeviceService {
*/ */
SyncStatus getChannelSyncStatus(String deviceId); SyncStatus getChannelSyncStatus(String deviceId);
/**
* 查看是否仍在同步
* @param deviceId 设备ID
* @return
*/
Boolean isSyncRunning(String deviceId);
/** /**
* 通道同步 * 通道同步
* @param device * @param device

View File

@ -44,9 +44,9 @@ public interface IMediaServerService {
void updateVmServer(List<MediaServerItem> mediaServerItemList); void updateVmServer(List<MediaServerItem> mediaServerItemList);
SSRCInfo openRTPServer(MediaServerItem mediaServerItem, String streamId); SSRCInfo openRTPServer(MediaServerItem mediaServerItem, String streamId, boolean ssrcCheck);
SSRCInfo openRTPServer(MediaServerItem mediaServerItem, String streamId, boolean isPlayback); SSRCInfo openRTPServer(MediaServerItem mediaServerItem, String streamId, boolean ssrcCheck, boolean isPlayback);
void closeRTPServer(String deviceId, String channelId, String ssrc); void closeRTPServer(String deviceId, String channelId, String ssrc);

View File

@ -41,10 +41,6 @@ public class DeviceServiceImpl implements IDeviceService {
if (device == null || device.getSubscribeCycleForCatalog() < 0) { if (device == null || device.getSubscribeCycleForCatalog() < 0) {
return false; return false;
} }
CatalogSubscribeTask task = (CatalogSubscribeTask)dynamicTask.get(device.getDeviceId() + "catalog");
if (task != null && task.getDialogState() != null && task.getDialogState().equals(DialogState.CONFIRMED)) { // 已存在不需要再次添加
return true;
}
logger.info("[添加目录订阅] 设备{}", device.getDeviceId()); logger.info("[添加目录订阅] 设备{}", device.getDeviceId());
// 添加目录订阅 // 添加目录订阅
CatalogSubscribeTask catalogSubscribeTask = new CatalogSubscribeTask(device, sipCommander); CatalogSubscribeTask catalogSubscribeTask = new CatalogSubscribeTask(device, sipCommander);
@ -71,10 +67,6 @@ public class DeviceServiceImpl implements IDeviceService {
return false; return false;
} }
logger.info("[添加移动位置订阅] 设备{}", device.getDeviceId()); logger.info("[添加移动位置订阅] 设备{}", device.getDeviceId());
MobilePositionSubscribeTask task = (MobilePositionSubscribeTask)dynamicTask.get(device.getDeviceId() + "mobile_position");
if (task != null && task.getDialogState() != null && task.getDialogState().equals(DialogState.CONFIRMED)) { // 已存在不需要再次添加
return true;
}
// 添加目录订阅 // 添加目录订阅
MobilePositionSubscribeTask mobilePositionSubscribeTask = new MobilePositionSubscribeTask(device, sipCommander); MobilePositionSubscribeTask mobilePositionSubscribeTask = new MobilePositionSubscribeTask(device, sipCommander);
// 提前开始刷新订阅 // 提前开始刷新订阅
@ -99,9 +91,14 @@ public class DeviceServiceImpl implements IDeviceService {
return catalogResponseMessageHandler.getChannelSyncProgress(deviceId); return catalogResponseMessageHandler.getChannelSyncProgress(deviceId);
} }
@Override
public Boolean isSyncRunning(String deviceId) {
return catalogResponseMessageHandler.isSyncRunning(deviceId);
}
@Override @Override
public void sync(Device device) { public void sync(Device device) {
if (catalogResponseMessageHandler.getChannelSyncProgress(device.getDeviceId()) != null) { if (catalogResponseMessageHandler.isSyncRunning(device.getDeviceId())) {
logger.info("开启同步时发现同步已经存在"); logger.info("开启同步时发现同步已经存在");
return; return;
} }

View File

@ -117,12 +117,12 @@ public class MediaServerServiceImpl implements IMediaServerService {
} }
@Override @Override
public SSRCInfo openRTPServer(MediaServerItem mediaServerItem, String streamId) { public SSRCInfo openRTPServer(MediaServerItem mediaServerItem, String streamId, boolean ssrcCheck) {
return openRTPServer(mediaServerItem, streamId, false); return openRTPServer(mediaServerItem, streamId, ssrcCheck,false);
} }
@Override @Override
public SSRCInfo openRTPServer(MediaServerItem mediaServerItem, String streamId, boolean isPlayback) { public SSRCInfo openRTPServer(MediaServerItem mediaServerItem, String streamId, boolean ssrcCheck, boolean isPlayback) {
if (mediaServerItem == null || mediaServerItem.getId() == null) { if (mediaServerItem == null || mediaServerItem.getId() == null) {
return null; return null;
} }
@ -146,7 +146,7 @@ public class MediaServerServiceImpl implements IMediaServerService {
} }
int rtpServerPort = mediaServerItem.getRtpProxyPort(); int rtpServerPort = mediaServerItem.getRtpProxyPort();
if (mediaServerItem.isRtpEnable()) { if (mediaServerItem.isRtpEnable()) {
rtpServerPort = zlmrtpServerFactory.createRTPServer(mediaServerItem, streamId); rtpServerPort = zlmrtpServerFactory.createRTPServer(mediaServerItem, streamId, ssrcCheck?Integer.parseInt(ssrc):0);
} }
redisUtil.set(key, mediaServerItem); redisUtil.set(key, mediaServerItem);
return new SSRCInfo(rtpServerPort, ssrc, streamId); return new SSRCInfo(rtpServerPort, ssrc, streamId);

View File

@ -188,7 +188,7 @@ public class PlayServiceImpl implements IPlayService {
if (mediaServerItem.isRtpEnable()) { if (mediaServerItem.isRtpEnable()) {
streamId = String.format("%s_%s", device.getDeviceId(), channelId); streamId = String.format("%s_%s", device.getDeviceId(), channelId);
} }
SSRCInfo ssrcInfo = mediaServerService.openRTPServer(mediaServerItem, streamId); SSRCInfo ssrcInfo = mediaServerService.openRTPServer(mediaServerItem, streamId, device.isSsrcCheck());
play(mediaServerItem, ssrcInfo, device, channelId, (mediaServerItemInUse, response)->{ play(mediaServerItem, ssrcInfo, device, channelId, (mediaServerItemInUse, response)->{
if (hookEvent != null) { if (hookEvent != null) {
hookEvent.response(mediaServerItem, response); hookEvent.response(mediaServerItem, response);
@ -232,7 +232,7 @@ public class PlayServiceImpl implements IPlayService {
streamId = String.format("%s_%s", device.getDeviceId(), channelId); streamId = String.format("%s_%s", device.getDeviceId(), channelId);
} }
if (ssrcInfo == null) { if (ssrcInfo == null) {
ssrcInfo = mediaServerService.openRTPServer(mediaServerItem, streamId); ssrcInfo = mediaServerService.openRTPServer(mediaServerItem, streamId, device.isSsrcCheck());
} }
// 超时处理 // 超时处理

View File

@ -420,9 +420,6 @@ public class StreamPushServiceImpl implements IStreamPushService {
continue; continue;
} }
streamPushItemForPlatform.setPlatformId(platFormInfoArray[0]); streamPushItemForPlatform.setPlatformId(platFormInfoArray[0]);
if (platFormInfoArray[0].equals("34020000002110000001")) {
System.out.println(111);
}
List<GbStream> gbStreamList = platformForEvent.get(platFormInfoArray[0]); List<GbStream> gbStreamList = platformForEvent.get(platFormInfoArray[0]);
if (gbStreamList == null) { if (gbStreamList == null) {
gbStreamList = new ArrayList<>(); gbStreamList = new ArrayList<>();

View File

@ -37,6 +37,7 @@ public interface DeviceMapper {
"subscribeCycleForMobilePosition," + "subscribeCycleForMobilePosition," +
"mobilePositionSubmissionInterval," + "mobilePositionSubmissionInterval," +
"subscribeCycleForAlarm," + "subscribeCycleForAlarm," +
"ssrcCheck," +
"online" + "online" +
") VALUES (" + ") VALUES (" +
"#{deviceId}," + "#{deviceId}," +
@ -59,6 +60,7 @@ public interface DeviceMapper {
"#{subscribeCycleForMobilePosition}," + "#{subscribeCycleForMobilePosition}," +
"#{mobilePositionSubmissionInterval}," + "#{mobilePositionSubmissionInterval}," +
"#{subscribeCycleForAlarm}," + "#{subscribeCycleForAlarm}," +
"#{ssrcCheck}," +
"#{online}" + "#{online}" +
")") ")")
int add(Device device); int add(Device device);
@ -84,6 +86,7 @@ public interface DeviceMapper {
"<if test=\"subscribeCycleForMobilePosition != null\">, subscribeCycleForMobilePosition=${subscribeCycleForMobilePosition}</if>" + "<if test=\"subscribeCycleForMobilePosition != null\">, subscribeCycleForMobilePosition=${subscribeCycleForMobilePosition}</if>" +
"<if test=\"mobilePositionSubmissionInterval != null\">, mobilePositionSubmissionInterval=${mobilePositionSubmissionInterval}</if>" + "<if test=\"mobilePositionSubmissionInterval != null\">, mobilePositionSubmissionInterval=${mobilePositionSubmissionInterval}</if>" +
"<if test=\"subscribeCycleForAlarm != null\">, subscribeCycleForAlarm=${subscribeCycleForAlarm}</if>" + "<if test=\"subscribeCycleForAlarm != null\">, subscribeCycleForAlarm=${subscribeCycleForAlarm}</if>" +
"<if test=\"ssrcCheck != null\">, ssrcCheck=${ssrcCheck}</if>" +
"WHERE deviceId='${deviceId}'"+ "WHERE deviceId='${deviceId}'"+
" </script>"}) " </script>"})
int update(Device device); int update(Device device);

View File

@ -16,10 +16,10 @@ public interface ParentPlatformMapper {
@Insert("INSERT INTO parent_platform (enable, name, serverGBId, serverGBDomain, serverIP, serverPort, deviceGBId, deviceIp, " + @Insert("INSERT INTO parent_platform (enable, name, serverGBId, serverGBDomain, serverIP, serverPort, deviceGBId, deviceIp, " +
" devicePort, username, password, expires, keepTimeout, transport, characterSet, ptz, rtcp, " + " devicePort, username, password, expires, keepTimeout, transport, characterSet, ptz, rtcp, " +
" status, shareAllLiveStream, catalogId) " + " status, shareAllLiveStream, startOfflinePush, catalogId, administrativeDivision, catalogGroup) " +
" VALUES (${enable}, '${name}', '${serverGBId}', '${serverGBDomain}', '${serverIP}', ${serverPort}, '${deviceGBId}', '${deviceIp}', " + " VALUES (${enable}, '${name}', '${serverGBId}', '${serverGBDomain}', '${serverIP}', ${serverPort}, '${deviceGBId}', '${deviceIp}', " +
" '${devicePort}', '${username}', '${password}', '${expires}', '${keepTimeout}', '${transport}', '${characterSet}', ${ptz}, ${rtcp}, " + " '${devicePort}', '${username}', '${password}', '${expires}', '${keepTimeout}', '${transport}', '${characterSet}', ${ptz}, ${rtcp}, " +
" ${status}, ${shareAllLiveStream}, #{catalogId})") " ${status}, ${shareAllLiveStream}, ${startOfflinePush}, #{catalogId}, #{administrativeDivision}, #{catalogGroup})")
int addParentPlatform(ParentPlatform parentPlatform); int addParentPlatform(ParentPlatform parentPlatform);
@Update("UPDATE parent_platform " + @Update("UPDATE parent_platform " +
@ -42,6 +42,9 @@ public interface ParentPlatformMapper {
"rtcp=#{rtcp}, " + "rtcp=#{rtcp}, " +
"status=#{status}, " + "status=#{status}, " +
"shareAllLiveStream=#{shareAllLiveStream}, " + "shareAllLiveStream=#{shareAllLiveStream}, " +
"startOfflinePush=${startOfflinePush}, " +
"catalogGroup=#{catalogGroup}, " +
"administrativeDivision=#{administrativeDivision}, " +
"catalogId=#{catalogId} " + "catalogId=#{catalogId} " +
"WHERE id=#{id}") "WHERE id=#{id}")
int updateParentPlatform(ParentPlatform parentPlatform); int updateParentPlatform(ParentPlatform parentPlatform);

View File

@ -520,6 +520,12 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage {
@Override @Override
public boolean updateParentPlatform(ParentPlatform parentPlatform) { public boolean updateParentPlatform(ParentPlatform parentPlatform) {
int result = 0; int result = 0;
if (parentPlatform.getCatalogGroup() == 0) {
parentPlatform.setCatalogGroup(1);
}
if (parentPlatform.getAdministrativeDivision() == null) {
parentPlatform.setAdministrativeDivision(parentPlatform.getAdministrativeDivision());
}
ParentPlatformCatch parentPlatformCatch = redisCatchStorage.queryPlatformCatchInfo(parentPlatform.getServerGBId()); // .getDeviceGBId()); ParentPlatformCatch parentPlatformCatch = redisCatchStorage.queryPlatformCatchInfo(parentPlatform.getServerGBId()); // .getDeviceGBId());
if (parentPlatform.getId() == null ) { if (parentPlatform.getId() == null ) {
if (parentPlatform.getCatalogId() == null) { if (parentPlatform.getCatalogId() == null) {
@ -539,6 +545,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage {
parentPlatformCatch.setId(parentPlatform.getServerGBId()); parentPlatformCatch.setId(parentPlatform.getServerGBId());
redisCatchStorage.delPlatformCatchInfo(parentPlatById.getServerGBId()); redisCatchStorage.delPlatformCatchInfo(parentPlatById.getServerGBId());
} }
result = platformMapper.updateParentPlatform(parentPlatform); result = platformMapper.updateParentPlatform(parentPlatform);
} }
// 更新缓存 // 更新缓存
@ -1074,7 +1081,7 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage {
deviceChannel.setParentId(catalog.getParentId()); deviceChannel.setParentId(catalog.getParentId());
deviceChannel.setRegisterWay(1); deviceChannel.setRegisterWay(1);
// 行政区划应该是Domain的前八位 // 行政区划应该是Domain的前八位
deviceChannel.setCivilCode(parentPlatByServerGBId.getDeviceGBId().substring(0,6)); deviceChannel.setCivilCode(parentPlatByServerGBId.getAdministrativeDivision());
deviceChannel.setModel("live"); deviceChannel.setModel("live");
deviceChannel.setOwner("wvp-pro"); deviceChannel.setOwner("wvp-pro");
deviceChannel.setSecrecy("0"); deviceChannel.setSecrecy("0");

View File

@ -164,12 +164,13 @@ public class DeviceQuery {
logger.debug("设备通道信息同步API调用deviceId" + deviceId); logger.debug("设备通道信息同步API调用deviceId" + deviceId);
} }
Device device = storager.queryVideoDevice(deviceId); Device device = storager.queryVideoDevice(deviceId);
SyncStatus syncStatus = deviceService.getChannelSyncStatus(deviceId); boolean status = deviceService.isSyncRunning(deviceId);
// 已存在则返回进度 // 已存在则返回进度
if (syncStatus != null && syncStatus.getErrorMsg() == null) { if (status) {
WVPResult<SyncStatus> wvpResult = new WVPResult<>(); WVPResult<SyncStatus> wvpResult = new WVPResult<>();
wvpResult.setCode(0); wvpResult.setCode(0);
wvpResult.setData(syncStatus); SyncStatus channelSyncStatus = deviceService.getChannelSyncStatus(deviceId);
wvpResult.setData(channelSyncStatus);
return wvpResult; return wvpResult;
} }
deviceService.sync(device); deviceService.sync(device);

View File

@ -1,67 +1,57 @@
<template> <template>
<div id="app"> <div id="app" style="width: 100%">
<el-container> <div class="page-header">
<el-header> <div class="page-title">云端录像</div>
<uiHeader></uiHeader> <div class="page-header-btn">
</el-header> 节点选择:
<el-main> <el-select size="mini" @change="chooseMediaChange" style="width: 16rem; margin-right: 1rem;" v-model="mediaServerId" placeholder="请选择" :disabled="recordDetail">
<div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;"> <el-option
<span v-if="!recordDetail" >云端录像</span> v-for="item in mediaServerList"
<el-page-header v-if="recordDetail" @back="backToList" content="云端录像"> :key="item.id"
</el-page-header> :label="item.id"
<div style="position: absolute; right: 5rem; top: 0.3rem;"> :value="item.id">
节点选择: </el-option>
<el-select size="mini" @change="chooseMediaChange" style="width: 16rem; margin-right: 1rem;" v-model="mediaServerId" placeholder="请选择" :disabled="recordDetail"> </el-select>
<el-option <el-button v-if="!recordDetail" icon="el-icon-refresh-right" circle size="mini" :loading="loading" @click="getRecordList()"></el-button>
v-for="item in mediaServerList" </div>
:key="item.id" </div>
:label="item.id" <div v-if="!recordDetail">
:value="item.id">
</el-option>
</el-select>
</div>
<div style="position: absolute; right: 1rem; top: 0.3rem;">
<el-button v-if="!recordDetail" icon="el-icon-refresh-right" circle size="mini" :loading="loading" @click="getRecordList()"></el-button>
</div>
</div>
<div v-if="!recordDetail">
<!--设备列表--> <!--设备列表-->
<el-table :data="recordList" border style="width: 100%" :height="winHeight"> <el-table :data="recordList" border style="width: 100%" :height="winHeight">
<el-table-column prop="app" label="应用名" align="center"> <el-table-column prop="app" label="应用名" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="stream" label="流ID" align="center"> <el-table-column prop="stream" label="流ID" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="time" label="时间" align="center"> <el-table-column prop="time" label="时间" align="center">
</el-table-column> </el-table-column>
<el-table-column label="操作" width="360" align="center" fixed="right"> <el-table-column label="操作" width="360" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button-group> <el-button-group>
<el-button size="mini" icon="el-icon-video-camera-solid" type="primary" @click="showRecordDetail(scope.row)">查看</el-button> <el-button size="mini" icon="el-icon-video-camera-solid" type="primary" @click="showRecordDetail(scope.row)">查看</el-button>
<!-- <el-button size="mini" icon="el-icon-delete" type="danger" @click="deleteRecord(scope.row)">删除</el-button>--> <!-- <el-button size="mini" icon="el-icon-delete" type="danger" @click="deleteRecord(scope.row)">删除</el-button>-->
</el-button-group> </el-button-group>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
style="float: right" style="float: right"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="currentChange" @current-change="currentChange"
:current-page="currentPage" :current-page="currentPage"
:page-size="count" :page-size="count"
:page-sizes="[15, 25, 35, 50]" :page-sizes="[15, 25, 35, 50]"
layout="total, sizes, prev, pager, next" layout="total, sizes, prev, pager, next"
:total="total"> :total="total">
</el-pagination> </el-pagination>
</div> </div>
<cloud-record-detail ref="cloudRecordDetail" v-if="recordDetail" :recordFile="chooseRecord" :mediaServerId="mediaServerId" :mediaServerPath="mediaServerPath" ></cloud-record-detail> <cloud-record-detail ref="cloudRecordDetail" v-if="recordDetail" :recordFile="chooseRecord" :mediaServerId="mediaServerId" :mediaServerPath="mediaServerPath" ></cloud-record-detail>
</el-main>
</el-container> </div>
</div>
</template> </template>
<script> <script>
import uiHeader from './UiHeader.vue' import uiHeader from '../layout/UiHeader.vue'
import cloudRecordDetail from './CloudRecordDetail.vue' import cloudRecordDetail from './CloudRecordDetail.vue'
import MediaServer from './service/MediaServer' import MediaServer from './service/MediaServer'
export default { export default {

View File

@ -104,7 +104,7 @@
<script> <script>
// TODO // TODO
import uiHeader from './UiHeader.vue' import uiHeader from '../layout/UiHeader.vue'
import player from './dialog/easyPlayer.vue' import player from './dialog/easyPlayer.vue'
import moment from 'moment' import moment from 'moment'
export default { export default {

View File

@ -1,349 +1,350 @@
<template> <template>
<div id="app"> <div id="app" style="width: 100%">
<el-container> <div class="page-header">
<el-header> <div class="page-title">设备列表</div>
<uiHeader></uiHeader> <div class="page-header-btn">
</el-header> <el-button icon="el-icon-refresh-right" circle size="mini" :loading="getDeviceListLoading"
<el-main> @click="getDeviceList()"></el-button>
<div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;"> </div>
<span style="font-size: 1rem; font-weight: bold;">设备列表</span> </div>
<div style="position: absolute; right: 1rem; top: 0.3rem;"> <!-- <devicePlayer ref="devicePlayer"></devicePlayer> -->
<el-button icon="el-icon-refresh-right" circle size="mini" :loading="getDeviceListLoading" @click="getDeviceList()"></el-button> <!--设备列表-->
</div> <el-table :data="deviceList" border style="width: 100%;font-size: 12px;" :height="winHeight">
</div> <el-table-column prop="name" label="名称" align="center">
<!-- <devicePlayer ref="devicePlayer"></devicePlayer> --> </el-table-column>
<!--设备列表--> <el-table-column prop="deviceId" label="设备编号" width="180" align="center">
<el-table :data="deviceList" border style="width: 100%;font-size: 12px;" :height="winHeight"> </el-table-column>
<el-table-column prop="name" label="名称" align="center"> <el-table-column label="地址" width="180" align="center">
</el-table-column> <template slot-scope="scope">
<el-table-column prop="deviceId" label="设备编号" width="180" align="center"> <div slot="reference" class="name-wrapper">
</el-table-column> <el-tag size="medium">{{ scope.row.hostAddress }}</el-tag>
<el-table-column label="地址" width="180" align="center"> </div>
<template slot-scope="scope"> </template>
<div slot="reference" class="name-wrapper"> </el-table-column>
<el-tag size="medium">{{ scope.row.hostAddress }}</el-tag> <el-table-column prop="manufacturer" label="厂家" align="center">
</div> </el-table-column>
</template> <el-table-column label="流传输模式" align="center" width="120">
</el-table-column> <template slot-scope="scope">
<el-table-column prop="manufacturer" label="厂家" align="center"> <el-select size="mini" @change="transportChange(scope.row)" v-model="scope.row.streamMode" placeholder="请选择">
</el-table-column> <el-option key="UDP" label="UDP" value="UDP"></el-option>
<el-table-column label="流传输模式" align="center" width="120"> <el-option key="TCP-ACTIVE" label="TCP主动模式" :disabled="true" value="TCP-ACTIVE"></el-option>
<template slot-scope="scope"> <el-option key="TCP-PASSIVE" label="TCP被动模式" value="TCP-PASSIVE"></el-option>
<el-select size="mini" @change="transportChange(scope.row)" v-model="scope.row.streamMode" placeholder="请选择"> </el-select>
<el-option key="UDP" label="UDP" value="UDP"></el-option> </template>
<el-option key="TCP-ACTIVE" label="TCP主动模式" :disabled="true" value="TCP-ACTIVE"></el-option> </el-table-column>
<el-option key="TCP-PASSIVE" label="TCP被动模式" value="TCP-PASSIVE"></el-option> <el-table-column prop="channelCount" label="通道数" align="center">
</el-select> </el-table-column>
</template> <el-table-column label="状态" width="120" align="center">
</el-table-column> <template slot-scope="scope">
<el-table-column prop="channelCount" label="通道数" align="center"> <div slot="reference" class="name-wrapper">
</el-table-column> <el-tag size="medium" v-if="scope.row.online == 1">在线</el-tag>
<el-table-column label="状态" width="120" align="center"> <el-tag size="medium" type="info" v-if="scope.row.online == 0">离线</el-tag>
<template slot-scope="scope"> </div>
<div slot="reference" class="name-wrapper"> </template>
<el-tag size="medium" v-if="scope.row.online == 1">在线</el-tag> </el-table-column>
<el-tag size="medium" type="info" v-if="scope.row.online == 0">离线</el-tag> <el-table-column prop="keepaliveTime" label="最近心跳" align="center" width="140">
</div> </el-table-column>
</template> <el-table-column prop="registerTime" label="最近注册" align="center" width="140">
</el-table-column> </el-table-column>
<el-table-column prop="keepaliveTime" label="最近心跳" align="center" width="140"> <el-table-column prop="updateTime" label="更新时间" align="center" width="140">
</el-table-column> </el-table-column>
<el-table-column prop="registerTime" label="最近注册" align="center" width="140"> <el-table-column prop="createTime" label="创建时间" align="center" width="140">
</el-table-column> </el-table-column>
<el-table-column prop="updateTime" label="更新时间" align="center" width="140">
</el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center" width="140">
</el-table-column>
<el-table-column label="操作" width="450" align="center" fixed="right"> <el-table-column label="操作" width="450" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button size="mini" v-if="scope.row.online!=0" icon="el-icon-refresh" @click="refDevice(scope.row)" @mouseover="getTooltipContent(scope.row.deviceId)">刷新</el-button> <el-button size="mini" v-if="scope.row.online!=0" icon="el-icon-refresh" @click="refDevice(scope.row)"
<el-button-group> @mouseover="getTooltipContent(scope.row.deviceId)">刷新
<el-button size="mini" icon="el-icon-video-camera-solid" v-bind:disabled="scope.row.online==0" type="primary" @click="showChannelList(scope.row)">通道</el-button> </el-button>
<el-button size="mini" icon="el-icon-location" v-bind:disabled="scope.row.online==0" type="primary" @click="showDevicePosition(scope.row)">定位</el-button> <el-button-group>
<el-button size="mini" icon="el-icon-edit" type="primary" @click="edit(scope.row)">编辑</el-button> <el-button size="mini" icon="el-icon-video-camera-solid" v-bind:disabled="scope.row.online==0"
<el-button size="mini" icon="el-icon-delete" type="danger" @click="deleteDevice(scope.row)">删除</el-button> type="primary" @click="showChannelList(scope.row)">通道
</el-button-group> </el-button>
</template> <el-button size="mini" icon="el-icon-location" v-bind:disabled="scope.row.online==0" type="primary"
</el-table-column> @click="showDevicePosition(scope.row)">定位
</el-table> </el-button>
<el-pagination <el-button size="mini" icon="el-icon-edit" type="primary" @click="edit(scope.row)">编辑</el-button>
style="float: right" <el-button size="mini" icon="el-icon-delete" type="danger" @click="deleteDevice(scope.row)">删除</el-button>
@size-change="handleSizeChange" </el-button-group>
@current-change="currentChange" </template>
:current-page="currentPage" </el-table-column>
:page-size="count" </el-table>
:page-sizes="[15, 25, 35, 50]" <el-pagination
layout="total, sizes, prev, pager, next" style="float: right"
:total="total"> @size-change="handleSizeChange"
</el-pagination> @current-change="currentChange"
<deviceEdit ref="deviceEdit" ></deviceEdit> :current-page="currentPage"
<syncChannelProgress ref="syncChannelProgress" ></syncChannelProgress> :page-size="count"
</el-main> :page-sizes="[15, 25, 35, 50]"
</el-container> layout="total, sizes, prev, pager, next"
</div> :total="total">
</el-pagination>
<deviceEdit ref="deviceEdit"></deviceEdit>
<syncChannelProgress ref="syncChannelProgress"></syncChannelProgress>
</div>
</template> </template>
<script> <script>
import uiHeader from './UiHeader.vue' import uiHeader from '../layout/UiHeader.vue'
import deviceEdit from './dialog/deviceEdit.vue' import deviceEdit from './dialog/deviceEdit.vue'
import syncChannelProgress from './dialog/SyncChannelProgress.vue' import syncChannelProgress from './dialog/SyncChannelProgress.vue'
export default {
name: 'app',
components: {
uiHeader,
deviceEdit,
syncChannelProgress,
},
data() {
return {
deviceList: [], //
currentDevice: {}, //
videoComponentList: [], export default {
updateLooper: 0, // name: 'app',
currentDeviceChannelsLenth:0, components: {
winHeight: window.innerHeight - 200, uiHeader,
currentPage:1, deviceEdit,
count:15, syncChannelProgress,
total:0, },
getDeviceListLoading: false, data() {
}; return {
}, deviceList: [], //
computed: { currentDevice: {}, //
getcurrentDeviceChannels: function() {
let data = this.currentDevice['channelMap'];
let channels = null;
if (data) {
channels = Object.keys(data).map(key => {
return data[key];
});
this.currentDeviceChannelsLenth = channels.length;
}
return channels;
}
},
mounted() {
this.initData();
this.updateLooper = setInterval(this.initData, 10000);
},
destroyed() {
this.$destroy('videojs');
clearTimeout(this.updateLooper);
},
methods: {
initData: function() {
this.getDeviceList();
},
currentChange: function(val){
this.currentPage = val;
this.getDeviceList();
},
handleSizeChange: function(val){
this.count = val;
this.getDeviceList();
},
getDeviceList: function() {
let that = this;
this.getDeviceListLoading = true;
this.$axios({
method: 'get',
url:`/api/device/query/devices`,
params: {
page: that.currentPage,
count: that.count
}
}).then(function (res) {
that.total = res.data.total;
that.deviceList = res.data.list;
that.getDeviceListLoading = false;
}).catch(function (error) {
console.error(error);
that.getDeviceListLoading = false;
});
},
deleteDevice: function(row) {
let msg = "确定删除此设备?"
if (row.online !== 0) {
msg = "在线设备删除后仍可通过注册再次上线。<br/>如需彻底删除请先将设备离线。<br/><strong>确定删除此设备?</strong>"
}
this.$confirm(msg, '提示', {
dangerouslyUseHTMLString : true,
confirmButtonText: '确定',
cancelButtonText: '取消',
center: true,
type: 'warning'
}).then(() => {
this.$axios({
method: 'delete',
url:`/api/device/query/devices/${row.deviceId}/delete`
}).then((res)=>{
this.getDeviceList();
}).catch((error) =>{
console.error(error);
});
}).catch(() => {
videoComponentList: [],
updateLooper: 0, //
currentDeviceChannelsLenth: 0,
winHeight: window.innerHeight - 200,
currentPage: 1,
count: 15,
total: 0,
getDeviceListLoading: false,
};
},
computed: {
getcurrentDeviceChannels: function () {
let data = this.currentDevice['channelMap'];
let channels = null;
if (data) {
channels = Object.keys(data).map(key => {
return data[key];
}); });
this.currentDeviceChannelsLenth = channels.length;
}
return channels;
}
},
mounted() {
this.initData();
this.updateLooper = setInterval(this.initData, 10000);
},
destroyed() {
this.$destroy('videojs');
clearTimeout(this.updateLooper);
},
methods: {
initData: function () {
this.getDeviceList();
},
currentChange: function (val) {
this.currentPage = val;
this.getDeviceList();
},
handleSizeChange: function (val) {
this.count = val;
this.getDeviceList();
},
getDeviceList: function () {
let that = this;
this.getDeviceListLoading = true;
this.$axios({
method: 'get',
url: `/api/device/query/devices`,
params: {
page: that.currentPage,
count: that.count
}
}).then(function (res) {
that.total = res.data.total;
that.deviceList = res.data.list;
that.getDeviceListLoading = false;
}).catch(function (error) {
console.error(error);
that.getDeviceListLoading = false;
});
},
deleteDevice: function (row) {
let msg = "确定删除此设备?"
if (row.online !== 0) {
msg = "在线设备删除后仍可通过注册再次上线。<br/>如需彻底删除请先将设备离线。<br/><strong>确定删除此设备?</strong>"
}
this.$confirm(msg, '提示', {
dangerouslyUseHTMLString: true,
confirmButtonText: '确定',
cancelButtonText: '取消',
center: true,
type: 'warning'
}).then(() => {
this.$axios({
method: 'delete',
url: `/api/device/query/devices/${row.deviceId}/delete`
}).then((res) => {
this.getDeviceList();
}).catch((error) => {
console.error(error);
});
}).catch(() => {
});
}, },
showChannelList: function(row) { showChannelList: function (row) {
this.$router.push(`/channelList/${row.deviceId}/0/15/1`); this.$router.push(`/channelList/${row.deviceId}/0/15/1`);
}, },
showDevicePosition: function(row) { showDevicePosition: function (row) {
this.$router.push(`/devicePosition/${row.deviceId}/0/15/1`); this.$router.push(`/devicePosition/${row.deviceId}/0/15/1`);
}, },
//gb28181 //gb28181
// //
refDevice: function(itemData) { refDevice: function (itemData) {
console.log("刷新对应设备:" + itemData.deviceId); console.log("刷新对应设备:" + itemData.deviceId);
let that = this; let that = this;
this.$axios({ this.$axios({
method: 'post', method: 'post',
url: '/api/device/query/devices/' + itemData.deviceId + '/sync' url: '/api/device/query/devices/' + itemData.deviceId + '/sync'
}).then((res) => { }).then((res) => {
console.log("刷新设备结果:"+JSON.stringify(res)); console.log("刷新设备结果:" + JSON.stringify(res));
if (res.data.code !==0) { if (res.data.code !== 0) {
that.$message({
showClose: true,
message: res.data.msg,
type: 'error'
});
}else{
// that.$message({
// showClose: true,
// message: res.data.msg,
// type: 'success'
// });
this.$refs.syncChannelProgress.openDialog(itemData.deviceId)
}
that.initData()
}).catch((e) => {
console.error(e)
that.$message({ that.$message({
showClose: true, showClose: true,
message: e, message: res.data.msg,
type: 'error' type: 'error'
}); });
}); } else {
// that.$message({
}, // showClose: true,
// message: res.data.msg,
getTooltipContent: async function (deviceId){ // type: 'success'
let result = ""; // });
await this.$axios({ this.$refs.syncChannelProgress.openDialog(itemData.deviceId)
method: 'get', }
async: false, that.initData()
url:`/api/device/query/${deviceId}/sync_status/`, }).catch((e) => {
}).then((res) => { console.error(e)
if (res.data.code == 0) { that.$message({
if (res.data.data.errorMsg !== null) { showClose: true,
result = res.data.data.errorMsg message: e,
} else if (res.data.msg !== null) { type: 'error'
result = res.data.msg
} else {
result = `同步中...[${res.data.data.current}/${res.data.data.total}]`;
}
}
})
return result;
},
//
sendDevicePush: function(itemData) {
// let deviceId = this.currentDevice.deviceId;
// let channelId = itemData.channelId;
// console.log("1" + deviceId + " : " + channelId);
// let that = this;
// this.$axios({
// method: 'get',
// url: '/api/play/' + deviceId + '/' + channelId
// }).then(function(res) {
// let ssrc = res.data.ssrc;
// that.$refs.devicePlayer.play(ssrc,deviceId,channelId);
// }).catch(function(e) {
// });
},
transportChange: function (row) {
console.log(`修改传输方式为 ${row.streamMode}${row.deviceId} `);
let that = this;
this.$axios({
method: 'post',
url: '/api/device/query/transport/' + row.deviceId + '/' + row.streamMode
}).then(function(res) {
}).catch(function(e) {
}); });
}, });
edit: function (row) {
this.$refs.deviceEdit.openDialog(row, ()=>{
this.$refs.deviceEdit.close();
this.$message({
showClose: true,
message: "设备修改成功,通道字符集将在下次更新生效",
type: "success",
});
setTimeout(this.getDeviceList, 200)
}) },
}
} getTooltipContent: async function (deviceId) {
}; let result = "";
await this.$axios({
method: 'get',
async: false,
url: `/api/device/query/${deviceId}/sync_status/`,
}).then((res) => {
if (res.data.code == 0) {
if (res.data.data.errorMsg !== null) {
result = res.data.data.errorMsg
} else if (res.data.msg !== null) {
result = res.data.msg
} else {
result = `同步中...[${res.data.data.current}/${res.data.data.total}]`;
}
}
})
return result;
},
//
sendDevicePush: function (itemData) {
// let deviceId = this.currentDevice.deviceId;
// let channelId = itemData.channelId;
// console.log("1" + deviceId + " : " + channelId);
// let that = this;
// this.$axios({
// method: 'get',
// url: '/api/play/' + deviceId + '/' + channelId
// }).then(function(res) {
// let ssrc = res.data.ssrc;
// that.$refs.devicePlayer.play(ssrc,deviceId,channelId);
// }).catch(function(e) {
// });
},
transportChange: function (row) {
console.log(`修改传输方式为 ${row.streamMode}${row.deviceId} `);
let that = this;
this.$axios({
method: 'post',
url: '/api/device/query/transport/' + row.deviceId + '/' + row.streamMode
}).then(function (res) {
}).catch(function (e) {
});
},
edit: function (row) {
this.$refs.deviceEdit.openDialog(row, () => {
this.$refs.deviceEdit.close();
this.$message({
showClose: true,
message: "设备修改成功,通道字符集将在下次更新生效",
type: "success",
});
setTimeout(this.getDeviceList, 200)
})
}
}
};
</script> </script>
<style> <style>
.videoList { .videoList {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-content: flex-start; align-content: flex-start;
} }
.video-item { .video-item {
position: relative; position: relative;
width: 15rem; width: 15rem;
height: 10rem; height: 10rem;
margin-right: 1rem; margin-right: 1rem;
background-color: #000000; background-color: #000000;
} }
.video-item-img { .video-item-img {
position: absolute; position: absolute;
top: 0; top: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
margin: auto; margin: auto;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.video-item-img:after { .video-item-img:after {
content: ""; content: "";
display: inline-block; display: inline-block;
position: absolute; position: absolute;
z-index: 2; z-index: 2;
top: 0; top: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
margin: auto; margin: auto;
width: 3rem; width: 3rem;
height: 3rem; height: 3rem;
background-image: url("../assets/loading.png"); background-image: url("../assets/loading.png");
background-size: cover; background-size: cover;
background-color: #000000; background-color: #000000;
} }
.video-item-title { .video-item-title {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
color: #000000; color: #000000;
background-color: #ffffff; background-color: #ffffff;
line-height: 1.5rem; line-height: 1.5rem;
padding: 0.3rem; padding: 0.3rem;
width: 14.4rem; width: 14.4rem;
} }
</style> </style>

View File

@ -1,45 +1,38 @@
<template> <template>
<div id="mediaServerManger"> <div id="mediaServerManger" style="width: 100%">
<el-container> <div class="page-header">
<el-header> <div class="page-title">节点列表</div>
<uiHeader></uiHeader> <div class="page-header-btn">
</el-header> <el-button icon="el-icon-plus" size="mini" style="margin-right: 1rem;" type="primary" @click="add">添加节点</el-button>
<el-main id="msMain"> </div>
<div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;"> </div>
<span style="font-size: 1rem; font-weight: bold;">节点列表</span>
</div>
<div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;font-size: 14px;">
<el-button icon="el-icon-plus" size="mini" style="margin-right: 1rem;" type="primary" @click="add">添加节点</el-button>
</div>
<el-row :gutter="12"> <el-row :gutter="12">
<el-col :span="num" v-for="item in mediaServerList" :key="item.id"> <el-col :span="num" v-for="item in mediaServerList" :key="item.id">
<el-card shadow="hover" :body-style="{ padding: '0px'}" class="server-card"> <el-card shadow="hover" :body-style="{ padding: '0px'}" class="server-card">
<div class="card-img-zlm"></div> <div class="card-img-zlm"></div>
<div style="padding: 14px;text-align: left"> <div style="padding: 14px;text-align: left">
<span style="font-size: 16px">{{item.id}}</span> <span style="font-size: 16px">{{item.id}}</span>
<el-button v-if="!item.defaultServer" icon="el-icon-edit" style="padding: 0;float: right;" type="text" @click="edit(item)">编辑</el-button> <el-button v-if="!item.defaultServer" icon="el-icon-edit" style="padding: 0;float: right;" type="text" @click="edit(item)">编辑</el-button>
<el-button v-if="item.defaultServer" icon="el-icon-edit" style="padding: 0;float: right;" type="text" @click="edit(item)">查看</el-button> <el-button v-if="item.defaultServer" icon="el-icon-edit" style="padding: 0;float: right;" type="text" @click="edit(item)">查看</el-button>
<el-button icon="el-icon-delete" style="margin-right: 10px;padding: 0;float: right;" type="text" @click="del(item)">移除</el-button> <el-button icon="el-icon-delete" style="margin-right: 10px;padding: 0;float: right;" type="text" @click="del(item)">移除</el-button>
<div style="margin-top: 13px; line-height: 12px; "> <div style="margin-top: 13px; line-height: 12px; ">
<span style="font-size: 14px; color: #999; margin-top: 5px; ">{{item.ip}}</span> <span style="font-size: 14px; color: #999; margin-top: 5px; ">{{item.ip}}</span>
<span style="font-size: 14px; color: #999; margin-top: 5px; float: right;">{{item.createTime}}</span> <span style="font-size: 14px; color: #999; margin-top: 5px; float: right;">{{item.createTime}}</span>
</div> </div>
</div> </div>
<i v-if="item.status" class="iconfont icon-online server-card-status-online" title="在线"></i> <i v-if="item.status" class="iconfont icon-online server-card-status-online" title="在线"></i>
<i v-if="!item.status" class="iconfont icon-online server-card-status-offline" title="离线"></i> <i v-if="!item.status" class="iconfont icon-online server-card-status-offline" title="离线"></i>
<i v-if="item.defaultServer" class="server-card-default" >默认</i> <i v-if="item.defaultServer" class="server-card-default" >默认</i>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<mediaServerEdit ref="mediaServerEdit" ></mediaServerEdit> <mediaServerEdit ref="mediaServerEdit" ></mediaServerEdit>
</el-main>
</el-container>
</div> </div>
</template> </template>
<script> <script>
import uiHeader from './UiHeader.vue' import uiHeader from '../layout/UiHeader.vue'
import MediaServer from './service/MediaServer' import MediaServer from './service/MediaServer'
import mediaServerEdit from './dialog/MediaServerEdit' import mediaServerEdit from './dialog/MediaServerEdit'
export default { export default {

View File

@ -1,85 +1,79 @@
<template> <template>
<div id="app"> <div id="app" style="width: 100%">
<el-container> <div class="page-header">
<el-header> <div class="page-title">上级平台列表</div>
<uiHeader></uiHeader> <div class="page-header-btn">
</el-header> <el-button icon="el-icon-plus" size="mini" style="margin-right: 1rem;" type="primary" @click="addParentPlatform">添加</el-button>
<el-main> </div>
<div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;"> </div>
<span style="font-size: 1rem; font-weight: bold;">上级平台列表</span>
</div>
<div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;font-size: 14px;">
<el-button icon="el-icon-plus" size="mini" style="margin-right: 1rem;" type="primary" @click="addParentPlatform">添加</el-button>
</div>
<!--设备列表-->
<el-table :data="platformList" border style="width: 100%" :height="winHeight">
<el-table-column prop="name" label="名称" align="center"></el-table-column>
<el-table-column prop="serverGBId" label="平台编号" width="180" align="center"></el-table-column>
<el-table-column label="是否启用" width="120" align="center">
<template slot-scope="scope">
<div slot="reference" class="name-wrapper">
<el-tag size="medium" v-if="scope.row.enable">已启用</el-tag>
<el-tag size="medium" type="info" v-if="!scope.row.enable">未启用</el-tag>
</div>
</template>
</el-table-column>
<el-table-column label="状态" width="120" align="center">
<template slot-scope="scope">
<div slot="reference" class="name-wrapper">
<el-tag size="medium" v-if="scope.row.status">在线</el-tag>
<el-tag size="medium" type="info" v-if="!scope.row.status">离线</el-tag>
</div>
</template>
</el-table-column>
<el-table-column label="地址" width="180" align="center">
<template slot-scope="scope">
<div slot="reference" class="name-wrapper">
<el-tag size="medium">{{ scope.row.serverIP}}:{{scope.row.serverPort }}</el-tag>
</div>
</template>
</el-table-column>
<el-table-column prop="deviceGBId" label="设备国标编号" width="200" align="center"></el-table-column>
<el-table-column prop="transport" label="信令传输模式" width="120" align="center"></el-table-column>
<el-table-column prop="channelCount" label="通道数" width="120" align="center"></el-table-column>
<el-table-column label="订阅信息" width="240" align="center" fixed="right">
<template slot-scope="scope">
<i v-if="scope.row.alarmSubscribe" style="font-size: 20px" title="报警订阅" class="iconfont icon-gbaojings subscribe-on " ></i>
<i v-if="!scope.row.alarmSubscribe" style="font-size: 20px" title="报警订阅" class="iconfont icon-gbaojings subscribe-off " ></i>
<i v-if="scope.row.catalogSubscribe" title="目录订阅" class="iconfont icon-gjichus subscribe-on" ></i>
<i v-if="!scope.row.catalogSubscribe" title="目录订阅" class="iconfont icon-gjichus subscribe-off" ></i>
<i v-if="scope.row.mobilePositionSubscribe" title="位置订阅" class="iconfont icon-gxunjians subscribe-on" ></i>
<i v-if="!scope.row.mobilePositionSubscribe" title="位置订阅" class="iconfont icon-gxunjians subscribe-off" ></i>
</template>
</el-table-column>
<el-table-column label="操作" width="300" align="center" fixed="right"> <!--设备列表-->
<template slot-scope="scope"> <el-table :data="platformList" border style="width: 100%" :height="winHeight">
<el-button size="mini" icon="el-icon-edit" @click="editPlatform(scope.row)">编辑</el-button> <el-table-column prop="name" label="名称" align="center"></el-table-column>
<el-button size="mini" icon="el-icon-share" type="primary" @click="chooseChannel(scope.row)">选择通道</el-button> <el-table-column prop="serverGBId" label="平台编号" align="center"></el-table-column>
<el-button size="mini" icon="el-icon-delete" type="danger" @click="deletePlatform(scope.row)">删除</el-button> <el-table-column label="是否启用" width="120" align="center">
</template> <template slot-scope="scope">
</el-table-column> <div slot="reference" class="name-wrapper">
</el-table> <el-tag size="medium" v-if="scope.row.enable">已启用</el-tag>
<el-pagination <el-tag size="medium" type="info" v-if="!scope.row.enable">未启用</el-tag>
style="float: right" </div>
@size-change="handleSizeChange" </template>
@current-change="currentChange" </el-table-column>
:current-page="currentPage" <el-table-column label="状态" width="120" align="center">
:page-size="count" <template slot-scope="scope">
:page-sizes="[15, 25, 35, 50]" <div slot="reference" class="name-wrapper">
layout="total, sizes, prev, pager, next" <el-tag size="medium" v-if="scope.row.status">在线</el-tag>
:total="total"> <el-tag size="medium" type="info" v-if="!scope.row.status">离线</el-tag>
</el-pagination> </div>
<platformEdit ref="platformEdit" ></platformEdit> </template>
<chooseChannelDialog ref="chooseChannelDialog" ></chooseChannelDialog> </el-table-column>
</el-main> <el-table-column label="地址" width="180" align="center">
</el-container> <template slot-scope="scope">
<div slot="reference" class="name-wrapper">
<el-tag size="medium">{{ scope.row.serverIP}}:{{scope.row.serverPort }}</el-tag>
</div>
</template>
</el-table-column>
<el-table-column prop="deviceGBId" label="设备国标编号" width="200" align="center"></el-table-column>
<el-table-column prop="transport" label="信令传输模式" width="120" align="center"></el-table-column>
<el-table-column prop="channelCount" label="通道数" width="120" align="center"></el-table-column>
<el-table-column label="订阅信息" width="240" align="center" fixed="right">
<template slot-scope="scope">
<i v-if="scope.row.alarmSubscribe" style="font-size: 20px" title="报警订阅" class="iconfont icon-gbaojings subscribe-on " ></i>
<i v-if="!scope.row.alarmSubscribe" style="font-size: 20px" title="报警订阅" class="iconfont icon-gbaojings subscribe-off " ></i>
<i v-if="scope.row.catalogSubscribe" title="目录订阅" class="iconfont icon-gjichus subscribe-on" ></i>
<i v-if="!scope.row.catalogSubscribe" title="目录订阅" class="iconfont icon-gjichus subscribe-off" ></i>
<i v-if="scope.row.mobilePositionSubscribe" title="位置订阅" class="iconfont icon-gxunjians subscribe-on" ></i>
<i v-if="!scope.row.mobilePositionSubscribe" title="位置订阅" class="iconfont icon-gxunjians subscribe-off" ></i>
</template>
</el-table-column>
<el-table-column label="操作" width="300" align="center" fixed="right">
<template slot-scope="scope">
<el-button size="mini" icon="el-icon-edit" @click="editPlatform(scope.row)">编辑</el-button>
<el-button size="mini" icon="el-icon-share" type="primary" @click="chooseChannel(scope.row)">选择通道</el-button>
<el-button size="mini" icon="el-icon-delete" type="danger" @click="deletePlatform(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
style="float: right"
@size-change="handleSizeChange"
@current-change="currentChange"
:current-page="currentPage"
:page-size="count"
:page-sizes="[15, 25, 35, 50]"
layout="total, sizes, prev, pager, next"
:total="total">
</el-pagination>
<platformEdit ref="platformEdit" ></platformEdit>
<chooseChannelDialog ref="chooseChannelDialog" ></chooseChannelDialog>
</div> </div>
</template> </template>
<script> <script>
import platformEdit from './dialog/platformEdit.vue' import platformEdit from './dialog/platformEdit.vue'
import uiHeader from './UiHeader.vue' import uiHeader from '../layout/UiHeader.vue'
import chooseChannelDialog from './dialog/chooseChannel.vue' import chooseChannelDialog from './dialog/chooseChannel.vue'
export default { export default {
name: 'app', name: 'app',

View File

@ -1,18 +1,14 @@
<template> <template>
<div id="pushVideoList"> <div id="pushVideoList" style="width: 100%">
<el-container> <div class="page-header">
<el-header> <div class="page-title">推流列表</div>
<uiHeader></uiHeader> <div class="page-header-btn">
</el-header> 搜索:
<el-main> <el-input @input="getPushList" style="margin-right: 1rem; width: auto;" size="mini" placeholder="关键字"
<div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;"> prefix-icon="el-icon-search" v-model="searchSrt" clearable></el-input>
<span style="font-size: 1rem; font-weight: bold;">推流列表</span> 流媒体:
</div> <el-select size="mini" @change="getPushList" style="margin-right: 1rem;" v-model="mediaServerId"
<div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;font-size: 14px;"> placeholder="请选择" default-first-option>
搜索: <el-input @input="getPushList" style="margin-right: 1rem; width: auto;" size="mini" placeholder="关键字" prefix-icon="el-icon-search" v-model="searchSrt" clearable> </el-input>
流媒体: <el-select size="mini" @change="getPushList" style="margin-right: 1rem;" v-model="mediaServerId" placeholder="请选择" default-first-option>
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option <el-option
v-for="item in mediaServerList" v-for="item in mediaServerList"
@ -21,309 +17,327 @@
:value="item.id"> :value="item.id">
</el-option> </el-option>
</el-select> </el-select>
推流状态: <el-select size="mini" style="margin-right: 1rem;" @change="getPushList" v-model="pushing" placeholder="请选择" default-first-option> 推流状态:
<el-select size="mini" style="margin-right: 1rem;" @change="getPushList" v-model="pushing" placeholder="请选择"
default-first-option>
<el-option label="全部" value=""></el-option> <el-option label="全部" value=""></el-option>
<el-option label="推流进行中" value="true"></el-option> <el-option label="推流进行中" value="true"></el-option>
<el-option label="推流未进行" value="false"></el-option> <el-option label="推流未进行" value="false"></el-option>
</el-select> </el-select>
<el-button icon="el-icon-upload2" size="mini" style="margin-right: 1rem;" type="primary" @click="importChannel">通道导入</el-button> <el-button icon="el-icon-upload2" size="mini" style="margin-right: 1rem;" type="primary" @click="importChannel">
<el-button icon="el-icon-download" size="mini" style="margin-right: 1rem;" type="primary" > 通道导入
<a style="color: #FFFFFF; text-align: center; text-decoration: none" href="/static/file/推流通道导入.zip" download='推流通道导入.zip' >下载模板</a> </el-button>
</el-button> <el-button icon="el-icon-download" size="mini" style="margin-right: 1rem;" type="primary">
<el-button icon="el-icon-delete" size="mini" style="margin-right: 1rem;" :disabled="multipleSelection.length === 0" type="danger" @click="batchDel">批量移除</el-button> <a style="color: #FFFFFF; text-align: center; text-decoration: none" href="/static/file/推流通道导入.zip"
</div> download='推流通道导入.zip'>下载模板</a>
<devicePlayer ref="devicePlayer"></devicePlayer> </el-button>
<addStreamTOGB ref="addStreamTOGB"></addStreamTOGB> <el-button icon="el-icon-delete" size="mini" style="margin-right: 1rem;"
<el-table ref="pushListTable" :data="pushList" border style="width: 100%" :height="winHeight" @selection-change="handleSelectionChange" :row-key="(row)=> row.app + row.stream"> :disabled="multipleSelection.length === 0" type="danger" @click="batchDel">批量移除
<el-table-column align="center" type="selection" :reserve-selection="true" width="55"> </el-button>
</el-table-column> </div>
<el-table-column prop="name" label="名称" align="center"> </div>
</el-table-column> <devicePlayer ref="devicePlayer"></devicePlayer>
<el-table-column prop="app" label="APP" align="center"> <addStreamTOGB ref="addStreamTOGB"></addStreamTOGB>
</el-table-column> <el-table ref="pushListTable" :data="pushList" border style="width: 100%" :height="winHeight"
<el-table-column prop="stream" label="流ID" align="center"> @selection-change="handleSelectionChange" :row-key="(row)=> row.app + row.stream">
</el-table-column> <el-table-column align="center" type="selection" :reserve-selection="true" width="55">
<el-table-column prop="gbId" label="国标编码" width="200" align="center"> </el-table-column>
</el-table-column> <el-table-column prop="name" label="名称" align="center">
<el-table-column prop="mediaServerId" label="流媒体" width="200" align="center"> </el-table-column>
</el-table-column> <el-table-column prop="app" label="APP" align="center">
<el-table-column label="开始时间" align="center" width="200"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="stream" label="流ID" align="center">
<el-button-group> </el-table-column>
{{dateFormat(parseInt(scope.row.createStamp))}} <el-table-column prop="gbId" label="国标编码" width="200" align="center">
</el-button-group> </el-table-column>
</template> <el-table-column prop="mediaServerId" label="流媒体" width="200" align="center">
</el-table-column> </el-table-column>
<el-table-column label="正在推流" align="center" width="100"> <el-table-column label="开始时间" align="center" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
{{(scope.row.status == false && scope.row.gbId == null) || scope.row.status ?'是':'否'}} <el-button-group>
</template> {{ dateFormat(parseInt(scope.row.createStamp)) }}
</el-table-column> </el-button-group>
</template>
</el-table-column>
<el-table-column label="正在推流" align="center" width="100">
<template slot-scope="scope">
{{ (scope.row.status == false && scope.row.gbId == null) || scope.row.status ? '是' : '否' }}
</template>
</el-table-column>
<el-table-column label="操作" width="360" align="center" fixed="right"> <el-table-column label="操作" width="360" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button-group> <el-button-group>
<el-button size="mini" icon="el-icon-video-play" v-if="(scope.row.status == false && scope.row.gbId == null) || scope.row.status" @click="playPush(scope.row)">播放</el-button> <el-button size="mini" icon="el-icon-video-play"
<el-button size="mini" icon="el-icon-delete" type="danger" @click="stopPush(scope.row)">移除</el-button> v-if="(scope.row.status == false && scope.row.gbId == null) || scope.row.status"
<el-button size="mini" icon="el-icon-position" type="primary" v-if="!!!scope.row.gbId" @click="addToGB(scope.row)">加入国标</el-button> @click="playPush(scope.row)">播放
<el-button size="mini" icon="el-icon-position" type="primary" v-if="!!scope.row.gbId" @click="removeFromGB(scope.row)">移出国标</el-button> </el-button>
</el-button-group> <el-button size="mini" icon="el-icon-delete" type="danger" @click="stopPush(scope.row)">移除</el-button>
</template> <el-button size="mini" icon="el-icon-position" type="primary" v-if="!!!scope.row.gbId"
</el-table-column> @click="addToGB(scope.row)">加入国标
</el-table> </el-button>
<el-pagination <el-button size="mini" icon="el-icon-position" type="primary" v-if="!!scope.row.gbId"
style="float: right" @click="removeFromGB(scope.row)">移出国标
@size-change="handleSizeChange" </el-button>
@current-change="currentChange" </el-button-group>
:current-page="currentPage" </template>
:page-size="count" </el-table-column>
:page-sizes="[15, 25, 35, 50]" </el-table>
layout="total, sizes, prev, pager, next" <el-pagination
:total="total"> style="float: right"
</el-pagination> @size-change="handleSizeChange"
<streamProxyEdit ref="streamProxyEdit" ></streamProxyEdit> @current-change="currentChange"
<importChannel ref="importChannel" ></importChannel> :current-page="currentPage"
</el-main> :page-size="count"
</el-container> :page-sizes="[15, 25, 35, 50]"
</div> layout="total, sizes, prev, pager, next"
:total="total">
</el-pagination>
<streamProxyEdit ref="streamProxyEdit"></streamProxyEdit>
<importChannel ref="importChannel"></importChannel>
</div>
</template> </template>
<script> <script>
import streamProxyEdit from './dialog/StreamProxyEdit.vue' import streamProxyEdit from './dialog/StreamProxyEdit.vue'
import devicePlayer from './dialog/devicePlayer.vue' import devicePlayer from './dialog/devicePlayer.vue'
import addStreamTOGB from './dialog/addStreamTOGB.vue' import addStreamTOGB from './dialog/addStreamTOGB.vue'
import uiHeader from './UiHeader.vue' import uiHeader from '../layout/UiHeader.vue'
import importChannel from './dialog/importChannel.vue' import importChannel from './dialog/importChannel.vue'
import MediaServer from './service/MediaServer' import MediaServer from './service/MediaServer'
export default {
name: 'pushVideoList',
components: {
devicePlayer,
addStreamTOGB,
streamProxyEdit,
uiHeader,
importChannel,
},
data() {
return {
pushList: [], //
currentPusher: {}, //
updateLooper: 0, //
currentDeviceChannelsLenth:0,
winHeight: window.innerHeight - 250,
mediaServerObj : new MediaServer(),
currentPage:1,
count:15,
total:0,
searchSrt: "",
pushing: "",
mediaServerId: "",
mediaServerList: [],
multipleSelection: [],
getDeviceListLoading: false
};
},
computed: {
},
mounted() {
this.initData();
this.updateLooper = setInterval(this.getPushList, 2000);
},
destroyed() {
clearTimeout(this.updateLooper);
},
methods: {
initData: function() {
this.mediaServerObj.getOnlineMediaServerList((data)=>{
this.mediaServerList = data.data;
})
this.getPushList();
},
currentChange: function(val){
this.currentPage = val;
this.getPushList();
},
handleSizeChange: function(val){
this.count = val;
this.getPushList();
},
getPushList: function() {
let that = this;
this.getDeviceListLoading = true;
this.$axios({
method: 'get',
url:`/api/push/list`,
params: {
page: that.currentPage,
count: that.count,
query: that.searchSrt,
pushing: that.pushing,
mediaServerId: that.mediaServerId,
}
}).then(function (res) {
that.total = res.data.total;
that.pushList = res.data.list;
that.getDeviceListLoading = false;
}).catch(function (error) {
console.error(error);
that.getDeviceListLoading = false;
});
},
playPush: function(row){ export default {
let that = this; name: 'pushVideoList',
this.getListLoading = true; components: {
this.$axios({ devicePlayer,
method: 'get', addStreamTOGB,
url: '/api/media/stream_info_by_app_and_stream', streamProxyEdit,
params: { uiHeader,
app: row.app, importChannel,
stream: row.stream, },
mediaServerId: row.mediaServerId data() {
} return {
}).then(function (res) { pushList: [], //
that.getListLoading = false; currentPusher: {}, //
that.$refs.devicePlayer.openDialog("streamPlay", null, null, { updateLooper: 0, //
streamInfo: res.data.data, currentDeviceChannelsLenth: 0,
hasAudio: true winHeight: window.innerHeight - 250,
}); mediaServerObj: new MediaServer(),
}).catch(function (error) { currentPage: 1,
console.error(error); count: 15,
that.getListLoading = false; total: 0,
}); searchSrt: "",
}, pushing: "",
stopPush: function(row){ mediaServerId: "",
mediaServerList: [],
multipleSelection: [],
getDeviceListLoading: false
};
},
computed: {},
mounted() {
this.initData();
this.updateLooper = setInterval(this.getPushList, 2000);
},
destroyed() {
clearTimeout(this.updateLooper);
},
methods: {
initData: function () {
this.mediaServerObj.getOnlineMediaServerList((data) => {
this.mediaServerList = data.data;
})
this.getPushList();
},
currentChange: function (val) {
this.currentPage = val;
this.getPushList();
},
handleSizeChange: function (val) {
this.count = val;
this.getPushList();
},
getPushList: function () {
let that = this;
this.getDeviceListLoading = true;
this.$axios({
method: 'get',
url: `/api/push/list`,
params: {
page: that.currentPage,
count: that.count,
query: that.searchSrt,
pushing: that.pushing,
mediaServerId: that.mediaServerId,
}
}).then(function (res) {
that.total = res.data.total;
that.pushList = res.data.list;
that.getDeviceListLoading = false;
}).catch(function (error) {
console.error(error);
that.getDeviceListLoading = false;
});
},
playPush: function (row) {
let that = this;
this.getListLoading = true;
this.$axios({
method: 'get',
url: '/api/media/stream_info_by_app_and_stream',
params: {
app: row.app,
stream: row.stream,
mediaServerId: row.mediaServerId
}
}).then(function (res) {
that.getListLoading = false;
that.$refs.devicePlayer.openDialog("streamPlay", null, null, {
streamInfo: res.data.data,
hasAudio: true
});
}).catch(function (error) {
console.error(error);
that.getListLoading = false;
});
},
stopPush: function (row) {
let that = this;
that.$axios({
method: "post",
url: "/api/push/stop",
params: {
app: row.app,
streamId: row.stream
}
}).then((res) => {
if (res.data == "success") {
that.initData()
}
}).catch(function (error) {
console.error(error);
});
},
addToGB: function (row) {
this.$refs.addStreamTOGB.openDialog({
app: row.app,
stream: row.stream,
mediaServerId: row.mediaServerId
}, this.initData);
},
removeFromGB: function (row) {
let that = this;
that.$axios({
method: "delete",
url: "/api/push/remove_form_gb",
data: row
}).then((res) => {
if (res.data == "success") {
that.initData()
}
}).catch(function (error) {
console.error(error);
});
},
dateFormat: function (/** timestamp=0 **/) {
let ts = arguments[0] || 0;
let t, y, m, d, h, i, s;
t = ts ? new Date(ts) : new Date();
y = t.getFullYear();
m = t.getMonth() + 1;
d = t.getDate();
h = t.getHours();
i = t.getMinutes();
s = t.getSeconds();
//
return y + '-' + (m < 10 ? '0' + m : m) + '-' + (d < 10 ? '0' + d : d) + ' ' + (h < 10 ? '0' + h : h) + ':' + (i < 10 ? '0' + i : i) + ':' + (s < 10 ? '0' + s : s);
},
importChannel: function () {
this.$refs.importChannel.openDialog(() => {
})
},
batchDel: function () {
this.$confirm(`确定删除选中的${this.multipleSelection.length}个通道?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let that = this; let that = this;
that.$axios({ that.$axios({
method:"post", method: "delete",
url:"/api/push/stop", url: "/api/push/batchStop",
params: { data: {
app: row.app, gbStreams: this.multipleSelection
streamId: row.stream
}
}).then((res)=>{
if (res.data == "success") {
that.initData()
} }
}).then((res) => {
this.initData();
this.$refs.pushListTable.clearSelection();
}).catch(function (error) { }).catch(function (error) {
console.error(error); console.error(error);
}); });
}, }).catch(() => {
addToGB: function(row){
this.$refs.addStreamTOGB.openDialog({app: row.app, stream: row.stream, mediaServerId: row.mediaServerId}, this.initData);
},
removeFromGB: function(row){
let that = this;
that.$axios({
method:"delete",
url:"/api/push/remove_form_gb",
data:row
}).then((res)=>{
if (res.data == "success") {
that.initData()
}
}).catch(function (error) {
console.error(error);
});
},
dateFormat: function(/** timestamp=0 **/) {
let ts = arguments[0] || 0;
let t,y,m,d,h,i,s;
t = ts ? new Date(ts) : new Date();
y = t.getFullYear();
m = t.getMonth()+1;
d = t.getDate();
h = t.getHours();
i = t.getMinutes();
s = t.getSeconds();
//
return y+'-'+(m<10?'0'+m:m)+'-'+(d<10?'0'+d:d)+' '+(h<10?'0'+h:h)+':'+(i<10?'0'+i:i)+':'+(s<10?'0'+s:s);
},
importChannel: function () {
this.$refs.importChannel.openDialog(()=>{
}) });
}, },
batchDel: function () { handleSelectionChange: function (val) {
this.$confirm(`确定删除选中的${this.multipleSelection.length}个通道?`, '提示', { this.multipleSelection = val;
confirmButtonText: '确定', },
cancelButtonText: '取消', }
type: 'warning' };
}).then(() => {
let that = this;
that.$axios({
method:"delete",
url:"/api/push/batchStop",
data: {
gbStreams: this.multipleSelection
}
}).then((res)=>{
this.initData();
this.$refs.pushListTable.clearSelection();
}).catch(function (error) {
console.error(error);
});
}).catch(() => {
});
},
handleSelectionChange: function (val) {
this.multipleSelection = val;
},
}
};
</script> </script>
<style> <style>
.videoList { .videoList {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-content: flex-start; align-content: flex-start;
} }
.video-item { .video-item {
position: relative; position: relative;
width: 15rem; width: 15rem;
height: 10rem; height: 10rem;
margin-right: 1rem; margin-right: 1rem;
background-color: #000000; background-color: #000000;
} }
.video-item-img { .video-item-img {
position: absolute; position: absolute;
top: 0; top: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
margin: auto; margin: auto;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.video-item-img:after { .video-item-img:after {
content: ""; content: "";
display: inline-block; display: inline-block;
position: absolute; position: absolute;
z-index: 2; z-index: 2;
top: 0; top: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
margin: auto; margin: auto;
width: 3rem; width: 3rem;
height: 3rem; height: 3rem;
background-image: url("../assets/loading.png"); background-image: url("../assets/loading.png");
background-size: cover; background-size: cover;
background-color: #000000; background-color: #000000;
} }
.video-item-title { .video-item-title {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
color: #000000; color: #000000;
background-color: #ffffff; background-color: #ffffff;
line-height: 1.5rem; line-height: 1.5rem;
padding: 0.3rem; padding: 0.3rem;
width: 14.4rem; width: 14.4rem;
} }
</style> </style>

View File

@ -1,115 +1,108 @@
<template> <template>
<div id="streamProxyList"> <div id="streamProxyList" style="width: 100%">
<el-container> <div class="page-header">
<el-header> <div class="page-title">拉流代理列表</div>
<uiHeader></uiHeader> <div class="page-header-btn">
</el-header> <el-button icon="el-icon-plus" size="mini" style="margin-right: 1rem;" type="primary" @click="addStreamProxy">添加代理</el-button>
<el-main> <el-button v-if="false" icon="el-icon-search" size="mini" style="margin-right: 1rem;" type="primary" @click="addOnvif">搜索ONVIF</el-button>
<div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;"> </div>
<span style="font-size: 1rem; font-weight: bold;">拉流代理列表</span> </div>
</div> <devicePlayer ref="devicePlayer"></devicePlayer>
<div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;font-size: 14px;"> <el-table :data="streamProxyList" border style="width: 100%" :height="winHeight">
<el-button icon="el-icon-plus" size="mini" style="margin-right: 1rem;" type="primary" @click="addStreamProxy">添加代理</el-button> <el-table-column prop="name" label="名称" align="center" show-overflow-tooltip/>
<el-button v-if="false" icon="el-icon-search" size="mini" style="margin-right: 1rem;" type="primary" @click="addOnvif">搜索ONVIF</el-button> <el-table-column prop="app" label="流应用名" align="center" show-overflow-tooltip/>
</div> <el-table-column prop="stream" label="流ID" align="center" show-overflow-tooltip/>
<devicePlayer ref="devicePlayer"></devicePlayer> <el-table-column label="流地址" width="400" align="center" show-overflow-tooltip >
<el-table :data="streamProxyList" border style="width: 100%" :height="winHeight"> <template slot-scope="scope">
<el-table-column prop="name" label="名称" align="center" show-overflow-tooltip/> <div slot="reference" class="name-wrapper">
<el-table-column prop="app" label="流应用名" align="center" show-overflow-tooltip/>
<el-table-column prop="stream" label="流ID" align="center" show-overflow-tooltip/>
<el-table-column label="流地址" width="400" align="center" show-overflow-tooltip >
<template slot-scope="scope">
<div slot="reference" class="name-wrapper">
<el-tag size="medium" v-if="scope.row.type == 'default'"> <el-tag size="medium" v-if="scope.row.type == 'default'">
<i class="cpoy-btn el-icon-document-copy" title="点击拷贝" v-clipboard="scope.row.url" @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></i> <i class="cpoy-btn el-icon-document-copy" title="点击拷贝" v-clipboard="scope.row.url" @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></i>
{{scope.row.url}} {{scope.row.url}}
</el-tag> </el-tag>
<el-tag size="medium" v-if="scope.row.type != 'default'"> <el-tag size="medium" v-if="scope.row.type != 'default'">
<i class="cpoy-btn el-icon-document-copy" title="点击拷贝" v-clipboard="scope.row.src_url" @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></i> <i class="cpoy-btn el-icon-document-copy" title="点击拷贝" v-clipboard="scope.row.src_url" @success="$message({type:'success', message:'成功拷贝到粘贴板'})"></i>
{{scope.row.src_url}} {{scope.row.src_url}}
</el-tag> </el-tag>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="mediaServerId" label="流媒体" width="150" align="center"></el-table-column> <el-table-column prop="mediaServerId" label="流媒体" width="150" align="center"></el-table-column>
<el-table-column label="类型" width="100" align="center"> <el-table-column label="类型" width="100" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div slot="reference" class="name-wrapper"> <div slot="reference" class="name-wrapper">
<el-tag size="medium">{{scope.row.type}}</el-tag> <el-tag size="medium">{{scope.row.type}}</el-tag>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="gbId" label="国标编码" width="180" align="center" show-overflow-tooltip/> <el-table-column prop="gbId" label="国标编码" width="180" align="center" show-overflow-tooltip/>
<el-table-column label="状态" width="120" align="center"> <el-table-column label="状态" width="120" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div slot="reference" class="name-wrapper"> <div slot="reference" class="name-wrapper">
<el-tag size="medium" v-if="scope.row.status">在线</el-tag> <el-tag size="medium" v-if="scope.row.status">在线</el-tag>
<el-tag size="medium" type="info" v-if="!scope.row.status">离线</el-tag> <el-tag size="medium" type="info" v-if="!scope.row.status">离线</el-tag>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="启用" width="120" align="center"> <el-table-column label="启用" width="120" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div slot="reference" class="name-wrapper"> <div slot="reference" class="name-wrapper">
<el-tag size="medium" v-if="scope.row.enable">已启用</el-tag> <el-tag size="medium" v-if="scope.row.enable">已启用</el-tag>
<el-tag size="medium" type="info" v-if="!scope.row.enable">未启用</el-tag> <el-tag size="medium" type="info" v-if="!scope.row.enable">未启用</el-tag>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center" width="150" show-overflow-tooltip/> <el-table-column prop="createTime" label="创建时间" align="center" width="150" show-overflow-tooltip/>
<el-table-column label="转HLS" width="120" align="center"> <el-table-column label="转HLS" width="120" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div slot="reference" class="name-wrapper"> <div slot="reference" class="name-wrapper">
<el-tag size="medium" v-if="scope.row.enable_hls">已启用</el-tag> <el-tag size="medium" v-if="scope.row.enable_hls">已启用</el-tag>
<el-tag size="medium" type="info" v-if="!scope.row.enable_hls">未启用</el-tag> <el-tag size="medium" type="info" v-if="!scope.row.enable_hls">未启用</el-tag>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="MP4录制" width="120" align="center"> <el-table-column label="MP4录制" width="120" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div slot="reference" class="name-wrapper"> <div slot="reference" class="name-wrapper">
<el-tag size="medium" v-if="scope.row.enable_mp4">已启用</el-tag> <el-tag size="medium" v-if="scope.row.enable_mp4">已启用</el-tag>
<el-tag size="medium" type="info" v-if="!scope.row.enable_mp4">未启用</el-tag> <el-tag size="medium" type="info" v-if="!scope.row.enable_mp4">未启用</el-tag>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="无人观看自动删除" width="160" align="center"> <el-table-column label="无人观看自动删除" width="160" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div slot="reference" class="name-wrapper"> <div slot="reference" class="name-wrapper">
<el-tag size="medium" v-if="scope.row.enable_remove_none_reader">已启用</el-tag> <el-tag size="medium" v-if="scope.row.enable_remove_none_reader">已启用</el-tag>
<el-tag size="medium" type="info" v-if="!scope.row.enable_remove_none_reader">未启用</el-tag> <el-tag size="medium" type="info" v-if="!scope.row.enable_remove_none_reader">未启用</el-tag>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="360" align="center" fixed="right"> <el-table-column label="操作" width="360" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button-group> <el-button-group>
<el-button size="mini" icon="el-icon-video-play" v-if="scope.row.enable" @click="play(scope.row)">播放</el-button> <el-button size="mini" icon="el-icon-video-play" v-if="scope.row.enable" @click="play(scope.row)">播放</el-button>
<el-button size="mini" icon="el-icon-close" type="success" v-if="scope.row.enable" @click="stop(scope.row)">停用</el-button> <el-button size="mini" icon="el-icon-close" type="success" v-if="scope.row.enable" @click="stop(scope.row)">停用</el-button>
<el-button size="mini" icon="el-icon-check" type="primary" :loading="startBtnLaoding" v-if="!scope.row.enable" @click="start(scope.row)">启用</el-button> <el-button size="mini" icon="el-icon-check" type="primary" :loading="startBtnLaoding" v-if="!scope.row.enable" @click="start(scope.row)">启用</el-button>
<el-button size="mini" icon="el-icon-delete" type="danger" @click="deleteStreamProxy(scope.row)">删除</el-button> <el-button size="mini" icon="el-icon-delete" type="danger" @click="deleteStreamProxy(scope.row)">删除</el-button>
</el-button-group> </el-button-group>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <el-pagination
style="float: right" style="float: right"
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="currentChange" @current-change="currentChange"
:current-page="currentPage" :current-page="currentPage"
:page-size="count" :page-size="count"
:page-sizes="[15, 25, 35, 50]" :page-sizes="[15, 25, 35, 50]"
layout="total, sizes, prev, pager, next" layout="total, sizes, prev, pager, next"
:total="total"> :total="total">
</el-pagination> </el-pagination>
<streamProxyEdit ref="streamProxyEdit" ></streamProxyEdit> <streamProxyEdit ref="streamProxyEdit" ></streamProxyEdit>
<onvifEdit ref="onvifEdit" ></onvifEdit> <onvifEdit ref="onvifEdit" ></onvifEdit>
</el-main>
</el-container>
</div> </div>
</template> </template>
@ -117,7 +110,7 @@
import streamProxyEdit from './dialog/StreamProxyEdit.vue' import streamProxyEdit from './dialog/StreamProxyEdit.vue'
import onvifEdit from './dialog/onvifEdit.vue' import onvifEdit from './dialog/onvifEdit.vue'
import devicePlayer from './dialog/devicePlayer.vue' import devicePlayer from './dialog/devicePlayer.vue'
import uiHeader from './UiHeader.vue' import uiHeader from '../layout/UiHeader.vue'
export default { export default {
name: 'streamProxyList', name: 'streamProxyList',
components: { components: {

View File

@ -1,141 +0,0 @@
<template>
<div id="UiHeader">
<el-menu router :default-active="activeIndex" menu-trigger="click" background-color="#545c64" text-color="#fff" active-text-color="#ffd04b" mode="horizontal">
<el-menu-item index="/">控制台</el-menu-item>
<el-menu-item index="/live">实时监控</el-menu-item>
<el-menu-item index="/deviceList">国标设备</el-menu-item>
<el-menu-item index="/pushVideoList">推流列表</el-menu-item>
<el-menu-item index="/streamProxyList">拉流代理</el-menu-item>
<el-menu-item index="/cloudRecord">云端录像</el-menu-item>
<el-menu-item index="/mediaServerManger">节点管理</el-menu-item>
<el-menu-item index="/parentPlatformList/15/1">国标级联</el-menu-item>
<el-menu-item @click="openDoc">在线文档</el-menu-item>
<!-- <el-submenu index="/setting">-->
<!-- <template slot="title">系统设置</template>-->
<!-- <el-menu-item index="/setting/web">WEB服务</el-menu-item>-->
<!-- <el-menu-item index="/setting/sip">国标服务</el-menu-item>-->
<!-- <el-menu-item index="/setting/media">媒体服务</el-menu-item>-->
<!-- </el-submenu>-->
<el-switch v-model="alarmNotify" active-text="报警信息推送" style="display: block float: right" @change="alarmNotifyChannge"></el-switch>
<!-- <el-menu-item style="float: right;" @click="loginout">退出</el-menu-item>-->
<el-submenu index="" style="float: right;" >
<template slot="title">欢迎{{this.$cookies.get("session").username}}</template>
<el-menu-item @click="changePassword">修改密码</el-menu-item>
<el-menu-item @click="loginout">注销</el-menu-item>
</el-submenu>
</el-menu>
<changePasswordDialog ref="changePasswordDialog"></changePasswordDialog>
</div>
</template>
<script>
import changePasswordDialog from './dialog/changePassword.vue'
export default {
name: "UiHeader",
components: { Notification, changePasswordDialog },
data() {
return {
alarmNotify: false,
sseSource: null,
activeIndex: this.$route.path,
};
},
created(){
if (this.$route.path.startsWith("/channelList")){
this.activeIndex = "/deviceList"
}
},
mounted() {
window.addEventListener('beforeunload', e => this.beforeunloadHandler(e))
// window.addEventListener('unload', e => this.unloadHandler(e))
this.alarmNotify = this.getAlarmSwitchStatus() === "true";
this.sseControl();
},
methods:{
loginout(){
this.$axios({
method: 'get',
url:"/api/user/logout"
}).then((res)=> {
// cookie
this.$cookies.remove("session");
this.$router.push('/login');
this.sseSource.close();
}).catch((error)=> {
console.error("登出失败")
console.error(error)
});
},
changePassword(){
this.$refs.changePasswordDialog.openDialog()
},
openDoc(){
console.log(process.env.BASE_API)
window.open( !!process.env.BASE_API? process.env.BASE_API + "/doc.html": "/doc.html")
},
beforeunloadHandler() {
this.sseSource.close();
},
alarmNotifyChannge(){
this.setAlarmSwitchStatus()
this.sseControl()
},
sseControl() {
let that = this;
if (this.alarmNotify) {
console.log("申请SSE推送API调用浏览器ID: " + this.$browserId);
this.sseSource = new EventSource('/api/emit?browserId=' + this.$browserId);
this.sseSource.addEventListener('message', function(evt) {
that.$notify({
title: '收到报警信息',
dangerouslyUseHTMLString: true,
message: evt.data,
type: 'warning'
});
console.log("收到信息:" + evt.data);
});
this.sseSource.addEventListener('open', function(e) {
console.log("SSE连接打开.");
}, false);
this.sseSource.addEventListener('error', function(e) {
if (e.target.readyState == EventSource.CLOSED) {
console.log("SSE连接关闭");
} else {
console.log(e.target.readyState);
}
}, false);
} else {
if (this.sseSource != null) {
this.sseSource.removeEventListener('open', null);
this.sseSource.removeEventListener('message', null);
this.sseSource.removeEventListener('error', null);
this.sseSource.close();
}
}
},
getAlarmSwitchStatus(){
if (localStorage.getItem("alarmSwitchStatus") == null) {
localStorage.setItem("alarmSwitchStatus", false);
}
return localStorage.getItem("alarmSwitchStatus");
},
setAlarmSwitchStatus(){
localStorage.setItem("alarmSwitchStatus", this.alarmNotify);
}
},
destroyed() {
window.removeEventListener('beforeunload', e => this.beforeunloadHandler(e))
if (this.sseSource != null) {
this.sseSource.removeEventListener('open', null);
this.sseSource.removeEventListener('message', null);
this.sseSource.removeEventListener('error', null);
this.sseSource.close();
}
},
}
</script>

View File

@ -1,393 +1,404 @@
<template> <template>
<div id="channelList"> <div id="channelList" style="width: 100%">
<el-container> <div class="page-header">
<el-header> <div class="page-title">
<uiHeader></uiHeader> <el-button icon="el-icon-arrow-left" size="mini" style="margin-right: 1rem;" type="primary" @click="showDevice">
</el-header> 返回
<el-main> </el-button>
<div style="background-color: #FFFFFF; position: relative; padding: 1rem 0.5rem 0.5rem 0.5rem; text-align: center;"> 通道列表({{ parentChannelId == 0 ? deviceId : parentChannelId }})</div>
<span style="font-size: 1rem; font-weight: 500; ">通道列表({{parentChannelId ==0 ? deviceId:parentChannelId}})</span> <div class="page-header-btn">
搜索:
<el-input @input="search" style="margin-right: 1rem; width: auto;" size="mini" placeholder="关键字"
prefix-icon="el-icon-search" v-model="searchSrt" clearable></el-input>
</div> 通道类型:
<div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;font-size: 14px;"> <el-select size="mini" @change="search" style="margin-right: 1rem;" v-model="channelType" placeholder="请选择"
<el-button icon="el-icon-arrow-left" size="mini" style="margin-right: 1rem;" type="primary" @click="showDevice">返回</el-button> default-first-option>
搜索: <el-input @input="search" style="margin-right: 1rem; width: auto;" size="mini" placeholder="关键字" prefix-icon="el-icon-search" v-model="searchSrt" clearable> </el-input> <el-option label="全部" value=""></el-option>
<el-option label="设备" value="false"></el-option>
通道类型: <el-select size="mini" @change="search" style="margin-right: 1rem;" v-model="channelType" placeholder="请选择" default-first-option> <el-option label="子目录" value="true"></el-option>
<el-option label="全部" value=""></el-option> </el-select>
<el-option label="设备" value="false"></el-option> 在线状态:
<el-option label="子目录" value="true"></el-option> <el-select size="mini" style="margin-right: 1rem;" @change="search" v-model="online" placeholder="请选择"
</el-select> default-first-option>
在线状态: <el-select size="mini" style="margin-right: 1rem;" @change="search" v-model="online" placeholder="请选择" default-first-option> <el-option label="全部" value=""></el-option>
<el-option label="全部" value=""></el-option> <el-option label="在线" value="true"></el-option>
<el-option label="在线" value="true"></el-option> <el-option label="离线" value="false"></el-option>
<el-option label="离线" value="false"></el-option> </el-select>
</el-select> <el-checkbox size="mini" v-model="autoList" @change="autoListChange">
<el-checkbox size="mini" style="margin-right: 1rem; float: right;" v-model="autoList" @change="autoListChange">自动刷新</el-checkbox> 自动刷新
</div> </el-checkbox>
<devicePlayer ref="devicePlayer" v-loading="isLoging"></devicePlayer> </div>
<!--设备列表--> </div>
<el-table ref="channelListTable" :data="deviceChannelList" :height="winHeight" border style="width: 100%"> <devicePlayer ref="devicePlayer" v-loading="isLoging"></devicePlayer>
<el-table-column prop="channelId" label="通道编号" width="200"> <!--设备列表-->
</el-table-column> <el-table ref="channelListTable" :data="deviceChannelList" :height="winHeight" border style="width: 100%">
<el-table-column prop="name" label="通道名称"> <el-table-column prop="channelId" label="通道编号" width="200">
</el-table-column> </el-table-column>
<el-table-column label="快照" width="80" align="center"> <el-table-column prop="name" label="通道名称">
<template slot-scope="scope"> </el-table-column>
<img style="max-height: 3rem;max-width: 4rem;" <el-table-column label="快照" width="80" align="center">
:id="scope.row.deviceId + '_' + scope.row.channelId" <template slot-scope="scope">
:src="getSnap(scope.row)" <img style="max-height: 3rem;max-width: 4rem;"
@error="getSnapErrorEvent($event.target.id)" :id="scope.row.deviceId + '_' + scope.row.channelId"
alt=""> :src="getSnap(scope.row)"
<!-- <el-image--> @error="getSnapErrorEvent($event.target.id)"
<!-- :id="'snapImg_' + scope.row.deviceId + '_' + scope.row.channelId"--> alt="">
<!-- :src="getSnap(scope.row)"--> <!-- <el-image-->
<!-- @error="getSnapErrorEvent($event, scope.row)"--> <!-- :id="'snapImg_' + scope.row.deviceId + '_' + scope.row.channelId"-->
<!-- :fit="'contain'">--> <!-- :src="getSnap(scope.row)"-->
<!-- <div slot="error" class="image-slot">--> <!-- @error="getSnapErrorEvent($event, scope.row)"-->
<!-- <i class="el-icon-picture-outline"></i>--> <!-- :fit="'contain'">-->
<!-- </div>--> <!-- <div slot="error" class="image-slot">-->
<!-- </el-image>--> <!-- <i class="el-icon-picture-outline"></i>-->
</template> <!-- </div>-->
</el-table-column> <!-- </el-image>-->
<el-table-column prop="subCount" label="子节点数"> </template>
</el-table-column> </el-table-column>
<el-table-column prop="manufacture" label="厂家"> <el-table-column prop="subCount" label="子节点数">
</el-table-column> </el-table-column>
<el-table-column label="位置信息" align="center"> <el-table-column prop="manufacture" label="厂家">
<template slot-scope="scope"> </el-table-column>
<span>{{scope.row.longitude}},{{scope.row.latitude}}</span> <el-table-column label="位置信息" align="center">
</template> <template slot-scope="scope">
</el-table-column> <span>{{ scope.row.longitude }},{{ scope.row.latitude }}</span>
<el-table-column prop="ptztypeText" label="云台类型"/> </template>
<el-table-column label="开启音频" align="center"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="ptztypeText" label="云台类型"/>
<el-switch @change="updateChannel(scope.row)" v-model="scope.row.hasAudio" active-color="#409EFF"> <el-table-column label="开启音频" align="center">
</el-switch> <template slot-scope="scope">
</template> <el-switch @change="updateChannel(scope.row)" v-model="scope.row.hasAudio" active-color="#409EFF">
</el-table-column> </el-switch>
<el-table-column label="状态" width="180" align="center"> </template>
<template slot-scope="scope"> </el-table-column>
<div slot="reference" class="name-wrapper"> <el-table-column label="状态" width="180" align="center">
<el-tag size="medium" v-if="scope.row.status == 1">开启</el-tag> <template slot-scope="scope">
<el-tag size="medium" type="info" v-if="scope.row.status == 0">关闭</el-tag> <div slot="reference" class="name-wrapper">
</div> <el-tag size="medium" v-if="scope.row.status == 1">开启</el-tag>
</template> <el-tag size="medium" type="info" v-if="scope.row.status == 0">关闭</el-tag>
</el-table-column> </div>
</template>
</el-table-column>
<el-table-column label="操作" width="280" align="center" fixed="right"> <el-table-column label="操作" width="280" align="center" fixed="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button-group> <el-button-group>
<!-- <el-button size="mini" icon="el-icon-video-play" v-if="scope.row.parental == 0" @click="sendDevicePush(scope.row)">播放</el-button> --> <!-- <el-button size="mini" icon="el-icon-video-play" v-if="scope.row.parental == 0" @click="sendDevicePush(scope.row)">播放</el-button> -->
<el-button size="mini" icon="el-icon-video-play" @click="sendDevicePush(scope.row)">播放</el-button> <el-button size="mini" icon="el-icon-video-play" @click="sendDevicePush(scope.row)">播放</el-button>
<el-button size="mini" icon="el-icon-switch-button" type="danger" v-if="!!scope.row.streamId" @click="stopDevicePush(scope.row)">停止</el-button> <el-button size="mini" icon="el-icon-switch-button" type="danger" v-if="!!scope.row.streamId"
<el-button size="mini" icon="el-icon-s-open" type="primary" v-if="scope.row.subCount > 0" @click="changeSubchannel(scope.row)">查看</el-button> @click="stopDevicePush(scope.row)">停止
<el-button size="mini" icon="el-icon-video-camera" type="primary" @click="queryRecords(scope.row)">设备录象</el-button> </el-button>
<!-- <el-button size="mini" @click="sendDevicePush(scope.row)">录像查询</el-button> --> <el-button size="mini" icon="el-icon-s-open" type="primary" v-if="scope.row.subCount > 0"
</el-button-group> @click="changeSubchannel(scope.row)">查看
</template> </el-button>
</el-table-column> <el-button size="mini" icon="el-icon-video-camera" type="primary" @click="queryRecords(scope.row)">设备录象
</el-table> </el-button>
<el-pagination style="float: right" @size-change="handleSizeChange" @current-change="currentChange" :current-page="currentPage" :page-size="count" :page-sizes="[15, 20, 30, 50]" layout="total, sizes, prev, pager, next" :total="total"> <!-- <el-button size="mini" @click="sendDevicePush(scope.row)">录像查询</el-button> -->
</el-pagination> </el-button-group>
</template>
</el-main> </el-table-column>
</el-container> </el-table>
</div> <el-pagination style="float: right" @size-change="handleSizeChange" @current-change="currentChange"
:current-page="currentPage" :page-size="count" :page-sizes="[15, 20, 30, 50]"
layout="total, sizes, prev, pager, next" :total="total">
</el-pagination>
</div>
</template> </template>
<script> <script>
import devicePlayer from './dialog/devicePlayer.vue' import devicePlayer from './dialog/devicePlayer.vue'
import uiHeader from './UiHeader.vue' import uiHeader from '../layout/UiHeader.vue'
import moment from "moment"; import moment from "moment";
export default { export default {
name: 'channelList', name: 'channelList',
components: { components: {
devicePlayer, devicePlayer,
uiHeader uiHeader
}, },
data() { data() {
return { return {
deviceId: this.$route.params.deviceId, deviceId: this.$route.params.deviceId,
parentChannelId: this.$route.params.parentChannelId, parentChannelId: this.$route.params.parentChannelId,
deviceChannelList: [], deviceChannelList: [],
videoComponentList: [], videoComponentList: [],
currentPlayerInfo: {}, // currentPlayerInfo: {}, //
updateLooper: 0, // updateLooper: 0, //
searchSrt: "", searchSrt: "",
channelType: "", channelType: "",
online: "", online: "",
winHeight: window.innerHeight - 250, winHeight: window.innerHeight - 250,
currentPage: parseInt(this.$route.params.page), currentPage: parseInt(this.$route.params.page),
count: parseInt(this.$route.params.count), count: parseInt(this.$route.params.count),
total: 0, total: 0,
beforeUrl: "/deviceList", beforeUrl: "/deviceList",
isLoging: false, isLoging: false,
autoList: true, autoList: true,
loadSnap:{} loadSnap: {}
}; };
}, },
mounted() {
this.initData();
if (this.autoList) {
this.updateLooper = setInterval(this.initData, 5000);
}
},
destroyed() {
this.$destroy('videojs');
clearTimeout(this.updateLooper);
},
methods: {
initData: function () {
if (typeof (this.parentChannelId) == "undefined" || this.parentChannelId == 0) {
this.getDeviceChannelList();
} else {
this.showSubchannels();
}
},
initParam: function () {
this.deviceId = this.$route.params.deviceId;
this.parentChannelId = this.$route.params.parentChannelId;
this.currentPage = parseInt(this.$route.params.page);
this.count = parseInt(this.$route.params.count);
if (this.parentChannelId == "" || this.parentChannelId == 0) {
this.beforeUrl = "/deviceList"
}
},
currentChange: function (val) {
var url = `/${this.$router.currentRoute.name}/${this.deviceId}/${this.parentChannelId}/${this.count}/${val}`
this.$router.push(url).then(() => {
this.initParam();
this.initData();
})
},
handleSizeChange: function (val) {
var url = `/${this.$router.currentRoute.name}/${this.$router.params.deviceId}/${this.$router.params.parentChannelId}/${val}/1`
this.$router.push(url).then(() => {
this.initParam();
this.initData();
})
},
getDeviceChannelList: function () {
let that = this;
if (typeof (this.$route.params.deviceId) == "undefined") return;
this.$axios({
method: 'get',
url: `/api/device/query/devices/${this.$route.params.deviceId}/channels`,
params:{
page: that.currentPage,
count: that.count,
query: that.searchSrt,
online: that.online,
channelType: that.channelType
}
}).then(function (res) {
that.total = res.data.total;
that.deviceChannelList = res.data.list;
//
that.$nextTick(() => {
that.$refs.channelListTable.doLayout();
})
}).catch(function (error) {
console.log(error);
});
},
//
sendDevicePush: function (itemData) {
let deviceId = this.deviceId;
this.isLoging = true;
let channelId = itemData.channelId;
console.log("通知设备推流1" + deviceId + " : " + channelId );
let that = this;
this.$axios({
method: 'get',
url: '/api/play/start/' + deviceId + '/' + channelId
}).then(function (res) {
that.isLoging = false;
if (res.data.code === 0) {
setTimeout(()=>{
let snapId = deviceId + "_" + channelId;
that.loadSnap[snapId] = 0;
that.getSnapErrorEvent(snapId)
},5000)
that.$refs.devicePlayer.openDialog("media", deviceId, channelId, {
streamInfo: res.data.data,
hasAudio: itemData.hasAudio
});
setTimeout(()=>{
that.initData();
},1000)
}else {
that.$message.error(res.data.msg);
}
}).catch(function (e) {});
},
queryRecords: function (itemData) {
var format = moment().format("YYYY-M-D");
let deviceId = this.deviceId;
let channelId = itemData.channelId;
this.$refs.devicePlayer.openDialog("record", deviceId, channelId, {date: format})
},
stopDevicePush: function (itemData) {
var that = this;
this.$axios({
method: 'get',
url: '/api/play/stop/' + this.deviceId + "/" + itemData.channelId
}).then(function (res) {
that.initData();
}).catch(function (error) {
if (error.response.status === 402) { //
that.initData();
}else {
console.log(error)
}
});
},
getSnap: function (row){
return '/static/snap/' + row.deviceId + '_' + row.channelId + '.jpg'
},
getSnapErrorEvent: function (id){
if (typeof (this.loadSnap[id]) != "undefined") {
console.log("下载截图" + this.loadSnap[id])
if (this.loadSnap[id] > 5) {
delete this.loadSnap[id];
return;
}
setTimeout(()=>{
this.loadSnap[id] ++
document.getElementById(id).setAttribute("src", '/static/snap/' + id + '.jpg?' + new Date().getTime())
},1000)
}
},
showDevice: function () {
this.$router.push(this.beforeUrl).then(() => {
this.initParam();
this.initData();
})
},
changeSubchannel(itemData) {
this.beforeUrl = this.$router.currentRoute.path;
var url = `/${this.$router.currentRoute.name}/${this.$router.currentRoute.params.deviceId}/${itemData.channelId}/${this.$router.currentRoute.params.count}/1`
this.$router.push(url).then(() => {
this.searchSrt = "";
this.channelType = "";
this.online = "";
this.initParam();
this.initData();
})
},
showSubchannels: function (channelId) {
let that = this;
this.$axios({
method: 'get',
url:`/api/device/query/sub_channels/${this.deviceId}/${this.parentChannelId}/channels`,
params: {
page: that.currentPage,
count: that.count,
query: that.searchSrt,
online: that.online,
channelType: that.channelType
}
}).then(function (res) {
that.total = res.data.total;
that.deviceChannelList = res.data.list;
//
that.$nextTick(() => {
that.$refs.channelListTable.doLayout();
})
}).catch(function (error) {
console.log(error);
});
},
search: function () {
this.currentPage = 1;
this.total = 0;
this.initData();
},
updateChannel: function (row) {
this.$axios({
method: 'post',
url: `/api/device/query/channel/update/${this.deviceId}`,
params: row
}).then(function (res) {
console.log(JSON.stringify(res));
});
},
autoListChange: function () {
if (this.autoList) {
this.updateLooper = setInterval(this.initData, 1500);
}else{
window.clearInterval(this.updateLooper);
}
}
mounted() {
this.initData();
if (this.autoList) {
this.updateLooper = setInterval(this.initData, 5000);
} }
},
destroyed() {
this.$destroy('videojs');
clearTimeout(this.updateLooper);
},
methods: {
initData: function () {
if (typeof (this.parentChannelId) == "undefined" || this.parentChannelId == 0) {
this.getDeviceChannelList();
} else {
this.showSubchannels();
}
},
initParam: function () {
this.deviceId = this.$route.params.deviceId;
this.parentChannelId = this.$route.params.parentChannelId;
this.currentPage = parseInt(this.$route.params.page);
this.count = parseInt(this.$route.params.count);
if (this.parentChannelId == "" || this.parentChannelId == 0) {
this.beforeUrl = "/deviceList"
}
},
currentChange: function (val) {
var url = `/${this.$router.currentRoute.name}/${this.deviceId}/${this.parentChannelId}/${this.count}/${val}`
this.$router.push(url).then(() => {
this.initParam();
this.initData();
})
},
handleSizeChange: function (val) {
var url = `/${this.$router.currentRoute.name}/${this.$router.params.deviceId}/${this.$router.params.parentChannelId}/${val}/1`
this.$router.push(url).then(() => {
this.initParam();
this.initData();
})
},
getDeviceChannelList: function () {
let that = this;
if (typeof (this.$route.params.deviceId) == "undefined") return;
this.$axios({
method: 'get',
url: `/api/device/query/devices/${this.$route.params.deviceId}/channels`,
params: {
page: that.currentPage,
count: that.count,
query: that.searchSrt,
online: that.online,
channelType: that.channelType
}
}).then(function (res) {
that.total = res.data.total;
that.deviceChannelList = res.data.list;
//
that.$nextTick(() => {
that.$refs.channelListTable.doLayout();
})
}).catch(function (error) {
console.log(error);
});
},
//
sendDevicePush: function (itemData) {
let deviceId = this.deviceId;
this.isLoging = true;
let channelId = itemData.channelId;
console.log("通知设备推流1" + deviceId + " : " + channelId);
let that = this;
this.$axios({
method: 'get',
url: '/api/play/start/' + deviceId + '/' + channelId
}).then(function (res) {
that.isLoging = false;
if (res.data.code === 0) {
setTimeout(() => {
let snapId = deviceId + "_" + channelId;
that.loadSnap[snapId] = 0;
that.getSnapErrorEvent(snapId)
}, 5000)
that.$refs.devicePlayer.openDialog("media", deviceId, channelId, {
streamInfo: res.data.data,
hasAudio: itemData.hasAudio
});
setTimeout(() => {
that.initData();
}, 1000)
} else {
that.$message.error(res.data.msg);
}
}).catch(function (e) {
});
},
queryRecords: function (itemData) {
var format = moment().format("YYYY-M-D");
let deviceId = this.deviceId;
let channelId = itemData.channelId;
this.$refs.devicePlayer.openDialog("record", deviceId, channelId, {date: format})
},
stopDevicePush: function (itemData) {
var that = this;
this.$axios({
method: 'get',
url: '/api/play/stop/' + this.deviceId + "/" + itemData.channelId
}).then(function (res) {
that.initData();
}).catch(function (error) {
if (error.response.status === 402) { //
that.initData();
} else {
console.log(error)
}
});
},
getSnap: function (row) {
return '/static/snap/' + row.deviceId + '_' + row.channelId + '.jpg'
},
getSnapErrorEvent: function (id) {
if (typeof (this.loadSnap[id]) != "undefined") {
console.log("下载截图" + this.loadSnap[id])
if (this.loadSnap[id] > 5) {
delete this.loadSnap[id];
return;
}
setTimeout(() => {
this.loadSnap[id]++
document.getElementById(id).setAttribute("src", '/static/snap/' + id + '.jpg?' + new Date().getTime())
}, 1000)
}
},
showDevice: function () {
this.$router.push(this.beforeUrl).then(() => {
this.initParam();
this.initData();
})
},
changeSubchannel(itemData) {
this.beforeUrl = this.$router.currentRoute.path;
var url = `/${this.$router.currentRoute.name}/${this.$router.currentRoute.params.deviceId}/${itemData.channelId}/${this.$router.currentRoute.params.count}/1`
this.$router.push(url).then(() => {
this.searchSrt = "";
this.channelType = "";
this.online = "";
this.initParam();
this.initData();
})
},
showSubchannels: function (channelId) {
let that = this;
this.$axios({
method: 'get',
url: `/api/device/query/sub_channels/${this.deviceId}/${this.parentChannelId}/channels`,
params: {
page: that.currentPage,
count: that.count,
query: that.searchSrt,
online: that.online,
channelType: that.channelType
}
}).then(function (res) {
that.total = res.data.total;
that.deviceChannelList = res.data.list;
//
that.$nextTick(() => {
that.$refs.channelListTable.doLayout();
})
}).catch(function (error) {
console.log(error);
});
},
search: function () {
this.currentPage = 1;
this.total = 0;
this.initData();
},
updateChannel: function (row) {
this.$axios({
method: 'post',
url: `/api/device/query/channel/update/${this.deviceId}`,
params: row
}).then(function (res) {
console.log(JSON.stringify(res));
});
},
autoListChange: function () {
if (this.autoList) {
this.updateLooper = setInterval(this.initData, 1500);
} else {
window.clearInterval(this.updateLooper);
}
}
}
}; };
</script> </script>
<style> <style>
.videoList { .videoList {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
align-content: flex-start; align-content: flex-start;
} }
.video-item { .video-item {
position: relative; position: relative;
width: 15rem; width: 15rem;
height: 10rem; height: 10rem;
margin-right: 1rem; margin-right: 1rem;
background-color: #000000; background-color: #000000;
} }
.video-item-img { .video-item-img {
position: absolute; position: absolute;
top: 0; top: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
margin: auto; margin: auto;
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.video-item-img:after { .video-item-img:after {
content: ""; content: "";
display: inline-block; display: inline-block;
position: absolute; position: absolute;
z-index: 2; z-index: 2;
top: 0; top: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
margin: auto; margin: auto;
width: 3rem; width: 3rem;
height: 3rem; height: 3rem;
background-image: url("../assets/loading.png"); background-image: url("../assets/loading.png");
background-size: cover; background-size: cover;
background-color: #000000; background-color: #000000;
} }
.video-item-title { .video-item-title {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
color: #000000; color: #000000;
background-color: #ffffff; background-color: #ffffff;
line-height: 1.5rem; line-height: 1.5rem;
padding: 0.3rem; padding: 0.3rem;
width: 14.4rem; width: 14.4rem;
} }
</style> </style>

File diff suppressed because it is too large Load Diff

View File

@ -1,43 +1,35 @@
<template> <template>
<div id="devicePosition" style="height: 100%"> <div id="devicePosition" style="height: 100%">
<el-container style="height: 100%"> <div style="background-color: #ffffff; position: relative; padding: 1rem 0.5rem 0.5rem 0.5rem; text-align: center;">
<el-header> <span style="font-size: 1rem; font-weight: 500">设备定位 ({{ parentChannelId == 0 ? deviceId : parentChannelId }})</span>
<uiHeader></uiHeader> </div>
</el-header> <div style="background-color: #ffffff; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left; font-size: 14px;">
<el-main> <el-button icon="el-icon-arrow-left" size="mini" style="margin-right: 1rem" type="primary" @click="showDevice">返回</el-button>
<div style="background-color: #ffffff; position: relative; padding: 1rem 0.5rem 0.5rem 0.5rem; text-align: center;"> <!-- <span class="demonstration"></span> -->
<span style="font-size: 1rem; font-weight: 500">设备定位 ({{ parentChannelId == 0 ? deviceId : parentChannelId }})</span> <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>
</div> <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>
<div style="background-color: #ffffff; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left; font-size: 14px;"> <el-button-group>
<el-button icon="el-icon-arrow-left" size="mini" style="margin-right: 1rem" type="primary" @click="showDevice">返回</el-button> <el-button icon="el-icon-search" size="mini" type="primary" @click="showHistoryPath">历史轨迹</el-button>
<!-- <span class="demonstration"></span> --> <el-button icon="el-icon-search" size="mini" style="margin-right: 1rem" type="primary" @click="showLatestPosition">最新位置</el-button>
<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> </el-button-group>
<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> <el-tag style="width: 5rem; text-align: center" size="medium">过期时间</el-tag>
<el-button-group> <el-input-number size="mini" v-model="expired" :min="300" :controls="false" style="width: 4rem;"></el-input-number>
<el-button icon="el-icon-search" size="mini" type="primary" @click="showHistoryPath">历史轨迹</el-button> <el-tag style="width: 5rem; text-align: center" size="medium">上报周期</el-tag>
<el-button icon="el-icon-search" size="mini" style="margin-right: 1rem" type="primary" @click="showLatestPosition">最新位置</el-button> <el-input-number size="mini" v-model="interval" :min="1" :controls="false" style="width: 4rem;"></el-input-number>
</el-button-group> <el-button-group>
<el-tag style="width: 5rem; text-align: center" size="medium">过期时间</el-tag> <el-button icon="el-icon-search" size="mini" type="primary" @click="subscribeMobilePosition">位置订阅</el-button>
<el-input-number size="mini" v-model="expired" :min="300" :controls="false" style="width: 4rem;"></el-input-number> <el-button icon="el-icon-search" size="mini" type="primary" @click="unSubscribeMobilePosition">取消订阅</el-button>
<el-tag style="width: 5rem; text-align: center" size="medium">上报周期</el-tag> </el-button-group>
<el-input-number size="mini" v-model="interval" :min="1" :controls="false" style="width: 4rem;"></el-input-number> <el-checkbox size="mini" style="margin-right: 1rem; float: right" v-model="autoList" @change="autoListChange" >自动刷新</el-checkbox>
<el-button-group> </div>
<el-button icon="el-icon-search" size="mini" type="primary" @click="subscribeMobilePosition">位置订阅</el-button> <div class="mapContainer" style="background-color: #ffffff; position: relative; padding: 1rem 0.5rem 0.5rem 0.5rem; text-align: center; height: calc(100% - 10rem);">
<el-button icon="el-icon-search" size="mini" type="primary" @click="unSubscribeMobilePosition">取消订阅</el-button> <div class="baidumap" id="allmap"></div>
</el-button-group> </div>
<el-checkbox size="mini" style="margin-right: 1rem; float: right" v-model="autoList" @change="autoListChange" >自动刷新</el-checkbox>
</div>
<div class="mapContainer" style="background-color: #ffffff; position: relative; padding: 1rem 0.5rem 0.5rem 0.5rem; text-align: center; height: calc(100% - 10rem);">
<div class="baidumap" id="allmap"></div>
</div>
</el-main>
</el-container>
</div> </div>
</template> </template>
<script> <script>
import uiHeader from "./UiHeader.vue"; import uiHeader from "../layout/UiHeader.vue";
import moment from "moment";
import geoTools from "./GeoConvertTools.js"; import geoTools from "./GeoConvertTools.js";
export default { export default {
name: "devicePosition", name: "devicePosition",
@ -173,7 +165,7 @@ export default {
let self = this; let self = this;
this.$axios({ this.$axios({
method: 'get', method: 'get',
url:`/api/position/history/${this.deviceId}`, url:`/api/position/history/${this.deviceId}`,
params: { params: {
start: self.startTime, start: self.startTime,
end: self.endTime, end: self.endTime,
@ -259,7 +251,7 @@ export default {
}, },
toGBString: function (dateTime) { toGBString: function (dateTime) {
return ( return (
dateTime.getFullYear() + dateTime.getFullYear() +
"-" + this.twoDigits(dateTime.getMonth() + 1) + "-" + this.twoDigits(dateTime.getMonth() + 1) +
"-" + this.twoDigits(dateTime.getDate()) + "-" + this.twoDigits(dateTime.getDate()) +
"T" + this.twoDigits(dateTime.getHours()) + "T" + this.twoDigits(dateTime.getHours()) +

View File

@ -13,11 +13,24 @@
<div id="shared" style="margin-top: 1rem;margin-right: 100px;"> <div id="shared" style="margin-top: 1rem;margin-right: 100px;">
<el-form ref="form" :rules="rules" :model="form" label-width="140px" > <el-form ref="form" :rules="rules" :model="form" label-width="140px" >
<el-form-item label="节点编号" prop="id" > <el-form-item label="节点编号" prop="id" >
<el-input v-model="form.id" :disabled="isEdit"></el-input> <el-tooltip class="item" effect="dark" content="" placement="top-start">
<div slot="content">
建议的类型
<br/>
&emsp;&emsp;行政区划可选2位/4/6/8/10位数字例如130432表示河北省邯郸市广平县
<br/>
&emsp;&emsp;业务分组第111213位215例如34020000002150000001
<br/>
&emsp;&emsp;虚拟组织第111213位216例如34020000002160000001
</div>
<el-input v-model="form.id" :disabled="isEdit"></el-input>
</el-tooltip>
</el-form-item> </el-form-item>
<el-form-item label="节点名称" prop="name"> <el-form-item label="节点名称" prop="name">
<el-input v-model="form.name" clearable></el-input> <el-input v-model="form.name" clearable></el-input>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<div style="float: right;"> <div style="float: right;">
<el-button type="primary" @click="onSubmit" >确认</el-button> <el-button type="primary" @click="onSubmit" >确认</el-button>

View File

@ -45,6 +45,9 @@
<el-form-item v-if="form.subscribeCycleForMobilePosition > 0" label="移动位置报送间隔" prop="subscribeCycleForCatalog" > <el-form-item v-if="form.subscribeCycleForMobilePosition > 0" label="移动位置报送间隔" prop="subscribeCycleForCatalog" >
<el-input v-model="form.mobilePositionSubmissionInterval" clearable ></el-input> <el-input v-model="form.mobilePositionSubmissionInterval" clearable ></el-input>
</el-form-item> </el-form-item>
<el-form-item label="其他选项">
<el-checkbox label="SSRC校验" v-model="form.ssrcCheck" style="float: left"></el-checkbox>
</el-form-item>
<el-form-item> <el-form-item>
<div style="float: right;"> <div style="float: right;">
<el-button type="primary" @click="onSubmit" >确认</el-button> <el-button type="primary" @click="onSubmit" >确认</el-button>

View File

@ -44,6 +44,9 @@
<el-form-item label="SIP认证用户名" prop="username"> <el-form-item label="SIP认证用户名" prop="username">
<el-input v-model="platform.username"></el-input> <el-input v-model="platform.username"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="行政区划" prop="administrativeDivision">
<el-input v-model="platform.administrativeDivision" clearable></el-input>
</el-form-item>
<el-form-item label="SIP认证密码" prop="password"> <el-form-item label="SIP认证密码" prop="password">
<el-input v-model="platform.password" ></el-input> <el-input v-model="platform.password" ></el-input>
</el-form-item> </el-form-item>
@ -63,6 +66,18 @@
<el-option label="TCP" value="TCP"></el-option> <el-option label="TCP" value="TCP"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="目录分组" prop="catalogGroup">
<el-select
v-model="platform.catalogGroup"
style="width: 100%"
placeholder="请选择目录分组"
>
<el-option label="1" value="1"></el-option>
<el-option label="2" value="2"></el-option>
<el-option label="4" value="4"></el-option>
<el-option label="8" value="8"></el-option>
</el-select>
</el-form-item>
<el-form-item label="字符集" prop="characterSet"> <el-form-item label="字符集" prop="characterSet">
<el-select <el-select
v-model="platform.characterSet" v-model="platform.characterSet"
@ -77,6 +92,7 @@
<el-checkbox label="启用" v-model="platform.enable" @change="checkExpires"></el-checkbox> <el-checkbox label="启用" v-model="platform.enable" @change="checkExpires"></el-checkbox>
<el-checkbox label="云台控制" v-model="platform.ptz"></el-checkbox> <el-checkbox label="云台控制" v-model="platform.ptz"></el-checkbox>
<el-checkbox label="共享所有直播流" v-model="platform.shareAllLiveStream"></el-checkbox> <el-checkbox label="共享所有直播流" v-model="platform.shareAllLiveStream"></el-checkbox>
<el-checkbox label="拉起离线推流" v-model="platform.startOfflinePush"></el-checkbox>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="primary" @click="onSubmit">{{ <el-button type="primary" @click="onSubmit">{{
@ -138,6 +154,9 @@ export default {
transport: "UDP", transport: "UDP",
characterSet: "GB2312", characterSet: "GB2312",
shareAllLiveStream: false, shareAllLiveStream: false,
startOfflinePush: false,
catalogGroup: 1,
administrativeDivision: null,
}, },
rules: { rules: {
name: [{ required: true, message: "请输入平台名称", trigger: "blur" }], name: [{ required: true, message: "请输入平台名称", trigger: "blur" }],
@ -175,6 +194,7 @@ export default {
that.platform.devicePort = res.data.devicePort; that.platform.devicePort = res.data.devicePort;
that.platform.username = res.data.username; that.platform.username = res.data.username;
that.platform.password = res.data.password; that.platform.password = res.data.password;
that.platform.administrativeDivision = res.data.username.substr(0, 6);
}).catch(function (error) { }).catch(function (error) {
console.log(error); console.log(error);
}); });
@ -199,6 +219,9 @@ export default {
this.platform.characterSet = platform.characterSet; this.platform.characterSet = platform.characterSet;
this.platform.shareAllLiveStream = platform.shareAllLiveStream; this.platform.shareAllLiveStream = platform.shareAllLiveStream;
this.platform.catalogId = platform.catalogId; this.platform.catalogId = platform.catalogId;
this.platform.startOfflinePush = platform.startOfflinePush;
this.platform.catalogGroup = platform.catalogGroup;
this.platform.administrativeDivision = platform.administrativeDivision;
this.onSubmit_text = "保存"; this.onSubmit_text = "保存";
this.saveUrl = "/api/platform/save"; this.saveUrl = "/api/platform/save";
} }
@ -213,6 +236,10 @@ export default {
deviceGBIdChange: function () { deviceGBIdChange: function () {
this.platform.username = this.platform.deviceGBId ; this.platform.username = this.platform.deviceGBId ;
if (this.platform.administrativeDivision == null) {
this.platform.administrativeDivision = this.platform.deviceGBId.substr(0, 6);
}
}, },
onSubmit: function () { onSubmit: function () {
var that = this; var that = this;
@ -253,6 +280,7 @@ export default {
rtcp: false, rtcp: false,
name: null, name: null,
serverGBId: null, serverGBId: null,
administrativeDivision: null,
serverGBDomain: null, serverGBDomain: null,
serverIP: null, serverIP: null,
serverPort: null, serverPort: null,
@ -266,6 +294,8 @@ export default {
transport: "UDP", transport: "UDP",
characterSet: "GB2312", characterSet: "GB2312",
shareAllLiveStream: false, shareAllLiveStream: false,
startOfflinePush: false,
catalogGroup: 1,
} }
}, },
deviceGBIdExit: async function (deviceGbId) { deviceGBIdExit: async function (deviceGbId) {

View File

@ -1,51 +1,46 @@
<template> <template>
<div id="devicePosition" style="height: 100%"> <div id="devicePosition" style="height: 100%;width: 100%">
<el-container style="height: 100%"> <el-container v-loading="loading" element-loading-text="拼命加载中">
<el-header> <el-aside width="300px" style="background-color: #ffffff">
<uiHeader></uiHeader> <div style="text-align: center;padding-top: 20px;">设备列表</div>
</el-header> <el-menu v-loading="loading">
<el-container v-loading="loading" element-loading-text="拼命加载中"> <el-submenu v-for="device in deviceList" :key="device.deviceId" :index="device.deviceId" @click="sendDevicePush(item)">
<el-aside width="300px" style="background-color: #ffffff"> <template slot="title" >
<div style="text-align: center;padding-top: 20px;">设备列表</div> <i class="el-icon-location-outline"></i>
<el-menu v-loading="loading"> {{device.name}}
<el-submenu v-for="device in deviceList" :key="device.deviceId" :index="device.deviceId" @click="sendDevicePush(item)"> </template>
<template slot="title" > <ChannelTree :device="device" @sendDevicePush="sendDevicePush"></ChannelTree>
<i class="el-icon-location-outline"></i> </el-submenu>
{{device.name}} </el-menu>
</template> </el-aside>
<ChannelTree :device="device" @sendDevicePush="sendDevicePush"></ChannelTree> <el-container>
</el-submenu> <!-- <LivePlay></LivePlay> -->
</el-menu> <el-header height="40px" style="text-align: left;font-size: 17px;line-height: 40px;">
</el-aside> 分屏:
<el-container> <i class="el-icon-full-screen btn" :class="{active:spilt==1}" @click="spilt=1"/>
<!-- <LivePlay></LivePlay> --> <i class="el-icon-menu btn" :class="{active:spilt==4}" @click="spilt=4"/>
<el-header height="40px" style="text-align: left;font-size: 17px;line-height: 40px;"> <i class="el-icon-s-grid btn" :class="{active:spilt==9}" @click="spilt=9"/>
分屏: </el-header>
<i class="el-icon-full-screen btn" :class="{active:spilt==1}" @click="spilt=1"/> <el-main>
<i class="el-icon-menu btn" :class="{active:spilt==4}" @click="spilt=4"/> <div style="width: 100%;height: calc( 100vh - 150px );display: flex;flex-wrap: wrap;background-color: #000;">
<i class="el-icon-s-grid btn" :class="{active:spilt==9}" @click="spilt=9"/> <div v-for="i in spilt" :key="i" class="play-box"
</el-header> :style="liveStyle" :class="{redborder:playerIdx == (i-1)}"
<el-main> @click="playerIdx = (i-1)"
<div style="width: 100%;height: calc( 100vh - 110px );display: flex;flex-wrap: wrap;background-color: #000;"> >
<div v-for="i in spilt" :key="i" class="play-box" <div v-if="!videoUrl[i-1]" style="color: #ffffff;font-size: 30px;font-weight: bold;">{{i}}</div>
:style="liveStyle" :class="{redborder:playerIdx == (i-1)}" <player v-else :ref="'player'+i" :videoUrl="videoUrl[i-1]" fluent autoplay :height="true"
@click="playerIdx = (i-1)" :containerId="'player'+i" @screenshot="shot" @destroy="destroy"></player>
> <!-- <player v-else ref="'player'+i" :idx="'player'+i" :visible.sync="showVideoDialog" :videoUrl="videoUrl[i-1]" :height="true" :hasAudio="hasAudio" fluent autoplay live ></player> -->
<div v-if="!videoUrl[i-1]" style="color: #ffffff;font-size: 30px;font-weight: bold;">{{i}}</div> </div>
<player v-else :ref="'player'+i" :videoUrl="videoUrl[i-1]" fluent autoplay :height="true" </div>
:containerId="'player'+i" @screenshot="shot" @destroy="destroy"></player> </el-main>
<!-- <player v-else ref="'player'+i" :idx="'player'+i" :visible.sync="showVideoDialog" :videoUrl="videoUrl[i-1]" :height="true" :hasAudio="hasAudio" fluent autoplay live ></player> -->
</div>
</div>
</el-main>
</el-container>
</el-container> </el-container>
</el-container> </el-container>
</div> </div>
</template> </template>
<script> <script>
import uiHeader from "./UiHeader.vue"; import uiHeader from "../layout/UiHeader.vue";
import player from './dialog/jessibuca.vue' import player from './dialog/jessibuca.vue'
import ChannelTree from './channelTree.vue' import ChannelTree from './channelTree.vue'

View File

@ -1,85 +1,78 @@
<template> <template>
<div id="SettingForMedia"> <div id="SettingForMedia" style="width: 100%">
<el-container> <div class="page-header">
<el-header> <div class="page-title">媒体服务</div>
<uiHeader></uiHeader> </div>
</el-header> <div
<el-main> style="width: 60%; margin:0 auto; background-color: #FFFFFF; position: relative; padding: 5rem 6.5rem; text-align: left;font-size: 14px; max-width: 400px">
<div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;"> <el-form ref="form" :rules="rules" :model="form" label-width="140px">
<span style="font-size: 1rem; font-weight: bold;">媒体服务</span> <el-form-item label="IP" prop="IP">
</div> <el-input v-model="form.IP" clearable></el-input>
<div style="width: 60%; margin:0 auto; background-color: #FFFFFF; position: relative; padding: 5rem 6.5rem; text-align: left;font-size: 14px; max-width: 400px"> </el-form-item>
<el-form ref="form" :rules="rules" :model="form" label-width="140px"> <el-form-item label="公网IP" prop="wanIp">
<el-form-item label="IP" prop="IP"> <el-input v-model="form.wanIp" clearable></el-input>
<el-input v-model="form.IP" clearable></el-input> </el-form-item>
</el-form-item> <el-form-item label="HOOK IP" prop="hookIp">
<el-form-item label="公网IP" prop="wanIp"> <el-input v-model="form.hookIp" clearable></el-input>
<el-input v-model="form.wanIp" clearable></el-input> </el-form-item>
</el-form-item> <el-form-item label="HTTP端口">
<el-form-item label="HOOK IP" prop="hookIp"> <el-input v-model.number="form.httpPort" clearable></el-input>
<el-input v-model="form.hookIp" clearable></el-input> </el-form-item>
</el-form-item> <el-form-item label="HTTP SSL端口">
<el-form-item label="HTTP端口" > <el-input v-model.number="form.httpSSlPort" clearable></el-input>
<el-input v-model.number="form.httpPort" clearable></el-input> </el-form-item>
</el-form-item> <el-form-item label="RTMP端口">
<el-form-item label="HTTP SSL端口" > <el-input v-model.number="form.rtmpPort" clearable></el-input>
<el-input v-model.number="form.httpSSlPort" clearable></el-input> </el-form-item>
</el-form-item> <el-form-item label="RTMP SSL端口">
<el-form-item label="RTMP端口" > <el-input v-model.number="form.rtmpSSlPort" clearable></el-input>
<el-input v-model.number="form.rtmpPort" clearable></el-input> </el-form-item>
</el-form-item> <el-form-item label="RTSP端口">
<el-form-item label="RTMP SSL端口" > <el-input v-model.number="form.rtspPort" clearable></el-input>
<el-input v-model.number="form.rtmpSSlPort" clearable></el-input> </el-form-item>
</el-form-item> <el-form-item label="RTSP SSL端口">
<el-form-item label="RTSP端口" > <el-input v-model.number="form.rtspSSLPort" clearable></el-input>
<el-input v-model.number="form.rtspPort" clearable></el-input> </el-form-item>
</el-form-item> <el-form-item label="RTP端口">
<el-form-item label="RTSP SSL端口" > <el-input v-model.number="form.rtpProxyPort" clearable></el-input>
<el-input v-model.number="form.rtspSSLPort" clearable></el-input> </el-form-item>
</el-form-item> <el-form-item label="自动点播">
<el-form-item label="RTP端口" > <el-switch v-model="form.autoApplyPlay"></el-switch>
<el-input v-model.number="form.rtpProxyPort" clearable></el-input> </el-form-item>
</el-form-item> <el-form-item label="接口密钥" prop="secret">
<el-form-item label="自动点播" > <el-input v-model="form.secret" clearable></el-input>
<el-switch v-model="form.autoApplyPlay"></el-switch> </el-form-item>
</el-form-item> <el-form-item label="无人观看触发时长">
<el-form-item label="接口密钥" prop="secret"> <el-input v-model.number="form.streamNoneReaderDelayMS" clearable></el-input>
<el-input v-model="form.secret" clearable></el-input> </el-form-item>
</el-form-item> <el-form-item label="自动配置">
<el-form-item label="无人观看触发时长" > <el-switch v-model="form.autoConfig"></el-switch>
<el-input v-model.number="form.streamNoneReaderDelayMS" clearable></el-input> </el-form-item>
</el-form-item> <el-form-item label="使用多端口">
<el-form-item label="自动配置" > <el-switch v-model="form.rtp.enable"></el-switch>
<el-switch v-model="form.autoConfig"></el-switch> </el-form-item>
</el-form-item> <el-form-item label="端口范围">
<el-form-item label="使用多端口" > <el-input v-model.number="form.rtp.portRange" clearable></el-input>
<el-switch v-model="form.rtp.enable"></el-switch> </el-form-item>
</el-form-item> <el-form-item label="DOCKER智能识别">
<el-form-item label="端口范围" > <el-input type="textarea" v-model="dockerStr"></el-input>
<el-input v-model.number="form.rtp.portRange" clearable></el-input> </el-form-item>
</el-form-item>
<el-form-item label="DOCKER智能识别">
<el-input type="textarea" v-model="dockerStr"></el-input>
</el-form-item>
<el-form-item> <el-form-item>
<div style="float: right;"> <div style="float: right;">
<el-button type="primary" @click="onSubmit">保存</el-button> <el-button type="primary" @click="onSubmit">保存</el-button>
<!-- <el-button @click="close">取消</el-button>--> <!-- <el-button @click="close">取消</el-button>-->
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</el-main>
</el-container>
</div> </div>
</template> </template>
<script> <script>
import uiHeader from '../UiHeader.vue' import uiHeader from '../../layout/UiHeader.vue'
export default { export default {
name: "SettingForMedia", name: "SettingForMedia",
components: { components: {
@ -107,9 +100,9 @@ export default {
}, },
rules: { rules: {
IP: [{ required: true, message: "请输入名称", trigger: "blur" }], IP: [{required: true, message: "请输入名称", trigger: "blur"}],
wanIp: [{ required: false, message: "请输入应用名", trigger: "blur" }], wanIp: [{required: false, message: "请输入应用名", trigger: "blur"}],
hookIp: [{ required: false, message: "请输入流ID", trigger: "blur" }], hookIp: [{required: false, message: "请输入流ID", trigger: "blur"}],
}, },
} }
} }

View File

@ -1,50 +1,43 @@
<template> <template>
<div id="SettingForSip"> <div id="SettingForSip" style="width: 100%">
<el-container> <div class="page-header">
<el-header> <div class="page-title">国标服务</div>
<uiHeader></uiHeader> </div>
</el-header> <div
<el-main> style="width: 60%; margin:0 auto; background-color: #FFFFFF; position: relative; padding: 5rem 6.5rem; text-align: left;font-size: 14px; max-width: 400px">
<div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;"> <el-form ref="form" :rules="rules" :model="form" label-width="140px">
<span style="font-size: 1rem; font-weight: bold;">国标服务</span> <el-form-item label="ip" prop="ip">
</div> <el-input v-model="form.ip" clearable></el-input>
<div style="width: 60%; margin:0 auto; background-color: #FFFFFF; position: relative; padding: 5rem 6.5rem; text-align: left;font-size: 14px; max-width: 400px"> </el-form-item>
<el-form ref="form" :rules="rules" :model="form" label-width="140px"> <el-form-item label="端口" prop="port">
<el-form-item label="ip" prop="ip"> <el-input v-model.number="form.port" clearable></el-input>
<el-input v-model="form.ip" clearable></el-input> </el-form-item>
</el-form-item> <el-form-item label="域" prop="domain">
<el-form-item label="端口" prop="port"> <el-input v-model="form.domain" clearable></el-input>
<el-input v-model.number="form.port" clearable></el-input> </el-form-item>
</el-form-item> <el-form-item label="id" prop="id">
<el-form-item label="域" prop="domain"> <el-input v-model="form.id" clearable></el-input>
<el-input v-model="form.domain" clearable></el-input> </el-form-item>
</el-form-item> <el-form-item label="密码" prop="password">
<el-form-item label="id" prop="id"> <el-input v-model="form.password" clearable></el-input>
<el-input v-model="form.id" clearable></el-input> </el-form-item>
</el-form-item>
<el-form-item label="密码" prop="password">
<el-input v-model="form.password" clearable></el-input>
</el-form-item>
<el-form-item> <el-form-item>
<div style="float: right;"> <div style="float: right;">
<el-button type="primary" @click="onSubmit">保存</el-button> <el-button type="primary" @click="onSubmit">保存</el-button>
<!-- <el-button @click="close">取消</el-button>--> <!-- <el-button @click="close">取消</el-button>-->
</div> </div>
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</el-main>
</el-container>
</div> </div>
</template> </template>
<script> <script>
import uiHeader from '../UiHeader.vue' import uiHeader from '../../layout/UiHeader.vue'
export default { export default {
name: "SettingForSip", name: "SettingForSip",
components: { components: {
@ -61,11 +54,11 @@ export default {
}, },
rules: { rules: {
ip: [{ required: true, message: "请输入名称", trigger: "blur" }], ip: [{required: true, message: "请输入名称", trigger: "blur"}],
port: [{ required: true, message: "请输入应用名", trigger: "blur" }], port: [{required: true, message: "请输入应用名", trigger: "blur"}],
domain: [{ required: true, message: "请输入流ID", trigger: "blur" }], domain: [{required: true, message: "请输入流ID", trigger: "blur"}],
id: [{ required: true, message: "请输入国标编码", trigger: "blur" }], id: [{required: true, message: "请输入国标编码", trigger: "blur"}],
password: [{ required: true, message: "请输入国标编码", trigger: "blur" }], password: [{required: true, message: "请输入国标编码", trigger: "blur"}],
}, },
} }
} }

View File

@ -1,12 +1,7 @@
<template> <template>
<div id="SettingForWeb"> <div id="SettingForWeb" style="width: 100%">
<el-container> <div class="page-header">
<el-header> <div class="page-title">WEB服务</div>
<uiHeader></uiHeader>
</el-header>
<el-main>
<div style="background-color: #FFFFFF; margin-bottom: 1rem; position: relative; padding: 0.5rem; text-align: left;">
<span style="font-size: 1rem; font-weight: bold;">WEB服务</span>
</div> </div>
<div style="width: 60%; margin:0 auto; background-color: #FFFFFF; position: relative; padding: 5rem 6.5rem; text-align: left;font-size: 14px; max-width: 400px"> <div style="width: 60%; margin:0 auto; background-color: #FFFFFF; position: relative; padding: 5rem 6.5rem; text-align: left;font-size: 14px; max-width: 400px">
<el-form ref="form" :rules="rules" :model="form" label-width="140px"> <el-form ref="form" :rules="rules" :model="form" label-width="140px">
@ -41,15 +36,11 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</el-main>
</el-container>
</div> </div>
</template> </template>
<script> <script>
import uiHeader from '../UiHeader.vue' import uiHeader from '../../layout/UiHeader.vue'
export default { export default {
name: "SettingForWeb", name: "SettingForWeb",
components: { components: {

View File

@ -0,0 +1,151 @@
<template>
<div id="UiHeader">
<el-menu router :default-active="activeIndex" menu-trigger="click" background-color="#545c64" text-color="#fff"
active-text-color="#ffd04b" mode="horizontal">
<el-menu-item index="/control">控制台</el-menu-item>
<el-menu-item index="/live">实时监控</el-menu-item>
<el-menu-item index="/deviceList">国标设备</el-menu-item>
<el-menu-item index="/pushVideoList">推流列表</el-menu-item>
<el-menu-item index="/streamProxyList">拉流代理</el-menu-item>
<el-menu-item index="/cloudRecord">云端录像</el-menu-item>
<el-menu-item index="/mediaServerManger">节点管理</el-menu-item>
<el-menu-item index="/parentPlatformList/15/1">国标级联</el-menu-item>
<el-menu-item @click="openDoc">在线文档</el-menu-item>
<!-- <el-submenu index="/setting">-->
<!-- <template slot="title">系统设置</template>-->
<!-- <el-menu-item index="/setting/web">WEB服务</el-menu-item>-->
<!-- <el-menu-item index="/setting/sip">国标服务</el-menu-item>-->
<!-- <el-menu-item index="/setting/media">媒体服务</el-menu-item>-->
<!-- </el-submenu>-->
<el-switch v-model="alarmNotify" active-text="报警信息推送" @change="alarmNotifyChannge"></el-switch>
<!-- <el-menu-item style="float: right;" @click="loginout">退出</el-menu-item>-->
<el-submenu index="" style="float: right;">
<template slot="title">欢迎{{ this.$cookies.get("session").username }}</template>
<el-menu-item @click="changePassword">修改密码</el-menu-item>
<el-menu-item @click="loginout">注销</el-menu-item>
</el-submenu>
</el-menu>
<changePasswordDialog ref="changePasswordDialog"></changePasswordDialog>
</div>
</template>
<script>
import changePasswordDialog from '../components/dialog/changePassword.vue'
export default {
name: "UiHeader",
components: {Notification, changePasswordDialog},
data() {
return {
alarmNotify: false,
sseSource: null,
activeIndex: this.$route.path,
};
},
created() {
if (this.$route.path.startsWith("/channelList")) {
this.activeIndex = "/deviceList"
}
},
mounted() {
window.addEventListener('beforeunload', e => this.beforeunloadHandler(e))
// window.addEventListener('unload', e => this.unloadHandler(e))
this.alarmNotify = this.getAlarmSwitchStatus() === "true";
this.sseControl();
},
methods: {
loginout() {
this.$axios({
method: 'get',
url: "/api/user/logout"
}).then((res) => {
// cookie
this.$cookies.remove("session");
this.$router.push('/login');
this.sseSource.close();
}).catch((error) => {
console.error("登出失败")
console.error(error)
});
},
changePassword() {
this.$refs.changePasswordDialog.openDialog()
},
openDoc() {
console.log(process.env.BASE_API)
window.open(!!process.env.BASE_API ? process.env.BASE_API + "/doc.html" : "/doc.html")
},
beforeunloadHandler() {
this.sseSource.close();
},
alarmNotifyChannge() {
this.setAlarmSwitchStatus()
this.sseControl()
},
sseControl() {
let that = this;
if (this.alarmNotify) {
console.log("申请SSE推送API调用浏览器ID: " + this.$browserId);
this.sseSource = new EventSource('/api/emit?browserId=' + this.$browserId);
this.sseSource.addEventListener('message', function (evt) {
that.$notify({
title: '收到报警信息',
dangerouslyUseHTMLString: true,
message: evt.data,
type: 'warning'
});
console.log("收到信息:" + evt.data);
});
this.sseSource.addEventListener('open', function (e) {
console.log("SSE连接打开.");
}, false);
this.sseSource.addEventListener('error', function (e) {
if (e.target.readyState == EventSource.CLOSED) {
console.log("SSE连接关闭");
} else {
console.log(e.target.readyState);
}
}, false);
} else {
if (this.sseSource != null) {
this.sseSource.removeEventListener('open', null);
this.sseSource.removeEventListener('message', null);
this.sseSource.removeEventListener('error', null);
this.sseSource.close();
}
}
},
getAlarmSwitchStatus() {
if (localStorage.getItem("alarmSwitchStatus") == null) {
localStorage.setItem("alarmSwitchStatus", false);
}
return localStorage.getItem("alarmSwitchStatus");
},
setAlarmSwitchStatus() {
localStorage.setItem("alarmSwitchStatus", this.alarmNotify);
}
},
destroyed() {
window.removeEventListener('beforeunload', e => this.beforeunloadHandler(e))
if (this.sseSource != null) {
this.sseSource.removeEventListener('open', null);
this.sseSource.removeEventListener('message', null);
this.sseSource.removeEventListener('error', null);
this.sseSource.close();
}
},
}
</script>
<style>
#UiHeader .el-switch__label {
color: white;
}
#UiHeader .el-switch__label.is-active{
color: #409EFF;
}
</style>

View File

@ -0,0 +1,90 @@
<template>
<el-container style="height: 100%">
<el-header>
<ui-header/>
</el-header>
<el-main>
<el-container>
<transition name="fade">
<router-view></router-view>
</transition>
</el-container>
</el-main>
</el-container>
</template>
<script>
import uiHeader from "./UiHeader.vue";
export default {
name: "index",
components: {
uiHeader
},
}
</script>
<style>
/*定义滚动条高宽及背景 高宽分别对应横竖滚动条的尺寸*/
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
/*定义滚动条轨道 内阴影+圆角*/
::-webkit-scrollbar-track {
border-radius: 4px;
background-color: #F5F5F5;
}
/*定义滑块 内阴影+圆角*/
::-webkit-scrollbar-thumb {
border-radius: 4px;
background-color: #c8c8c8;
box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
-webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .1);
}
/*定义标题栏*/
.page-header {
background-color: #FFFFFF;
margin-bottom: 1rem;
padding: 0.5rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.page-title {
font-weight: bold;
text-align: left;
}
.page-header-btn {
text-align: right;
}
</style>
<style scoped>
.el-main {
margin: 0;
}
.fade-enter {
visibility: hidden;
opacity: 0;
}
.fade-leave-to {
display: none;
}
.fade-enter-active,
.fade-leave-active {
transition: opacity .5s ease;
}
.fade-enter-to,
.fade-leave {
visibility: visible;
opacity: 1;
}
</style>

View File

@ -1,5 +1,6 @@
import Vue from 'vue' import Vue from 'vue'
import VueRouter from 'vue-router' import VueRouter from 'vue-router'
import Layout from "../layout/index.vue"
import control from '../components/control.vue' import control from '../components/control.vue'
import deviceList from '../components/DeviceList.vue' import deviceList from '../components/DeviceList.vue'
@ -32,78 +33,86 @@ export default new VueRouter({
routes: [ routes: [
{ {
path: '/', path: '/',
component: control, name: 'home',
}, component: Layout,
{ redirect: '/control',
path: '/live', children: [
component: live, {
}, path: '/control',
{ component: control,
path: '/deviceList', },
component: deviceList, {
}, path: '/live',
{ component: live,
path: '/pushVideoList', },
component: pushVideoList, {
}, path: '/deviceList',
{ component: deviceList,
path: '/streamProxyList', },
component: streamProxyList, {
path: '/pushVideoList',
component: pushVideoList,
},
{
path: '/streamProxyList',
component: streamProxyList,
},
{
path: '/channelList/:deviceId/:parentChannelId/:count/:page',
name: 'channelList',
component: channelList,
},
{
path: '/parentPlatformList/:count/:page',
name: 'parentPlatformList',
component: parentPlatformList,
},
{
path: '/devicePosition/:deviceId/:parentChannelId/:count/:page',
name: 'devicePosition',
component: devicePosition,
},
{
path: '/cloudRecord',
name: 'cloudRecord',
component: cloudRecord,
},
{
path: '/mediaServerManger',
name: 'mediaServerManger',
component: mediaServerManger,
},
{
path: '/setting/web',
name: 'web',
component: web,
},
{
path: '/setting/sip',
name: 'sip',
component: sip,
},
{
path: '/setting/media',
name: 'media',
component: media,
},
{
path: '/play/wasm/:url',
name: 'wasmPlayer',
component: wasmPlayer,
},
{
path: '/play/rtc/:url',
name: 'rtcPlayer',
component: rtcPlayer,
},
]
}, },
{ {
path: '/login', path: '/login',
name: '登录', name: '登录',
component: login, component: login,
}, },
{
path: '/channelList/:deviceId/:parentChannelId/:count/:page',
name: 'channelList',
component: channelList,
},
{
path: '/parentPlatformList/:count/:page',
name: 'parentPlatformList',
component: parentPlatformList,
},
{
path: '/devicePosition/:deviceId/:parentChannelId/:count/:page',
name: 'devicePosition',
component: devicePosition,
},
{
path: '/cloudRecord',
name: 'cloudRecord',
component: cloudRecord,
},
{
path: '/mediaServerManger',
name: 'mediaServerManger',
component: mediaServerManger,
},
{
path: '/setting/web',
name: 'web',
component: web,
},
{
path: '/setting/sip',
name: 'sip',
component: sip,
},
{
path: '/setting/media',
name: 'media',
component: media,
},
{
path: '/play/wasm/:url',
name: 'wasmPlayer',
component: wasmPlayer,
},
{
path: '/play/rtc/:url',
name: 'rtcPlayer',
component: rtcPlayer,
},
] ]
}) })