完善通道数据类型的保存与展示

pull/1733/head
648540858 2024-12-24 23:35:01 +08:00
parent e82213b466
commit 081bb6de18
10 changed files with 41 additions and 59 deletions

View File

@ -367,7 +367,7 @@ public class GbChannelServiceImpl implements IGbChannelService {
log.warn("[重置国标通道] 未找到对应Id的通道: id: {}", id);
throw new ControllerException(ErrorCode.ERROR400);
}
if (channel.getDataType() == ChannelDataType.GB28181.value) {
if (channel.getDataType() != ChannelDataType.GB28181.value) {
log.warn("[重置国标通道] 非国标下级通道无法重置: id: {}", id);
throw new ControllerException(ErrorCode.ERROR100.getCode(), "非国标下级通道无法重置");
}

View File

@ -50,7 +50,7 @@ public interface StreamPushMapper {
" LEFT join wvp_device_channel wdc " +
" on st.id = wdc.data_device_id " +
" WHERE " +
" 1=1 " +
" wdc.data_type = 2 " +
" <if test='query != null'> AND (st.app LIKE concat('%',#{query},'%') escape '/' OR st.stream LIKE concat('%',#{query},'%') escape '/' " +
" OR wdc.gb_device_id LIKE concat('%',#{query},'%') escape '/' OR wdc.gb_name LIKE concat('%',#{query},'%') escape '/')</if> " +
" <if test='pushing == true' > AND st.pushing=1</if>" +

View File

@ -153,7 +153,6 @@ export default {
onSubmit: function () {
console.log(typeof this.streamProxy.noneReader)
this.saveLoading = true;
this.noneReaderHandler();
if (this.streamProxy.id) {
this.$axios({

View File

@ -204,6 +204,7 @@
// this.$refs.streamProxyEdit.openDialog(null, this.initData)
this.streamProxy = {
type: "default",
dataType: 3,
noneReader: 1,
enable: true,
enableAudio: true,

View File

@ -1,41 +0,0 @@
<template>
<el-select size="mini" @change="change" v-model="dataType" placeholder="请选择"
default-first-option>
<el-option label="全部" value=""></el-option>
<el-option
v-for="item in dataTypeArray"
:key="item.key"
:label="item.key"
:value="item.value">
</el-option>
</el-select>
</template>
<script>
export default {
name: "channelDataTypeSelect",
props: ['dataType','change'],
created() {
this.init()
},
data() {
return {
dataTypeArray: [],
};
},
methods: {
init: function (){
this.$axios({
method: 'get',
url: `/api/server/channel/datatype`,
params: {}
}).then((res)=> {
if (res.data.code === 0) {
this.dataTypeArray = res.data.data;
}
})
},
},
};
</script>

View File

@ -23,7 +23,13 @@
<el-option label="离线" value="false"></el-option>
</el-select>
类型:
<channelDataTypeSelect style="width: 8rem; margin-right: 1rem;" :change="getChannelList" :dataType="channelType"></channelDataTypeSelect>
<el-select size="mini" style="width: 8rem; margin-right: 1rem;" @change="getChannelList" v-model="channelType" placeholder="请选择"
default-first-option>
<el-option label="全部" value=""></el-option>
<el-option label="国标设备" :value="1"></el-option>
<el-option label="推流设备" :value="2"></el-option>
<el-option label="拉流代理" :value="3"></el-option>
</el-select>
<el-button size="mini" :loading="getChannelListLoading"
@click="getChannelList()">刷新</el-button>
<el-button type="primary" size="mini" style="float: right" @click="onSubmit"> </el-button>
@ -80,11 +86,9 @@
<script>
import ChannelDataTypeSelect from "../common/channelDataTypeSelect.vue";
export default {
name: "gbChannelSelect",
components: {ChannelDataTypeSelect},
props: ['dataType', "selected"],
computed: {},
data() {

View File

@ -22,7 +22,13 @@
<el-option label="离线" value="false"></el-option>
</el-select>
类型:
<channelDataTypeSelect style="width: 8rem; margin-right: 1rem;" :change="search" :dataType="channelType"></channelDataTypeSelect>
<el-select size="mini" style="width: 8rem; margin-right: 1rem;" @change="search" v-model="channelType" placeholder="请选择"
default-first-option>
<el-option label="全部" value=""></el-option>
<el-option label="国标设备" :value="1"></el-option>
<el-option label="推流设备" :value="2"></el-option>
<el-option label="拉流代理" :value="3"></el-option>
</el-select>
<el-button v-if="hasLink !=='true'" size="mini" type="primary" @click="add()">
添加
</el-button>
@ -85,11 +91,10 @@
<script>
import gbDeviceSelect from "./GbDeviceSelect.vue";
import ChannelDataTypeSelect from "../common/channelDataTypeSelect.vue";
export default {
name: 'linkChannelRecord',
components: {ChannelDataTypeSelect, gbDeviceSelect},
components: {gbDeviceSelect},
data() {
return {
dialogLoading: false,

View File

@ -20,7 +20,13 @@
<el-option label="离线" value="false"></el-option>
</el-select>
类型:
<channelDataTypeSelect style="width: 8rem; margin-right: 1rem;" :change="search" :dataType="channelType"></channelDataTypeSelect>
<el-select size="mini" style="width: 8rem; margin-right: 1rem;" @change="search" v-model="channelType" placeholder="请选择"
default-first-option>
<el-option label="全部" value=""></el-option>
<el-option label="国标设备" :value="1"></el-option>
<el-option label="推流设备" :value="2"></el-option>
<el-option label="拉流代理" :value="3"></el-option>
</el-select>
<el-button v-if="hasShare !=='true'" size="mini" type="primary" @click="add()">
添加
</el-button>
@ -101,11 +107,10 @@
<script>
import gbDeviceSelect from "./GbDeviceSelect.vue";
import ChannelDataTypeSelect from "../common/channelDataTypeSelect.vue";
export default {
name: 'shareChannelAdd',
components: {ChannelDataTypeSelect, gbDeviceSelect},
components: {gbDeviceSelect},
props: [ 'platformId'],
data() {
return {

View File

@ -28,7 +28,14 @@
<el-option label="离线" value="false"></el-option>
</el-select>
类型:
<channelDataTypeSelect style="width: 8rem; margin-right: 1rem;" :change="getChannelList" :dataType="channelType"></channelDataTypeSelect>
<el-select size="mini" style="width: 8rem; margin-right: 1rem;" @change="getChannelList"
v-model="channelType" placeholder="请选择"
default-first-option>
<el-option label="全部" value=""></el-option>
<el-option label="国标设备" :value="1"></el-option>
<el-option label="推流设备" :value="2"></el-option>
<el-option label="拉流代理" :value="3"></el-option>
</el-select>
<el-button size="mini" type="primary" @click="add()">
添加通道
</el-button>
@ -90,12 +97,10 @@ import DeviceService from "./service/DeviceService";
import GroupTree from "./common/GroupTree.vue";
import GbChannelSelect from "./dialog/GbChannelSelect.vue";
import RegionTree from "./common/RegionTree.vue";
import ChannelDataTypeSelect from "./common/channelDataTypeSelect.vue";
export default {
name: 'channelList',
components: {
ChannelDataTypeSelect,
RegionTree,
GbChannelSelect,
uiHeader,

View File

@ -28,7 +28,13 @@
<el-option label="离线" value="false"></el-option>
</el-select>
类型:
<channelDataTypeSelect style="width: 8rem; margin-right: 1rem;" :change="getChannelList" :dataType="channelType"></channelDataTypeSelect>
<el-select size="mini" style="width: 8rem; margin-right: 1rem;" @change="getChannelList" v-model="channelType" placeholder="请选择"
default-first-option>
<el-option label="全部" value=""></el-option>
<el-option label="国标设备" :value="1"></el-option>
<el-option label="推流设备" :value="2"></el-option>
<el-option label="拉流代理" :value="3"></el-option>
</el-select>
<el-button size="mini" type="primary" @click="add()">
添加通道
</el-button>
@ -89,12 +95,10 @@ import uiHeader from '../layout/UiHeader.vue'
import DeviceService from "./service/DeviceService";
import RegionTree from "./common/RegionTree.vue";
import GbChannelSelect from "./dialog/GbChannelSelect.vue";
import ChannelDataTypeSelect from "./common/channelDataTypeSelect.vue";
export default {
name: 'channelList',
components: {
ChannelDataTypeSelect,
GbChannelSelect,
uiHeader,
RegionTree,