Merge remote-tracking branch 'origin/wvp-28181-2.0' into wvp-28181-2.0

This commit is contained in:
panlinlin
2021-04-11 15:00:52 +08:00
36 changed files with 548 additions and 150 deletions

View File

@@ -136,7 +136,7 @@
getDeviceList: function() {
let that = this;
this.getDeviceListLoading = true;
this.$axios.get(`/api/devices`,{
this.$axios.get(`/api/device/query/devices`,{
params: {
page: that.currentPage,
count: that.count
@@ -167,13 +167,12 @@
//gb28181平台对接
//刷新设备信息
refDevice: function(itemData) {
///api/devices/{deviceId}/sync
console.log("刷新对应设备:" + itemData.deviceId);
var that = this;
that.$refs[itemData.deviceId + 'refbtn' ].loading = true;
this.$axios({
method: 'post',
url: '/api/devices/' + itemData.deviceId + '/sync'
url: '/api/device/query/devices/' + itemData.deviceId + '/sync'
}).then(function(res) {
console.log("刷新设备结果:"+JSON.stringify(res));
if (!res.data.deviceId) {
@@ -217,7 +216,7 @@
let that = this;
this.$axios({
method: 'get',
url: '/api/devices/' + row.deviceId + '/transport/' + row.streamMode
url: '/api/device/query/transport' + row.deviceId + '/' + row.streamMode
}).then(function(res) {
}).catch(function(e) {

View File

@@ -121,7 +121,7 @@ export default {
},
deletePlatformCommit: function(platform) {
var that = this;
that.$axios.post(`/api/platforms/delete`, platform)
that.$axios.delete(`/api/platform/delete/${platform.serverGBId}`)
.then(function (res) {
if (res.data == "success") {
that.$message({
@@ -155,7 +155,7 @@ export default {
getPlatformList: function() {
let that = this;
this.$axios.get(`/api/platforms/${that.count}/${that.currentPage}`)
this.$axios.get(`/api/platform/query/${that.count}/${that.currentPage}`)
.then(function (res) {
that.total = res.data.total;
that.platformList = res.data.list;

View File

@@ -15,8 +15,6 @@
</el-table-column>
<el-table-column prop="stream" label="流ID" width="240" align="center">
</el-table-column>
<el-table-column prop="totalReaderCount" label="在线人数" width="240" align="center">
</el-table-column>
<el-table-column prop="gbId" label="国标编码" width="150" align="center">
</el-table-column>
<el-table-column label="开始时间" align="center" >

View File

@@ -71,6 +71,10 @@ export default {
},
destroyed() {
window.removeEventListener('beforeunload', e => this.beforeunloadHandler(e))
this.sseSource.removeEventListener('open', null);
this.sseSource.removeEventListener('message', null);
this.sseSource.removeEventListener('error', null);
this.sseSource.close();
// window.removeEventListener('unload', e => this.unloadHandler(e))
},
}

View File

@@ -154,7 +154,7 @@ export default {
getDeviceChannelList: function () {
let that = this;
this.$axios.get(`/api/devices/${this.$route.params.deviceId}/channels`, {
this.$axios.get(`/api/device/query/devices/${this.$route.params.deviceId}/channels`, {
params: {
page: that.currentPage,
count: that.count,
@@ -188,7 +188,7 @@ export default {
let that = this;
this.$axios({
method: 'get',
url: '/api/play/' + deviceId + '/' + channelId
url: '/api/play/start/' + deviceId + '/' + channelId
}).then(function (res) {
console.log(res.data)
let streamId = res.data.streamId;
@@ -216,7 +216,7 @@ export default {
var that = this;
this.$axios({
method: 'post',
url: '/api/play/' + itemData.streamId + '/stop'
url: '/api/play/stop/' + itemData.streamId
}).then(function (res) {
console.log(JSON.stringify(res));
that.initData();
@@ -251,7 +251,7 @@ export default {
showSubchannels: function (channelId) {
let that = this;
this.$axios.get(`/api/subChannels/${this.deviceId}/${this.parentChannelId}/channels`, {
this.$axios.get(`/api/device/query/sub_channels/${this.deviceId}/${this.parentChannelId}/channels`, {
params: {
page: that.currentPage,
count: that.count,
@@ -282,7 +282,7 @@ export default {
console.log(row)
this.$axios({
method: 'post',
url: `/api/channel/update/${this.deviceId}`,
url: `/api/device/query/channel/update/${this.deviceId}`,
params: row
}).then(function (res) {
console.log(JSON.stringify(res));

View File

@@ -171,7 +171,7 @@ export default {
this.endTime = null;
}
let self = this;
this.$axios.get(`/api/positions/${this.deviceId}/history`, {
this.$axios.get(`/api/position/history/${this.deviceId}`, {
params: {
start: self.startTime,
end: self.endTime,
@@ -202,7 +202,7 @@ export default {
this.mapPointList = [];
this.mobilePositionList = [];
let self = this;
this.$axios.get(`/api/positions/${this.deviceId}/latest`)
this.$axios.get(`/api/position/latest/${this.deviceId}`)
.then(function (res) {
console.log(res.data);
self.total = res.data.length;
@@ -226,7 +226,7 @@ export default {
},
subscribeMobilePosition: function() {
let self = this;
this.$axios.get(`/api/positions/${this.deviceId}/subscribe`, {
this.$axios.get(`/api/position/subscribe/${this.deviceId}`, {
params: {
expires: self.expired,
interval: self.interval,
@@ -241,7 +241,7 @@ export default {
},
unSubscribeMobilePosition: function() {
let self = this;
this.$axios.get(`/api/positions/${this.deviceId}/subscribe`, {
this.$axios.get(`/api/position/subscribe/${this.deviceId}`, {
params: {
expires: 0,
interval: self.interval,

View File

@@ -176,7 +176,7 @@ export default {
var result = false;
var that = this;
await that.$axios
.post(`/api/platforms/exit/${deviceGbId}`)
.post(`/api/platform/exit/${deviceGbId}`)
.then(function (res) {
result = res.data;
})

View File

@@ -119,7 +119,7 @@ export default {
var result = false;
var that = this;
await that.$axios
.post(`/api/platforms/exit/${deviceGbId}`)
.post(`/api/platform/exit/${deviceGbId}`)
.then(function (res) {
result = res.data;
})

View File

@@ -72,7 +72,7 @@ export default {
this.$axios({
method:"post",
url:"/api/platforms/updateChannelForGB",
url:"/api/platform/update_channel_for_gb",
data:{
platformId: that.platformId,
channelReduces: that.chooseData

View File

@@ -149,7 +149,7 @@ export default {
if (Object.keys(addData).length >0) {
that.$axios({
method:"post",
url:"/api/platforms/updateChannelForGB",
url:"/api/platform/update_channel_for_gb",
data:{
platformId: that.platformId,
channelReduces: addData
@@ -162,8 +162,8 @@ export default {
}
if (Object.keys(delData).length >0) {
that.$axios({
method:"post",
url:"/api/platforms/delChannelForGB",
method:"delete",
url:"/api/platform/del_channel_for_gb",
data:{
platformId: that.platformId,
channelReduces: delData
@@ -182,7 +182,7 @@ export default {
getChannelList: function () {
let that = this;
this.$axios.get(`/api/platforms/channelList`, {
this.$axios.get(`/api/platform/channel_list`, {
params: {
page: that.currentPage,
count: that.count,

View File

@@ -142,7 +142,7 @@ export default {
if (Object.keys(delData).length >0) {
console.log(delData)
that.$axios({
method:"post",
method:"delete",
url:"/api/gbStream/del",
data:{
gbStreams: delData,
@@ -152,6 +152,7 @@ export default {
}).catch(function (error) {
console.log(error);
});
}
},

View File

@@ -261,7 +261,7 @@ export default {
this.$refs.videoPlayer.pause()
that.$axios({
method: 'post',
url: '/api/play/' + that.streamId + '/convert'
url: '/api/play/convert/' + that.streamId
}).then(function (res) {
if (res.data.code == 0) {
that.convertKey = res.data.key;
@@ -298,7 +298,7 @@ export default {
that.$refs.videoPlayer.pause()
this.$axios({
method: 'post',
url: '/api/play/convert/stop/' + this.convertKey
url: '/api/play/convertStop/' + this.convertKey
}).then(function (res) {
if (res.data.code == 0) {
console.log(res.data.msg)
@@ -393,7 +393,7 @@ export default {
} else {
this.$axios({
method: 'get',
url: '/api/playback/' + this.deviceId + '/' + this.channelId + '?startTime=' + row.startTime + '&endTime=' +
url: '/api/playback/start/' + this.deviceId + '/' + this.channelId + '?startTime=' + row.startTime + '&endTime=' +
row.endTime
}).then(function (res) {
var streamInfo = res.data;
@@ -408,7 +408,7 @@ export default {
this.videoUrl = '';
this.$axios({
method: 'get',
url: '/api/playback/' + this.streamId + '/stop'
url: '/api/playback/stop/' + this.streamId
}).then(function (res) {
if (callback) callback()
});

View File

@@ -75,7 +75,7 @@
</el-form-item>
<el-form-item label="其他选项">
<el-checkbox label="启用" v-model="platform.enable" @change="checkExpires"></el-checkbox>
<el-checkbox label="云台控制" v-model="platform.PTZEnable"></el-checkbox>
<el-checkbox label="云台控制" v-model="platform.ptz"></el-checkbox>
<el-checkbox label="RTCP保活" v-model="platform.rtcp"></el-checkbox>
</el-form-item>
<el-form-item>
@@ -120,28 +120,10 @@ export default {
showDialog: false,
isLoging: false,
onSubmit_text: "立即创建",
// platform: {
// enable: false,
// PTZEnable: true,
// rtcp: false,
// name: null,
// serverGBId: null,
// serverGBDomain: null,
// serverIP: null,
// serverPort: null,
// deviceGBId: null,
// deviceIp: null,
// devicePort: null,
// username: null,
// password: null,
// expires: 300,
// keepTimeout: 60,
// transport: "UDP",
// characterSet: "GB2312",
// },
platform: {
enable: true,
PTZEnable: true,
ptz: true,
rtcp: false,
name: "测试001",
serverGBId: "34020000002000000001",
@@ -182,7 +164,7 @@ export default {
openDialog: function (platform, callback) {
var that = this;
this.$axios
.get(`/api/platforms/serverconfig`)
.get(`/api/platform/server_config`)
.then(function (res) {
console.log(res);
that.platform.deviceGBId = res.data.username;
@@ -207,7 +189,7 @@ export default {
console.log("onSubmit");
var that = this;
that.$axios
.post(`/api/platforms/save`, that.platform)
.post(`/api/platform/save`, that.platform)
.then(function (res) {
console.log(res);
console.log(res.data == "success");
@@ -237,7 +219,7 @@ export default {
var result = false;
var that = this;
await that.$axios
.post(`/api/platforms/exit/${deviceGbId}`)
.post(`/api/platform/exit/${deviceGbId}`)
.then(function (res) {
result = res.data;
})