Commit b6402422d63613f029fc19482cc137055370de4b
Merge branch 'fix/DEFECT-1904' into 'main_dev'
fix: 修复设备分布的历史数据查询中升降序未生效 See merge request yunteng/thingskit-front!1196
Showing
1 changed file
with
6 additions
and
3 deletions
| ... | ... | @@ -130,7 +130,7 @@ |
| 130 | 130 | import lx1 from '/@/assets/images/lx1.png'; |
| 131 | 131 | import { TimePeriodForm, useTimePeriodForm } from './cpns/TimePeriodForm'; |
| 132 | 132 | import { selectDeviceAttrSchema } from './config.data'; |
| 133 | - import { defaultSchemas } from './cpns/TimePeriodForm/config'; | |
| 133 | + import { OrderByEnum, defaultSchemas } from './cpns/TimePeriodForm/config'; | |
| 134 | 134 | import { QueryWay, SchemaFiled, AggregateDataEnum } from './cpns/TimePeriodForm/config'; |
| 135 | 135 | import { useAsyncQueue } from './useAsyncQueue'; |
| 136 | 136 | import { useHistoryData } from '../list/hook/useHistoryData'; |
| ... | ... | @@ -457,11 +457,14 @@ |
| 457 | 457 | await method.validate(); |
| 458 | 458 | const value = method.getFieldsValue(); |
| 459 | 459 | const searchParams = getSearchParams(value); |
| 460 | - | |
| 460 | + const { orderBy } = searchParams || {}; | |
| 461 | 461 | if (!hasDeviceAttr()) return; |
| 462 | 462 | // 发送请求 |
| 463 | 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 | 468 | loading.value = false; |
| 466 | 469 | historyData.value = getTableHistoryData(res); |
| 467 | 470 | // 判断数据对象是否为空 | ... | ... |