diff --git a/src/views/eam/basicInspectionOption/basicInspectionOption.data.ts b/src/views/eam/basicInspectionOption/basicInspectionOption.data.ts index 13bf5fff5..55e27a673 100644 --- a/src/views/eam/basicInspectionOption/basicInspectionOption.data.ts +++ b/src/views/eam/basicInspectionOption/basicInspectionOption.data.ts @@ -1,11 +1,16 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' import { dateFormatter } from '@/utils/formatTime' +import * as ItemApi from "@/api/eam/inspectionItemSelectSet"; +import { + InspectionItemSelectSet +} from "@/views/eam/inspectionItemSelectSet/inspectionItemSelectSet.data"; +import {getInspectionItemSelectSetPage} from "@/api/eam/inspectionItemSelectSet"; // 表单校验 export const BasicInspectionOptionRules = reactive({ code: [required], name: [required], - type: [required], + selectId: [required], }) export const BasicInspectionOption = useCrudSchemas(reactive([ @@ -30,6 +35,29 @@ export const BasicInspectionOption = useCrudSchemas(reactive([ sort: 'custom', isSearch: true, }, + { + label: '选择集', + field: 'selectId', + sort: 'custom', + isDetail: true, + form: { + componentProps: { + isSearchList: true, // 开启查询弹窗 + searchTitle: '巡检选择信息', // 查询弹窗标题 + searchAllSchemas: InspectionItemSelectSet.allSchemas, // 查询弹窗所需类 + searchField: 'name', // 查询弹窗赋值字段 + searchPage: ItemApi.getInspectionItemSelectSetPage, // 查询弹窗所需分页方法 + multiple:true, + searchCondition: [{ + key: 'available', + value: 'TRUE', + action: '==', + isSearch: true, + isMainValue: false + }] + } + } + }, { label: '描述', field: 'describing',