离在线状态样式修改

修复未回复200ok导致catalog一直发送的bug
修改点播接口未收到视频后回复
This commit is contained in:
648540858
2020-10-13 14:46:47 +08:00
parent c6e959eb45
commit d4ae8194eb
12 changed files with 179 additions and 80 deletions

View File

@@ -35,8 +35,16 @@
</el-table-column>
<el-table-column prop="subCount" label="子节点数">
</el-table-column>
<el-table-column prop="ptztypeText" label="云台类型">
</el-table-column>
<el-table-column label="状态" width="180" align="center">
<template slot-scope="scope">
<div slot="reference" class="name-wrapper">
<el-tag size="medium" v-if="scope.row.status == 1">在线</el-tag>
<el-tag size="medium" type="info" v-if="scope.row.status == 0">离线</el-tag>
</div>
</template>
</el-table-column>
<el-table-column prop="ptztypeText" label="云台类型">
</el-table-column>
<el-table-column label="操作" width="240" align="center" fixed="right">
<template slot-scope="scope">
<el-button size="mini" icon="el-icon-video-play" v-if="scope.row.parental == 0" @click="sendDevicePush(scope.row)">预览视频</el-button>
@@ -58,17 +66,20 @@
</el-main>
</el-container>
<Loading v-if="isLoging" marginTop="-50%"></Loading>
</div>
</template>
<script>
import devicePlayer from './gb28181/devicePlayer.vue'
import uiHeader from './UiHeader.vue'
import Loading from './Loading.vue'
export default {
name: 'channelList',
components: {
devicePlayer,
uiHeader
uiHeader,
Loading
},
data() {
return {
@@ -85,7 +96,8 @@
currentPage: parseInt(this.$route.params.page),
count: parseInt(this.$route.params.count),
total:0,
beforeUrl:"/videoList"
beforeUrl:"/videoList",
isLoging: false
};
},
@@ -182,7 +194,7 @@
//通知设备上传媒体流
sendDevicePush: function(itemData) {
let deviceId = this.deviceId;
this.isLoging = true;
let channelId = itemData.channelId;
console.log("通知设备推流1" + deviceId + " : " + channelId);
let that = this;
@@ -191,6 +203,7 @@
url: '/api/play/' + deviceId + '/' + channelId
}).then(function(res) {
let ssrc = res.data.ssrc;
that.isLoging = false
that.$refs.devicePlayer.play(res.data,deviceId,channelId);
}).catch(function(e) {
});

View File

@@ -115,6 +115,7 @@
deviceId: '',
channelId: '',
tabActiveName: 'media'
};
},
methods: {

View File

@@ -1,7 +1,6 @@
<template>
<div id="app">
<el-container>
<el-header>
<uiHeader></uiHeader>
</el-header>
@@ -37,14 +36,15 @@
<el-table-column label="状态" width="180" align="center">
<template slot-scope="scope">
<div slot="reference" class="name-wrapper">
<el-tag size="medium">{{ scope.row.online==1?'在线' :'离线'}}</el-tag>
<el-tag size="medium" v-if="scope.row.online == 1">在线</el-tag>
<el-tag size="medium" type="info" v-if="scope.row.online == 0">离线</el-tag>
</div>
</template>
</el-table-column>
<el-table-column label="操作" width="240" align="center" fixed="right">
<template slot-scope="scope">
<el-button size="mini" icon="el-icon-refresh" @click="refDevice(scope.row)">刷新</el-button>
<el-button size="mini" icon="el-icon-refresh" @click="refDevice(scope.row)">刷新通道</el-button>
<el-button size="mini" icon="el-icon-s-open" type="primary" @click="showChannelList(scope.row)">查看通道</el-button>
</template>
</el-table-column>