| | |
| | | |
| | | @Insert("INSERT INTO device_channel (channelId, deviceId, name, manufacture, model, owner, civilCode, block, " + |
| | | "address, parental, parentId, safetyWay, registerWay, certNum, certifiable, errCode, secrecy, " + |
| | | "ipAddress, port, password, PTZType, status) " + |
| | | "ipAddress, port, password, PTZType, status, streamId) " + |
| | | "VALUES ('${channelId}', '${deviceId}', '${name}', '${manufacture}', '${model}', '${owner}', '${civilCode}', '${block}'," + |
| | | "'${address}', ${parental}, '${parentId}', ${safetyWay}, ${registerWay}, '${certNum}', ${certifiable}, ${errCode}, '${secrecy}', " + |
| | | "'${ipAddress}', ${port}, '${password}', ${PTZType}, ${status})") |
| | | "'${ipAddress}', ${port}, '${password}', ${PTZType}, ${status}, '${streamId}')") |
| | | int add(DeviceChannel channel); |
| | | |
| | | @Update(value = {" <script>" + |
| | |
| | | |
| | | import java.util.*; |
| | | |
| | | import com.genersoft.iot.vmp.common.StreamInfo; |
| | | import com.genersoft.iot.vmp.gb28181.bean.*; |
| | | import com.genersoft.iot.vmp.gb28181.session.VideoStreamSessionManager; |
| | | import com.genersoft.iot.vmp.media.zlm.dto.StreamProxyItem; |
| | | import com.genersoft.iot.vmp.media.zlm.dto.StreamPushItem; |
| | | import com.genersoft.iot.vmp.storager.IRedisCatchStorage; |
| | |
| | | @Autowired |
| | | private GbStreamMapper gbStreamMapper; |
| | | |
| | | @Autowired |
| | | private VideoStreamSessionManager streamSession; |
| | | |
| | | |
| | | /** |
| | | * 根据设备ID判断设备是否存在 |
| | |
| | | public synchronized void updateChannel(String deviceId, DeviceChannel channel) { |
| | | String channelId = channel.getChannelId(); |
| | | channel.setDeviceId(deviceId); |
| | | channel.setStreamId(streamSession.getStreamId(deviceId, channel.getChannelId())); |
| | | DeviceChannel deviceChannel = deviceChannelMapper.queryChannel(deviceId, channelId); |
| | | if (deviceChannel == null) { |
| | | deviceChannelMapper.add(channel); |
| | |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | active: local |
| | |
| | | sseControl() { |
| | | let that = this; |
| | | if (this.alarmNotify) { |
| | | console.log("申请SSE推送API调用,浏览器ID: " + this.$browserId); |
| | | this.sseSource = new EventSource('/api/emit?browserId=' + this.$browserId); |
| | | 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: '收到报警信息', |
| | |
| | | <template> |
| | | <div id="channelList"> |
| | | <el-container> |
| | | |
| | | <el-header> |
| | | <uiHeader></uiHeader> |
| | | </el-header> |
| | |
| | | }, |
| | | methods: { |
| | | initData: function () { |
| | | if (this.parentChannelId == "" || this.parentChannelId == 0) { |
| | | if (typeof (this.parentChannelId) == "undefined" || this.parentChannelId == 0) { |
| | | this.getDeviceChannelList(); |
| | | } else { |
| | | this.showSubchannels(); |
| | |
| | | }, |
| | | 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`, |