Commit cddce7acf89f3f8bccdda14e2b39d746ebf31c9e
Merge branch 'fix/teambition/10-10' into 'main_dev'
fix: 设备历史数据查询时,查询为升序,分页正常显示 See merge request yunteng/thingskit-front!1504
Showing
4 changed files
with
9 additions
and
4 deletions
... | ... | @@ -122,7 +122,7 @@ |
122 | 122 | loading.value = false; |
123 | 123 | }; |
124 | 124 | |
125 | - const handleTableChange = async (_pag, _filters, sorter: SorterResult) => { | |
125 | + const handleTableChange = async (page, _filters, sorter: SorterResult) => { | |
126 | 126 | sortOrder.value = sorter.order; |
127 | 127 | await setColumns(unref(columns)); |
128 | 128 | if (sorter.field == 'ts') { |
... | ... | @@ -132,6 +132,11 @@ |
132 | 132 | getTableList(OrderByEnum.ASC); |
133 | 133 | } |
134 | 134 | } |
135 | + if (page.current >= 1) { | |
136 | + const value = method.getFieldsValue(); | |
137 | + const { orderBy } = getSearchParams(value); | |
138 | + getTableList(orderBy as OrderByEnum); | |
139 | + } | |
135 | 140 | }; |
136 | 141 | |
137 | 142 | const { setOptions, getInstance } = useECharts(chartRef as Ref<HTMLDivElement>); | ... | ... |