Pre Merge pull request !27 from harston/结构优化

This commit is contained in:
harston 2024-02-04 07:24:48 +00:00 committed by Gitee
commit eee8214136
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
6 changed files with 69 additions and 48 deletions

View File

@ -508,6 +508,7 @@ public class DeviceServiceImpl implements IDeviceService {
}
deviceChannelMapper.clearPlay(device.getDeviceId());
inviteStreamService.clearInviteInfo(device.getDeviceId());
deviceInStore.setSwitchPrimarySubStream(device.isSwitchPrimarySubStream());
}
if (!ObjectUtils.isEmpty(device.getName())) {
@ -597,6 +598,7 @@ public class DeviceServiceImpl implements IDeviceService {
}
deviceChannelMapper.cleanChannelsByDeviceId(deviceId);
deviceMapper.del(deviceId);
redisCatchStorage.removeDevice(deviceId);
return true;
}

View File

@ -3,6 +3,7 @@ package com.genersoft.iot.vmp.vmanager.channel;
import com.genersoft.iot.vmp.common.CommonGbChannel;
import com.genersoft.iot.vmp.conf.UserSetting;
import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.gb28181.bean.ParentPlatform;
import com.genersoft.iot.vmp.gb28181.transmit.callback.DeferredResultHolder;
import com.genersoft.iot.vmp.service.ICommonGbChannelService;
@ -17,6 +18,7 @@ import com.github.pagehelper.PageInfo;
import com.google.common.collect.Lists;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.commons.lang3.ObjectUtils;
import org.slf4j.Logger;
@ -56,7 +58,7 @@ public class CommonChannelPlatformController {
/**
* 向上级平台添加国标通道
*/
@Operation(summary = "向上级平台添加国标通道")
@Operation(summary = "向上级平台添加国标通道", security = @SecurityRequirement(name = JwtUtils.HEADER))
@PostMapping("/add")
@ResponseBody
public void addChannelForGB(@RequestBody UpdateChannelParam param) {
@ -85,7 +87,7 @@ public class CommonChannelPlatformController {
* @param param 通道关联参数
* @return
*/
@Operation(summary = "从上级平台移除国标通道")
@Operation(summary = "从上级平台移除国标通道", security = @SecurityRequirement(name = JwtUtils.HEADER))
@DeleteMapping("/delete")
@ResponseBody
public void delChannelForGB(@RequestBody UpdateChannelParam param) {

View File

@ -1,12 +1,14 @@
package com.genersoft.iot.vmp.vmanager.group;
import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.service.IGroupService;
import com.genersoft.iot.vmp.service.bean.Group;
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
import com.github.pagehelper.PageInfo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.apache.commons.lang3.ObjectUtils;
import org.slf4j.Logger;
@ -26,7 +28,7 @@ public class GroupController {
@Autowired
private IGroupService groupService;
@Operation(summary = "添加区域")
@Operation(summary = "添加区域", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "group", description = "Group", required = true)
@ResponseBody
@PostMapping("/add")
@ -34,7 +36,7 @@ public class GroupController {
groupService.add(group);
}
@Operation(summary = "查询区域")
@Operation(summary = "查询区域", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "query", description = "查询内容", required = true)
@Parameter(name = "page", description = "当前页", required = true)
@Parameter(name = "count", description = "每页查询数量", required = true)
@ -48,7 +50,7 @@ public class GroupController {
return groupService.queryGroup(query, page, count);
}
@Operation(summary = "更新区域")
@Operation(summary = "更新区域", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "group", description = "Group", required = true)
@ResponseBody
@PostMapping("/update")
@ -56,7 +58,7 @@ public class GroupController {
groupService.update(group);
}
@Operation(summary = "删除区域")
@Operation(summary = "删除区域", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "groupDeviceId", description = "待删除的节点编号", required = true)
@ResponseBody
@GetMapping("/delete")
@ -68,7 +70,7 @@ public class GroupController {
}
}
@Operation(summary = "查询区域的子节点")
@Operation(summary = "查询区域的子节点", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "groupParentId", description = "待查询的节点", required = true)
@Parameter(name = "page", description = "当前页", required = true)
@Parameter(name = "count", description = "每页查询数量", required = true)

View File

@ -1,6 +1,7 @@
package com.genersoft.iot.vmp.vmanager.region;
import com.genersoft.iot.vmp.conf.exception.ControllerException;
import com.genersoft.iot.vmp.conf.security.JwtUtils;
import com.genersoft.iot.vmp.gb28181.bean.Gb28181CodeType;
import com.genersoft.iot.vmp.service.IRegionService;
import com.genersoft.iot.vmp.service.bean.Region;
@ -8,6 +9,7 @@ import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
import com.github.pagehelper.PageInfo;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -27,7 +29,7 @@ public class RegionController {
@Autowired
private IRegionService regionService;
@Operation(summary = "添加区域")
@Operation(summary = "添加区域",security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "region", description = "Region", required = true)
@ResponseBody
@PostMapping("/add")
@ -35,7 +37,7 @@ public class RegionController {
regionService.add(region);
}
@Operation(summary = "查询区域")
@Operation(summary = "查询区域", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "query", description = "要搜索的内容", required = true)
@Parameter(name = "page", description = "当前页", required = true)
@Parameter(name = "count", description = "每页查询数量", required = true)
@ -49,7 +51,7 @@ public class RegionController {
return regionService.query(query, page, count);
}
@Operation(summary = "更新区域")
@Operation(summary = "更新区域" , security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "region", description = "Region", required = true)
@ResponseBody
@PostMapping("/update")
@ -57,7 +59,7 @@ public class RegionController {
regionService.update(region);
}
@Operation(summary = "删除区域")
@Operation(summary = "删除区域" , security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "regionDeviceId", description = "区域编码", required = true)
@ResponseBody
@GetMapping("/delete")
@ -69,7 +71,7 @@ public class RegionController {
}
}
@Operation(summary = "分页区域子节点")
@Operation(summary = "分页区域子节点", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "regionParentId", description = "行政区划父节点编号", required = true)
@Parameter(name = "page", description = "当前页", required = true)
@Parameter(name = "count", description = "每页查询数量", required = true)
@ -86,7 +88,7 @@ public class RegionController {
return regionService.queryChildRegionList(regionParentId, page, count);
}
@Operation(summary = "根据区域Id查询区域")
@Operation(summary = "根据区域Id查询区域", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "regionDeviceId", description = "行政区划节点编号", required = true)
@ResponseBody
@GetMapping("/one")
@ -99,7 +101,7 @@ public class RegionController {
return regionService.queryRegionByDeviceId(regionDeviceId);
}
@Operation(summary = "获取所属的行政区划下的行政区划")
@Operation(summary = "获取所属的行政区划下的行政区划", security = @SecurityRequirement(name = JwtUtils.HEADER))
@Parameter(name = "parent", description = "所属的行政区划", required = false)
@ResponseBody
@GetMapping("/base/child/list")

View File

@ -36,7 +36,6 @@
:error="videoError"
:message="videoError"
:hasAudio="hasAudio"
style="max-height: 100%"
fluent autoplay live ></player>
</div>
<div class="player-option-box">
@ -137,8 +136,11 @@
margin: "10px auto 10px auto"
},
playerStyle: {
"display": "flex",
"justify-content": "center",
"align-items": "center",
"margin": "0 auto 20px auto",
"height": this.winHeight + "px",
"height": this.winHeight + "px"
},
winHeight: window.innerHeight - 240,
playTime: null,
@ -178,17 +180,25 @@
},
mounted() {
this.recordListStyle.height = this.winHeight + "px";
this.playerStyle["height"] = this.winHeight + "px";
this.$nextTick(() => {
this.updateWinHeight();
this.chooseDate = moment().format('YYYY-MM-DD')
this.dateChange();
window.addEventListener('resize',this.updateWinHeight)
window.addEventListener('beforeunload', this.stopPlayRecord)
})
},
destroyed() {
this.$destroy('recordVideoPlayer');
window.removeEventListener('beforeunload', this.stopPlayRecord)
window.removeEventListener('resize',this.updateWinHeight)
},
methods: {
updateWinHeight(){
this.winHeight=window.innerHeight - 240;
this.recordListStyle.height = this.winHeight + "px";
this.playerStyle.height = this.winHeight + "px";
},
dateChange(){
if (!this.chooseDate) {
return;

View File

@ -1,6 +1,7 @@
<template>
<div ref="container" @dblclick="fullscreenSwich"
style="width:100%;height:518px; min-height: 200px;background-color: #000000;margin:0 auto;position: relative;">
<div ref="container">
<div ref="playerContainer" @dblclick="fullscreenSwich"
style="width:100%;height:100%;background-color: #000000;margin:0 auto;position: relative;">
<div class="buttons-box" id="buttonsBox">
<div class="buttons-box-left">
<i v-if="!playing" class="iconfont icon-play jessibuca-btn" @click="playBtnClick"></i>
@ -21,6 +22,7 @@
</div>
</div>
</div>
</div>
</template>
<script>
@ -46,13 +48,11 @@ export default {
};
},
props: ['videoUrl', 'error', 'hasAudio', 'height'],
created() {
mounted() {
let paramUrl = decodeURIComponent(this.$route.params.url)
this.$nextTick(() => {
this.updatePlayerDomSize()
window.onresize = () => {
this.updatePlayerDomSize()
}
window.addEventListener('resize',this.updatePlayerDomSize)
if (typeof (this.videoUrl) == "undefined") {
this.videoUrl = paramUrl;
}
@ -63,7 +63,10 @@ export default {
videoUrl: {
handler(val, _) {
this.$nextTick(() => {
if(val) {
this.play(val);
}
this.updatePlayerDomSize()
})
},
immediate: true
@ -74,8 +77,7 @@ export default {
let dom = this.$refs.container;
let width = dom.parentNode.clientWidth
let height = (9 / 16) * width
const clientHeight = Math.min(document.body.clientHeight, document.documentElement.clientHeight)
const clientHeight = Math.min(dom.parentNode.clientHeight?dom.parentNode.clientHeight:document.body.clientHeight, document.documentElement.clientHeight)
if (height > clientHeight) {
height = clientHeight
width = (16 / 9) * height
@ -87,7 +89,7 @@ export default {
},
create() {
let options = {
container: this.$refs.container,
container: this.$refs.playerContainer,
autoWasm: true,
background: "",
controlAutoHide: false,
@ -257,6 +259,7 @@ export default {
this.playing = false;
this.loaded = false;
this.performance = "";
window.removeEventListener('resize',this.updatePlayerDomSize);
},
}
</script>