Files
ndm-web-platform/src/components/device/device-card/ndm-alarm-host/alarm-host-current-diag.vue
T
yangsy b8ef57e417 feat: 统一并优化设备诊断页面的信息展示
重构报警主机、解码器、录像机、安防箱的设备诊断页通用信息展示逻辑,适配组件新的props格式。完善摄像头诊断相关的接口类型定义,为摄像头诊断页新增硬件使用率展示卡片,补充完整的设备基础信息和网络信息内容
2026-05-18 14:11:59 +08:00

37 lines
1.0 KiB
Vue

<script setup lang="ts">
import { NFlex } from 'naive-ui';
import { DeviceCommonCard, DeviceHeaderCard, type DeviceCommonCardProps } from '@/components';
import type { NdmAlarmHostResultVO, Station } from '@/apis';
import { computed, toRefs } from 'vue';
const props = defineProps<{
ndmDevice: NdmAlarmHostResultVO;
station: Station;
}>();
const { ndmDevice, station } = toRefs(props);
const commonInfo = computed<DeviceCommonCardProps['commonInfo']>(() => {
const { createdTime, updatedTime, manufacturer } = ndmDevice.value;
return [
{
title: '设备接入信息',
items: [
{ label: '创建时间', value: createdTime || '-' },
{ label: '更新时间', value: updatedTime || '-' },
{ label: '制造商', value: manufacturer || '-' },
],
},
];
});
</script>
<template>
<NFlex vertical>
<DeviceHeaderCard :ndm-device="ndmDevice" :station="station" />
<DeviceCommonCard :common-info="commonInfo" />
</NFlex>
</template>
<style scoped lang="scss"></style>