合并开源主线
This commit is contained in:
@@ -133,7 +133,7 @@
|
||||
let that = this;
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./record_proxy/${that.mediaServerId}/api/record/list`,
|
||||
url:`/record_proxy/${that.mediaServerId}/api/record/list`,
|
||||
params: {
|
||||
page: that.currentPage,
|
||||
count: that.count
|
||||
@@ -185,7 +185,7 @@
|
||||
let that = this;
|
||||
this.$axios({
|
||||
method: 'delete',
|
||||
url:`./record_proxy/api/record/delete`,
|
||||
url:`/record_proxy/api/record/delete`,
|
||||
params: {
|
||||
page: that.currentPage,
|
||||
count: that.count
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<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}/download.html?url=record/${recordFile.app}/${recordFile.stream}/${chooseDate}/${item}`" target="_blank" />
|
||||
<a class="el-icon-download" style="color: #409EFF;font-weight: 600;margin-left: 10px;" :href="`${getFileBasePath()}/download.html?url=download/${recordFile.app}/${recordFile.stream}/${chooseDate}/${item}`" target="_blank" />
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -76,7 +76,7 @@
|
||||
<li class="task-list-item" v-for="(item, index) in taskListEnded" :key="index">
|
||||
<div class="task-list-item-box" style="height: 2rem;line-height: 2rem;">
|
||||
<span>{{ item.startTime.substr(10) }}-{{item.endTime.substr(10)}}</span>
|
||||
<a class="el-icon-download download-btn" :href="mediaServerPath + '/download.html?url=../' + item.recordFile" target="_blank">
|
||||
<a class="el-icon-download download-btn" :href="getFileBasePath() + '/download.html?url=download/' + item.recordFile" target="_blank">
|
||||
</a>
|
||||
</div>
|
||||
</li>
|
||||
@@ -107,15 +107,15 @@
|
||||
import uiHeader from '../layout/UiHeader.vue'
|
||||
import player from './dialog/easyPlayer.vue'
|
||||
import moment from 'moment'
|
||||
import axios from "axios";
|
||||
export default {
|
||||
name: 'app',
|
||||
components: {
|
||||
uiHeader, player
|
||||
},
|
||||
props: ['recordFile', 'mediaServerId', 'dateFiles', 'mediaServerPath'],
|
||||
props: ['recordFile', 'mediaServerId', 'dateFiles'],
|
||||
data() {
|
||||
return {
|
||||
basePath: `${this.mediaServerPath}`,
|
||||
dateFilesObj: [],
|
||||
detailFiles: [],
|
||||
chooseDate: null,
|
||||
@@ -220,14 +220,18 @@
|
||||
}
|
||||
this.queryRecordDetails(()=>{
|
||||
if (this.detailFiles.length > 0){
|
||||
console.log(this.detailFiles)
|
||||
let timeForFile = this.getTimeForFile(this.detailFiles[0]);
|
||||
let lastTimeForFile = this.getTimeForFile(this.detailFiles[this.detailFiles.length - 1]);
|
||||
let timeNum = timeForFile[0].getTime() - new Date(this.chooseDate + " " + this.timeFormat).getTime()
|
||||
console.log(timeNum)
|
||||
let lastTimeNum = lastTimeForFile[1].getTime() - new Date(this.chooseDate + " " + this.timeFormat).getTime()
|
||||
|
||||
this.playTime = parseInt(timeNum/1000)
|
||||
this.sliderMIn = parseInt(timeNum/1000 - timeNum/1000%(60*60))
|
||||
console.log(this.sliderMIn )
|
||||
this.sliderMax = parseInt(lastTimeNum/1000 - lastTimeNum/1000%(60*60)) + 60*60
|
||||
console.log(this.sliderMax )
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -241,7 +245,7 @@
|
||||
let that = this;
|
||||
that.$axios({
|
||||
method: 'get',
|
||||
url:`./record_proxy/${that.mediaServerId}/api/record/file/list`,
|
||||
url:`/record_proxy/${that.mediaServerId}/api/record/file/list`,
|
||||
params: {
|
||||
app: that.recordFile.app,
|
||||
stream: that.recordFile.stream,
|
||||
@@ -267,13 +271,23 @@
|
||||
if (file == null) {
|
||||
this.videoUrl = "";
|
||||
}else {
|
||||
// TODO 控制列表滚动条
|
||||
this.videoUrl = `${this.basePath}/record/${this.recordFile.app}/${this.recordFile.stream}/${this.chooseDate}/${this.choosedFile}`
|
||||
this.videoUrl = `${this.getFileBasePath()}/download/${this.recordFile.app}/${this.recordFile.stream}/${this.chooseDate}/${this.choosedFile}`
|
||||
|
||||
console.log(this.videoUrl)
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
getFileBasePath(){
|
||||
let basePath = ""
|
||||
if (axios.defaults.baseURL.startsWith("http")) {
|
||||
basePath = `${axios.defaults.baseURL}/record_proxy/${this.mediaServerId}`
|
||||
}else {
|
||||
basePath = `${window.location.origin}${axios.defaults.baseURL}/record_proxy/${this.mediaServerId}`
|
||||
}
|
||||
return basePath;
|
||||
},
|
||||
|
||||
getDataWidth(item){
|
||||
let timeForFile = this.getTimeForFile(item);
|
||||
let result = (timeForFile[2])/((this.sliderMax - this.sliderMIn)*1000)
|
||||
@@ -301,11 +315,12 @@
|
||||
}
|
||||
},
|
||||
getTimeForFile(file){
|
||||
console.log(file)
|
||||
let timeStr = file.substring(0,17);
|
||||
if(timeStr.indexOf("~") > 0){
|
||||
timeStr = timeStr.replaceAll("-",":")
|
||||
}
|
||||
let timeArr = timeStr.split("~");
|
||||
let timeArr = timeStr.split("-");
|
||||
let starTime = new Date(this.chooseDate + " " + timeArr[0]);
|
||||
let endTime = new Date(this.chooseDate + " " + timeArr[1]);
|
||||
if(this.checkIsOver24h(starTime,endTime)){
|
||||
@@ -340,7 +355,7 @@
|
||||
let that = this;
|
||||
this.$axios({
|
||||
method: 'delete',
|
||||
url:`./record_proxy/${that.mediaServerId}/api/record/delete`,
|
||||
url:`/record_proxy/${that.mediaServerId}/api/record/delete`,
|
||||
params: {
|
||||
page: that.currentPage,
|
||||
count: that.count
|
||||
@@ -359,7 +374,7 @@
|
||||
that.dateFilesObj = {};
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./record_proxy/${that.mediaServerId}/api/record/date/list`,
|
||||
url:`/record_proxy/${that.mediaServerId}/api/record/date/list`,
|
||||
params: {
|
||||
app: that.recordFile.app,
|
||||
stream: that.recordFile.stream
|
||||
@@ -408,7 +423,7 @@
|
||||
let that = this;
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./record_proxy/${that.mediaServerId}/api/record/file/download/task/add`,
|
||||
url:`/record_proxy/${that.mediaServerId}/api/record/file/download/task/add`,
|
||||
params: {
|
||||
app: that.recordFile.app,
|
||||
stream: that.recordFile.stream,
|
||||
@@ -433,7 +448,7 @@
|
||||
let that = this;
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./record_proxy/${that.mediaServerId}/api/record/file/download/task/list`,
|
||||
url:`/record_proxy/${that.mediaServerId}/api/record/file/download/task/list`,
|
||||
params: {
|
||||
isEnd: isEnd,
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ export default {
|
||||
this.getDeviceListLoading = true;
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: `./api/device/query/devices`,
|
||||
url: `/api/device/query/devices`,
|
||||
params: {
|
||||
page: this.currentPage,
|
||||
count: this.count
|
||||
@@ -182,7 +182,7 @@ export default {
|
||||
}).then(() => {
|
||||
this.$axios({
|
||||
method: 'delete',
|
||||
url: `./api/device/query/devices/${row.deviceId}/delete`
|
||||
url: `/api/device/query/devices/${row.deviceId}/delete`
|
||||
}).then((res) => {
|
||||
this.getDeviceList();
|
||||
}).catch((error) => {
|
||||
@@ -208,7 +208,7 @@ export default {
|
||||
let that = this;
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: './api/device/query/devices/' + itemData.deviceId + '/sync'
|
||||
url: '/api/device/query/devices/' + itemData.deviceId + '/sync'
|
||||
}).then((res) => {
|
||||
console.log("刷新设备结果:" + JSON.stringify(res));
|
||||
if (res.data.code !== 0) {
|
||||
@@ -242,7 +242,7 @@ export default {
|
||||
await this.$axios({
|
||||
method: 'get',
|
||||
async: false,
|
||||
url: `./api/device/query/${deviceId}/sync_status/`,
|
||||
url: `/api/device/query/${deviceId}/sync_status/`,
|
||||
}).then((res) => {
|
||||
if (res.data.code == 0) {
|
||||
if (res.data.data.errorMsg !== null) {
|
||||
@@ -261,7 +261,7 @@ export default {
|
||||
let that = this;
|
||||
this.$axios({
|
||||
method: 'post',
|
||||
url: './api/device/query/transport/' + row.deviceId + '/' + row.streamMode
|
||||
url: '/api/device/query/transport/' + row.deviceId + '/' + row.streamMode
|
||||
}).then(function (res) {
|
||||
|
||||
}).catch(function (e) {
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
this.detailFiles = [];
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: './api/gb_record/query/' + this.deviceId + '/' + this.channelId + '?startTime=' + this.startTime + '&endTime=' + this.endTime
|
||||
url: '/api/gb_record/query/' + this.deviceId + '/' + this.channelId + '?startTime=' + this.startTime + '&endTime=' + this.endTime
|
||||
}).then((res)=>{
|
||||
this.recordsLoading = false;
|
||||
if(res.data.code === 0) {
|
||||
@@ -249,7 +249,7 @@
|
||||
} else {
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: './api/playback/start/' + this.deviceId + '/' + this.channelId + '?startTime=' + this.startTime + '&endTime=' +
|
||||
url: '/api/playback/start/' + this.deviceId + '/' + this.channelId + '?startTime=' + this.startTime + '&endTime=' +
|
||||
this.endTime
|
||||
}).then((res)=> {
|
||||
if (res.data.code === 0) {
|
||||
@@ -273,7 +273,7 @@
|
||||
console.log('前端控制:播放');
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: './api/playback/resume/' + this.streamId
|
||||
url: '/api/playback/resume/' + this.streamId
|
||||
}).then((res)=> {
|
||||
this.$refs["recordVideoPlayer"].play(this.videoUrl)
|
||||
});
|
||||
@@ -282,14 +282,14 @@
|
||||
console.log('前端控制:暂停');
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: './api/playback/pause/' + this.streamId
|
||||
url: '/api/playback/pause/' + this.streamId
|
||||
}).then(function (res) {});
|
||||
},
|
||||
gbScale(command){
|
||||
console.log('前端控制:倍速 ' + command);
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: `./api/playback/speed/${this.streamId }/${command}`
|
||||
url: `/api/playback/speed/${this.streamId }/${command}`
|
||||
}).then(function (res) {});
|
||||
},
|
||||
downloadRecord: function (row) {
|
||||
@@ -311,7 +311,7 @@
|
||||
}else {
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: './api/gb_record/download/start/' + this.deviceId + '/' + this.channelId + '?startTime=' + row.startTime + '&endTime=' +
|
||||
url: '/api/gb_record/download/start/' + this.deviceId + '/' + this.channelId + '?startTime=' + row.startTime + '&endTime=' +
|
||||
row.endTime + '&downloadSpeed=4'
|
||||
}).then( (res)=> {
|
||||
if (res.data.code === 0) {
|
||||
@@ -332,7 +332,7 @@
|
||||
this.videoUrl = '';
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: './api/gb_record/download/stop/' + this.deviceId + "/" + this.channelId+ "/" + this.streamId
|
||||
url: '/api/gb_record/download/stop/' + this.deviceId + "/" + this.channelId+ "/" + this.streamId
|
||||
}).then((res)=> {
|
||||
if (callback) callback(res)
|
||||
});
|
||||
@@ -342,7 +342,7 @@
|
||||
this.videoUrl = '';
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: './api/playback/stop/' + this.deviceId + "/" + this.channelId + "/" + this.streamId
|
||||
url: '/api/playback/stop/' + this.deviceId + "/" + this.channelId + "/" + this.streamId
|
||||
}).then(function (res) {
|
||||
if (callback) callback()
|
||||
});
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
<script>
|
||||
import crypto from 'crypto'
|
||||
import userService from "./service/UserService";
|
||||
export default {
|
||||
name: 'Login',
|
||||
data(){
|
||||
@@ -81,13 +82,14 @@ export default {
|
||||
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:"./api/user/login",
|
||||
url:"/api/user/login",
|
||||
params: loginParam
|
||||
}).then(function (res) {
|
||||
window.clearTimeout(timeoutTask)
|
||||
console.log(JSON.stringify(res));
|
||||
console.log(res);
|
||||
console.log("登录成功");
|
||||
if (res.data.code === 0 ) {
|
||||
that.$cookies.set("session", {"username": that.username,"roleId":res.data.data.role.id}) ;
|
||||
userService.setUser(res.data.data)
|
||||
//登录成功后
|
||||
that.cancelEnterkeyDefaultAction();
|
||||
that.$router.push('/');
|
||||
@@ -106,14 +108,6 @@ export default {
|
||||
that.isLoging = false;
|
||||
});
|
||||
},
|
||||
setCookie: function (cname, cvalue, exdays) {
|
||||
var d = new Date();
|
||||
d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
|
||||
var expires = "expires=" + d.toUTCString();
|
||||
console.info(cname + "=" + cvalue + "; " + expires);
|
||||
document.cookie = cname + "=" + cvalue + "; " + expires;
|
||||
console.info(document.cookie);
|
||||
},
|
||||
cancelEnterkeyDefaultAction: function() {
|
||||
document.onkeydown = function(e) {
|
||||
var key = window.event.keyCode;
|
||||
|
||||
@@ -128,7 +128,7 @@ export default {
|
||||
var that = this;
|
||||
that.$axios({
|
||||
method: 'delete',
|
||||
url:`./api/platform/delete/${platform.serverGBId}`
|
||||
url:`/api/platform/delete/${platform.serverGBId}`
|
||||
}).then(function (res) {
|
||||
if (res.data.code === 0) {
|
||||
that.$message({
|
||||
@@ -162,7 +162,7 @@ export default {
|
||||
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./api/platform/query/${that.count}/${that.currentPage}`
|
||||
url:`/api/platform/query/${that.count}/${that.currentPage}`
|
||||
}).then(function (res) {
|
||||
if (res.data.code === 0) {
|
||||
that.total = res.data.data.total;
|
||||
|
||||
@@ -171,7 +171,7 @@ export default {
|
||||
this.getDeviceListLoading = true;
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: `./api/push/list`,
|
||||
url: `/api/push/list`,
|
||||
params: {
|
||||
page: that.currentPage,
|
||||
count: that.count,
|
||||
@@ -197,7 +197,7 @@ export default {
|
||||
this.getListLoading = true;
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: './api/push/getPlayUrl',
|
||||
url: '/api/push/getPlayUrl',
|
||||
params: {
|
||||
app: row.app,
|
||||
stream: row.stream,
|
||||
@@ -223,7 +223,7 @@ export default {
|
||||
let that = this;
|
||||
that.$axios({
|
||||
method: "post",
|
||||
url: "./api/push/stop",
|
||||
url: "/api/push/stop",
|
||||
params: {
|
||||
app: row.app,
|
||||
streamId: row.stream
|
||||
@@ -247,7 +247,7 @@ export default {
|
||||
let that = this;
|
||||
that.$axios({
|
||||
method: "delete",
|
||||
url: "./api/push/remove_form_gb",
|
||||
url: "/api/push/remove_form_gb",
|
||||
data: row
|
||||
}).then((res) => {
|
||||
if (res.data.code === 0) {
|
||||
@@ -274,7 +274,7 @@ export default {
|
||||
let that = this;
|
||||
that.$axios({
|
||||
method: "delete",
|
||||
url: "./api/push/batchStop",
|
||||
url: "/api/push/batchStop",
|
||||
data: {
|
||||
gbStreams: this.multipleSelection
|
||||
}
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
let that = this;
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./api/proxy/list`,
|
||||
url:`/api/proxy/list`,
|
||||
params: {
|
||||
page: that.currentPage,
|
||||
count: that.count
|
||||
@@ -190,7 +190,7 @@
|
||||
addOnvif: function(){
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./api/onvif/search?timeout=3000`,
|
||||
url:`/api/onvif/search?timeout=3000`,
|
||||
}).then((res) =>{
|
||||
if (res.data.code === 0 ){
|
||||
if (res.data.data.length > 0) {
|
||||
@@ -218,7 +218,7 @@
|
||||
let that = this;
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./api/push/getPlayUrl`,
|
||||
url:`/api/push/getPlayUrl`,
|
||||
params: {
|
||||
app: row.app,
|
||||
stream: row.stream,
|
||||
@@ -247,7 +247,7 @@
|
||||
let that = this;
|
||||
that.$axios({
|
||||
method:"delete",
|
||||
url:"./api/proxy/del",
|
||||
url:"/api/proxy/del",
|
||||
params:{
|
||||
app: row.app,
|
||||
stream: row.stream
|
||||
@@ -263,7 +263,7 @@
|
||||
this.$set(row, 'startBtnLoading', true)
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./api/proxy/start`,
|
||||
url:`/api/proxy/start`,
|
||||
params: {
|
||||
app: row.app,
|
||||
stream: row.stream
|
||||
@@ -295,7 +295,7 @@
|
||||
let that = this;
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./api/proxy/stop`,
|
||||
url:`/api/proxy/stop`,
|
||||
params: {
|
||||
app: row.app,
|
||||
stream: row.stream
|
||||
|
||||
@@ -99,7 +99,7 @@ export default {
|
||||
this.getUserListLoading = true;
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: `./api/user/users`,
|
||||
url: `/api/user/users`,
|
||||
params: {
|
||||
page: that.currentPage,
|
||||
count: that.count
|
||||
@@ -141,7 +141,7 @@ export default {
|
||||
}).then(() => {
|
||||
this.$axios({
|
||||
method: 'delete',
|
||||
url: `./api/user/delete?id=${row.id}`
|
||||
url: `/api/user/delete?id=${row.id}`
|
||||
}).then((res) => {
|
||||
this.getUserList();
|
||||
}).catch((error) => {
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
<span v-if="scope.row.longitude*scope.row.latitude === 0">无</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="ptztypeText" label="云台类型" min-width="120"/>
|
||||
<el-table-column prop="PTZTypeText" label="云台类型" min-width="120"/>
|
||||
<el-table-column label="开启音频" min-width="120">
|
||||
<template slot-scope="scope">
|
||||
<el-switch @change="updateChannel(scope.row)" v-model="scope.row.hasAudio" active-color="#409EFF">
|
||||
@@ -206,7 +206,7 @@ export default {
|
||||
if (typeof (this.$route.params.deviceId) == "undefined") return;
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: `./api/device/query/devices/${this.$route.params.deviceId}/channels`,
|
||||
url: `/api/device/query/devices/${this.$route.params.deviceId}/channels`,
|
||||
params: {
|
||||
page: that.currentPage,
|
||||
count: that.count,
|
||||
@@ -238,7 +238,7 @@ export default {
|
||||
let that = this;
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: './api/play/start/' + deviceId + '/' + channelId
|
||||
url: '/api/play/start/' + deviceId + '/' + channelId
|
||||
}).then(function (res) {
|
||||
console.log(res)
|
||||
that.isLoging = false;
|
||||
@@ -278,7 +278,7 @@ export default {
|
||||
var that = this;
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: './api/play/stop/' + this.deviceId + "/" + itemData.channelId
|
||||
url: '/api/play/stop/' + this.deviceId + "/" + itemData.channelId
|
||||
}).then(function (res) {
|
||||
that.initData();
|
||||
}).catch(function (error) {
|
||||
@@ -334,7 +334,7 @@ export default {
|
||||
if (!this.showTree) {
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: `./api/device/query/sub_channels/${this.deviceId}/${this.parentChannelId}/channels`,
|
||||
url: `/api/device/query/sub_channels/${this.deviceId}/${this.parentChannelId}/channels`,
|
||||
params: {
|
||||
page: this.currentPage,
|
||||
count: this.count,
|
||||
@@ -358,7 +358,7 @@ export default {
|
||||
}else {
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: `./api/device/query/tree/channel/${this.deviceId}`,
|
||||
url: `/api/device/query/tree/channel/${this.deviceId}`,
|
||||
params: {
|
||||
parentId: this.parentChannelId,
|
||||
page: this.currentPage,
|
||||
@@ -387,7 +387,7 @@ export default {
|
||||
updateChannel: function (row) {
|
||||
this.$axios({
|
||||
method: 'post',
|
||||
url: `./api/device/query/channel/update/${this.deviceId}`,
|
||||
url: `/api/device/query/channel/update/${this.deviceId}`,
|
||||
params: row
|
||||
}).then(function (res) {
|
||||
console.log(JSON.stringify(res));
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<div ref="container" @dblclick="fullscreenSwich" style="width:100%;height:100%;background-color: #000000;margin:0 auto;">
|
||||
<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>
|
||||
@@ -12,7 +13,7 @@
|
||||
<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)"
|
||||
<i class="iconfont icon-camera1196054easyiconnet jessibuca-btn" @click="screenshot"
|
||||
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>
|
||||
@@ -92,29 +93,49 @@ export default {
|
||||
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,
|
||||
autoWasm: true,
|
||||
background: "",
|
||||
controlAutoHide: false,
|
||||
debug: false,
|
||||
supportDblclickFullscreen: false, // 是否支持屏幕的双击事件,触发全屏,取消全屏事件。
|
||||
decoder: "static/js/jessibuca/decoder.js",
|
||||
forceNoOffscreen: true,
|
||||
hasAudio: typeof (this.hasAudio) == "undefined" ? true : this.hasAudio,
|
||||
hasVideo: true,
|
||||
heartTimeout: 5,
|
||||
heartTimeoutReplay: true,
|
||||
heartTimeoutReplayTimes: 3,
|
||||
hiddenAutoPause: false,
|
||||
hotKey: false,
|
||||
isFlv: false,
|
||||
isFullResize: false,
|
||||
isNotMute: this.isNotMute,
|
||||
isResize: false,
|
||||
keepScreenOn: false,
|
||||
loadingText: "请稍等, 视频加载中......",
|
||||
loadingTimeout: 10,
|
||||
loadingTimeoutReplay: true,
|
||||
loadingTimeoutReplayTimes: 3,
|
||||
openWebglAlignment: false,
|
||||
operateBtns: {
|
||||
fullscreen: false,
|
||||
screenshot: false,
|
||||
play: false,
|
||||
audio: false,
|
||||
recorder: false,
|
||||
record: false
|
||||
},
|
||||
record: "record",
|
||||
vod: this.vod,
|
||||
forceNoOffscreen: this.forceNoOffscreen,
|
||||
isNotMute: this.isNotMute,
|
||||
recordType: "webm",
|
||||
rotate: 0,
|
||||
showBandwidth: false,
|
||||
supportDblclickFullscreen: false,
|
||||
timeout: 10,
|
||||
useMSE: location.hostname !== "localhost" && location.protocol !== "https:",
|
||||
useOffscreen: false,
|
||||
useWCS: location.hostname === "localhost" || location.protocol === "https",
|
||||
useWebFullScreen: false,
|
||||
videoBuffer: 0,
|
||||
wasmDecodeAudioSyncVideo: true,
|
||||
wasmDecodeErrorReplay: true,
|
||||
wcsUseVideoRender: true
|
||||
},
|
||||
options
|
||||
));
|
||||
@@ -146,13 +167,7 @@ export default {
|
||||
_this.isNotMute = !msg;
|
||||
});
|
||||
jessibuca.on("audioInfo", function (msg) {
|
||||
// console.log("audioInfo", msg);
|
||||
});
|
||||
|
||||
jessibuca.on("videoInfo", function (msg) {
|
||||
// this.videoInfo = msg;
|
||||
console.log("videoInfo", msg);
|
||||
|
||||
console.log("audioInfo", msg);
|
||||
});
|
||||
|
||||
jessibuca.on("bps", function (bps) {
|
||||
@@ -243,6 +258,11 @@ export default {
|
||||
this.err = "";
|
||||
this.performance = "";
|
||||
},
|
||||
screenshot: function () {
|
||||
if (jessibucaPlayer[this._uid]) {
|
||||
jessibucaPlayer[this._uid].screenshot();
|
||||
}
|
||||
},
|
||||
mute: function () {
|
||||
if (jessibucaPlayer[this._uid]) {
|
||||
jessibucaPlayer[this._uid].mute();
|
||||
|
||||
@@ -114,7 +114,7 @@ export default {
|
||||
getSystemInfo: function (){
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: `./api/server/system/info`,
|
||||
url: `/api/server/system/info`,
|
||||
}).then( (res)=> {
|
||||
if (res.data.code === 0) {
|
||||
this.$refs.consoleCPU.setData(res.data.data.cpu)
|
||||
@@ -128,7 +128,7 @@ export default {
|
||||
getLoad: function (){
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: `./api/server/media_server/load`,
|
||||
url: `/api/server/media_server/load`,
|
||||
}).then( (res)=> {
|
||||
if (res.data.code === 0) {
|
||||
this.$refs.consoleNodeLoad.setData(res.data.data)
|
||||
@@ -139,7 +139,7 @@ export default {
|
||||
getResourceInfo: function (){
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: `./api/server/resource/info`,
|
||||
url: `/api/server/resource/info`,
|
||||
}).then( (res)=> {
|
||||
if (res.data.code === 0) {
|
||||
this.$refs.consoleResource.setData(res.data.data)
|
||||
@@ -151,7 +151,7 @@ export default {
|
||||
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: `./api/server/system/configInfo`,
|
||||
url: `/api/server/system/configInfo`,
|
||||
}).then( (res)=> {
|
||||
console.log(res)
|
||||
if (res.data.code === 0) {
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
<el-switch v-model="mediaServerForm.autoConfig" :disabled="mediaServerForm.defaultServer"></el-switch>
|
||||
</el-form-item>
|
||||
<el-form-item label="收流端口模式" >
|
||||
<el-switch active-text="多端口" inactive-text="单端口" v-model="mediaServerForm.rtpEnable" :disabled="mediaServerForm.defaultServer"></el-switch>
|
||||
<el-switch active-text="多端口" inactive-text="单端口" @change="portRangeChange" v-model="mediaServerForm.rtpEnable" :disabled="mediaServerForm.defaultServer"></el-switch>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item v-if="!mediaServerForm.rtpEnable" label="收流端口" prop="rtpProxyPort">
|
||||
@@ -335,7 +335,7 @@ export default {
|
||||
var that = this;
|
||||
await that.$axios({
|
||||
method: 'get',
|
||||
url:`./api/platform/exit/${deviceGbId}`
|
||||
url:`/api/platform/exit/${deviceGbId}`
|
||||
}).then(function (res) {
|
||||
result = res.data;
|
||||
}).catch(function (error) {
|
||||
@@ -349,8 +349,10 @@ export default {
|
||||
}
|
||||
},
|
||||
portRangeChange: function() {
|
||||
this.mediaServerForm.rtpPortRange = this.rtpPortRange1 + "," + this.rtpPortRange2
|
||||
console.log(this.mediaServerForm.rtpPortRange)
|
||||
if (this.mediaServerForm.rtpEnable) {
|
||||
this.mediaServerForm.rtpPortRange = this.rtpPortRange1 + "," + this.rtpPortRange2
|
||||
console.log(this.mediaServerForm.rtpPortRange)
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
@@ -195,7 +195,7 @@ export default {
|
||||
let that = this;
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./api/platform/query/10000/1`
|
||||
url:`/api/platform/query/10000/1`
|
||||
}).then(function (res) {
|
||||
that.platformList = res.data.data.list;
|
||||
}).catch(function (error) {
|
||||
@@ -212,7 +212,7 @@ export default {
|
||||
if (that.proxyParam.mediaServerId !== "auto"){
|
||||
that.$axios({
|
||||
method: 'get',
|
||||
url:`./api/proxy/ffmpeg_cmd/list`,
|
||||
url:`/api/proxy/ffmpeg_cmd/list`,
|
||||
params: {
|
||||
mediaServerId: that.proxyParam.mediaServerId
|
||||
}
|
||||
@@ -230,7 +230,7 @@ export default {
|
||||
this.noneReaderHandler();
|
||||
this.$axios({
|
||||
method: 'post',
|
||||
url:`./api/proxy/save`,
|
||||
url:`/api/proxy/save`,
|
||||
data: this.proxyParam
|
||||
}).then((res)=> {
|
||||
this.dialogLoading = false;
|
||||
@@ -261,7 +261,7 @@ export default {
|
||||
var that = this;
|
||||
await that.$axios({
|
||||
method: 'get',
|
||||
url:`./api/platform/exit/${deviceGbId}`
|
||||
url:`/api/platform/exit/${deviceGbId}`
|
||||
}).then(function (res) {
|
||||
result = res.data;
|
||||
}).catch(function (error) {
|
||||
|
||||
@@ -55,7 +55,7 @@ export default {
|
||||
getProgress(){
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./api/device/query/${this.deviceId}/sync_status/`,
|
||||
url:`/api/device/query/${this.deviceId}/sync_status/`,
|
||||
}).then((res) => {
|
||||
if (res.data.code === 0) {
|
||||
if (!this.syncFlag) {
|
||||
|
||||
@@ -100,7 +100,7 @@ export default {
|
||||
onSubmit: function () {
|
||||
this.$axios({
|
||||
method: 'post',
|
||||
url: "./api/user/add",
|
||||
url: "/api/user/add",
|
||||
params: {
|
||||
username: this.username,
|
||||
password: this.password,
|
||||
@@ -139,7 +139,7 @@ export default {
|
||||
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: "./api/role/all"
|
||||
url: "/api/role/all"
|
||||
}).then((res) => {
|
||||
this.loading = true;
|
||||
if (res.data.code === 0) {
|
||||
|
||||
@@ -116,7 +116,7 @@ export default {
|
||||
console.log(this.form);
|
||||
this.$axios({
|
||||
method:"post",
|
||||
url:`./api/platform/catalog/${!this.isEdit? "add":"edit"}`,
|
||||
url:`/api/platform/catalog/${!this.isEdit? "add":"edit"}`,
|
||||
data: this.form
|
||||
}).then((res)=> {
|
||||
if (res.data.code === 0) {
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
|
||||
<script>
|
||||
import crypto from 'crypto'
|
||||
import userService from "../service/UserService";
|
||||
export default {
|
||||
name: "changePassword",
|
||||
props: {},
|
||||
@@ -90,7 +91,7 @@ export default {
|
||||
onSubmit: function () {
|
||||
this.$axios({
|
||||
method: 'post',
|
||||
url:"./api/user/changePassword",
|
||||
url:"/api/user/changePassword",
|
||||
params: {
|
||||
oldPassword: crypto.createHash('md5').update(this.oldPassword, "utf8").digest('hex'),
|
||||
password: this.newPassword
|
||||
@@ -105,7 +106,7 @@ export default {
|
||||
this.showDialog = false;
|
||||
setTimeout(()=>{
|
||||
// 删除cookie,回到登录页面
|
||||
this.$cookies.remove("session");
|
||||
userService.clearUserInfo();
|
||||
this.$router.push('/login');
|
||||
this.sseSource.close();
|
||||
},800)
|
||||
|
||||
@@ -85,7 +85,7 @@ export default {
|
||||
onSubmit: function () {
|
||||
this.$axios({
|
||||
method: 'post',
|
||||
url:"./api/user/changePasswordForAdmin",
|
||||
url:"/api/user/changePasswordForAdmin",
|
||||
params: {
|
||||
password: this.newPassword,
|
||||
userId: this.form.id,
|
||||
|
||||
@@ -65,7 +65,7 @@ export default {
|
||||
onSubmit: function () {
|
||||
this.$axios({
|
||||
method: 'post',
|
||||
url:"./api/user/changePushKey",
|
||||
url:"/api/user/changePushKey",
|
||||
params: {
|
||||
pushKey: this.newPushKey,
|
||||
userId: this.form.id,
|
||||
|
||||
@@ -44,7 +44,7 @@ export default {
|
||||
let that = this;
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: './api/play/start/' + deviceId + '/' + channelId
|
||||
url: '/api/play/start/' + deviceId + '/' + channelId
|
||||
}).then(function (res) {
|
||||
that.isLoging = false;
|
||||
if (res.data.code === 0) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div id="chooseChannel" v-loading="isLoging">
|
||||
<div id="chooseChannel" >
|
||||
|
||||
<el-dialog title="选择通道" v-if="showDialog" top="2rem" width="90%" :close-on-click-modal="false" :visible.sync="showDialog" :destroy-on-close="true" @close="close()">
|
||||
<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" >
|
||||
@@ -56,7 +56,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
isLoging: false,
|
||||
loading: false,
|
||||
tabActiveName: "gbChannel",
|
||||
catalogTabActiveName: "catalog",
|
||||
platformId: "",
|
||||
@@ -94,18 +94,17 @@ export default {
|
||||
|
||||
},
|
||||
save: function() {
|
||||
var that = this;
|
||||
|
||||
this.$axios({
|
||||
method:"post",
|
||||
url:"./api/platform/update_channel_for_gb",
|
||||
url:"/api/platform/update_channel_for_gb",
|
||||
data:{
|
||||
platformId: that.platformId,
|
||||
channelReduces: that.chooseData
|
||||
platformId: this.platformId,
|
||||
channelReduces: this.chooseData
|
||||
}
|
||||
}).then((res)=>{
|
||||
if (res.data.code === 0) {
|
||||
that.$message({
|
||||
this.$message({
|
||||
showClose: true,
|
||||
message: '保存成功,',
|
||||
type: 'success'
|
||||
@@ -114,6 +113,7 @@ export default {
|
||||
}).catch(function (error) {
|
||||
console.log(error);
|
||||
});
|
||||
|
||||
},
|
||||
catalogIdChange: function (id, name) {
|
||||
this.catalogId = id;
|
||||
|
||||
@@ -82,7 +82,7 @@ export default {
|
||||
let that = this;
|
||||
this.$axios({
|
||||
method:"get",
|
||||
url:`./api/platform/catalog`,
|
||||
url:`/api/platform/catalog`,
|
||||
params: {
|
||||
platformId: that.platformId,
|
||||
parentId: parentId
|
||||
@@ -134,7 +134,7 @@ export default {
|
||||
removeCatalog: function (id, node){
|
||||
this.$axios({
|
||||
method:"delete",
|
||||
url:`./api/platform/catalog/del`,
|
||||
url:`/api/platform/catalog/del`,
|
||||
params: {
|
||||
id: id,
|
||||
platformId: this.platformId,
|
||||
@@ -156,7 +156,7 @@ export default {
|
||||
setDefaultCatalog: function (id){
|
||||
this.$axios({
|
||||
method:"post",
|
||||
url:`./api/platform/catalog/default/update`,
|
||||
url:`/api/platform/catalog/default/update`,
|
||||
params: {
|
||||
platformId: this.platformId,
|
||||
catalogId: id,
|
||||
@@ -201,7 +201,7 @@ export default {
|
||||
onClick: () => {
|
||||
this.$axios({
|
||||
method:"delete",
|
||||
url:"./api/platform/catalog/relation/del",
|
||||
url:"/api/platform/catalog/relation/del",
|
||||
data: data
|
||||
}).then((res)=>{
|
||||
console.log("移除成功")
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div id="chooseChannelForGb" >
|
||||
<div id="chooseChannelForGb" v-loading="loading">
|
||||
<div style="font-size: 17px; color: #606060; white-space: nowrap; line-height: 30px; font-family: monospace;">
|
||||
<span v-if="catalogId == null">{{catalogName}}的国标通道</span>
|
||||
<span v-if="catalogId != null">{{catalogName}}({{catalogId}})的国标通道</span>
|
||||
@@ -79,6 +79,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
gbChannels: [],
|
||||
gbChoosechannel:{},
|
||||
searchSrt: "",
|
||||
@@ -118,10 +119,12 @@ export default {
|
||||
},
|
||||
add: function (row) {
|
||||
let all = typeof(row) === "undefined"
|
||||
|
||||
this.getCatalogFromUser((catalogId)=> {
|
||||
let task = null;
|
||||
this.$axios({
|
||||
method:"post",
|
||||
url:"./api/platform/update_channel_for_gb",
|
||||
url:"/api/platform/update_channel_for_gb",
|
||||
data:{
|
||||
platformId: this.platformId,
|
||||
all: all,
|
||||
@@ -130,12 +133,20 @@ export default {
|
||||
}
|
||||
}).then((res)=>{
|
||||
console.log("保存成功")
|
||||
window.clearTimeout(task);
|
||||
this.loading = false;
|
||||
this.getChannelList();
|
||||
}).catch(function (error) {
|
||||
}).catch((error)=> {
|
||||
window.clearTimeout(task);
|
||||
this.loading = false;
|
||||
console.log(error);
|
||||
});
|
||||
task= setTimeout(()=>{
|
||||
this.loading = true;
|
||||
}, 200)
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
remove: function (row) {
|
||||
let all = typeof(row) === "undefined"
|
||||
@@ -149,7 +160,7 @@ export default {
|
||||
|
||||
this.$axios({
|
||||
method:"delete",
|
||||
url:"./api/platform/del_channel_for_gb",
|
||||
url:"/api/platform/del_channel_for_gb",
|
||||
data:{
|
||||
platformId: this.platformId,
|
||||
all: all,
|
||||
@@ -248,7 +259,7 @@ export default {
|
||||
|
||||
this.$axios({
|
||||
method:"get",
|
||||
url:`./api/platform/channel_list`,
|
||||
url:`/api/platform/channel_list`,
|
||||
params: {
|
||||
page: that.currentPage,
|
||||
count: that.count,
|
||||
@@ -290,7 +301,7 @@ export default {
|
||||
}).then(() => {
|
||||
this.$axios({
|
||||
method:"delete",
|
||||
url:"./api/platform/del_channel_for_gb",
|
||||
url:"/api/platform/del_channel_for_gb",
|
||||
data:{
|
||||
platformId: this.platformId,
|
||||
channelReduces: this.multipleSelection
|
||||
@@ -310,7 +321,7 @@ export default {
|
||||
|
||||
this.$axios({
|
||||
method: "post",
|
||||
url: "./api/platform/update_channel_for_gb",
|
||||
url: "/api/platform/update_channel_for_gb",
|
||||
data: {
|
||||
platformId: this.platformId,
|
||||
channelReduces: this.multipleSelection,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div id="chooseChannelFoStream" >
|
||||
<div id="chooseChannelFoStream" v-loading="loading">
|
||||
<div style="font-size: 17px; color: #606060; white-space: nowrap; line-height: 30px; font-family: monospace;">
|
||||
<span v-if="catalogId == null">{{catalogName}}的直播通道</span>
|
||||
<span v-if="catalogId != null">{{catalogName}}({{catalogId}})的直播通道</span>
|
||||
@@ -85,6 +85,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
gbStreams: [],
|
||||
gbChoosechannel:{},
|
||||
channelType: "",
|
||||
@@ -132,9 +133,10 @@ export default {
|
||||
add: function (row, scope) {
|
||||
let all = typeof(row) === "undefined"
|
||||
this.getCatalogFromUser((catalogId)=>{
|
||||
let task = null;
|
||||
this.$axios({
|
||||
method:"post",
|
||||
url:"./api/gbStream/add",
|
||||
url:"/api/gbStream/add",
|
||||
data:{
|
||||
platformId: this.platformId,
|
||||
catalogId: catalogId,
|
||||
@@ -143,11 +145,18 @@ export default {
|
||||
}
|
||||
}).then((res)=>{
|
||||
console.log("保存成功")
|
||||
window.clearTimeout(task);
|
||||
this.loading = false;
|
||||
// this.gbStreams.splice(scope.$index,1)
|
||||
this.getChannelList();
|
||||
}).catch(function (error) {
|
||||
window.clearTimeout(task);
|
||||
this.loading = false;
|
||||
console.log(error);
|
||||
});
|
||||
task= setTimeout(()=>{
|
||||
this.loading = true;
|
||||
}, 200)
|
||||
})
|
||||
|
||||
|
||||
@@ -163,7 +172,7 @@ export default {
|
||||
|
||||
this.$axios({
|
||||
method:"delete",
|
||||
url:"./api/gbStream/del",
|
||||
url:"/api/gbStream/del",
|
||||
data:{
|
||||
platformId: this.platformId,
|
||||
all: all,
|
||||
@@ -186,7 +195,7 @@ export default {
|
||||
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./api/gbStream/list`,
|
||||
url:`/api/gbStream/list`,
|
||||
params: {
|
||||
page: that.currentPage,
|
||||
count: that.count,
|
||||
@@ -222,7 +231,7 @@ export default {
|
||||
}).then(() => {
|
||||
this.$axios({
|
||||
method:"delete",
|
||||
url:"./api/gbStream/del",
|
||||
url:"/api/gbStream/del",
|
||||
data:{
|
||||
platformId: this.platformId,
|
||||
gbStreams: this.multipleSelection,
|
||||
@@ -242,7 +251,7 @@ export default {
|
||||
this.getCatalogFromUser((catalogId)=>{
|
||||
this.$axios({
|
||||
method:"post",
|
||||
url:"./api/gbStream/add",
|
||||
url:"/api/gbStream/add",
|
||||
data:{
|
||||
platformId: this.platformId,
|
||||
catalogId: catalogId,
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<el-descriptions title="国标服务信息" v-if="configInfoData.sip" :span="2">
|
||||
<el-descriptions-item label="编号" >{{configInfoData.sip.id}}</el-descriptions-item>
|
||||
<el-descriptions-item label="域">{{configInfoData.sip.domain}}</el-descriptions-item>
|
||||
<el-descriptions-item label="IP">{{configInfoData.sip.ip}}</el-descriptions-item>
|
||||
<el-descriptions-item label="IP">{{configInfoData.sip.showIp}}</el-descriptions-item>
|
||||
<el-descriptions-item label="端口">{{configInfoData.sip.port}}</el-descriptions-item>
|
||||
<el-descriptions-item label="密码">
|
||||
<el-tag size="small">{{configInfoData.sip.password}}</el-tag>
|
||||
|
||||
@@ -69,6 +69,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="其他选项">
|
||||
<el-checkbox label="SSRC校验" v-model="form.ssrcCheck" style="float: left"></el-checkbox>
|
||||
<el-checkbox label="作为消息通道" v-model="form.asMessageChannel" style="float: left"></el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<div style="float: right;">
|
||||
@@ -134,7 +135,7 @@ export default {
|
||||
this.form.mobilePositionSubmissionInterval = this.form.mobilePositionSubmissionInterval||0
|
||||
this.$axios({
|
||||
method: 'post',
|
||||
url:`./api/device/query/device/${this.isEdit?'update':'add'}/`,
|
||||
url:`/api/device/query/device/${this.isEdit?'update':'add'}/`,
|
||||
params: this.form
|
||||
}).then((res) => {
|
||||
console.log(res.data)
|
||||
|
||||
@@ -89,7 +89,7 @@ export default {
|
||||
let that = this;
|
||||
this.$axios({
|
||||
method:"get",
|
||||
url:`./api/platform/catalog`,
|
||||
url:`/api/platform/catalog`,
|
||||
params: {
|
||||
platformId: that.platformId,
|
||||
parentId: parentId
|
||||
@@ -111,7 +111,7 @@ export default {
|
||||
if (node.level === 0) {
|
||||
this.$axios({
|
||||
method:"get",
|
||||
url:`./api/platform/info/` + this.platformId,
|
||||
url:`/api/platform/info/` + this.platformId,
|
||||
})
|
||||
.then((res)=> {
|
||||
if (res.data.code === 0) {
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
drag
|
||||
:action="uploadUrl"
|
||||
name="file"
|
||||
:headers="headers"
|
||||
:on-success="successHook"
|
||||
:on-error="errorHook"
|
||||
>
|
||||
@@ -33,6 +34,8 @@
|
||||
|
||||
import ShowErrorData from './importChannelShowErrorData.vue'
|
||||
|
||||
import userService from "../service/UserService";
|
||||
|
||||
export default {
|
||||
name: "importChannel",
|
||||
components: {
|
||||
@@ -47,7 +50,10 @@ export default {
|
||||
isEdit: false,
|
||||
errorStreams: [],
|
||||
errorGBIds: [],
|
||||
uploadUrl: process.env.NODE_ENV === 'development'?`debug/api/push/upload`:`api/push/upload`,
|
||||
headers: {
|
||||
"access-token": userService.getToken()
|
||||
},
|
||||
uploadUrl: process.env.NODE_ENV === 'development'? `http://127.0.0.1:8080/debug/api/push/upload`: (window.baseUrl ? window.baseUrl : "") + `/api/push/upload`,
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
@@ -60,7 +66,7 @@ export default {
|
||||
console.log(this.form);
|
||||
this.$axios({
|
||||
method:"post",
|
||||
url:`./api/platform/catalog/${!this.isEdit? "add":"edit"}`,
|
||||
url:`/api/platform/catalog/${!this.isEdit? "add":"edit"}`,
|
||||
data: this.form
|
||||
})
|
||||
.then((res)=> {
|
||||
|
||||
@@ -81,7 +81,7 @@ export default {
|
||||
console.log(this.form);
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./api/onvif/rtsp`,
|
||||
url:`/api/onvif/rtsp`,
|
||||
params: {
|
||||
hostname: this.form.hostName,
|
||||
timeout: 3000,
|
||||
|
||||
@@ -96,9 +96,10 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="其他选项">
|
||||
<el-checkbox label="启用" v-model="platform.enable" @change="checkExpires"></el-checkbox>
|
||||
<el-checkbox label="云台控制" v-model="platform.ptz"></el-checkbox>
|
||||
<!-- <el-checkbox label="云台控制" v-model="platform.ptz"></el-checkbox>-->
|
||||
<el-checkbox label="拉起离线推流" v-model="platform.startOfflinePush"></el-checkbox>
|
||||
<el-checkbox label="RTCP保活" v-model="platform.rtcp" @change="rtcpCheckBoxChange"></el-checkbox>
|
||||
<el-checkbox label="作为消息通道" v-model="platform.asMessageChannel" ></el-checkbox>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="onSubmit">{{
|
||||
@@ -138,13 +139,14 @@ export default {
|
||||
showDialog: false,
|
||||
isLoging: false,
|
||||
onSubmit_text: "立即创建",
|
||||
saveUrl: "./api/platform/save",
|
||||
saveUrl: "/api/platform/save",
|
||||
|
||||
platform: {
|
||||
id: null,
|
||||
enable: true,
|
||||
ptz: true,
|
||||
rtcp: false,
|
||||
asMessageChannel: false,
|
||||
name: null,
|
||||
serverGBId: null,
|
||||
serverGBDomain: null,
|
||||
@@ -155,7 +157,7 @@ export default {
|
||||
devicePort: null,
|
||||
username: null,
|
||||
password: null,
|
||||
expires: 300,
|
||||
expires: 3600,
|
||||
keepTimeout: 60,
|
||||
transport: "UDP",
|
||||
characterSet: "GB2312",
|
||||
@@ -192,7 +194,7 @@ export default {
|
||||
this.saveUrl = "/api/platform/add";
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./api/platform/server_config`
|
||||
url:`/api/platform/server_config`
|
||||
}).then(function (res) {
|
||||
console.log(res);
|
||||
if (res.data.code === 0) {
|
||||
@@ -213,6 +215,7 @@ export default {
|
||||
this.platform.enable = platform.enable;
|
||||
this.platform.ptz = platform.ptz;
|
||||
this.platform.rtcp = platform.rtcp;
|
||||
this.platform.asMessageChannel = platform.asMessageChannel;
|
||||
this.platform.name = platform.name;
|
||||
this.platform.serverGBId = platform.serverGBId;
|
||||
this.platform.serverGBDomain = platform.serverGBDomain;
|
||||
@@ -290,6 +293,7 @@ export default {
|
||||
enable: true,
|
||||
ptz: true,
|
||||
rtcp: false,
|
||||
asMessageChannel: false,
|
||||
name: null,
|
||||
serverGBId: null,
|
||||
administrativeDivision: null,
|
||||
@@ -301,7 +305,7 @@ export default {
|
||||
devicePort: null,
|
||||
username: null,
|
||||
password: null,
|
||||
expires: 300,
|
||||
expires: 3600,
|
||||
keepTimeout: 60,
|
||||
transport: "UDP",
|
||||
characterSet: "GB2312",
|
||||
@@ -315,7 +319,7 @@ export default {
|
||||
var that = this;
|
||||
await that.$axios({
|
||||
method: 'get',
|
||||
url:`./api/platform/exit/${deviceGbId}`})
|
||||
url:`/api/platform/exit/${deviceGbId}`})
|
||||
.then(function (res) {
|
||||
if (res.data.code === 0) {
|
||||
result = res.data.data;
|
||||
@@ -327,8 +331,8 @@ export default {
|
||||
return result;
|
||||
},
|
||||
checkExpires: function() {
|
||||
if (this.platform.enable && this.platform.expires == "0") {
|
||||
this.platform.expires = "300";
|
||||
if (this.platform.enable && this.platform.expires === "0") {
|
||||
this.platform.expires = "3600";
|
||||
}
|
||||
},
|
||||
rtcpCheckBoxChange: function (result){
|
||||
|
||||
@@ -109,7 +109,7 @@ export default {
|
||||
if (this.edit) {
|
||||
this.$axios({
|
||||
method:"post",
|
||||
url:`./api/push/save_to_gb`,
|
||||
url:`/api/push/save_to_gb`,
|
||||
data: this.proxyParam
|
||||
}).then( (res) => {
|
||||
if (res.data.code === 0) {
|
||||
@@ -129,7 +129,7 @@ export default {
|
||||
}else {
|
||||
this.$axios({
|
||||
method:"post",
|
||||
url:`./api/push/add`,
|
||||
url:`/api/push/add`,
|
||||
data: this.proxyParam
|
||||
}).then( (res) => {
|
||||
if (res.data.code === 0) {
|
||||
@@ -159,7 +159,7 @@ export default {
|
||||
var that = this;
|
||||
await that.$axios({
|
||||
method:"get",
|
||||
url:`./api/platform/exit/${deviceGbId}`
|
||||
url:`/api/platform/exit/${deviceGbId}`
|
||||
}).then(function (res) {
|
||||
result = res.data;
|
||||
}).catch(function (error) {
|
||||
|
||||
@@ -72,7 +72,7 @@ export default {
|
||||
onSubmit: function () {
|
||||
console.log("onSubmit");
|
||||
this.isLoging = true;
|
||||
let url = `./api/position/history/${this.channel.deviceId}?start=${this.searchFrom}&end=${this.searchTo}`;
|
||||
let url = `/api/position/history/${this.channel.deviceId}?start=${this.searchFrom}&end=${this.searchTo}`;
|
||||
if (this.channel.channelId) {
|
||||
url+="&channelId=${this.channel.channelId}"
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ export default {
|
||||
getProgress: function (callback){
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: `./api/gb_record/download/progress/${this.deviceId}/${this.channelId}/${this.stream}`
|
||||
url: `/api/gb_record/download/progress/${this.deviceId}/${this.channelId}/${this.stream}`
|
||||
}).then((res)=> {
|
||||
console.log(res)
|
||||
if (res.data.code === 0) {
|
||||
@@ -124,7 +124,7 @@ export default {
|
||||
stopDownloadRecord: function (callback) {
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: './api/gb_record/download/stop/' + this.deviceId + "/" + this.channelId+ "/" + this.stream
|
||||
url: '/api/gb_record/download/stop/' + this.deviceId + "/" + this.channelId+ "/" + this.stream
|
||||
}).then((res)=> {
|
||||
if (callback) callback(res)
|
||||
});
|
||||
@@ -132,7 +132,7 @@ export default {
|
||||
getFileDownload: function (){
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./record_proxy/${this.mediaServerId}/api/record/file/download/task/add`,
|
||||
url:`/record_proxy/${this.mediaServerId}/api/record/file/download/task/add`,
|
||||
params: {
|
||||
app: this.app,
|
||||
stream: this.stream,
|
||||
@@ -164,7 +164,7 @@ export default {
|
||||
getProgressForFile: function (callback){
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./record_proxy/${this.mediaServerId}/api/record/file/download/task/list`,
|
||||
url:`/record_proxy/${this.mediaServerId}/api/record/file/download/task/list`,
|
||||
params: {
|
||||
app: this.app,
|
||||
stream: this.stream,
|
||||
|
||||
@@ -135,7 +135,7 @@ export default {
|
||||
this.loading = true
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: './api/play/start/' + deviceId + '/' + channelId
|
||||
url: '/api/play/start/' + deviceId + '/' + channelId
|
||||
}).then(function (res) {
|
||||
if (res.data.code === 0 && res.data.data) {
|
||||
let videoUrl;
|
||||
|
||||
@@ -298,7 +298,7 @@ export default {
|
||||
let that = this;
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: './api/play/start/' + deviceId + '/' + channelId
|
||||
url: '/api/play/start/' + deviceId + '/' + channelId
|
||||
}).then(function (res) {
|
||||
that.isLoging = false;
|
||||
if (res.data.code === 0) {
|
||||
|
||||
@@ -9,7 +9,7 @@ class DeviceService{
|
||||
getDeviceList(currentPage, count, callback, errorCallback){
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./api/device/query/devices`,
|
||||
url:`/api/device/query/devices`,
|
||||
params: {
|
||||
page: currentPage,
|
||||
count: count
|
||||
@@ -25,7 +25,7 @@ class DeviceService{
|
||||
getDevice(deviceId, callback, errorCallback){
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./api/device/query/devices/${deviceId}`,
|
||||
url:`/api/device/query/devices/${deviceId}`,
|
||||
}).then((res) => {
|
||||
if (typeof (callback) == "function") callback(res.data)
|
||||
}).catch((error) => {
|
||||
@@ -82,7 +82,7 @@ class DeviceService{
|
||||
getChanel(isCatalog, catalogUnderDevice, deviceId, currentPage, count, callback, errorCallback) {
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: `./api/device/query/devices/${deviceId}/channels`,
|
||||
url: `/api/device/query/devices/${deviceId}/channels`,
|
||||
params:{
|
||||
page: currentPage,
|
||||
count: count,
|
||||
@@ -121,7 +121,7 @@ class DeviceService{
|
||||
getSubChannel(isCatalog, deviceId, channelId, currentPage, count, callback, errorCallback) {
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: `./api/device/query/sub_channels/${deviceId}/${channelId}/channels`,
|
||||
url: `/api/device/query/sub_channels/${deviceId}/${channelId}/channels`,
|
||||
params:{
|
||||
page: currentPage,
|
||||
count: count,
|
||||
@@ -161,7 +161,7 @@ class DeviceService{
|
||||
}
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url: `./api/device/query/tree/${deviceId}`,
|
||||
url: `/api/device/query/tree/${deviceId}`,
|
||||
params:{
|
||||
page: currentPage,
|
||||
count: count,
|
||||
|
||||
@@ -9,7 +9,7 @@ class MediaServer{
|
||||
getOnlineMediaServerList(callback){
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./api/server/media_server/online/list`,
|
||||
url:`/api/server/media_server/online/list`,
|
||||
}).then((res) => {
|
||||
if (typeof (callback) == "function") callback(res.data)
|
||||
}).catch((error) => {
|
||||
@@ -19,7 +19,7 @@ class MediaServer{
|
||||
getMediaServerList(callback){
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./api/server/media_server/list`,
|
||||
url:`/api/server/media_server/list`,
|
||||
}).then(function (res) {
|
||||
if (typeof (callback) == "function") callback(res.data)
|
||||
}).catch(function (error) {
|
||||
@@ -30,7 +30,7 @@ class MediaServer{
|
||||
getMediaServer(id, callback){
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./api/server/media_server/one/` + id,
|
||||
url:`/api/server/media_server/one/` + id,
|
||||
}).then(function (res) {
|
||||
if (typeof (callback) == "function") callback(res.data)
|
||||
}).catch(function (error) {
|
||||
@@ -41,7 +41,7 @@ class MediaServer{
|
||||
checkServer(param, callback){
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./api/server/media_server/check`,
|
||||
url:`/api/server/media_server/check`,
|
||||
params: {
|
||||
ip: param.ip,
|
||||
port: param.httpPort,
|
||||
@@ -57,7 +57,7 @@ class MediaServer{
|
||||
checkRecordServer(param, callback){
|
||||
this.$axios({
|
||||
method: 'get',
|
||||
url:`./api/server/media_server/record/check`,
|
||||
url:`/api/server/media_server/record/check`,
|
||||
params: {
|
||||
ip: param.ip,
|
||||
port: param.recordAssistPort
|
||||
@@ -72,7 +72,7 @@ class MediaServer{
|
||||
addServer(param, callback){
|
||||
this.$axios({
|
||||
method: 'post',
|
||||
url:`./api/server/media_server/save`,
|
||||
url:`/api/server/media_server/save`,
|
||||
data: param
|
||||
}).then(function (res) {
|
||||
if (typeof (callback) == "function") callback(res.data)
|
||||
@@ -84,7 +84,7 @@ class MediaServer{
|
||||
delete(id, callback) {
|
||||
this.$axios({
|
||||
method: 'delete',
|
||||
url:`./api/server/media_server/delete`,
|
||||
url:`/api/server/media_server/delete`,
|
||||
params: {
|
||||
id: id
|
||||
}
|
||||
|
||||
42
web_src/src/components/service/UserService.js
Normal file
42
web_src/src/components/service/UserService.js
Normal file
@@ -0,0 +1,42 @@
|
||||
|
||||
export default {
|
||||
|
||||
/**
|
||||
* 存储用户信息
|
||||
* @param username
|
||||
* @param token
|
||||
*/
|
||||
setUser(user){
|
||||
localStorage.setItem("wvp-user", JSON.stringify(user));
|
||||
},
|
||||
|
||||
/**
|
||||
* 获取用户
|
||||
*/
|
||||
getUser(){
|
||||
return JSON.parse(localStorage.getItem("wvp-user"));
|
||||
},
|
||||
|
||||
|
||||
/**
|
||||
* 获取登录token
|
||||
*/
|
||||
getToken(){
|
||||
return localStorage.getItem("wvp-token");
|
||||
},
|
||||
|
||||
/**
|
||||
* 清理用户信息
|
||||
*/
|
||||
clearUserInfo(){
|
||||
localStorage.removeItem("wvp-user");
|
||||
localStorage.removeItem("wvp-token");
|
||||
},
|
||||
/**
|
||||
* 更新token
|
||||
* @param header
|
||||
*/
|
||||
setToken(token) {
|
||||
localStorage.setItem("wvp-token", token);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user