|
|
|
|
@ -37,8 +37,12 @@
|
|
|
|
|
<div class="status-item">
|
|
|
|
|
版本号:1.0.0
|
|
|
|
|
</div>
|
|
|
|
|
<div class="status-item">
|
|
|
|
|
系统状态:<span class="status-online">开启</span>
|
|
|
|
|
<div class="status-item" v-if="status !== -1">
|
|
|
|
|
系统状态:
|
|
|
|
|
<span v-if="status === 1" class="status-online">开启</span>
|
|
|
|
|
<span v-else-if="status === 0" class="status-offline">关闭</span>
|
|
|
|
|
<span v-else class="status-offline">{{ status }}</span>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@ -54,6 +58,7 @@ import {
|
|
|
|
|
VideoPlay,
|
|
|
|
|
Bell
|
|
|
|
|
} from '@element-plus/icons-vue'
|
|
|
|
|
import RPC from '@/utils/rpc'
|
|
|
|
|
const currentTime = ref('')
|
|
|
|
|
const router = useRouter()
|
|
|
|
|
const route = useRoute()
|
|
|
|
|
@ -65,9 +70,16 @@ if (route.query.deviceName) {
|
|
|
|
|
localStorage.setItem('central_control_device_name', route.query.deviceName)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const commit_uid = localStorage.getItem('central_control_comm_uid')
|
|
|
|
|
const device_name = localStorage.getItem('central_control_device_name')
|
|
|
|
|
const status = ref(-1)
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
RPC.post('/m9z/getRelayStatus', { comm_uid: commit_uid }).then(res => {
|
|
|
|
|
status.value = res
|
|
|
|
|
})
|
|
|
|
|
})
|
|
|
|
|
const functionCards = [
|
|
|
|
|
{ key: 'monitor', title: '实时监控', icon: Camera, route: '/monitoring' },
|
|
|
|
|
{ key: 'control', title: '手动控制', icon: Operation, route: '/handle-control' },
|
|
|
|
|
@ -315,6 +327,11 @@ onUnmounted(() => {
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.status-offline {
|
|
|
|
|
color: #f12323;
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* Element Plus 卡片样式重写 */
|
|
|
|
|
:deep(.el-card) {
|
|
|
|
|
background: transparent !important;
|
|
|
|
|
|