临时提交
parent
abed3ecbec
commit
976c089b7f
|
@ -8,10 +8,7 @@ import com.genersoft.iot.vmp.conf.SipConfig;
|
|||
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.Platform;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.PlatformCatch;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.PlatformCatalog;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.SubscribeHolder;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.*;
|
||||
import com.genersoft.iot.vmp.gb28181.controller.bean.ChannelReduce;
|
||||
import com.genersoft.iot.vmp.gb28181.controller.bean.UpdateChannelParam;
|
||||
import com.genersoft.iot.vmp.gb28181.transmit.cmd.ISIPCommanderForPlatform;
|
||||
|
@ -303,35 +300,27 @@ public class PlatformController {
|
|||
* @param channelType 通道类型
|
||||
* @return
|
||||
*/
|
||||
@Operation(summary = "查询上级平台是否存在", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||
@Operation(summary = "分页查询级联平台的所有所有通道", security = @SecurityRequirement(name = JwtUtils.HEADER))
|
||||
@Parameter(name = "page", description = "当前页", required = true)
|
||||
@Parameter(name = "count", description = "每页条数", required = true)
|
||||
@Parameter(name = "platformId", description = "上级平台的国标编号")
|
||||
@Parameter(name = "catalogId", description = "目录ID")
|
||||
@Parameter(name = "platformId", description = "上级平台的数据ID")
|
||||
@Parameter(name = "query", description = "查询内容")
|
||||
@Parameter(name = "online", description = "是否在线")
|
||||
@Parameter(name = "channelType", description = "通道类型")
|
||||
@GetMapping("/channel_list")
|
||||
@Parameter(name = "hasShare", description = "是否已经共享")
|
||||
@GetMapping("/channel/list")
|
||||
@ResponseBody
|
||||
public PageInfo<ChannelReduce> channelList(int page, int count,
|
||||
@RequestParam(required = false) String platformId,
|
||||
@RequestParam(required = false) String catalogId,
|
||||
public PageInfo<CommonGBChannel> channelList(int page, int count,
|
||||
@RequestParam(required = false) Integer platformId,
|
||||
@RequestParam(required = false) String query,
|
||||
@RequestParam(required = false) Boolean online,
|
||||
@RequestParam(required = false) Boolean channelType) {
|
||||
@RequestParam(required = false) Boolean hasShare) {
|
||||
|
||||
if (ObjectUtils.isEmpty(platformId)) {
|
||||
platformId = null;
|
||||
}
|
||||
Assert.notNull(platformId, "上级平台的数据ID不可为NULL");
|
||||
if (ObjectUtils.isEmpty(query)) {
|
||||
query = null;
|
||||
}
|
||||
if (ObjectUtils.isEmpty(platformId) || ObjectUtils.isEmpty(catalogId)) {
|
||||
catalogId = null;
|
||||
}
|
||||
PageInfo<ChannelReduce> channelReduces = deviceChannelService.queryAllChannelList(page, count, query, online, channelType, platformId, catalogId);
|
||||
|
||||
return channelReduces;
|
||||
return platformChannelService.queryChannelList(page, count, query, online, platformId, hasShare);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -71,13 +71,13 @@
|
|||
</div>
|
||||
|
||||
<platformEdit ref="platformEdit" v-if="platform" v-model="platform" :closeEdit="closeEdit" :device-ips="deviceIps" ></platformEdit>
|
||||
<chooseChannelDialog ref="chooseChannelDialog" ></chooseChannelDialog>
|
||||
<shareChannel ref="shareChannel" ></shareChannel>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import uiHeader from '../layout/UiHeader.vue'
|
||||
import chooseChannelDialog from './dialog/chooseChannel.vue'
|
||||
import shareChannel from './dialog/shareChannel.vue'
|
||||
import platformEdit from './PlatformEdit.vue'
|
||||
import streamProxyEdit from "./dialog/StreamProxyEdit.vue";
|
||||
export default {
|
||||
|
@ -85,7 +85,7 @@ export default {
|
|||
components: {
|
||||
streamProxyEdit,
|
||||
uiHeader,
|
||||
chooseChannelDialog,
|
||||
shareChannel,
|
||||
platformEdit
|
||||
},
|
||||
data() {
|
||||
|
@ -153,8 +153,7 @@ export default {
|
|||
});
|
||||
},
|
||||
chooseChannel: function(platform) {
|
||||
console.log("platform.name: " + platform.name)
|
||||
this.$refs.chooseChannelDialog.openDialog(platform.serverGBId,platform.deviceGBId, platform.name, platform.catalogId, this.initData)
|
||||
this.$refs.shareChannel.openDialog(platform.serverGBId, this.initData)
|
||||
},
|
||||
initData: function() {
|
||||
this.$axios({
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div id="catalogEdit" v-loading="isLoging">
|
||||
<el-dialog
|
||||
title="节点编辑"
|
||||
title="通道共享"
|
||||
width="40%"
|
||||
top="2rem"
|
||||
:append-to-body="true"
|
||||
|
|
|
@ -1,126 +0,0 @@
|
|||
<template>
|
||||
<div id="chooseChannel" >
|
||||
|
||||
<el-dialog title="选择通道" v-loading="loading" v-if="showDialog" top="2rem" width="90%" :close-on-click-modal="false" :visible.sync="showDialog" :destroy-on-close="true" @close="close()">
|
||||
<el-row>
|
||||
<el-col :span="10">
|
||||
<el-tabs v-model="catalogTabActiveName" >
|
||||
<el-tab-pane label="目录结构" name="catalog">
|
||||
<el-container>
|
||||
<el-main v-bind:style="{backgroundColor: '#FFF', maxHeight: winHeight + 'px'}">
|
||||
<chooseChannelForCatalog ref="chooseChannelForCatalog" :platformId=platformId :platformDeviceId=platformDeviceId :platformName=platformName :defaultCatalogId=defaultCatalogId :catalogIdChange="catalogIdChange" ></chooseChannelForCatalog>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="14">
|
||||
<el-tabs v-model="tabActiveName" @tab-click="tabClick">
|
||||
<el-tab-pane label="国标通道" name="gbChannel">
|
||||
<el-container>
|
||||
<el-main style="background-color: #FFF;">
|
||||
<chooseChannelForGb ref="chooseChannelForGb" :catalogId="catalogId" :catalogName="catalogName" :platformId=platformId ></chooseChannelForGb>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="直播流通道" name="streamchannel">
|
||||
<el-container>
|
||||
<el-main style="background-color: #FFF;">
|
||||
<chooseChannelFoStream ref="chooseChannelFoStream" :catalogId="catalogId" :catalogName="catalogName" :currentCatalogId="currentCatalogId" :platformId=platformId ></chooseChannelFoStream>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import chooseChannelForGb from '../dialog/chooseChannelForGb.vue'
|
||||
import chooseChannelFoStream from '../dialog/chooseChannelForStream.vue'
|
||||
import chooseChannelForCatalog from '../dialog/chooseChannelForCatalog.vue'
|
||||
export default {
|
||||
name: 'chooseChannel',
|
||||
props: {},
|
||||
components: {
|
||||
chooseChannelForGb,
|
||||
chooseChannelFoStream,
|
||||
chooseChannelForCatalog,
|
||||
},
|
||||
computed: {
|
||||
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
tabActiveName: "gbChannel",
|
||||
catalogTabActiveName: "catalog",
|
||||
platformId: "",
|
||||
platformDeviceId: "",
|
||||
catalogId: "",
|
||||
catalogName: "",
|
||||
currentCatalogId: "",
|
||||
platformName: "",
|
||||
defaultCatalogId: "",
|
||||
showDialog: false,
|
||||
chooseData: {},
|
||||
winHeight: window.innerHeight - 250,
|
||||
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
openDialog(platformId, platformDeviceId, platformName, defaultCatalogId, closeCallback) {
|
||||
console.log("defaultCatalogId: " + defaultCatalogId)
|
||||
this.platformId = platformId
|
||||
this.platformDeviceId = platformDeviceId
|
||||
this.platformName = platformName
|
||||
this.defaultCatalogId = defaultCatalogId
|
||||
this.showDialog = true
|
||||
this.closeCallback = closeCallback
|
||||
},
|
||||
tabClick (tab, event){
|
||||
|
||||
},
|
||||
close: function() {
|
||||
this.closeCallback()
|
||||
},
|
||||
search: function() {
|
||||
|
||||
},
|
||||
save: function() {
|
||||
|
||||
this.$axios({
|
||||
method:"post",
|
||||
url:"/api/platform/update_channel_for_gb",
|
||||
data:{
|
||||
platformId: this.platformId,
|
||||
channelReduces: this.chooseData
|
||||
}
|
||||
}).then((res)=>{
|
||||
if (res.data.code === 0) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '保存成功,',
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
},
|
||||
catalogIdChange: function (id, name) {
|
||||
this.catalogId = id;
|
||||
this.catalogName = name;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,98 @@
|
|||
<template>
|
||||
<div id="chooseChannel" >
|
||||
|
||||
<el-dialog title="通道共享" v-loading="loading" v-if="showDialog" top="2rem" width="80%" :close-on-click-modal="false" :visible.sync="showDialog" :destroy-on-close="true" @close="close()">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-tabs v-model="catalogTabActiveName" >
|
||||
<el-tab-pane label="共享通道" name="addShare">
|
||||
<el-container>
|
||||
<el-main v-bind:style="{backgroundColor: '#FFF', maxHeight: winHeight + 'px'}">
|
||||
<shareChannelAdd ref="shareChannelAdd" :platformId="platformId"></shareChannelAdd>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="共享通道信息展示" name="showShare">
|
||||
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="共享通道信息自定义" name="customShare">
|
||||
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import shareChannelAdd from "./shareChannelAdd.vue";
|
||||
|
||||
export default {
|
||||
name: 'chooseChannel',
|
||||
props: {},
|
||||
components: {shareChannelAdd},
|
||||
computed: {},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
tabActiveName: "gbChannel",
|
||||
catalogTabActiveName: "addShare",
|
||||
platformId: "",
|
||||
showDialog: false,
|
||||
chooseData: {},
|
||||
winHeight: window.innerHeight - 250,
|
||||
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
openDialog(platformId, closeCallback) {
|
||||
this.platformId = platformId
|
||||
this.showDialog = true
|
||||
this.closeCallback = closeCallback
|
||||
},
|
||||
tabClick (tab, event){
|
||||
|
||||
},
|
||||
close: function() {
|
||||
this.closeCallback()
|
||||
},
|
||||
search: function() {
|
||||
|
||||
},
|
||||
save: function() {
|
||||
|
||||
this.$axios({
|
||||
method:"post",
|
||||
url:"/api/platform/update_channel_for_gb",
|
||||
data:{
|
||||
platformId: this.platformId,
|
||||
channelReduces: this.chooseData
|
||||
}
|
||||
}).then((res)=>{
|
||||
if (res.data.code === 0) {
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '保存成功,',
|
||||
type: 'success'
|
||||
});
|
||||
}
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
},
|
||||
catalogIdChange: function (id, name) {
|
||||
this.catalogId = id;
|
||||
this.catalogName = name;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
|
@ -0,0 +1,288 @@
|
|||
<template>
|
||||
<div id="shareChannelAdd" style="width: 100%; background-color: #FFFFFF">
|
||||
<div class="page-header">
|
||||
<div class="page-header-btn">
|
||||
<div style="display: inline;">
|
||||
搜索:
|
||||
<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-select size="mini" style="width: 8rem; margin-right: 1rem;" @change="search" v-model="online" placeholder="请选择"
|
||||
default-first-option>
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="在线" value="true"></el-option>
|
||||
<el-option label="离线" value="false"></el-option>
|
||||
</el-select>
|
||||
添加状态:
|
||||
<el-select size="mini" style="width: 8rem; margin-right: 1rem;" @change="search" v-model="hasShare" placeholder="请选择"
|
||||
default-first-option>
|
||||
<el-option label="全部" value=""></el-option>
|
||||
<el-option label="已共享" value="true"></el-option>
|
||||
<el-option label="未共享" value="false"></el-option>
|
||||
</el-select>
|
||||
<el-button v-if="hasShare !=='true'" size="mini" type="primary" @click="add()">
|
||||
添加
|
||||
</el-button>
|
||||
<el-button v-if="hasShare ==='true'" size="mini" type="danger" @click="remove()">
|
||||
移除
|
||||
</el-button>
|
||||
<el-button icon="el-icon-refresh-right" circle size="mini" @click="getChannelList()"></el-button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-table size="small" ref="channelListTable" :data="channelList" :height="winHeight" style="width: 100%;"
|
||||
header-row-class-name="table-header" @selection-change="handleSelectionChange" >
|
||||
<el-table-column type="selection" width="55" :selectable="selectable">
|
||||
</el-table-column>
|
||||
<el-table-column prop="gbName" label="名称" min-width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="gbDeviceId" label="编号" min-width="180">
|
||||
</el-table-column>
|
||||
<el-table-column prop="gbManufacturer" label="厂家" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<div slot="reference" class="name-wrapper">
|
||||
<el-tag size="medium" v-if="scope.row.gbDeviceDbId">国标设备</el-tag>
|
||||
<el-tag size="medium" v-if="scope.row.streamPushId">推流设备</el-tag>
|
||||
<el-tag size="medium" v-if="scope.row.streamProxyId">拉流代理</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<div slot="reference" class="name-wrapper">
|
||||
<el-tag size="medium" v-if="scope.row.gbStatus === 'ON'">在线</el-tag>
|
||||
<el-tag size="medium" type="info" v-if="scope.row.gbStatus !== 'ON'">离线</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="共享状态" min-width="100">
|
||||
<template slot-scope="scope">
|
||||
<div slot="reference" class="name-wrapper">
|
||||
<el-tag size="medium" :title="scope.row.platformId" v-if="scope.row.platformId">已共享</el-tag>
|
||||
<el-tag size="medium" type="info" v-if="!scope.row.platformId">未共享</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
style="text-align: 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>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'shareChannelAdd',
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
channelList: [],
|
||||
searchSrt: "",
|
||||
channelType: "",
|
||||
online: "",
|
||||
hasShare: "false",
|
||||
winHeight: window.innerHeight - 380,
|
||||
currentPage: 1,
|
||||
count: 15,
|
||||
total: 0,
|
||||
loading: false,
|
||||
loadSnap: {},
|
||||
multipleSelection: []
|
||||
};
|
||||
},
|
||||
|
||||
created() {
|
||||
this.initData();
|
||||
},
|
||||
destroyed() {},
|
||||
methods: {
|
||||
initData: function () {
|
||||
this.getChannelList();
|
||||
},
|
||||
currentChange: function (val) {
|
||||
this.currentPage = val;
|
||||
this.initData();
|
||||
},
|
||||
handleSizeChange: function (val) {
|
||||
this.count = val;
|
||||
this.getChannelList();
|
||||
},
|
||||
getChannelList: function () {
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: `/api/platform/channel/list`,
|
||||
params: {
|
||||
page: this.currentPage,
|
||||
count: this.count,
|
||||
query: this.searchSrt,
|
||||
online: this.online,
|
||||
platformId: this.platformId,
|
||||
hasShare: this.hasShare
|
||||
}
|
||||
}).then((res)=> {
|
||||
if (res.data.code === 0) {
|
||||
this.total = res.data.data.total;
|
||||
this.channelList = res.data.data.list;
|
||||
// 防止出现表格错位
|
||||
this.$nextTick(() => {
|
||||
this.$refs.channelListTable.doLayout();
|
||||
})
|
||||
}
|
||||
|
||||
}).catch((error)=> {
|
||||
|
||||
console.log(error);
|
||||
});
|
||||
},
|
||||
handleSelectionChange: function (val){
|
||||
this.multipleSelection = val;
|
||||
},
|
||||
selectable: function (row, rowIndex) {
|
||||
if (this.hasShare === "") {
|
||||
if (row.platformId) {
|
||||
return false
|
||||
}else {
|
||||
return true
|
||||
}
|
||||
}else {
|
||||
return true
|
||||
}
|
||||
},
|
||||
add: function (row) {
|
||||
let channels = []
|
||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
||||
channels.push(this.multipleSelection[i].gbId)
|
||||
}
|
||||
if (channels.length === 0) {
|
||||
this.$message.info("请选择右侧通道")
|
||||
return;
|
||||
}
|
||||
this.loading = true
|
||||
|
||||
this.$axios({
|
||||
method: 'post',
|
||||
url: `/api/platform/channel/add`,
|
||||
data: {
|
||||
platformId: this.platformId,
|
||||
channelIds: channels
|
||||
}
|
||||
}).then((res)=> {
|
||||
if (res.data.code === 0) {
|
||||
this.$message.success("保存成功")
|
||||
this.getChannelList()
|
||||
}else {
|
||||
this.$message.error(res.data.msg)
|
||||
}
|
||||
this.loading = false
|
||||
}).catch((error)=> {
|
||||
this.$message.error(error)
|
||||
this.loading = false
|
||||
});
|
||||
},
|
||||
remove: function (row) {
|
||||
let channels = []
|
||||
for (let i = 0; i < this.multipleSelection.length; i++) {
|
||||
channels.push(this.multipleSelection[i].gbId)
|
||||
}
|
||||
if (channels.length === 0) {
|
||||
this.$message.info("请选择右侧通道")
|
||||
return;
|
||||
}
|
||||
this.loading = true
|
||||
|
||||
this.$axios({
|
||||
method: 'post',
|
||||
url: `/api/platform/channel/delete`,
|
||||
data: {
|
||||
channelIds: channels
|
||||
}
|
||||
}).then((res)=> {
|
||||
if (res.data.code === 0) {
|
||||
this.$message.success("保存成功")
|
||||
this.getChannelList()
|
||||
}else {
|
||||
this.$message.error(res.data.msg)
|
||||
}
|
||||
this.loading = false
|
||||
}).catch((error)=> {
|
||||
this.$message.error(error)
|
||||
this.loading = false
|
||||
});
|
||||
},
|
||||
search: function () {
|
||||
this.currentPage = 1;
|
||||
this.total = 0;
|
||||
this.initData();
|
||||
},
|
||||
refresh: function () {
|
||||
this.initData();
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.videoList {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-content: flex-start;
|
||||
}
|
||||
|
||||
.video-item {
|
||||
position: relative;
|
||||
width: 15rem;
|
||||
height: 10rem;
|
||||
margin-right: 1rem;
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
.video-item-img {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.video-item-img:after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
z-index: 2;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
width: 3rem;
|
||||
height: 3rem;
|
||||
background-image: url("../../assets/loading.png");
|
||||
background-size: cover;
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
.video-item-title {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
color: #000000;
|
||||
background-color: #ffffff;
|
||||
line-height: 1.5rem;
|
||||
padding: 0.3rem;
|
||||
width: 14.4rem;
|
||||
}
|
||||
</style>
|
|
@ -154,7 +154,6 @@ export default {
|
|||
this.$refs.channelListTable.doLayout();
|
||||
})
|
||||
}
|
||||
yguop
|
||||
|
||||
}).catch((error)=> {
|
||||
|
||||
|
|
Loading…
Reference in New Issue