|
|
@ -1,5 +1,10 @@ |
|
|
|
import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
import { |
|
|
|
BasicMaintenanceItemSelectSet |
|
|
|
} from "@/views/eam/maintenanceItemSelectSet/maintenanceItemSelectSet.data"; |
|
|
|
import * as ItemApi from "@/api/eam/maintenanceItemSelectSet"; |
|
|
|
import {getBasicMaintenanceItemSelectSetPage} from "@/api/eam/maintenanceItemSelectSet"; |
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const BasicMaintenanceOptionRules = reactive({ |
|
|
@ -30,6 +35,29 @@ export const BasicMaintenanceOption = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '选择集', |
|
|
|
field: 'selectId', |
|
|
|
sort: 'custom', |
|
|
|
isDetail: true, |
|
|
|
form: { |
|
|
|
componentProps: { |
|
|
|
isSearchList: true, // 开启查询弹窗
|
|
|
|
searchTitle: '保养选择集信息', // 查询弹窗标题
|
|
|
|
searchAllSchemas: BasicMaintenanceItemSelectSet.allSchemas, // 查询弹窗所需类
|
|
|
|
searchField: 'name', // 查询弹窗赋值字段
|
|
|
|
searchPage: ItemApi.getBasicMaintenanceItemSelectSetPage, // 查询弹窗所需分页方法
|
|
|
|
multiple:true, |
|
|
|
searchCondition: [{ |
|
|
|
key: 'available', |
|
|
|
value: 'TRUE', |
|
|
|
action: '==', |
|
|
|
isSearch: true, |
|
|
|
isMainValue: false |
|
|
|
}] |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '描述', |
|
|
|
field: 'describing', |
|
|
@ -37,10 +65,16 @@ export const BasicMaintenanceOption = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '项是否可修改默认是', |
|
|
|
label: '项是否可修改', |
|
|
|
field: 'isUpdated', |
|
|
|
sort: 'custom', |
|
|
|
dictType: DICT_TYPE.IS_UPDATED, |
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
isTable: true, |
|
|
|
isDetail: false, |
|
|
|
isSearch: true, |
|
|
|
isTableForm: false, |
|
|
|
isForm: true, |
|
|
|
form: { |
|
|
|
component: 'Switch', |
|
|
|
value: 'TRUE', |
|
|
@ -50,12 +84,12 @@ export const BasicMaintenanceOption = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '保养项', |
|
|
|
field: 'type', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: true, |
|
|
|
}, |
|
|
|
// {
|
|
|
|
// label: '保养项',
|
|
|
|
// field: 'type',
|
|
|
|
// sort: 'custom',
|
|
|
|
// isSearch: true,
|
|
|
|
// },
|
|
|
|
{ |
|
|
|
label: '创建时间', |
|
|
|
field: 'createTime', |
|
|
@ -103,14 +137,13 @@ export const BasicMaintenanceOption = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
label: '是否可用', |
|
|
|
field: 'available', |
|
|
|
sort: 'custom', |
|
|
|
form: { |
|
|
|
component: 'Switch', |
|
|
|
value: 'TRUE', |
|
|
|
componentProps: { |
|
|
|
inactiveValue: 'FALSE', |
|
|
|
activeValue: 'TRUE' |
|
|
|
} |
|
|
|
}, |
|
|
|
dictType: DICT_TYPE.TRUE_FALSE, |
|
|
|
dictClass: 'string', // 默认都是字符串类型其他暂不考虑
|
|
|
|
isTable: true, |
|
|
|
isDetail: false, |
|
|
|
isSearch: false, |
|
|
|
isTableForm: false, |
|
|
|
isForm: false, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '删除时间', |
|
|
|