chore: reorder import
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
<script setup lang="ts">
|
||||
import { ref, reactive, onBeforeMount, h } from 'vue';
|
||||
import dayjs from 'dayjs';
|
||||
import type { NdmDeviceAlarmLogResultVO } from '@/apis/models';
|
||||
import { defaultExportByTemplate, postNdmDeviceAlarmLogPage } from '@/apis/requests';
|
||||
import { JAVA_INTEGER_MAX_VALUE } from '@/constants';
|
||||
import { DeviceType, DeviceTypeName, type DeviceTypeCode } from '@/enums/device-type';
|
||||
import { useStationStore } from '@/stores/station';
|
||||
import { downloadByData } from '@/utils/download';
|
||||
import { useMutation } from '@tanstack/vue-query';
|
||||
import dayjs from 'dayjs';
|
||||
import type { DataTableColumns, DataTableRowData, PaginationProps, SelectOption } from 'naive-ui';
|
||||
import { NForm, NInput, NButton, NSpace, NDataTable, NFormItemGi, NGrid, NSelect, NGridItem, NDatePicker } from 'naive-ui';
|
||||
import { DeviceType, DeviceTypeName, type DeviceTypeCode } from '@/enums/device-type';
|
||||
import { defaultExportByTemplate, postNdmDeviceAlarmLogPage } from '@/apis/requests/log/ndm-device-alarm-log';
|
||||
import type { NdmDeviceAlarmLogResultVO } from '@/apis/models/device';
|
||||
import { useStationStore } from '@/stores/station';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { downloadByData } from '@/utils/download';
|
||||
import { JAVA_INTEGER_MAX_VALUE } from '@/constants';
|
||||
import { ref, reactive, onBeforeMount, h } from 'vue';
|
||||
|
||||
const stationStore = useStationStore();
|
||||
const { stationList } = storeToRefs(stationStore);
|
||||
@@ -95,7 +95,7 @@ const tablePagination = reactive<PaginationProps>({
|
||||
},
|
||||
});
|
||||
|
||||
const { mutate: getAlarmList, isPending } = useMutation({
|
||||
const { mutate: getAlarmList, isPending: isTableLoading } = useMutation({
|
||||
mutationFn: async () => {
|
||||
const res = await postNdmDeviceAlarmLogPage('', {
|
||||
model: {},
|
||||
@@ -214,7 +214,7 @@ onBeforeMount(() => getAlarmList());
|
||||
<NGridItem>
|
||||
<NSpace>
|
||||
<NButton @click="onClickReset">重置</NButton>
|
||||
<NButton type="primary" :loading="isPending" @click="onClickQuery">查询</NButton>
|
||||
<NButton type="primary" :loading="isTableLoading" @click="onClickQuery">查询</NButton>
|
||||
</NSpace>
|
||||
</NGridItem>
|
||||
</NGrid>
|
||||
@@ -231,7 +231,7 @@ onBeforeMount(() => getAlarmList());
|
||||
|
||||
<!-- 表格区域:填满剩余空间 -->
|
||||
<div style="flex: 1 1 auto; min-height: 0; padding: 8px">
|
||||
<NDataTable remote :columns="tableColumns" :data="tableData" :pagination="tablePagination" :loading="isPending" :single-line="false" flex-height style="height: 100%" />
|
||||
<NDataTable remote :columns="tableColumns" :data="tableData" :pagination="tablePagination" :loading="isTableLoading" :single-line="false" flex-height style="height: 100%" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user