|
|
@ -6,7 +6,7 @@ import * as DeviceMaintenanceMainApi from '@/api/eam/device/deviceMaintenanceMai |
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
import { ItemSearchTable } from '../../basic/item/item.data' |
|
|
|
import * as ItemApi from '@/api/eam/basic/item' |
|
|
|
import { validateHanset, validateInteger, validateNum } from '@/utils/validator' |
|
|
|
import { validateHanset, validateNum, validateNum100 } from '@/utils/validator' |
|
|
|
import * as UserApi from '@/api/system/user' |
|
|
|
import { useUserStore } from '@/store/modules/user' |
|
|
|
const userStore = useUserStore() |
|
|
@ -33,9 +33,9 @@ export const DeviceInspectionMainRules = reactive({ |
|
|
|
{ max: 200, message: '不得超过200个字符', trigger: 'blur' }, |
|
|
|
], |
|
|
|
maintenancePhone: [ |
|
|
|
{ validator:validateHanset, message: '输入电话格式不正确', trigger: 'blur'} |
|
|
|
{ validator: validateHanset, message: '输入电话格式不正确', trigger: 'blur' } |
|
|
|
], |
|
|
|
|
|
|
|
|
|
|
|
status: [required], |
|
|
|
type: [required], |
|
|
|
faultType: [required], |
|
|
@ -157,7 +157,7 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
label: '检修人', |
|
|
|
field: 'maintenance', |
|
|
@ -268,7 +268,7 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
dictType: DICT_TYPE.FAULT_TYPE, |
|
|
|
dictClass: 'string', |
|
|
|
form: { |
|
|
|
value: 'PM', |
|
|
|
value: 'PM', |
|
|
|
component: 'Select', |
|
|
|
componentProps: { |
|
|
|
// disabled: true,
|
|
|
@ -306,27 +306,32 @@ export const DeviceInspectionMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
width: 150, |
|
|
|
fixed: 'right' |
|
|
|
}, |
|
|
|
isDetail:false |
|
|
|
isDetail: false |
|
|
|
} |
|
|
|
])) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 表单校验
|
|
|
|
export const DeviceInspectionDetailRules = reactive({ |
|
|
|
chargePeoples:[ |
|
|
|
chargePeoples: [ |
|
|
|
required, |
|
|
|
], |
|
|
|
estimatedMinutes:[ |
|
|
|
peoples: [ |
|
|
|
required, |
|
|
|
{ validator:validateNum, message: '请输入正整数', trigger: 'blur'}, |
|
|
|
{ validator: validateNum, message: '请输入正整数', trigger: 'blur' }, |
|
|
|
{ validator: validateNum100, message: '预估人数不得超出100', trigger: 'blur' }, |
|
|
|
], |
|
|
|
estimatedMinutes: [ |
|
|
|
required, |
|
|
|
{ validator: validateNum, message: '请输入正整数', trigger: 'blur' }, |
|
|
|
], |
|
|
|
number: [required], |
|
|
|
actualMinutes: [ |
|
|
|
{ validator:validateNum, message: '请输入正整数', trigger: 'blur'}, |
|
|
|
{ validator: validateNum, message: '请输入正整数', trigger: 'blur' }, |
|
|
|
], |
|
|
|
maintenance: [required], |
|
|
|
uncompleted :[ |
|
|
|
{ required:true, message: '该项为必填项', trigger: 'blur'} |
|
|
|
uncompleted: [ |
|
|
|
{ required: true, message: '该项为必填项', trigger: 'blur' } |
|
|
|
], |
|
|
|
}) |
|
|
|
|
|
|
@ -352,9 +357,9 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
tableForm: { |
|
|
|
type: 'Select', |
|
|
|
initOptions: userList, |
|
|
|
multiple:true, |
|
|
|
collapseTags:true, |
|
|
|
collapseTagsTooltip:true, |
|
|
|
multiple: true, |
|
|
|
collapseTags: true, |
|
|
|
collapseTagsTooltip: true, |
|
|
|
optionsAlias: { |
|
|
|
labelField: 'name', |
|
|
|
valueField: 'id' |
|
|
@ -395,7 +400,7 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '人数', |
|
|
|
label: '预估人数', |
|
|
|
field: 'peoples', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
@ -410,7 +415,7 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
type: 'InputNumber', |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
label: '实际分钟', |
|
|
|
field: 'actualMinutes', |
|
|
@ -460,7 +465,7 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
{ |
|
|
|
label: '完成时间', |
|
|
|
field: 'completionTime', |
|
|
@ -502,12 +507,12 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
}, |
|
|
|
tableForm:{ |
|
|
|
tableForm: { |
|
|
|
isInpuFocusShow: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择备件', |
|
|
|
searchField: 'itemNumbers1', |
|
|
|
searchTitle: '备件', |
|
|
|
multiple:true, |
|
|
|
multiple: true, |
|
|
|
searchAllSchemas: ItemSearchTable.allSchemas, |
|
|
|
searchPage: ItemApi.getItemList, |
|
|
|
tableSelectionChange: (value) => { |
|
|
@ -528,9 +533,9 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
searchListPlaceholder: '请选择备件', // 输入框占位文本
|
|
|
|
searchField: 'itemNumbers1', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '备件', // 查询弹窗标题
|
|
|
|
multiple:true, |
|
|
|
searchAllSchemas: ItemSearchTable.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ItemApi.getItemList, // 查询弹窗所需分页方法
|
|
|
|
multiple: true, |
|
|
|
searchAllSchemas: ItemSearchTable.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ItemApi.getItemList, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
|
key: 'number', |
|
|
|
value: 'deviceNumber', |
|
|
@ -547,9 +552,9 @@ export const DeviceInspectionDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
}, |
|
|
|
isForm:false, |
|
|
|
isDetail:false, |
|
|
|
isTable:false, |
|
|
|
isForm: false, |
|
|
|
isDetail: false, |
|
|
|
isTable: false, |
|
|
|
isSearch: false, |
|
|
|
isTableForm: false, |
|
|
|
}, |
|
|
|