|
|
@@ -206,6 +206,7 @@ import {
|
|
|
h,
|
|
|
getCurrentInstance,
|
|
|
computed,
|
|
|
+ onMounted,
|
|
|
} from 'vue';
|
|
|
import {
|
|
|
queryDashboardList,
|
|
|
@@ -221,10 +222,10 @@ import useLoading from '@/hooks/loading';
|
|
|
import { useI18n } from 'vue-i18n';
|
|
|
import dayjs from 'dayjs';
|
|
|
import { downLoadFun, DeviceInfo } from '@/utils/const';
|
|
|
-import { useIntervalFn } from '@vueuse/core';
|
|
|
import { Modal } from '@arco-design/web-vue';
|
|
|
import type { AdditionalProp } from '@/api/dict';
|
|
|
-import { getDictQueryList } from '@/api/dict';
|
|
|
+import useDictList from '@/hooks/dict-list';
|
|
|
+
|
|
|
const { t } = useI18n();
|
|
|
|
|
|
const { loading, setLoading } = useLoading(true);
|
|
|
@@ -304,10 +305,11 @@ const deviceInfo = ref<DeviceInfo[]>([] as DeviceInfo[]);
|
|
|
const deviceTypeList = ref<AdditionalProp[]>([] as AdditionalProp[]);
|
|
|
const deviceStatusList = ref<AdditionalProp[]>([] as AdditionalProp[]);
|
|
|
|
|
|
-getDictQueryList({ names: ['DeviceType', 'DeviceStatus'] }).then(res => {
|
|
|
- deviceTypeList.value.push(...res.data['DeviceType']);
|
|
|
- deviceStatusList.value.push(...res.data['DeviceStatus']);
|
|
|
+useDictList(['DeviceType', 'DeviceStatus']).then(res => {
|
|
|
+ deviceTypeList.value.push(...res['DeviceType']);
|
|
|
+ deviceStatusList.value.push(...res['DeviceStatus']);
|
|
|
});
|
|
|
+
|
|
|
function searchTable() {
|
|
|
// setLoading(true);
|
|
|
const [startTime, endTime] = formModel.value.time
|