[RPC 云端录像] 修复服务ID 获取
parent
32e90b2537
commit
874733fa2c
|
@ -116,6 +116,7 @@ public class CloudRecordServiceImpl implements ICloudRecordService {
|
||||||
@EventListener
|
@EventListener
|
||||||
public void onApplicationEvent(MediaRecordMp4Event event) {
|
public void onApplicationEvent(MediaRecordMp4Event event) {
|
||||||
CloudRecordItem cloudRecordItem = CloudRecordItem.getInstance(event);
|
CloudRecordItem cloudRecordItem = CloudRecordItem.getInstance(event);
|
||||||
|
cloudRecordItem.setServerId(userSetting.getServerId());
|
||||||
if (ObjectUtils.isEmpty(cloudRecordItem.getCallId())) {
|
if (ObjectUtils.isEmpty(cloudRecordItem.getCallId())) {
|
||||||
StreamAuthorityInfo streamAuthorityInfo = redisCatchStorage.getStreamAuthorityInfo(event.getApp(), event.getStream());
|
StreamAuthorityInfo streamAuthorityInfo = redisCatchStorage.getStreamAuthorityInfo(event.getApp(), event.getStream());
|
||||||
if (streamAuthorityInfo != null) {
|
if (streamAuthorityInfo != null) {
|
||||||
|
|
|
@ -21,6 +21,7 @@ public interface CloudRecordServiceMapper {
|
||||||
" folder," +
|
" folder," +
|
||||||
" file_path," +
|
" file_path," +
|
||||||
" file_size," +
|
" file_size," +
|
||||||
|
" server_id," +
|
||||||
" time_len ) " +
|
" time_len ) " +
|
||||||
"VALUES (" +
|
"VALUES (" +
|
||||||
" #{app}," +
|
" #{app}," +
|
||||||
|
@ -33,6 +34,7 @@ public interface CloudRecordServiceMapper {
|
||||||
" #{folder}," +
|
" #{folder}," +
|
||||||
" #{filePath}," +
|
" #{filePath}," +
|
||||||
" #{fileSize}," +
|
" #{fileSize}," +
|
||||||
|
" #{serverId}," +
|
||||||
" #{timeLen})" +
|
" #{timeLen})" +
|
||||||
" </script>")
|
" </script>")
|
||||||
int add(CloudRecordItem cloudRecordItem);
|
int add(CloudRecordItem cloudRecordItem);
|
||||||
|
|
|
@ -65,8 +65,8 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="时长">
|
<el-table-column label="时长">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<el-tag v-if="serverId !== scope.row.serverId" style="border-color: #ecf1af">{{formatTime(scope.row.timeLen)}}</el-tag>
|
<el-tag v-if="Vue.prototype.$myServerId !== scope.row.serverId" style="border-color: #ecf1af">{{formatTime(scope.row.timeLen)}}</el-tag>
|
||||||
<el-tag v-if="serverId === scope.row.serverId">{{formatTime(scope.row.timeLen)}}</el-tag>
|
<el-tag v-if="Vue.prototype.$myServerId === scope.row.serverId">{{formatTime(scope.row.timeLen)}}</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="fileName" label="文件名称">
|
<el-table-column prop="fileName" label="文件名称">
|
||||||
|
@ -135,7 +135,6 @@ export default {
|
||||||
mediaServerPath: null, // 媒体服务地址
|
mediaServerPath: null, // 媒体服务地址
|
||||||
recordList: [], // 设备列表
|
recordList: [], // 设备列表
|
||||||
chooseRecord: null, // 媒体服务
|
chooseRecord: null, // 媒体服务
|
||||||
serverId: this.$myServerId,
|
|
||||||
updateLooper: 0, //数据刷新轮训标志
|
updateLooper: 0, //数据刷新轮训标志
|
||||||
winHeight: window.innerHeight - 250,
|
winHeight: window.innerHeight - 250,
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
|
|
|
@ -56,8 +56,8 @@
|
||||||
<el-table-column label="状态" min-width="100">
|
<el-table-column label="状态" min-width="100">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<div slot="reference" class="name-wrapper">
|
<div slot="reference" class="name-wrapper">
|
||||||
<el-tag size="medium" v-if="scope.row.onLine && serverId !== scope.row.serverId" style="border-color: #ecf1af">在线</el-tag>
|
<el-tag size="medium" v-if="scope.row.onLine && Vue.prototype.$myServerId !== scope.row.serverId" style="border-color: #ecf1af">在线</el-tag>
|
||||||
<el-tag size="medium" v-if="scope.row.onLine && serverId === scope.row.serverId">在线</el-tag>
|
<el-tag size="medium" v-if="scope.row.onLine && Vue.prototype.$myServerId === scope.row.serverId">在线</el-tag>
|
||||||
<el-tag size="medium" type="info" v-if="!scope.row.onLine">离线</el-tag>
|
<el-tag size="medium" type="info" v-if="!scope.row.onLine">离线</el-tag>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -122,6 +122,7 @@ import uiHeader from '../layout/UiHeader.vue'
|
||||||
import deviceEdit from './dialog/deviceEdit.vue'
|
import deviceEdit from './dialog/deviceEdit.vue'
|
||||||
import syncChannelProgress from './dialog/SyncChannelProgress.vue'
|
import syncChannelProgress from './dialog/SyncChannelProgress.vue'
|
||||||
import configInfo from "./dialog/configInfo.vue";
|
import configInfo from "./dialog/configInfo.vue";
|
||||||
|
import Vue from "vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'app',
|
name: 'app',
|
||||||
|
@ -144,11 +145,13 @@ export default {
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
count: 15,
|
count: 15,
|
||||||
total: 0,
|
total: 0,
|
||||||
serverId: this.$myServerId,
|
|
||||||
getDeviceListLoading: false,
|
getDeviceListLoading: false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
Vue() {
|
||||||
|
return Vue
|
||||||
|
},
|
||||||
getcurrentDeviceChannels: function () {
|
getcurrentDeviceChannels: function () {
|
||||||
let data = this.currentDevice['channelMap'];
|
let data = this.currentDevice['channelMap'];
|
||||||
let channels = null;
|
let channels = null;
|
||||||
|
|
|
@ -58,8 +58,8 @@
|
||||||
<el-table-column label="拉流状态" min-width="120" >
|
<el-table-column label="拉流状态" min-width="120" >
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<div slot="reference" class="name-wrapper">
|
<div slot="reference" class="name-wrapper">
|
||||||
<el-tag size="medium" v-if="scope.row.pulling && serverId !== scope.row.serverId" style="border-color: #ecf1af">正在拉流</el-tag>
|
<el-tag size="medium" v-if="scope.row.pulling && Vue.prototype.$myServerId !== scope.row.serverId" style="border-color: #ecf1af">正在拉流</el-tag>
|
||||||
<el-tag size="medium" v-if="scope.row.pulling && serverId === scope.row.serverId">正在拉流</el-tag>
|
<el-tag size="medium" v-if="scope.row.pulling && Vue.prototype.$myServerId === scope.row.serverId">正在拉流</el-tag>
|
||||||
<el-tag size="medium" type="info" v-if="!scope.row.pulling">尚未拉流</el-tag>
|
<el-tag size="medium" type="info" v-if="!scope.row.pulling">尚未拉流</el-tag>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -67,8 +67,8 @@
|
||||||
<el-table-column label="启用" min-width="120" >
|
<el-table-column label="启用" min-width="120" >
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<div slot="reference" class="name-wrapper">
|
<div slot="reference" class="name-wrapper">
|
||||||
<el-tag size="medium" v-if="scope.row.enable && serverId !== scope.row.serverId" style="border-color: #ecf1af">已启用</el-tag>
|
<el-tag size="medium" v-if="scope.row.enable && Vue.prototype.$myServerId !== scope.row.serverId" style="border-color: #ecf1af">已启用</el-tag>
|
||||||
<el-tag size="medium" v-if="scope.row.enable && serverId === scope.row.serverId">已启用</el-tag>
|
<el-tag size="medium" v-if="scope.row.enable && Vue.prototype.$myServerId === scope.row.serverId">已启用</el-tag>
|
||||||
<el-tag size="medium" type="info" v-if="!scope.row.enable">未启用</el-tag>
|
<el-tag size="medium" type="info" v-if="!scope.row.enable">未启用</el-tag>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -114,6 +114,8 @@
|
||||||
import uiHeader from '../layout/UiHeader.vue'
|
import uiHeader from '../layout/UiHeader.vue'
|
||||||
import StreamProxyEdit from "./StreamProxyEdit";
|
import StreamProxyEdit from "./StreamProxyEdit";
|
||||||
import MediaServer from "./service/MediaServer";
|
import MediaServer from "./service/MediaServer";
|
||||||
|
import Vue from "vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'streamProxyList',
|
name: 'streamProxyList',
|
||||||
components: {
|
components: {
|
||||||
|
@ -138,12 +140,14 @@
|
||||||
searchSrt: "",
|
searchSrt: "",
|
||||||
mediaServerId: "",
|
mediaServerId: "",
|
||||||
pulling: "",
|
pulling: "",
|
||||||
serverId: this.$myServerId,
|
|
||||||
mediaServerObj: new MediaServer(),
|
mediaServerObj: new MediaServer(),
|
||||||
mediaServerList: [],
|
mediaServerList: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
Vue() {
|
||||||
|
return Vue
|
||||||
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initData();
|
this.initData();
|
||||||
|
|
|
@ -52,8 +52,8 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="推流状态" min-width="100">
|
<el-table-column label="推流状态" min-width="100">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<el-tag size="medium" v-if="scope.row.pushing && serverId !== scope.row.serverId" style="border-color: #ecf1af">推流中</el-tag>
|
<el-tag size="medium" v-if="scope.row.pushing && Vue.prototype.$myServerId !== scope.row.serverId" style="border-color: #ecf1af">推流中</el-tag>
|
||||||
<el-tag size="medium" v-if="scope.row.pushing && serverId === scope.row.serverId">推流中</el-tag>
|
<el-tag size="medium" v-if="scope.row.pushing && Vue.prototype.$myServerId === scope.row.serverId">推流中</el-tag>
|
||||||
<el-tag size="medium" type="info" v-if="!scope.row.pushing">已停止</el-tag>
|
<el-tag size="medium" type="info" v-if="!scope.row.pushing">已停止</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -117,6 +117,7 @@ import importChannel from './dialog/importChannel.vue'
|
||||||
import MediaServer from './service/MediaServer'
|
import MediaServer from './service/MediaServer'
|
||||||
import StreamPushEdit from "./StreamPushEdit";
|
import StreamPushEdit from "./StreamPushEdit";
|
||||||
import ChannelEdit from "./ChannelEdit.vue";
|
import ChannelEdit from "./ChannelEdit.vue";
|
||||||
|
import Vue from "vue";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'streamPushList',
|
name: 'streamPushList',
|
||||||
|
@ -145,11 +146,14 @@ export default {
|
||||||
mediaServerList: [],
|
mediaServerList: [],
|
||||||
multipleSelection: [],
|
multipleSelection: [],
|
||||||
loading: false,
|
loading: false,
|
||||||
serverId: this.$myServerId,
|
|
||||||
streamPush: null,
|
streamPush: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {
|
||||||
|
Vue() {
|
||||||
|
return Vue
|
||||||
|
},
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initData();
|
this.initData();
|
||||||
this.updateLooper = setInterval(this.getPushList, 2000);
|
this.updateLooper = setInterval(this.getPushList, 2000);
|
||||||
|
|
|
@ -76,18 +76,21 @@ axios.interceptors.request.use(
|
||||||
Vue.prototype.$axios = axios;
|
Vue.prototype.$axios = axios;
|
||||||
Vue.prototype.$cookies.config(60 * 30);
|
Vue.prototype.$cookies.config(60 * 30);
|
||||||
|
|
||||||
// 获取本平台的服务ID
|
|
||||||
axios({
|
|
||||||
|
new Vue({
|
||||||
|
beforeCreate: function () {
|
||||||
|
// 获取本平台的服务ID
|
||||||
|
axios({
|
||||||
method: 'get',
|
method: 'get',
|
||||||
url: `/api/server/system/configInfo`,
|
url: `/api/server/system/configInfo`,
|
||||||
}).then( (res)=> {
|
}).then( (res)=> {
|
||||||
if (res.data.code === 0) {
|
if (res.data.code === 0) {
|
||||||
Vue.prototype.$myServerId = res.data.data.addOn.serverId;
|
Vue.prototype.$myServerId = res.data.data.addOn.serverId;
|
||||||
}
|
}
|
||||||
}).catch( (error)=> {
|
}).catch( (error)=> {
|
||||||
});
|
});
|
||||||
|
},
|
||||||
new Vue({
|
|
||||||
router: router,
|
router: router,
|
||||||
render: h => h(App),
|
render: h => h(App),
|
||||||
}).$mount('#app')
|
}).$mount('#app')
|
||||||
|
|
Loading…
Reference in New Issue