西海岸:基础设施-视频预览,增加在线离线状态显示,点击预览,提示离线

This commit is contained in:
guoyue 2022-09-28 17:31:57 +08:00
parent f79b43d261
commit f86d40feda
1 changed files with 18 additions and 2 deletions

View File

@ -505,6 +505,9 @@
}"
>
<template #bodyCell="{ column, record }">
<template v-if="isXiHaiAn && column.dataIndex === 'status'">
<span>{{ statusText[record.status] || '' }}</span>
</template>
<template v-if="column.dataIndex === 'operation'">
<a
v-if="isXiHaiAn"
@ -550,6 +553,7 @@
@change="handleTableChange"
>
<template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'operation'">
<a-button
@click="goToApply(record)"
@ -1005,8 +1009,10 @@
const rowClickData = ref(null)
//
const openVideo = (id, item) => {
if (item) {
rowClickData.value = item
//
if (item && item.status != 1) {
rowClickData.value = item;
return message.warning('当前设备离线!')
}
console.log('打开视频', id)
const param = {
@ -1884,6 +1890,10 @@
//
const dataSource = ref([])
const dataSource2 = ref([])
const statusText = ref({
0: '离线',
1: '在线',
})
const columns = ref([
{
title: '名称',
@ -1896,6 +1906,12 @@
width: '60%',
key: 'nodeName',
},
{
title: '状态',
dataIndex: 'status',
width: '10%',
key: 'status',
},
{
title: '操作',
dataIndex: 'operation',