b8ef57e417
重构报警主机、解码器、录像机、安防箱的设备诊断页通用信息展示逻辑,适配组件新的props格式。完善摄像头诊断相关的接口类型定义,为摄像头诊断页新增硬件使用率展示卡片,补充完整的设备基础信息和网络信息内容
37 lines
1.0 KiB
Vue
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>
|