|
@@ -8,15 +8,16 @@
|
|
|
:inline="true"
|
|
|
label-width="68px"
|
|
|
>
|
|
|
- <el-form-item :label="t('info.deviceClass')" prop="deviceType" style="margin-left: 25px">
|
|
|
- <el-select
|
|
|
+ <el-form-item :label="t('deviceForm.category')" prop="deviceType" style="width: 15vw" >
|
|
|
+ <el-tree-select
|
|
|
v-model="queryParams.deviceType"
|
|
|
- :placeholder="t('info.classHolder')"
|
|
|
- clearable
|
|
|
- class="!w-240px"
|
|
|
- >
|
|
|
- <el-option label="请选择字典生成" value="" />
|
|
|
- </el-select>
|
|
|
+ :data="productClassifyList"
|
|
|
+ :props="defaultProps"
|
|
|
+ check-strictly
|
|
|
+ node-key="id"
|
|
|
+ :placeholder="t('deviceForm.categoryHolder')"
|
|
|
+ filterable
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item :label="t('info.faultySystem')" prop="failureSystem">
|
|
|
<el-input
|
|
@@ -126,6 +127,8 @@ import { dateFormatter } from '@/utils/formatTime'
|
|
|
import download from '@/utils/download'
|
|
|
import { IotInformationDbApi, IotInformationDbVO } from '@/api/pms/information'
|
|
|
import IotInformationDbForm from './IotInformationDbForm.vue'
|
|
|
+import {defaultProps, handleTree} from "@/utils/tree";
|
|
|
+import * as ProductClassifyApi from "@/api/pms/productclassify";
|
|
|
|
|
|
/** 故障知识库 列表 */
|
|
|
defineOptions({ name: 'IotInformationDb' })
|
|
@@ -135,6 +138,7 @@ const { t } = useI18n() // 国际化
|
|
|
|
|
|
const loading = ref(true) // 列表的加载中
|
|
|
const list = ref<IotInformationDbVO[]>([]) // 列表的数据
|
|
|
+const productClassifyList = ref<Tree[]>([]) // 树形结构
|
|
|
const total = ref(0) // 列表的总页数
|
|
|
const queryParams = reactive({
|
|
|
pageNo: 1,
|
|
@@ -211,7 +215,10 @@ const handleExport = async () => {
|
|
|
}
|
|
|
|
|
|
/** 初始化 **/
|
|
|
-onMounted(() => {
|
|
|
- getList()
|
|
|
+onMounted(async () => {
|
|
|
+ productClassifyList.value = handleTree(
|
|
|
+ await ProductClassifyApi.IotProductClassifyApi.getSimpleProductClassifyList()
|
|
|
+ )
|
|
|
+ await getList()
|
|
|
})
|
|
|
</script>
|