fix(device-alarm-history-diag-card): throw error if deviceId is undefined/null
This commit is contained in:
@@ -78,6 +78,7 @@ const { mutate: getDeviceAlarmLogList, isPending } = useMutation({
|
||||
if (!dateTimeRange.value) throw new Error('请选择时间范围');
|
||||
const range = dateTimeRange.value as [number, number];
|
||||
const deviceId = ndmDevice.value.deviceId;
|
||||
if (!deviceId) throw new Error('该设备未配置设备ID');
|
||||
const alarmDate_ge = range[0];
|
||||
const alarmDate_le = range[1];
|
||||
const restParams: Omit<PageParams<{ id: string }>, 'model' | 'extra'> = {
|
||||
|
||||
Reference in New Issue
Block a user