refactor: reorganize files
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { postNdmDeviceAlarmLogPage, type NdmDeviceAlarmLogResultVO, type NdmDeviceResultVO, type PageParams } from '@/apis';
|
||||
import { pageDeviceAlarmLogApi, type NdmDeviceAlarmLogResultVO, type NdmDeviceResultVO, type PageParams } from '@/apis';
|
||||
import { renderAlarmDateCell, renderAlarmTypeCell, renderFaultDescriptionCell, renderFaultLevelCell } from '@/components';
|
||||
import { useMutation } from '@tanstack/vue-query';
|
||||
import { NCard, NDataTable, type DataTableColumns, type DataTableRowData, type DatePickerProps, type PaginationProps } from 'naive-ui';
|
||||
@@ -86,11 +86,16 @@ const { mutate: getDeviceAlarmLogList, isPending } = useMutation({
|
||||
sort: 'id',
|
||||
order: 'descending',
|
||||
};
|
||||
const res = await postNdmDeviceAlarmLogPage(stationCode.value, {
|
||||
model: { deviceId },
|
||||
extra: { alarmDate_ge, alarmDate_le },
|
||||
...restParams,
|
||||
});
|
||||
const res = await pageDeviceAlarmLogApi(
|
||||
{
|
||||
model: { deviceId },
|
||||
extra: { alarmDate_ge, alarmDate_le },
|
||||
...restParams,
|
||||
},
|
||||
{
|
||||
stationCode: stationCode.value,
|
||||
},
|
||||
);
|
||||
return res;
|
||||
},
|
||||
onSuccess: ({ records, size, total }) => {
|
||||
|
||||
Reference in New Issue
Block a user