| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227 |
- import type { FormConfig } from '@/types/basic-form';
- // 特种设备设施 - 基础表单配置(新增/编辑可用,查看时外层禁用)
- export const SPECIAL_EQUIPMENT_FORM_CONFIG: FormConfig[] = [
- {
- prop: 'deviceId',
- label: '设备ID:',
- component: 'ElInput',
- componentProps: {
- placeholder: '',
- },
- },
- {
- prop: 'assetId',
- label: '设备固资ID:',
- component: 'ElInput',
- componentProps: {
- placeholder: '',
- },
- },
- {
- prop: 'deviceName',
- label: '设备名称:',
- component: 'ElInput',
- componentProps: {
- placeholder: '',
- },
- },
- {
- prop: 'useUnit',
- label: '使用单位:',
- component: 'ElInput',
- componentProps: {
- placeholder: '',
- },
- },
- {
- prop: 'categoryName',
- label: '设备类别:',
- component: 'ElInput',
- componentProps: {
- placeholder: '',
- },
- },
- {
- prop: 'typeName',
- label: '设备种类:',
- component: 'ElInput',
- componentProps: {
- placeholder: '',
- },
- },
- {
- prop: 'registerCode',
- label: '注册代码:',
- component: 'ElInput',
- componentProps: {
- placeholder: '',
- },
- },
- {
- prop: 'licenseNo',
- label: '使用证号:',
- component: 'ElInput',
- componentProps: {
- placeholder: '',
- },
- },
- {
- prop: 'deviceCode',
- label: '设备编码:',
- component: 'ElInput',
- componentProps: {
- placeholder: '',
- },
- },
- {
- prop: 'safeLocation',
- label: '安全地点:',
- component: 'ElInput',
- componentProps: {
- placeholder: '',
- },
- },
- {
- prop: 'useDepartment',
- label: '使用部门:',
- component: 'ElInput',
- componentProps: {
- placeholder: '',
- },
- },
- {
- prop: 'responsibilityDeptId',
- label: '责任部门:',
- slot: 'responsibilityDept',
- },
- {
- prop: 'responsiblePerson',
- label: '责任人:',
- component: 'ElInput',
- componentProps: {
- placeholder: '',
- },
- },
- {
- prop: 'jobNo',
- label: '工号:',
- component: 'ElInput',
- componentProps: {
- placeholder: '',
- },
- },
- {
- prop: 'factoryNo',
- label: '出厂编号:',
- component: 'ElInput',
- componentProps: {
- placeholder: '',
- },
- },
- {
- prop: 'productionDate',
- label: '生产日期:',
- component: 'ElDatePicker',
- componentProps: {
- type: 'date',
- valueFormat: 'YYYY-MM-DD',
- placeholder: '请选择生产日期',
- },
- },
- {
- prop: 'startUseDate',
- label: '启用日期:',
- component: 'ElDatePicker',
- componentProps: {
- type: 'date',
- valueFormat: 'YYYY-MM-DD',
- placeholder: '请选择启用日期',
- },
- },
- {
- prop: 'inspectionCycle',
- label: '检测周期(天):',
- component: 'ElInputNumber',
- componentProps: {
- min: 1,
- precision: 0,
- controlsPosition: 'right',
- },
- },
- {
- prop: 'useYears',
- label: '使用年限(年):',
- component: 'ElInputNumber',
- componentProps: {
- min: 1,
- precision: 0,
- controlsPosition: 'right',
- },
- },
- {
- prop: 'inspectionTime',
- label: '检测时间:',
- component: 'ElDatePicker',
- componentProps: {
- type: 'date',
- valueFormat: 'YYYY-MM-DD',
- placeholder: '请选择检测时间',
- },
- },
- {
- prop: 'deviceStatus',
- label: '设备状态:',
- slot: 'deviceStatus',
- },
- {
- prop: 'isUseDepartment',
- label: '是否使用部门:',
- slot: 'isUseDepartment',
- },
- {
- prop: 'nextInspectionDate',
- label: '下次检测时间:',
- component: 'ElDatePicker',
- componentProps: {
- type: 'date',
- valueFormat: 'YYYY-MM-DD',
- placeholder: '请选择下次检测时间',
- },
- },
- ];
- export const SPECIAL_EQUIPMENT_FORM_DATA = {
- deviceId: '',
- assetId: '',
- deviceName: '',
- useUnit: '',
- categoryName: '',
- typeName: '',
- registerCode: '',
- licenseNo: '',
- deviceCode: '',
- safeLocation: '',
- useDepartment: '',
- responsibilityDeptId: undefined as number | undefined,
- responsiblePerson: '',
- jobNo: '',
- factoryNo: '',
- productionDate: '',
- startUseDate: '',
- inspectionCycle: undefined as number | undefined,
- useYears: undefined as number | undefined,
- inspectionTime: '',
- deviceStatus: 1,
- isUseDepartment: 1,
- nextInspectionDate: '',
- };
- export const SPECIAL_EQUIPMENT_FORM_RULES = {
- deviceName: [{ required: true, message: '设备名称不能为空', trigger: 'blur' }],
- useUnit: [{ required: true, message: '使用单位不能为空', trigger: 'blur' }],
- deviceStatus: [{ required: true, message: '请选择设备状态', trigger: 'change' }],
- };
|