|
|
@@ -49,9 +49,9 @@
|
|
|
@clear="formModel.entityType = null"
|
|
|
>
|
|
|
<a-option
|
|
|
- v-for="item of entityTypeList"
|
|
|
- :value="item.value"
|
|
|
- :label="item.label"
|
|
|
+ v-for="item of deviceTypeList"
|
|
|
+ :value="item.dictCode"
|
|
|
+ :label="item.name"
|
|
|
/>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
@@ -118,7 +118,7 @@
|
|
|
row-key="name"
|
|
|
:loading="loading"
|
|
|
:pagination="pagination"
|
|
|
- :columns="(cloneColumns as TableColumnData[])"
|
|
|
+ :columns="cloneColumns as TableColumnData[]"
|
|
|
:data="renderData"
|
|
|
:bordered="false"
|
|
|
:size="size"
|
|
|
@@ -133,8 +133,8 @@
|
|
|
<template #entityType="{ record }">
|
|
|
<span>
|
|
|
{{
|
|
|
- entityTypeList.find(item => item.value === record.entityType)
|
|
|
- ?.label
|
|
|
+ deviceTypeList.find(item => item.dictCode === record.entityType)
|
|
|
+ ?.name
|
|
|
}}
|
|
|
</span>
|
|
|
</template>
|
|
|
@@ -186,7 +186,9 @@ import type { TableColumnData } from '@arco-design/web-vue';
|
|
|
import useLoading from '@/hooks/loading';
|
|
|
import { useI18n } from 'vue-i18n';
|
|
|
import { statusTypeList } from './conf';
|
|
|
-import { entityTypeList, DeviceInfo } from '@/utils/const';
|
|
|
+import { DeviceInfo } from '@/utils/const';
|
|
|
+import type { AdditionalProp } from '@/api/dict';
|
|
|
+import { getDictQueryList } from '@/api/dict';
|
|
|
import dayjs from 'dayjs';
|
|
|
import { downLoadFun } from '@/utils/const';
|
|
|
import { useIntervalFn } from '@vueuse/core';
|
|
|
@@ -260,6 +262,10 @@ const formModel = ref<DashboardParams>(generateFormModel());
|
|
|
const visible = shallowRef<boolean>(false);
|
|
|
const this_ = getCurrentInstance()?.appContext.config.globalProperties;
|
|
|
const deviceInfo = ref<DeviceInfo[]>([] as DeviceInfo[]);
|
|
|
+const deviceTypeList = ref<AdditionalProp[]>([] as AdditionalProp[]);
|
|
|
+getDictQueryList({ names: ['DeviceType'] }).then(res => {
|
|
|
+ deviceTypeList.value.push(...res.data['DeviceType']);
|
|
|
+});
|
|
|
function searchTable() {
|
|
|
// setLoading(true);
|
|
|
const [startTime, endTime] = formModel.value.time
|