Commit 063d31a19c4905a6ceecf5919cb68ffda5489566
Merge branch 'fix/DEFECT-1892' into 'main_dev'
fix: 设备详情表格排序不生效 See merge request yunteng/thingskit-front!1183
Showing
2 changed files
with
4 additions
and
4 deletions
@@ -17,7 +17,7 @@ export const getDeviceHistoryInfo = (params: Recordable, orderBy = OrderByEnum.D | @@ -17,7 +17,7 @@ export const getDeviceHistoryInfo = (params: Recordable, orderBy = OrderByEnum.D | ||
17 | return defHttp.get<HistoryData>( | 17 | return defHttp.get<HistoryData>( |
18 | { | 18 | { |
19 | url: `/plugins/telemetry/DEVICE/${params.entityId}/values/timeseries`, | 19 | url: `/plugins/telemetry/DEVICE/${params.entityId}/values/timeseries`, |
20 | - params: { orderBy, ...params, entityId: null }, | 20 | + params: { ...params, entityId: null, orderBy }, |
21 | }, | 21 | }, |
22 | { | 22 | { |
23 | joinPrefix: false, | 23 | joinPrefix: false, |
@@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
14 | import { ColEx } from '/@/components/Form/src/types'; | 14 | import { ColEx } from '/@/components/Form/src/types'; |
15 | import { useHistoryData } from '../../hook/useHistoryData'; | 15 | import { useHistoryData } from '../../hook/useHistoryData'; |
16 | import { formatToDateTime } from '/@/utils/dateUtil'; | 16 | import { formatToDateTime } from '/@/utils/dateUtil'; |
17 | - import { useTable, BasicTable, BasicColumn } from '/@/components/Table'; | 17 | + import { useTable, BasicTable, BasicColumn, SorterResult } from '/@/components/Table'; |
18 | import { | 18 | import { |
19 | ModeSwitchButton, | 19 | ModeSwitchButton, |
20 | TABLE_CHART_MODE_LIST, | 20 | TABLE_CHART_MODE_LIST, |
@@ -64,7 +64,7 @@ | @@ -64,7 +64,7 @@ | ||
64 | } | 64 | } |
65 | 65 | ||
66 | const sortOrder = ref<any>('descend'); | 66 | const sortOrder = ref<any>('descend'); |
67 | - const columns: BasicColumn[] | any = computed(() => { | 67 | + const columns = computed<BasicColumn[]>(() => { |
68 | return [ | 68 | return [ |
69 | { | 69 | { |
70 | title: '属性', | 70 | title: '属性', |
@@ -119,7 +119,7 @@ | @@ -119,7 +119,7 @@ | ||
119 | loading.value = false; | 119 | loading.value = false; |
120 | }; | 120 | }; |
121 | 121 | ||
122 | - const handleTableChange = async (_pag, _filters, sorter: any) => { | 122 | + const handleTableChange = async (_pag, _filters, sorter: SorterResult) => { |
123 | sortOrder.value = sorter.order; | 123 | sortOrder.value = sorter.order; |
124 | await setColumns(unref(columns)); | 124 | await setColumns(unref(columns)); |
125 | if (sorter.field == 'ts') { | 125 | if (sorter.field == 'ts') { |