|
|
@ -2,6 +2,10 @@ import type { CrudSchema } from '@/hooks/web/useCrudSchemas' |
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
import * as DeviceMoldItemsApi from '@/api/eam/basic/deviceMaintenance' |
|
|
|
|
|
|
|
import { selectAllFactoryAreaDept } from '@/api/system/dept' |
|
|
|
const factoryDeptList = await selectAllFactoryAreaDept() |
|
|
|
|
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const DeviceMoldItemsRules = reactive({ |
|
|
|
name: [required], |
|
|
@ -157,6 +161,55 @@ export const DeviceMoldItems = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
value: false, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '所属厂区', |
|
|
|
field: 'factoryAreaNumber', |
|
|
|
sort: 'custom', |
|
|
|
isSearch: false, |
|
|
|
isDetail: false, |
|
|
|
table: { |
|
|
|
width: '150', |
|
|
|
}, |
|
|
|
api: () => factoryDeptList, |
|
|
|
formatter: (_: Recordable, __: TableColumn, cellValue: number) => { |
|
|
|
return factoryDeptList.find((account) => account.id == cellValue)?.name |
|
|
|
}, |
|
|
|
search: { |
|
|
|
show: true, |
|
|
|
component: 'Select', |
|
|
|
api: () => factoryDeptList, |
|
|
|
componentProps: { |
|
|
|
optionsAlias: { |
|
|
|
labelField: 'name', |
|
|
|
valueField: 'id' |
|
|
|
}, |
|
|
|
filterable: true, |
|
|
|
} |
|
|
|
}, |
|
|
|
form: { |
|
|
|
component: 'Select', |
|
|
|
api: () => factoryDeptList, |
|
|
|
componentProps: { |
|
|
|
disabled: false, |
|
|
|
optionsAlias: { |
|
|
|
labelField: 'name', |
|
|
|
valueField: 'id' |
|
|
|
}, |
|
|
|
filterable: true, |
|
|
|
placeholder: "请选择所属厂区" |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '所属厂区', |
|
|
|
field: 'factoryAreaNumberDetail', |
|
|
|
sort: 'custom', |
|
|
|
isDetail: true, |
|
|
|
isForm: false, |
|
|
|
isSearch: false, |
|
|
|
isTable: false, |
|
|
|
isTableForm: false, |
|
|
|
}, |
|
|
|
// {
|
|
|
|
// label: '是否可用',
|
|
|
|
// field: 'available',
|
|
|
|