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