|
|
@@ -58,7 +58,7 @@
|
|
|
</a-col>
|
|
|
<a-col :span="6">
|
|
|
<a-form-item
|
|
|
- field="statusTypeList"
|
|
|
+ field="status"
|
|
|
:label="t('dashboard.form.status')"
|
|
|
label-col-flex="60px"
|
|
|
>
|
|
|
@@ -69,9 +69,9 @@
|
|
|
@clear="formModel.status = null"
|
|
|
>
|
|
|
<a-option
|
|
|
- v-for="item of statusTypeList"
|
|
|
- :value="item.value"
|
|
|
- :label="item.label"
|
|
|
+ v-for="item of deviceStatusList"
|
|
|
+ :value="item.dictCode"
|
|
|
+ :label="item.name"
|
|
|
/>
|
|
|
</a-select>
|
|
|
</a-form-item>
|
|
|
@@ -114,7 +114,6 @@
|
|
|
</a-col>
|
|
|
</a-row>
|
|
|
<a-table
|
|
|
- class="table-list"
|
|
|
row-key="name"
|
|
|
:loading="loading"
|
|
|
:pagination="pagination"
|
|
|
@@ -141,7 +140,8 @@
|
|
|
<template #status="{ record }">
|
|
|
<BTag :status="record.status">
|
|
|
{{
|
|
|
- statusTypeList.find(item => item.value === record.status)?.label
|
|
|
+ deviceStatusList.find(item => item.dictCode === record.status)
|
|
|
+ ?.name
|
|
|
}}
|
|
|
</BTag>
|
|
|
</template>
|
|
|
@@ -185,7 +185,6 @@ import BTag from '@/components/business/b-tag/index.vue';
|
|
|
import type { TableColumnData } from '@arco-design/web-vue';
|
|
|
import useLoading from '@/hooks/loading';
|
|
|
import { useI18n } from 'vue-i18n';
|
|
|
-import { statusTypeList } from './conf';
|
|
|
import { DeviceInfo } from '@/utils/const';
|
|
|
import type { AdditionalProp } from '@/api/dict';
|
|
|
import { getDictQueryList } from '@/api/dict';
|
|
|
@@ -263,8 +262,10 @@ 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 => {
|
|
|
+const deviceStatusList = ref<AdditionalProp[]>([] as AdditionalProp[]);
|
|
|
+getDictQueryList({ names: ['DeviceType', 'DeviceStatus'] }).then(res => {
|
|
|
deviceTypeList.value.push(...res.data['DeviceType']);
|
|
|
+ deviceStatusList.value.push(...res.data['DeviceStatus']);
|
|
|
});
|
|
|
function searchTable() {
|
|
|
// setLoading(true);
|
|
|
@@ -355,9 +356,5 @@ const handleCancel = () => {
|
|
|
margin-top: 20px;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
- .table-list {
|
|
|
- margin-top: 0;
|
|
|
- }
|
|
|
}
|
|
|
</style>
|