fix: deviceType column display
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import type { NdmDeviceAlarmLogResultVO } from '@/apis/models';
|
||||
import { ndmDeviceAlarmLogDefaultExportByTemplate, postNdmDeviceAlarmLogPage } from '@/apis/requests';
|
||||
import { DeviceType, DeviceTypeCode, DeviceTypeName, type DeviceTypeVal } from '@/enums/device-type';
|
||||
import { DeviceType, DeviceTypeCode, DeviceTypeName, getDeviceTypeVal, type DeviceTypeVal } from '@/enums/device-type';
|
||||
import { useCurrentAlarmsStore } from '@/stores/current-alarms';
|
||||
import { useStationStore } from '@/stores/station';
|
||||
import { downloadByData } from '@/utils/download';
|
||||
@@ -73,14 +73,14 @@ const tableColumns: DataTableColumns<NdmDeviceAlarmLogResultVO> = [
|
||||
title: '设备类型',
|
||||
key: 'deviceType',
|
||||
render: (rowData) => {
|
||||
return DeviceTypeName[(rowData.deviceType ?? DeviceType.Camera) as DeviceTypeVal];
|
||||
return DeviceTypeName[getDeviceTypeVal(rowData.deviceType)];
|
||||
},
|
||||
},
|
||||
{ title: '设备名称', key: 'deviceName' },
|
||||
{ title: '告警类型', key: 'alarmType', align: 'center' },
|
||||
{ title: '故障级别', key: 'faultLevel', align: 'center' },
|
||||
{ title: '故障编码', key: 'faultCode', align: 'center' },
|
||||
{ title: '故障位置', key: 'faultLocation' },
|
||||
// { title: '故障位置', key: 'faultLocation' },
|
||||
{ title: '故障描述', key: 'faultDescription' },
|
||||
{ title: '修复建议', key: 'alarmRepairSuggestion' },
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user