|
@@ -8,7 +8,18 @@
|
|
|
:inline="true"
|
|
|
label-width="68px"
|
|
|
>
|
|
|
- <el-form-item :label="t('inspect.InspectionItems')" prop="item" style="margin-left: 45px">
|
|
|
+ <el-form-item :label="t('deviceForm.category')" prop="deviceClassify" style="width: 15vw" >
|
|
|
+ <el-tree-select
|
|
|
+ v-model="queryParams.deviceClassify"
|
|
|
+ :data="productClassifyList"
|
|
|
+ :props="defaultProps"
|
|
|
+ check-strictly
|
|
|
+ node-key="id"
|
|
|
+ :placeholder="t('deviceForm.categoryHolder')"
|
|
|
+ filterable
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item :label="t('inspect.InspectionItems')" prop="item" style="margin-left: 30px">
|
|
|
<el-input
|
|
|
v-model="queryParams.item"
|
|
|
:placeholder="t('inspect.itemHolder')"
|
|
@@ -115,6 +126,8 @@ import { dateFormatter } from '@/utils/formatTime'
|
|
|
import download from '@/utils/download'
|
|
|
import { IotInspectItemApi, IotInspectItemVO } from '@/api/pms/inspect/item'
|
|
|
import IotInspectItemForm from './IotInspectItemForm.vue'
|
|
|
+import {defaultProps, handleTree} from "@/utils/tree";
|
|
|
+import * as ProductClassifyApi from "@/api/pms/productclassify";
|
|
|
|
|
|
/** 巡检项 列表 */
|
|
|
defineOptions({ name: 'IotInspectItem' })
|
|
@@ -129,12 +142,14 @@ const queryParams = reactive({
|
|
|
pageNo: 1,
|
|
|
pageSize: 10,
|
|
|
item: undefined,
|
|
|
+ deviceClassify: undefined,
|
|
|
standard: undefined,
|
|
|
sort: undefined,
|
|
|
remark: undefined,
|
|
|
createTime: [],
|
|
|
deptId: undefined,
|
|
|
})
|
|
|
+const productClassifyList = ref<Tree[]>([]) // 树形结构
|
|
|
const queryFormRef = ref() // 搜索的表单
|
|
|
const exportLoading = ref(false) // 导出的加载中
|
|
|
|
|
@@ -197,7 +212,10 @@ const handleExport = async () => {
|
|
|
}
|
|
|
|
|
|
/** 初始化 **/
|
|
|
-onMounted(() => {
|
|
|
- getList()
|
|
|
+onMounted(async () => {
|
|
|
+ productClassifyList.value = handleTree(
|
|
|
+ await ProductClassifyApi.IotProductClassifyApi.getSimpleProductClassifyList()
|
|
|
+ )
|
|
|
+ await getList()
|
|
|
})
|
|
|
</script>
|