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>
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<script setup lang="ts">
|
||||
import type { NdmDeviceResultVO, NdmNvrResultVO } from '@/apis/models/device';
|
||||
import type { Station } from '@/apis/domains';
|
||||
import type { NdmDeviceResultVO, NdmNvrResultVO } from '@/apis/models';
|
||||
import { useLineDevicesQuery } from '@/composables/query/use-line-devices-query';
|
||||
import { DeviceType, DeviceTypeName, type DeviceTypeCode, type DeviceTypeKey } from '@/enums/device-type';
|
||||
import { useStationStore } from '@/stores/station';
|
||||
import { ChevronBack } from '@vicons/ionicons5';
|
||||
import { destr } from 'destr';
|
||||
import {
|
||||
NButton,
|
||||
NButtonGroup,
|
||||
@@ -30,8 +32,6 @@ import { storeToRefs } from 'pinia';
|
||||
import { h, onMounted, useTemplateRef } from 'vue';
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import { useRoute, useRouter, type LocationQuery } from 'vue-router';
|
||||
import { destr } from 'destr';
|
||||
import type { Station } from '@/apis/domains';
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive } from 'vue';
|
||||
import { NLayout, NCard, NForm, NFormItem, NInput, NButton, NFlex } from 'naive-ui';
|
||||
import { userClient } from '@/apis/client';
|
||||
import type { LoginParams } from '@/apis/models';
|
||||
import ThemeSwitch from '@/components/theme-switch.vue';
|
||||
import { useUserStore } from '@/stores/user';
|
||||
import type { LoginParams } from '@/apis/models/user';
|
||||
import { randomNum } from '@/utils/random-num';
|
||||
import { userClient } from '@/apis/client';
|
||||
import { useMutation } from '@tanstack/vue-query';
|
||||
import { NLayout, NCard, NForm, NFormItem, NInput, NButton, NFlex } from 'naive-ui';
|
||||
import { reactive } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const router = useRouter();
|
||||
import { useMutation } from '@tanstack/vue-query';
|
||||
|
||||
const formData = reactive<LoginParams>({
|
||||
username: '',
|
||||
|
||||
Reference in New Issue
Block a user