|
|
@ -25,7 +25,7 @@ export const DeviceMaintenanceMainRules = reactive({ |
|
|
|
type: [required], |
|
|
|
classes: [required], |
|
|
|
faultType: [required], |
|
|
|
describes : [ |
|
|
|
describes: [ |
|
|
|
required, |
|
|
|
{ max: 200, message: '不得超过200个字符', trigger: 'blur' }, |
|
|
|
], |
|
|
@ -159,13 +159,13 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
placeholder: "请先选择设备" |
|
|
|
}, |
|
|
|
}, |
|
|
|
isSearch:true, |
|
|
|
search:{ |
|
|
|
isSearch: true, |
|
|
|
search: { |
|
|
|
component: 'Select', |
|
|
|
api: () => userListAll, |
|
|
|
componentProps: { |
|
|
|
collapseTags:true, |
|
|
|
collapseTagsTooltip:true, |
|
|
|
collapseTags: true, |
|
|
|
collapseTagsTooltip: true, |
|
|
|
optionsAlias: { |
|
|
|
labelField: 'nickname', |
|
|
|
valueField: 'id' |
|
|
@ -295,7 +295,7 @@ export const DeviceMaintenanceMain = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
width: 300, |
|
|
|
fixed: 'right' |
|
|
|
}, |
|
|
|
isDetail:false |
|
|
|
isDetail: false |
|
|
|
} |
|
|
|
])) |
|
|
|
|
|
|
@ -362,31 +362,38 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
field: 'maintenances', |
|
|
|
sort: 'custom', |
|
|
|
isDetail: false, |
|
|
|
formatter: (_: Recordable, __: TableColumn, cellValue) => { |
|
|
|
const cellValueList = cellValue ? cellValue.split(',') : []; |
|
|
|
return userListAll |
|
|
|
.filter(item => cellValueList.includes(item.id.toString())) |
|
|
|
.map(item => item.nickname) |
|
|
|
.join(','); |
|
|
|
}, |
|
|
|
// formatter: (_: Recordable, __: TableColumn, cellValue) => {
|
|
|
|
// let cellValueList = []
|
|
|
|
// if (Array.isArray(cellValue)) {
|
|
|
|
// cellValueList = cellValue
|
|
|
|
// } else {
|
|
|
|
// cellValueList = cellValue ? cellValue.split(',') : [];
|
|
|
|
// }
|
|
|
|
// // const cellValueList = cellValue ? cellValue.split(',') : [];
|
|
|
|
// return userListAll
|
|
|
|
// .filter(item => cellValueList.includes(item.id.toString()))
|
|
|
|
// .map(item => item.nickname)
|
|
|
|
// .join(',');
|
|
|
|
// },
|
|
|
|
isTable:false, |
|
|
|
tableForm: { |
|
|
|
type: 'Select', |
|
|
|
initOptions: userListAll, |
|
|
|
multiple:true, |
|
|
|
collapseTags:true, |
|
|
|
collapseTagsTooltip:true, |
|
|
|
multiple: true, |
|
|
|
collapseTags: true, |
|
|
|
collapseTagsTooltip: true, |
|
|
|
optionsAlias: { |
|
|
|
labelField: 'nickname', |
|
|
|
valueField: 'id' |
|
|
|
} |
|
|
|
}, |
|
|
|
form:{ |
|
|
|
form: { |
|
|
|
component: 'Select', |
|
|
|
// api: () => dutyUserList,
|
|
|
|
componentProps: { |
|
|
|
multiple:true, |
|
|
|
collapseTags:true, |
|
|
|
collapseTagsTooltip:true, |
|
|
|
multiple: true, |
|
|
|
collapseTags: true, |
|
|
|
collapseTagsTooltip: true, |
|
|
|
optionsAlias: { |
|
|
|
labelField: 'name', |
|
|
|
valueField: 'id' |
|
|
@ -394,18 +401,27 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '维修人', |
|
|
|
field: 'maintenancesName', |
|
|
|
sort: 'custom', |
|
|
|
isForm:false, |
|
|
|
isDetail:true, |
|
|
|
isTable:true, |
|
|
|
isTableForm:false |
|
|
|
}, |
|
|
|
{ |
|
|
|
label: '备件', |
|
|
|
field: 'itemNumbers1', |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
}, |
|
|
|
tableForm:{ |
|
|
|
tableForm: { |
|
|
|
isInpuFocusShow: true, // 开启查询弹窗
|
|
|
|
searchListPlaceholder: '请选择备件', |
|
|
|
searchField: 'itemNumbers1', |
|
|
|
searchTitle: '备件', |
|
|
|
multiple:true, |
|
|
|
multiple: true, |
|
|
|
searchAllSchemas: ItemSearchTable.allSchemas, |
|
|
|
searchPage: ItemApi.getItemList, |
|
|
|
searchCondition: [{ |
|
|
@ -422,7 +438,7 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
searchListPlaceholder: '请选择备件', // 输入框占位文本
|
|
|
|
searchField: 'itemNumbers1', // 查询弹窗赋值字段
|
|
|
|
searchTitle: '备件', // 查询弹窗标题
|
|
|
|
multiple:true, |
|
|
|
multiple: true, |
|
|
|
searchAllSchemas: ItemSearchTable.allSchemas, // 查询弹窗所需类
|
|
|
|
searchPage: ItemApi.getItemList, // 查询弹窗所需分页方法
|
|
|
|
searchCondition: [{ |
|
|
@ -441,9 +457,9 @@ export const DeviceMaintenanceDetail = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
sort: 'custom', |
|
|
|
table: { |
|
|
|
}, |
|
|
|
isForm:false, |
|
|
|
isDetail:false, |
|
|
|
isTable:false, |
|
|
|
isForm: false, |
|
|
|
isDetail: false, |
|
|
|
isTable: false, |
|
|
|
isSearch: false, |
|
|
|
isTableForm: false, |
|
|
|
}, |
|
|
@ -489,7 +505,7 @@ export const DeviceMaintenanceMainSecRules = reactive({ |
|
|
|
type: [required], |
|
|
|
classes: [required], |
|
|
|
faultType: [required], |
|
|
|
describes : [ |
|
|
|
describes: [ |
|
|
|
required, |
|
|
|
{ max: 200, message: '不得超过200个字符', trigger: 'blur' }, |
|
|
|
], |
|
|
@ -758,6 +774,6 @@ export const DeviceMaintenanceMainSec = useCrudSchemas(reactive<CrudSchema[]>([ |
|
|
|
width: 300, |
|
|
|
fixed: 'right' |
|
|
|
}, |
|
|
|
isDetail:false |
|
|
|
isDetail: false |
|
|
|
} |
|
|
|
])) |