Browse Source

EAM ——> 巡检方案关联巡检选择集

master_hella_20240701
gaojs 6 months ago
parent
commit
3015d443e2
  1. 30
      src/views/eam/basicInspectionOption/basicInspectionOption.data.ts

30
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<CrudSchema[]>([
@ -30,6 +35,29 @@ export const BasicInspectionOption = useCrudSchemas(reactive<CrudSchema[]>([
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',

Loading…
Cancel
Save