diff --git a/src/views/iot/alert/record/index.vue b/src/views/iot/alert/record/index.vue index c8dcb85e4..e0bef5c9b 100644 --- a/src/views/iot/alert/record/index.vue +++ b/src/views/iot/alert/record/index.vue @@ -131,7 +131,25 @@ {{ getDeviceName(scope.row.deviceId) }} - + + + + + + + 查看消息 + + + {{ scope.row.deviceMessage }} + + - + + @@ -210,14 +228,19 @@ const filteredDeviceList = computed(() => { /** 根据产品 ID 获取产品名称 */ const getProductName = (productId: number) => { + if (!productId) { + return `-` + } const product = productList.value.find((p) => p.id === productId) return product ? product.name : `加载中...` } /** 根据设备 ID 获取设备名称 */ const getDeviceName = (deviceId: number) => { + if (!deviceId) { + return `-` + } const device = deviceList.value.find((d) => d.id === deviceId) - debugger return device ? device.deviceName : `加载中...` }
{{ scope.row.deviceMessage }}