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:
@@ -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);
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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: '修改成功,请重新登录',
|
||||
|
||||
@@ -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: '修改成功',
|
||||
|
||||
@@ -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: '修改成功',
|
||||
|
||||
@@ -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: '保存成功,',
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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({
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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: "保存成功",
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user