Merge branch 'wvp-28181-2.0'

# Conflicts:
#	src/main/java/com/genersoft/iot/vmp/service/impl/MediaServerServiceImpl.java
#	src/main/java/com/genersoft/iot/vmp/service/impl/MediaServiceImpl.java
#	src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java
#	src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/play/PlayController.java
#	web_src/src/components/Login.vue
This commit is contained in:
648540858
2022-08-22 16:53:16 +08:00
146 changed files with 2878 additions and 17348 deletions

View File

@@ -125,8 +125,10 @@
}
}).then(function (res) {
console.log(res)
that.total = res.data.data.total;
that.recordList = res.data.data.list;
if (res.data.code === 0) {
that.total = res.data.data.total;
that.recordList = res.data.data.list;
}
that.loading = false;
}).catch(function (error) {
console.log(error);
@@ -174,8 +176,10 @@
}
}).then(function (res) {
console.log(res)
that.total = res.data.data.total;
that.recordList = res.data.data.list;
if (res.data.code === 0) {
that.total = res.data.data.total;
that.recordList = res.data.data.list;
}
}).catch(function (error) {
console.log(error);
});

View File

@@ -15,7 +15,6 @@
<i class="el-icon-video-camera" ></i>
{{ item.substring(0,17)}}
</el-tag>
<!-- <a class="el-icon-download" style="color: #409EFF;font-weight: 600;margin-left: 10px;" :href="`${basePath}/${mediaServerId}/record/${recordFile.app}/${recordFile.stream}/${chooseDate}/${item}`" download />-->
<a class="el-icon-download" style="color: #409EFF;font-weight: 600;margin-left: 10px;" :href="`${basePath}/download.html?url=record/${recordFile.app}/${recordFile.stream}/${chooseDate}/${item}`" target="_blank" />
</li>
</ul>
@@ -250,8 +249,10 @@
count: that.count
}
}).then(function (res) {
that.total = res.data.data.total;
that.detailFiles = that.detailFiles.concat(res.data.data.list);
if (res.data.code === 0) {
that.total = res.data.data.total;
that.detailFiles = that.detailFiles.concat(res.data.data.list);
}
that.loading = false;
if (callback) callback();
}).catch(function (error) {
@@ -320,7 +321,7 @@
count: that.count
}
}).then(function (res) {
if (res.data.code == 0) {
if (res.data.code === 0) {
that.total = res.data.data.total;
that.recordList = res.data.data.list;
}
@@ -390,7 +391,7 @@
endTime: moment(this.taskTimeRange[1]).format('YYYY-MM-DD HH:mm:ss'),
}
}).then(function (res) {
if (res.data.code === 0 && res.data.msg === "success") {
if (res.data.code === 0 ) {
that.showTaskBox = false
that.getTaskList(false);
}else {
@@ -412,7 +413,7 @@
isEnd: isEnd,
}
}).then(function (res) {
if (res.data.code == 0) {
if (res.data.code === 0) {
if (isEnd){
that.taskListEnded = res.data.data;
}else {

View File

@@ -146,22 +146,23 @@ export default {
this.getDeviceList();
},
getDeviceList: function () {
let that = this;
this.getDeviceListLoading = true;
this.$axios({
method: 'get',
url: `/api/device/query/devices`,
params: {
page: that.currentPage,
count: that.count
page: this.currentPage,
count: this.count
}
}).then(function (res) {
that.total = res.data.total;
that.deviceList = res.data.list;
that.getDeviceListLoading = false;
}).catch(function (error) {
}).then( (res)=> {
if (res.data.code === 0) {
this.total = res.data.data.total;
this.deviceList = res.data.data.list;
}
this.getDeviceListLoading = false;
}).catch( (error)=> {
console.error(error);
that.getDeviceListLoading = false;
this.getDeviceListLoading = false;
});
},

View File

@@ -35,7 +35,6 @@
<script>
import crypto from 'crypto'
import Vue from 'vue'
export default {
name: 'Login',
data(){
@@ -85,13 +84,11 @@ export default {
url:"/api/user/login",
params: loginParam
}).then(function (res) {
console.log(res);
console.log(res.data.data);
if (res.data.code == 0 && res.data.msg == "success") {
console.log(JSON.stringify(res));
if (res.data.code === 0 ) {
that.$cookies.set("session", {"username": that.username,"roleId":res.data.data.role.id}) ;
//登录成功后
that.cancelEnterkeyDefaultAction();
Vue.prototype.$loginUser = res.data.data
that.$router.push('/');
}else{
that.isLoging = false;

View File

@@ -127,10 +127,10 @@ export default {
deletePlatformCommit: function(platform) {
var that = this;
that.$axios({
method: 'delete',
url:`/api/platform/delete/${platform.serverGBId}`
method: 'delete',
url:`/api/platform/delete/${platform.serverGBId}`
}).then(function (res) {
if (res.data == "success") {
if (res.data.code === 0) {
that.$message({
showClose: true,
message: '删除成功',
@@ -163,8 +163,11 @@ export default {
method: 'get',
url:`/api/platform/query/${that.count}/${that.currentPage}`
}).then(function (res) {
that.total = res.data.total;
that.platformList = res.data.list;
if (res.data.code === 0) {
that.total = res.data.data.total;
that.platformList = res.data.data.list;
}
}).catch(function (error) {
console.log(error);
});

View File

@@ -180,8 +180,11 @@ export default {
mediaServerId: that.mediaServerId,
}
}).then(function (res) {
that.total = res.data.total;
that.pushList = res.data.list;
if (res.data.code === 0) {
that.total = res.data.data.total;
that.pushList = res.data.data.list;
}
that.getDeviceListLoading = false;
}).catch(function (error) {
console.error(error);
@@ -226,7 +229,7 @@ export default {
streamId: row.stream
}
}).then((res) => {
if (res.data == "success") {
if (res.data.code === 0) {
that.initData()
}
}).catch(function (error) {
@@ -247,7 +250,7 @@ export default {
url: "/api/push/remove_form_gb",
data: row
}).then((res) => {
if (res.data == "success") {
if (res.data.code === 0) {
that.initData()
}
}).catch(function (error) {

View File

@@ -168,12 +168,14 @@
count: that.count
}
}).then(function (res) {
that.total = res.data.total;
for (let i = 0; i < res.data.list.length; i++) {
res.data.list[i]["startBtnLoading"] = false;
if (res.data.code === 0) {
that.total = res.data.data.total;
for (let i = 0; i < res.data.data.list.length; i++) {
res.data.data.list[i]["startBtnLoading"] = false;
}
that.streamProxyList = res.data.data.list;
}
that.streamProxyList = res.data.list;
that.getListLoading = false;
that.getListLoading = false;
}).catch(function (error) {
console.log(error);
that.getListLoading = false;
@@ -190,7 +192,7 @@
url:`/api/onvif/search?timeout=3000`,
}).then((res) =>{
this.getListLoading = false;
if (res.data.code == 0 ){
if (res.data.code === 0 ){
if (res.data.data.length > 0) {
this.$refs.onvifEdit.openDialog(res.data.data, (url)=>{
if (url != null) {
@@ -277,7 +279,7 @@
}).then(function (res) {
that.getListLoading = false;
that.$set(row, 'startBtnLoading', false)
if (res.data == "success"){
if (res.data.code === 0){
that.initData()
}else {
that.$message({

View File

@@ -105,8 +105,10 @@ export default {
count: that.count
}
}).then(function (res) {
that.total = res.data.total;
that.userList = res.data.list;
if (res.data.code === 0) {
that.total = res.data.data.total;
that.userList = res.data.data.list;
}
that.getUserListLoading = false;
}).catch(function (error) {
that.getUserListLoading = false;

View File

@@ -215,12 +215,15 @@ export default {
channelType: that.channelType
}
}).then(function (res) {
that.total = res.data.total;
that.deviceChannelList = res.data.list;
// 防止出现表格错位
that.$nextTick(() => {
that.$refs.channelListTable.doLayout();
})
if (res.data.code === 0) {
that.total = res.data.data.total;
that.deviceChannelList = res.data.data.list;
// 防止出现表格错位
that.$nextTick(() => {
that.$refs.channelListTable.doLayout();
})
}
}).catch(function (error) {
console.log(error);
});
@@ -339,12 +342,15 @@ export default {
channelType: this.channelType
}
}).then( (res) =>{
this.total = res.data.total;
this.deviceChannelList = res.data.list;
// 防止出现表格错位
this.$nextTick(() => {
this.$refs.channelListTable.doLayout();
})
if (res.data.code === 0) {
this.total = res.data.data.total;
this.deviceChannelList = res.data.data.list;
// 防止出现表格错位
this.$nextTick(() => {
this.$refs.channelListTable.doLayout();
})
}
}).catch(function (error) {
console.log(error);
});
@@ -358,12 +364,14 @@ export default {
count: this.count,
}
}).then((res)=> {
this.total = res.data.total;
this.deviceChannelList = res.data.list;
// 防止出现表格错位
this.$nextTick(() => {
this.$refs.channelListTable.doLayout();
})
if (res.data.code === 0) {
this.total = res.data.total;
this.deviceChannelList = res.data.list;
// 防止出现表格错位
this.$nextTick(() => {
this.$refs.channelListTable.doLayout();
})
}
}).catch(function (error) {
console.log(error);
});

View File

@@ -0,0 +1,327 @@
<template>
<div ref="container" @dblclick="fullscreenSwich" style="width:100%;height:100%;background-color: #000000;margin:0 auto;">
<div class="buttons-box" id="buttonsBox">
<div class="buttons-box-left">
<i v-if="!playing" class="iconfont icon-play jessibuca-btn" @click="playBtnClick"></i>
<i v-if="playing" class="iconfont icon-pause jessibuca-btn" @click="pause"></i>
<i class="iconfont icon-stop jessibuca-btn" @click="destroy"></i>
<i v-if="isNotMute" class="iconfont icon-audio-high jessibuca-btn" @click="mute()"></i>
<i v-if="!isNotMute" class="iconfont icon-audio-mute jessibuca-btn" @click="cancelMute()"></i>
</div>
<div class="buttons-box-right">
<span class="jessibuca-btn">{{ kBps }} kb/s</span>
<!-- <i class="iconfont icon-file-record1 jessibuca-btn"></i>-->
<!-- <i class="iconfont icon-xiangqing2 jessibuca-btn" ></i>-->
<i class="iconfont icon-camera1196054easyiconnet jessibuca-btn" @click="jessibuca.screenshot('截图','png',0.5)"
style="font-size: 1rem !important"></i>
<i class="iconfont icon-shuaxin11 jessibuca-btn" @click="playBtnClick"></i>
<i v-if="!fullscreen" class="iconfont icon-weibiaoti10 jessibuca-btn" @click="fullscreenSwich"></i>
<i v-if="fullscreen" class="iconfont icon-weibiaoti11 jessibuca-btn" @click="fullscreenSwich"></i>
</div>
</div>
</div>
</template>
<script>
let jessibucaPlayer = {};
export default {
name: 'jessibuca',
data() {
return {
playing: false,
isNotMute: false,
quieting: false,
fullscreen: false,
loaded: false, // mute
speed: 0,
performance: "", // 工作情况
kBps: 0,
btnDom: null,
videoInfo: null,
volume: 1,
rotate: 0,
vod: true, // 点播
forceNoOffscreen: false,
};
},
props: ['videoUrl', 'error', 'hasAudio', 'height'],
mounted() {
window.onerror = (msg) => {
// console.error(msg)
};
console.log(this._uid)
let paramUrl = decodeURIComponent(this.$route.params.url)
this.$nextTick(() => {
this.updatePlayerDomSize()
window.onresize = () => {
this.updatePlayerDomSize()
}
if (typeof (this.videoUrl) == "undefined") {
this.videoUrl = paramUrl;
}
this.btnDom = document.getElementById("buttonsBox");
console.log("初始化时的地址为: " + this.videoUrl)
this.play(this.videoUrl)
})
},
watch: {
videoUrl(newData, oldData) {
this.play(newData)
},
immediate: true
},
methods: {
updatePlayerDomSize() {
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)
if (height > clientHeight) {
height = clientHeight
width = (16 / 9) * height
}
dom.style.width = width + 'px';
dom.style.height = height + "px";
},
create() {
let options = {};
console.log("hasAudio " + this.hasAudio)
jessibucaPlayer[this._uid] = new window.Jessibuca(Object.assign(
{
container: this.$refs.container,
videoBuffer: 0.2, // 最大缓冲时长,单位秒
isResize: true,
decoder: "static/js/jessibuca/decoder.js",
useMSE: false,
showBandwidth: false,
isFlv: true,
// text: "WVP-PRO",
// background: "static/images/zlm-logo.png",
loadingText: "加载中",
hasAudio: typeof (this.hasAudio) == "undefined" ? true : this.hasAudio,
debug: false,
supportDblclickFullscreen: false, // 是否支持屏幕的双击事件,触发全屏,取消全屏事件。
operateBtns: {
fullscreen: false,
screenshot: false,
play: false,
audio: false,
recorder: false,
},
record: "record",
vod: this.vod,
forceNoOffscreen: this.forceNoOffscreen,
isNotMute: this.isNotMute,
},
options
));
let jessibuca = jessibucaPlayer[this._uid];
let _this = this;
jessibuca.on("load", function () {
console.log("on load init");
});
jessibuca.on("log", function (msg) {
console.log("on log", msg);
});
jessibuca.on("record", function (msg) {
console.log("on record:", msg);
});
jessibuca.on("pause", function () {
_this.playing = false;
});
jessibuca.on("play", function () {
_this.playing = true;
});
jessibuca.on("fullscreen", function (msg) {
console.log("on fullscreen", msg);
_this.fullscreen = msg
});
jessibuca.on("mute", function (msg) {
console.log("on mute", msg);
_this.isNotMute = !msg;
});
jessibuca.on("audioInfo", function (msg) {
// console.log("audioInfo", msg);
});
jessibuca.on("videoInfo", function (msg) {
// this.videoInfo = msg;
console.log("videoInfo", msg);
});
jessibuca.on("bps", function (bps) {
// console.log('bps', bps);
});
let _ts = 0;
jessibuca.on("timeUpdate", function (ts) {
// console.log('timeUpdate,old,new,timestamp', _ts, ts, ts - _ts);
_ts = ts;
});
jessibuca.on("videoInfo", function (info) {
console.log("videoInfo", info);
});
jessibuca.on("error", function (error) {
console.log("error", error);
});
jessibuca.on("timeout", function () {
console.log("timeout");
});
jessibuca.on('start', function () {
console.log('start');
})
jessibuca.on("performance", function (performance) {
let show = "卡顿";
if (performance === 2) {
show = "非常流畅";
} else if (performance === 1) {
show = "流畅";
}
_this.performance = show;
});
jessibuca.on('buffer', function (buffer) {
// console.log('buffer', buffer);
})
jessibuca.on('stats', function (stats) {
// console.log('stats', stats);
})
jessibuca.on('kBps', function (kBps) {
_this.kBps = Math.round(kBps);
});
// 显示时间戳 PTS
jessibuca.on('videoFrame', function () {
})
//
jessibuca.on('metadata', function () {
});
},
playBtnClick: function (event) {
this.play(this.videoUrl)
},
play: function (url) {
console.log(url)
if (jessibucaPlayer[this._uid]) {
this.destroy();
}
this.create();
jessibucaPlayer[this._uid].on("play", () => {
this.playing = true;
this.loaded = true;
this.quieting = jessibuca.quieting;
});
if (jessibucaPlayer[this._uid].hasLoaded()) {
jessibucaPlayer[this._uid].play(url);
} else {
jessibucaPlayer[this._uid].on("load", () => {
console.log("load 播放")
jessibucaPlayer[this._uid].play(url);
});
}
},
pause: function () {
if (jessibucaPlayer[this._uid]) {
jessibucaPlayer[this._uid].pause();
}
this.playing = false;
this.err = "";
this.performance = "";
},
mute: function () {
if (jessibucaPlayer[this._uid]) {
jessibucaPlayer[this._uid].mute();
}
},
cancelMute: function () {
if (jessibucaPlayer[this._uid]) {
jessibucaPlayer[this._uid].cancelMute();
}
},
destroy: function () {
if (jessibucaPlayer[this._uid]) {
jessibucaPlayer[this._uid].destroy();
}
if (document.getElementById("buttonsBox") == null) {
this.$refs.container.appendChild(this.btnDom)
}
jessibucaPlayer[this._uid] = null;
this.playing = false;
this.err = "";
this.performance = "";
},
eventcallbacK: function (type, message) {
// console.log("player 事件回调")
// console.log(type)
// console.log(message)
},
fullscreenSwich: function () {
let isFull = this.isFullscreen()
jessibucaPlayer[this._uid].setFullscreen(!isFull)
this.fullscreen = !isFull;
},
isFullscreen: function () {
return document.fullscreenElement ||
document.msFullscreenElement ||
document.mozFullScreenElement ||
document.webkitFullscreenElement || false;
}
},
destroyed() {
if (jessibucaPlayer[this._uid]) {
jessibucaPlayer[this._uid].destroy();
}
this.playing = false;
this.loaded = false;
this.performance = "";
},
}
</script>
<style>
.buttons-box {
width: 100%;
height: 28px;
background-color: rgba(43, 51, 63, 0.7);
position: absolute;
display: -webkit-box;
display: -ms-flexbox;
display: flex;
left: 0;
bottom: 0;
user-select: none;
z-index: 10;
}
.jessibuca-btn {
width: 20px;
color: rgb(255, 255, 255);
line-height: 27px;
margin: 0px 10px;
padding: 0px 2px;
cursor: pointer;
text-align: center;
font-size: 0.8rem !important;
}
.buttons-box-right {
position: absolute;
right: 0;
}
</style>

View File

@@ -329,7 +329,7 @@ export default {
method: 'get',
url: '/zlm/' + that.mediaServerChoose + '/index/api/getThreadsLoad'
}).then(function (res) {
if (res.data.code == 0) {
if (res.data.code === 0) {
that.tableOption.xAxis.data.push(new Date().toLocaleTimeString('chinese', {
hour12: false
}));
@@ -554,7 +554,7 @@ export default {
url: '/zlm/' + that.mediaServerChoose + '/index/api/restartServer'
}).then(function (res) {
that.getAllSession();
if (res.data.code == 0) {
if (res.data.code === 0) {
that.$message({
type: 'success',
message: '操作完成'

View File

@@ -200,7 +200,7 @@ export default {
method: 'get',
url:`/api/platform/query/10000/1`
}).then(function (res) {
that.platformList = res.data.list;
that.platformList = res.data.data.list;
}).catch(function (error) {
console.log(error);
});

View File

@@ -57,7 +57,7 @@ export default {
method: 'get',
url:`/api/device/query/${this.deviceId}/sync_status/`,
}).then((res) => {
if (res.data.code == 0) {
if (res.data.code === 0) {
if (!this.syncFlag) {
this.syncFlag = true;
}

View File

@@ -142,13 +142,8 @@ export default {
url: "/api/role/all"
}).then((res) => {
this.loading = true;
console.info(res)
res.data
console.info(res.data.code)
if (res.data.code === 0) {
console.info(res.data.data)
this.options=res.data.data
}
}).catch((error) => {
console.error(error)

View File

@@ -118,8 +118,7 @@ export default {
method:"post",
url:`/api/platform/catalog/${!this.isEdit? "add":"edit"}`,
data: this.form
})
.then((res)=> {
}).then((res)=> {
if (res.data.code === 0) {
if (this.submitCallback)this.submitCallback(this.form)
}else {

View File

@@ -96,7 +96,7 @@ export default {
password: this.newPassword
}
}).then((res)=> {
if (res.data === "success"){
if (res.data.code === 0) {
this.$message({
showClose: true,
message: '修改成功,请重新登录',

View File

@@ -91,7 +91,7 @@ export default {
userId: this.form.id,
}
}).then((res)=> {
if (res.data === "success"){
if (res.data.code === 0) {
this.$message({
showClose: true,
message: '修改成功',

View File

@@ -71,8 +71,7 @@ export default {
userId: this.form.id,
}
}).then((res)=> {
console.log(res.data)
if (res.data.msg === "success"){
if (res.data.code === 0) {
this.$message({
showClose: true,
message: '修改成功',

View File

@@ -101,7 +101,7 @@ export default {
channelReduces: that.chooseData
}
}).then((res)=>{
if (res.data == true) {
if (res.data.code === 0) {
that.$message({
showClose: true,
message: '保存成功,',

View File

@@ -87,8 +87,7 @@ export default {
platformId: that.platformId,
parentId: parentId
}
})
.then((res)=> {
}).then((res)=> {
if (res.data.code === 0) {
if (typeof(callback) === 'function') {
callback(res.data.data)
@@ -140,8 +139,7 @@ export default {
id: id,
platformId: this.platformId,
}
})
.then((res) => {
}).then((res) => {
if (res.data.code === 0) {
console.log("移除成功")
node.parent.loaded = false
@@ -163,8 +161,7 @@ export default {
platformId: this.platformId,
catalogId: id,
}
})
.then((res)=> {
}).then((res)=> {
if (res.data.code === 0) {
this.defaultCatalogIdSign = id;
}

View File

@@ -243,15 +243,16 @@ export default {
}
})
.then(function (res) {
that.total = res.data.total;
that.gbChannels = res.data.list;
if (res.data.code === 0 ) {
that.total = res.data.data.total;
that.gbChannels = res.data.data.list;
that.gbChoosechannel = {};
// 防止出现表格错位
that.$nextTick(() => {
that.$refs.gbChannelsTable.doLayout();
that.eventEnable = true;
})
console.log(that.gbChoosechannel)
}
// 防止出现表格错位
that.$nextTick(() => {
that.$refs.gbChannelsTable.doLayout();
that.eventEnable = true;
})
})
.catch(function (error) {
console.log(error);

View File

@@ -180,15 +180,17 @@ export default {
}
})
.then(function (res) {
that.total = res.data.total;
that.gbStreams = res.data.list;
that.gbChoosechannel = {};
// 防止出现表格错位
that.$nextTick(() => {
if (res.data.code === 0) {
that.total = res.data.data.total;
that.gbStreams = res.data.data.list;
that.gbChoosechannel = {};
// 防止出现表格错位
that.$nextTick(() => {
that.$refs.gbStreamsTable.doLayout();
// 默认选中
that.eventEnable = true;
})
that.eventEnable = true;
})
}
})
.catch(function (error) {
console.log(error);

View File

@@ -125,7 +125,7 @@ export default {
params: this.form
}).then((res) => {
console.log(res.data)
if (res.data.code == 0) {
if (res.data.code === 0) {
this.listChangeCallback()
}else {
this.$message({

View File

@@ -453,6 +453,7 @@ export default {
this.playFromStreamInfo(false, streamInfo)
},
getUrlByStreamInfo(){
console.log(this.streamInfo)
if (location.protocol === "https:") {
this.videoUrl = this.streamInfo[this.player[this.activePlayer][1]]
}else {
@@ -467,9 +468,9 @@ export default {
this.$refs[this.activePlayer].pause()
that.$axios({
method: 'post',
url: '/api/gb_record/convert/' + that.streamId
url: '/api/play/convert/' + that.streamId
}).then(function (res) {
if (res.data.code == 0) {
if (res.data.code === 0) {
that.convertKey = res.data.key;
setTimeout(()=>{
that.isLoging = false;
@@ -623,13 +624,15 @@ export default {
url: '/api/playback/start/' + this.deviceId + '/' + this.channelId + '?startTime=' + row.startTime + '&endTime=' +
row.endTime
}).then(function (res) {
that.streamInfo = res.data;
if (res.data.code === 0) {
that.streamInfo = res.data.data;
that.app = that.streamInfo.app;
that.streamId = that.streamInfo.stream;
that.mediaServerId = that.streamInfo.mediaServerId;
that.ssrc = that.streamInfo.ssrc;
that.videoUrl = that.getUrlByStreamInfo();
that.recordPlay = true;
}
that.recordPlay = true;
});
}
},

View File

@@ -90,7 +90,7 @@ export default {
}
}).then((res) => {
console.log(res.data)
if (res.data.code == 0) {
if (res.data.code === 0) {
if (res.data.data != null) {
this.listChangeCallback(res.data.data)
}else {

View File

@@ -194,13 +194,16 @@ export default {
url:`/api/platform/server_config`
}).then(function (res) {
console.log(res);
that.platform.deviceGBId = res.data.username;
that.platform.deviceIp = res.data.deviceIp;
that.platform.devicePort = res.data.devicePort;
that.platform.username = res.data.username;
that.platform.password = res.data.password;
that.platform.treeType = "BusinessGroup";
that.platform.administrativeDivision = res.data.username.substr(0, 6);
if (res.data.code === 0) {
that.platform.deviceGBId = res.data.data.username;
that.platform.deviceIp = res.data.data.deviceIp;
that.platform.devicePort = res.data.data.devicePort;
that.platform.username = res.data.data.username;
that.platform.password = res.data.data.password;
that.platform.treeType = "BusinessGroup";
that.platform.administrativeDivision = res.data.data.username.substr(0, 6);
}
}).catch(function (error) {
console.log(error);
});
@@ -328,7 +331,9 @@ export default {
method: 'post',
url:`/api/platform/exit/${deviceGbId}`})
.then(function (res) {
result = res.data;
if (res.data.code === 0) {
result = res.data.data;
}
})
.catch(function (error) {
console.log(error);

View File

@@ -112,7 +112,7 @@ export default {
url:`/api/push/save_to_gb`,
data: this.proxyParam
}).then( (res) => {
if (res.data == "success") {
if (res.data.code === 0) {
this.$message({
showClose: true,
message: "保存成功",

View File

@@ -84,15 +84,16 @@ export default {
method: 'get',
url: `/api/gb_record/download/progress/${this.deviceId}/${this.channelId}/${this.stream}`
}).then((res)=> {
console.log(res)
console.log(res.data.progress)
this.streamInfo = res.data;
if (parseFloat(res.data.progress) == 1) {
this.percentage = 100;
}else {
this.percentage = (res.data.progress*100).toFixed(1);
if (res.data.code === 0) {
this.streamInfo = res.data.data;
if (parseFloat(res.data.progress) == 1) {
this.percentage = 100;
}else {
this.percentage = (res.data.progress*100).toFixed(1);
}
if (callback)callback();
}
if (callback)callback();
}).catch((e) =>{
});
@@ -140,7 +141,7 @@ export default {
endTime: null,
}
}).then((res) =>{
if (res.data.code === 0 && res.data.msg === "success") {
if (res.data.code === 0 ) {
// 查询进度
this.title = "录像文件处理中..."
this.taskId = res.data.data;
@@ -173,7 +174,7 @@ export default {
}
}).then((res) => {
console.log(res)
if (res.data.code == 0) {
if (res.data.code === 0) {
this.percentage = parseFloat(res.data.data.percentage)*100
if (res.data.data[0].percentage === '1') {
this.getProgressForFileRun = false;

View File

@@ -137,10 +137,7 @@ export default {
method: 'get',
url: '/api/play/start/' + deviceId + '/' + channelId
}).then(function (res) {
// that.isLoging = false;
console.log('=====----=====')
console.log(res)
if (res.data.code == 0 && res.data.data) {
if (res.data.code === 0 && res.data.data) {
itemData.playUrl = res.data.data.httpsFlv
that.setPlayUrl(res.data.data.ws_flv, idxTmp)
} else {

View File

@@ -302,7 +302,6 @@ export default {
}).then(function (res) {
that.isLoging = false;
if (res.data.code === 0) {
that.$refs.devicePlayer.openDialog("media", deviceId, channelId, {
streamInfo: res.data.data,
hasAudio: channel.hasAudio

View File

@@ -43,10 +43,10 @@ class DeviceService{
getAllDeviceListIteration(deviceList, currentPage, count, callback, endCallback, errorCallback) {
this.getDeviceList(currentPage, count, (data) => {
if (data.list) {
if (typeof (callback) == "function") callback(data.list)
deviceList = deviceList.concat(data.list);
if (deviceList.length < data.total) {
if (data.code === 0 && data.data.list) {
if (typeof (callback) == "function") callback(data.data.list)
deviceList = deviceList.concat(data.data.list);
if (deviceList.length < data.data.total) {
currentPage ++
this.getAllDeviceListIteration(deviceList, currentPage, count, callback, endCallback, errorCallback)
}else {
@@ -134,10 +134,6 @@ class DeviceService{
}).catch(errorCallback);
}
getTree(deviceId, id, param3, param4) {
}
getTree(deviceId, parentId, onlyCatalog, callback, endCallback, errorCallback) {
let currentPage = 1;
let count = 100;
@@ -147,10 +143,10 @@ class DeviceService{
getTreeIteration(deviceId, parentId, onlyCatalog, catalogList, currentPage, count, callback, endCallback, errorCallback) {
this.getTreeInfo(deviceId, parentId, onlyCatalog, currentPage, count, (data) => {
if (data.list) {
if (typeof (callback) == "function") callback(data.list)
catalogList = catalogList.concat(data.list);
if (catalogList.length < data.total) {
if (data.code === 0 && data.data.list) {
if (typeof (callback) == "function") callback(data.data.list)
catalogList = catalogList.concat(data.data.list);
if (catalogList.length < data.data.total) {
currentPage ++
this.getTreeIteration(deviceId, parentId, onlyCatalog, catalogList, currentPage, count, callback, endCallback, errorCallback)
}else {