修复拉流看方式回显
parent
0b7d55ed74
commit
2f4d983f9f
|
@ -126,7 +126,7 @@ public class StreamProxyController {
|
|||
})
|
||||
@PostMapping(value = "/update")
|
||||
@ResponseBody
|
||||
public void update(@RequestBody StreamProxy param){
|
||||
public StreamProxy update(@RequestBody StreamProxy param){
|
||||
log.info("更新代理: " + JSONObject.toJSONString(param));
|
||||
if (param.getId() == 0) {
|
||||
throw new ControllerException(ErrorCode.ERROR400.getCode(), "缺少代理信息的ID");
|
||||
|
@ -135,6 +135,7 @@ public class StreamProxyController {
|
|||
param.setGbDeviceId(null);
|
||||
}
|
||||
streamProxyService.update(param);
|
||||
return param;
|
||||
}
|
||||
|
||||
@GetMapping(value = "/ffmpeg_cmd/list")
|
||||
|
@ -170,7 +171,7 @@ public class StreamProxyController {
|
|||
@Operation(summary = "移除代理", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||
@Parameter(name = "id", description = "代理ID", required = true)
|
||||
public void delte(int id){
|
||||
log.info("移除代理: " + id );
|
||||
log.info("移除代理: {}", id);
|
||||
streamProxyService.delete(id);
|
||||
}
|
||||
|
||||
|
@ -179,7 +180,7 @@ public class StreamProxyController {
|
|||
@Operation(summary = "启用代理", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||
@Parameter(name = "id", description = "代理Id", required = true)
|
||||
public StreamContent start(int id){
|
||||
log.info("播放代理: " + id);
|
||||
log.info("播放代理: {}", id);
|
||||
StreamInfo streamInfo = streamProxyService.start(id);
|
||||
if (streamInfo == null) {
|
||||
throw new ControllerException(ErrorCode.ERROR100.getCode(), ErrorCode.ERROR100.getMsg());
|
||||
|
|
|
@ -161,9 +161,6 @@ public class StreamProxyServiceImpl implements IStreamProxyService {
|
|||
streamProxy.setUpdateTime(DateUtil.getNow());
|
||||
streamProxyMapper.add(streamProxy);
|
||||
streamProxy.setStreamProxyId(streamProxy.getId());
|
||||
if (streamProxy.isEnable()) {
|
||||
return startProxy(streamProxy);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,4 +2,4 @@ spring:
|
|||
application:
|
||||
name: wvp
|
||||
profiles:
|
||||
active: local
|
||||
active: 272重构
|
|
@ -21,8 +21,8 @@
|
|||
style="width: 100%"
|
||||
placeholder="请选择代理类型"
|
||||
>
|
||||
<el-option label="默认" value="default"></el-option>
|
||||
<el-option label="FFmpeg" value="ffmpeg"></el-option>
|
||||
<el-option key="默认" label="默认" value="default"></el-option>
|
||||
<el-option key="FFmpeg" label="FFmpeg" value="ffmpeg"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="应用名" prop="app">
|
||||
|
@ -67,7 +67,7 @@
|
|||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="拉流方式(RTSP)" prop="rtpType">
|
||||
<el-form-item label="拉流方式(RTSP)" prop="rtspType">
|
||||
<el-select
|
||||
v-model="streamProxy.rtspType"
|
||||
style="width: 100%"
|
||||
|
@ -127,6 +127,11 @@ export default {
|
|||
this.mediaServerList = data.data;
|
||||
})
|
||||
},
|
||||
watch: {
|
||||
value(newValue, oldValue){
|
||||
this.streamProxy = newValue;
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
saveLoading: false,
|
||||
|
@ -159,10 +164,12 @@ export default {
|
|||
this.saveLoading = false;
|
||||
if (typeof (res.data.code) != "undefined" && res.data.code === 0) {
|
||||
this.$message.success("保存成功");
|
||||
console.log(res.data.data)
|
||||
this.streamProxy = res.data.data
|
||||
}else {
|
||||
this.$message.error(res.data.msg);
|
||||
}
|
||||
this.saveLoading = false;
|
||||
}).catch((error) =>{
|
||||
this.$message.error(error);
|
||||
this.saveLoading = false;
|
||||
|
@ -214,7 +221,7 @@ export default {
|
|||
},
|
||||
noneReaderHandler: function() {
|
||||
console.log(this.streamProxy)
|
||||
if (this.streamProxy.noneReader === null || this.streamProxy.noneReader === 0 || !this.streamProxy.noneReader) {
|
||||
if (!this.streamProxy.noneReader || this.streamProxy.noneReader === 0 ) {
|
||||
this.streamProxy.enableDisableNoneReader = false;
|
||||
this.streamProxy.enableRemoveNoneReader = false;
|
||||
}else if (this.streamProxy.noneReader === 1){
|
||||
|
|
|
@ -159,7 +159,12 @@
|
|||
window.clearInterval(this.updateLooper)
|
||||
},
|
||||
startUpdateList: function (){
|
||||
this.updateLooper = setInterval(this.getStreamProxyList, 1000);
|
||||
this.updateLooper = setInterval(()=>{
|
||||
if (!this.streamProxy) {
|
||||
this.getStreamProxyList()
|
||||
}
|
||||
|
||||
}, 1000);
|
||||
},
|
||||
currentChange: function(val){
|
||||
this.currentPage = val;
|
||||
|
@ -238,6 +243,7 @@
|
|||
this.$set(row, "noneReader", 0)
|
||||
}
|
||||
this.streamProxy = row
|
||||
this.$set(this.streamProxy, "rtspType", row.rtspType)
|
||||
},
|
||||
closeEdit: function(row){
|
||||
this.streamProxy = null
|
||||
|
|
Loading…
Reference in New Issue