Commit 5d0d809d14ad096fe0fbb8c4cde0192bd69bc067

Authored by 张 峰林
Committed by xp.Huang
1 parent 0c81eb9e

fix: 修复设备分布的历史数据查询中升降序未生效

@@ -130,7 +130,7 @@ @@ -130,7 +130,7 @@
130 import lx1 from '/@/assets/images/lx1.png'; 130 import lx1 from '/@/assets/images/lx1.png';
131 import { TimePeriodForm, useTimePeriodForm } from './cpns/TimePeriodForm'; 131 import { TimePeriodForm, useTimePeriodForm } from './cpns/TimePeriodForm';
132 import { selectDeviceAttrSchema } from './config.data'; 132 import { selectDeviceAttrSchema } from './config.data';
133 - import { defaultSchemas } from './cpns/TimePeriodForm/config'; 133 + import { OrderByEnum, defaultSchemas } from './cpns/TimePeriodForm/config';
134 import { QueryWay, SchemaFiled, AggregateDataEnum } from './cpns/TimePeriodForm/config'; 134 import { QueryWay, SchemaFiled, AggregateDataEnum } from './cpns/TimePeriodForm/config';
135 import { useAsyncQueue } from './useAsyncQueue'; 135 import { useAsyncQueue } from './useAsyncQueue';
136 import { useHistoryData } from '../list/hook/useHistoryData'; 136 import { useHistoryData } from '../list/hook/useHistoryData';
@@ -457,11 +457,14 @@ @@ -457,11 +457,14 @@
457 await method.validate(); 457 await method.validate();
458 const value = method.getFieldsValue(); 458 const value = method.getFieldsValue();
459 const searchParams = getSearchParams(value); 459 const searchParams = getSearchParams(value);
460 - 460 + const { orderBy } = searchParams || {};
461 if (!hasDeviceAttr()) return; 461 if (!hasDeviceAttr()) return;
462 // 发送请求 462 // 发送请求
463 loading.value = true; 463 loading.value = true;
464 - const res = await getDeviceHistoryInfo({ ...searchParams, entityId }); 464 + const res = await getDeviceHistoryInfo(
  465 + { ...searchParams, entityId },
  466 + orderBy as OrderByEnum
  467 + );
465 loading.value = false; 468 loading.value = false;
466 historyData.value = getTableHistoryData(res); 469 historyData.value = getTableHistoryData(res);
467 // 判断数据对象是否为空 470 // 判断数据对象是否为空